tags:

views:

212

answers:

4

Hello!

I have a project to create a program, which prevents the user from escaping a GUI program. The program is designed for students to take exams in. The program contains a web browser page.

I have looked around and asked in different places how I should do this, and I have been recommended Qt. I am now having second thoughts about it...

I am using ubuntu 9.04 64 bits.

What do you think is the best solution for jailing users in GUI programs?

+7  A: 

First of all, see this answer.

The best way to prevent users from using anything else is to use full-screen mode and not to start a window manager at all. So just start X and then your app and nothing else.

[EDIT] Some things you must take care of:

  • Disable the switching to the text console (usually Ctrl-Alt-F1..F10)
  • Killing the X server (Ctrl-Alt-Backspace)
  • Magic Keys (Alt-SysRq-...)

As you see, this can become arbitrarily complex. Therefore, I suggest to close some of the holes and let the hackers waste their time on the other ones. If they want to spend their time hacking the computer instead on the test, that's OK.

Aaron Digulla
Good start, how ever this takes a lot more effort than you can anticipate. I could do Ctrl-F1, login at the console and start a second X server. And so on.
Niels Basjes
Yes. But you're on the clock. So if you want to spend half an hour to hack the computer, you're going to fail.
Aaron Digulla
+2  A: 

The first thing you'll want to do is disable the Ctrl-Alt-Backspace key combination in order to keep pesky users from shutting off your X server.

When it comes to what to write it in, I think your friends idea of Qt is a good one, you can probably write the whole program in something on the order of 50 lines. If all you care about is "Home", "Back", and "Forward" buttons, you can make a simple toolbar, and use the QWebView widget to do your actual web viewing. This would prevent the user from going anywhere since they wouldn't have an address bar, and they would still be able to take their test.

If you want to use an engine other than WebKit, you will probably end up with a lot more work, and WebKit should work on most websites anyway.

Jason E
+1 for disabling CA-BS
Aaron Digulla
I wouldn't just disable it, I would add a scary message.
patros
I agree with patros. If you log all of the test-takers' "hacking" attempts with the test results, and give them a message to that effect, it will dissuade them from trying because if they fail to hack the machine and adequately cover their tracks, there will be evidence that they cheated.
rmeador
In addition to disabling all keys except the minimum required for the GUI program, and if the GUI program handled student authentication, I would make the GUI program the login program for a passwordless chrooted test takers account.
David Harris
A: 

I think the best solution is proctors and either video recording or system logging for unacceptable usage (e.g., process list snapshots).

What's your plan to stop people from bringing in materials? Or consult their iPhone during the exam? Or asking their neighbors? You don't need technology to solve a policy problem.

Jim Zajkowski
If you can solve part of your policy problem with technology, then you can make better use of your time enforcing the rest of the policy problem.
Rob Kennedy
+3  A: 

What are you trying to prevent?

My guess is that the main thing is a restriction to ensure they don't Google the answers.

As a completely different alternative approach: Criple the network stack to the point it can (just about) only reach the required server(s).

This can be done with a few (relatively effective) and simple settings:

  • No default gateway, only a gateway for the subnet where the exam server is located.
  • No DNS servers at all, only a fixed hosts file ( OR a exam DNS server that only contains the exam servers).

These settings can even be attained by tuning the DHCP server. This makes it easy to 'criple/uncriple' an entire training room with a setting and a reboot of all the systems.

Niels Basjes