Details Of How The DC Online Voting System Was Hacked: Small Vulnerability, Huge Consequences

from the validate,-validate,-validate dept

We already wrote about the news that some folks at the University of Michigan had successfully hacked an online voting trial in DC, and suggested that Alex Halderman was the guy behind it (though, he was not identified in the press). Halderman has now written a blog post noting that, indeed, it was him and a few others, and providing a pretty thorough explanation of what happened. The DC project had called on anyone to try to hack it during an open hack period, though they only gave three days notice. Still, it didn't take long for Halderman, two PhD. students and a member of UMich's technical staff to find a vulnerability:
The problem, which geeks classify as a "shell-injection vulnerability," has to do with the ballot upload procedure. When a voter follows the instructions and uploads a completed ballot as a PDF file, the server saves it as a temporary file and encrypts it using a command-line tool called GnuPG. Internally, the server executes the command gpg with the name of this temporary file as a parameter: gpg [...] /tmp/stream,28957,0.pdf.

We realized that although the server replaces the filename with an automatically generated name ("stream,28957,0" in this example), it keeps whatever file
extension the voter provided. Instead of a file ending in ".pdf," we could upload a file with a name that ended in almost any string we wanted, and this string would become part of the command the server executed. By formatting the string in a particular way, we could cause the server to execute commands on our behalf. For example, the filename "ballot.$(sleep 10)pdf" would cause the server to pause for ten seconds (executing the "sleep 10" command) before responding. In effect, this vulnerability allowed us to remotely log in to the server as a privileged user.
Also, while the press pointed out the fact that after people voted the University of Michigan fight song played, that was hardly the only thing that these researchers did. The reason it got attention was that after they successfully made a bunch of changes to the system, they didn't tell anyone just to see how good the voting system's intrusion detection system was -- and it still took a while for anyone to notice. And it wasn't even the voting system folks who figured it out. Apparently, it was other testers who came across the fight song (hence that being what got reported in the press). They also changed all the votes to write-in candidates they liked and set the system to automatically change all future votes to the same candidates. You can see the ballot that they used to replace all of the votes below. You might like some of their write-in choices.
Of course, that's all fun and games, but this revealed a bunch of serious issues. Beyond the fact that the hack basically gave them total control of the system (yikes) and the fact that any intrusion detection system didn't work even though these guys did almost nothing to hide their trail, they were also able to install:
a back door that let us view any ballots that voters cast after our attack. This modification recorded the votes, in unencrypted form, together with the names of the voters who cast them, violating ballot secrecy.
Think about that for a second. This wasn't just a little hack. This was a big, big deal, for a voting system that someone had hoped to actually use in real elections next month. As Halderman notes, this does not bode well for internet voting:
We've found a number of other problems in the system, and everything we've seen suggests that the design is brittle: one small mistake can completely compromise its security. I described above how a small error in file-extension handling left the system open to exploitation. If this particular problem had not existed, I'm confident that we would have found another way to attack the system.
And just think: this was done in just a few days with a voting commission that was open to outsiders trying to hack the system. In the meantime, most of us will use electronic voting equipment next month that has not been subject to any sort of tests like that, and probably includes similarly damaging vulnerabilities (though, thankfully, not via the internet).

Reader Comments

Subscribe: RSS

View by: Time | Thread


  1. icon
    Hulser (profile), 6 Oct 2010 @ 11:37am

    Re:

    Not really - if it's ever discovered that some type of fraud did in fact take place, having tight security that only a few can get past takes an IMMENSE amount of options away from one's "plausible deniability".

    I disagree. Imagine some secret government cabal. Their trusted tech guys presents to them a plan whereby they can control the election results using a "shell-injection vulnerability". The catch? That a bunch of college kids could also control the election results if they figure out the hack. Oh, and by the way, it's been proven that hacks like these can be discovered in a matter of days with relatively little effort. I've never made a pitch to a secret government cabal -- that you know of -- but I'd be fearful of my job (if not my life) if I presented a plan like this. Plausible deniability might be a factor, but it would be so overshadowed by the possibility that the system would be rehacked that it wouldn't be worth the effort.

Add Your Comment

Have a Techdirt Account? Sign in now. Want one? Register here
Get Techdirt’s Daily Email
Use markdown for basic formatting. HTML is no longer supported.
  Save me a cookie
Follow Techdirt
Techdirt Gear
Shop Now: I Invented Email
Advertisement
Report this ad  |  Hide Techdirt ads
Essential Reading
Techdirt Deals
Report this ad  |  Hide Techdirt ads
Techdirt Insider Chat
Advertisement
Report this ad  |  Hide Techdirt ads
Recent Stories
Advertisement
Report this ad  |  Hide Techdirt ads

Close

Email This

This feature is only available to registered users. Register or sign in to use it.