17

We would like to make an interactive exhibition piece foolproof, requiring as little staff presence as possible when recovering it from anything anyone made it do.

It has a text input and then it outputs something. I figured the easiest would be to not give them a mouse at all, just a keyboard that is always focused on the single input field. And then disable every shortcut and special key possible, remaining only with letters, space, backspace and enter.

We are flexible in terms of OS and wether the UI is a HTML page or a desktop app. But obviously windows (or a standard linux distro) and a HTML page would be best. We may need GPU drivers for the backend.

Tried googleing around, but maybe I haven't stumbled on the right keywords, because we are not the first ones having this problem. But then again, most interactive exhibits are very poorly secured.

alparius
  • 189
  • 1
  • 5

8 Answers8

30

Remove all the 'illegal' key-caps & mount the keyboard behind a cutout so only allowed keys are exposed.

No 'illegal' keys available to press, no need to do anything special to the OS. You keep your supervisor keyboard behind the scenes.


I used to work with 'multimedia' displays for retail. In retail you quickly discover that the only way to stop the public messing things up is to remove literally all access that can mess it up. We used to mount keyboards like this in made-to-measure steel cases, bolted down. Anything less & someone would manage to break it or steal it. Don't buy a flimsy keyboard, or a skinny one people can easily flip the key caps out of… or they will.

Note that amongst the things people like to do, other than just steal all the key caps, is - delete your app &/or anything else they can get to. Change the desktop picture to something really, really inappropriate… or my favourite… set a supervisor password, thereby locking you out of your own machine.

Anecdotally, the funniest one [& very expensive for the company involved because they wouldn't let us VPN into the system so it always had to be an on-site visit, for which we charged them a fortune] was that the customers couldn't break it but the staff could. The staff would wonder why it didn't have internet access. They'd 'cleverly' spot DHCP was off & enable it. That would break the entire structure, so they had internet [which it wasn't supposed to] but their app wouldn't work, as it was hard-coded to their own internal server, 10 yards away in the office. Oh how I laughed every time… & took the money to 'fix' it which took, of course, about 30 seconds.

Tetsujin
  • 50,917
17

What you're looking for is called "kiosk".

Depending on your budget you could buy or rent a dedicated machine. They are called "interactive kiosk" or "kiosk computer". They come with a fairly safe touchscreen or sturdy builtin keyboard. Often they have a trackball.

If you consider it to be too expensive and want to spend time instead, you should take a dedicated operating system like Porteus Kiosk that allows you to disable everything you'd want to disable and restores the computer to initial configuration on every restart even if someone manages to screw it up. But you'd have to manage hardware safety yourself — lock the tower in some enclosure, prevent vandalism as needed and so on.

But obviously windows (or a standard linux distro) and a HTML page would be best.

Sorry, I don't think any standard OSes are suited for this role. But the app itself can surely be a web app (i.e. an HMTL page) and that's probably the easiest and most supported option that would be supported be nearly any kiosk solution.

Džuris
  • 543
11

If it fits in your budget you could also consider using a touchscreen and developing a simple JS keyboard

miniBill
  • 446
9

I've done something like this in order to use a USB number-pad as a custom control input for a piece of software.

Basically, rather then dealing with OS protections or other options, open the "safe" keyboard directly with libusb.

That gives you a full keyboard with a (relatively) simple interface, that literally cannot interact with anything but your specific application. When I did this, I masked the specific keyboard from the platform HID drivers by VID, so it wouldn't show up as a normal keyboard if my software wasn't running.

You can configure windows and/or linux to use libusb for specific USB VID/PID tuples.

Accessing the system in non-kiosk-mode is as simple as just using a keyboard from a different manufacturer, or with a different part-number.

Fake Name
  • 2,609
6

You could use the Linux DRM API to draw directly to the screen using e.g. libcairo (Which has font-rendering support), intercept input events with libinput, and disable all vttys. Probably overkill, but it will give you full control over your software stack, preventing the abuse of keyboard-shortcut, visiting of malicious websites, opening of applications, etc. From what I have heard from people in the industry, some car manufacturers and advertisement billboards use this method, amongst others.

yyny
  • 161
6

This could be a good use case for one of the embedded versions of Windows.

Windows 10 IoT Core is a stripped-down, minimalistic build of Windows that only allows a single, pre-defined UWP program to run in the foreground. There's no taskbar or desktop, so it's not even obvious that you're running Windows. You'd design your program to run fullscreen, and the system would boot straight into it at startup.

The various IoT flavors of Windows also have a number of other features that may be useful for your use case (some features only available in certain editions):

  • Unified Write Filter - prevent writes to the hard drive. Writes instead go to a virtual overlay which gets cleared on reboot. If someone messes up the system, simply reboot and you're back to normal.
  • Keyboard Filter - block certain key presses or combinations.
  • Shell Launcher - use your program as the OS "shell" instead of the normal desktop/taskbar. When the program terminates, it will be re-launched.
bta
  • 754
1

As other people mentioned, a "Kiosk mode" will be useful. With this answer, I'd like to recommend a specific product.

Find here the Safe Exam Browser: https://safeexambrowser.org/download_de.html

With this browser, you can easily switch the kiosk mode on and off and you can configure it.

There is an alliance of several universities and other insitutions behind the development. I used this browser while I was working in a University between didactics and media a couple of years ago.

The browser is considered a safe thing, however in rare cases somebody finds a security hole, like it recently happened:

https://www.zentralplus.ch/beruf-bildung/15-jaehriger-zuger-erhackt-sicherheitsleck-bei-pruefungsplattform-2388863/

I hope, this browser brings your project forward.

0

The "easy way" is to use xmodmap. I suspect this might be easily defeated by someone, but I don't know how, so if you know how, please comment.

Quick start:

$ xmodmap -pke > xmodmap-existing
$ xmodmap -pm > xmodmap-existing-modifiers
$ cp xmodmap-existing xmodmap-restricted
$ vi xmodmap-restricted

Using vi or your favorite editor, change all keys you don't want to NoSymbol or space or something. Also disable the Crtl/Alt/Windows modifier keys by adding at the beginning:

clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
clear Control

Then apply the restricted keyboard:

$ xmodmap xmodmap-restricted

The changes take effect until either you restart (easiest) or return to the original setup using xmodmap xmodmap-existing. (To undo the clear of Ctrl/Alt/Windows modifier keys, you'll need to add at the end some lines like add Control = Control_L Control_R. Refer to the earlier output from xmodmap -pm to get the correct modifier codes for your specific setup.)

krubo
  • 863