28 June 2010

Dead man's switch

A dead man's switch is, in Wikipedia's words, "is a switch that is automatically operated in case the human operator becomes incapacitated" and beside being a simple but cool project to work on, it may prove useful if you for example got threatened - your friends may notice you disappeared from the face of the internet, but will not be sure what is it about and won't know which actions to take.

So here is how I coded my own using some very simple Bash and php scripts (precise details are left out to diminish the possibility of an attack): there is a cron job running at a predefined interval, every N days. IT checks for an existence of a file, if the file exists, it is deleted and I am sent a reminder to update my status. If the file does not exists, then it assumes I was incapacitated and unable to update my status in the last N days, so it releases the payload, publishing some important content on the web.

The reminder directs me to a web page where the viewer is asked for a secret password, if the correct password is entered the status is updated, the check file restored. Every operation there is logged.

For security reasons, the software does not run on any of my computers or, if that matters, on any computer in my country, so it can't be reached by any person who has physical contact with me.

The code is trivial and sloppy, with sensitive info inside, so it is not worth or sane to publish the sources, but I am sure any of my readers can reimplement it in a matter of minutes, a couple of hours at most, reading the design specifications above.

Note: if you wonder, I did not got threatened by anyone in the FLOSS world or software world nor I feel in any immediate danger, is mostly a geeky exercise.

11 comments:

  1. Ok, what secret information did you steal? :)

    ReplyDelete
  2. Nothing :D just I got some threats from a very dubious person and thought MAD is an useful safeguard, even if the law in on my side.

    ReplyDelete
  3. Are you making use of the recently released GoogleCL to post content to blogspot from within a bash script?

    ReplyDelete
  4. @Dan: no, I am using a more traditional approach as I can't install software on the server hosting this system but GoogleCL is really cool.

    ReplyDelete
  5. [Possibility of events, in increasing order]

    What if you forget your password?
    What if you forget to operate computers?
    What if someone ties you in the basement for N-1 days and forces you to update the status, continuing in a cycle?
    What if the web experience a netsplit and your server is the only one in a side?
    What if the server turns hostile and take the bad man's side?

    ReplyDelete
  6. susmit said...
    > What if you forget your password?

    I have multiple means to get to the files, don't make me to disclose them in public

    > What if you forget to operate computers?

    LOL

    > What if someone ties you in the basement for N-1 days and forces you to update the status, continuing in a cycle?

    That's the most likely scenario to circumvent this system

    > What if the web experience a netsplit and your server is the only one in a side?

    For a whole N days? N is large enough to ensure this will not gonna happen... well, it may happen in the event of World War III, but then the server would be the last of our problems.

    > What if the server turns hostile and take the bad man's side?

    Unlikely

    Thanks Susmit, such discussion is what I was expecting as a result of the post ...and also maybe ideas to improve its design.

    ReplyDelete
  7. What if you forget to use the system and the "doomsday device" goes off unintentionally?

    ReplyDelete
  8. @AcursedKnight: by definition you must use a system that you WILL use no matter what, you know... like eating breakfast or so. And the device is not triggered instantly, it has a grace period... you you may skip the breakfast one day, but will not skip it for a whole week.

    ReplyDelete
  9. Greetings from Draco Horriblis. Speaking as someone who has lost his lap top, do to theft. I am serious about having a dead man switch running on my laptop from now on. For the purpose of having personal information wiped, Along with that of my clients, thus keeping it out of the hands of criminals. For all you pornsters out there yes I do have a few wickedweasel bikini pictures. What can I say I'm a guy. However they aren't my concern. To respond to issues of forgotten passwords. Just remember the first three rules of computer using, back-up, back-up, and back-up. Now while I was using encrypted containers, one for each client. I would sleep better at night knowing that some geek wouldn't be cracking an AES-Twofish encrypted container someday in the future. For those of you who might respond "oh they can't do that" just remember what can't be done today, can be done tomorrow.

    ReplyDelete
  10. Indeed, is useful to have such a protection for your laptop, still a "dead man switch" is something different: a device checking if you are still alive or not.

    ReplyDelete
  11. The principle is still the same. If the object, or device, is no longer in the possession of the authorized personnel. Determined by the correct password not being entered at the specified time, irrespective of that person being alive or dead, then a specific task is executed. A dead man switch such as the type employed on some common carriers dosen’t actually check to determine if the authorized user is alive, but rather that the lever is still compressed. If the operator releases the lever for any reason what so ever then the vehicle, such as a subway train, then comes to a complete stop. The original design concept was to ensure the the common carrier would stop running in the event that the authorized operator were to have a heart attack or some other occurrence in which he, or she, were to become incapacitated. Such as a fatality.

    ReplyDelete