

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Corey Shaw and Derek Sessions
The code was scanned by hand for all hacks. For the first scan, pair programming was used to scan over both code bases for any hacks. Then we split up and performed a more detailed and thorough scan on each project (we each took one to look over.) The results of our scans were put together and the results were logged in the document. Overall, we found that the most effective tactic was splitting the projects up to do a more thorough scan. This most likely resulted from us being able to spend more time on each project (since we only had one to worry about) and thus spend more time per line of code. We did not look into the use of automated tools.
Eclipse was used for perusing the code and we made extensive use of its ‘References’ and search functionality, as well as some of its other useful IDE features.
Hack Remove past votes using the “Start Over” button.
Implementation: A multitude of actionListeners have been placed within BallotControl.java for control of many of the buttons used within the interface. A small statement [((LinkedList) castBallots).removeLast();] was placed within the actionListener for the “Start Over” button used when a voter, while reviewing their ballot, wishes to start voting from scratch. Upon pressing this button it will remove the last vote cast.
Motivation This hack can be used either once or multiple times to remove past votes. Assuming that the arrival of votes is completely random, this would not be able to shift the election towards one candidate. However, it could be used in districts where a candidate is unpopular to create a discrepancy in vote counts and cause confusion and cast doubt on the election.
Hack “Trust us, it works fine” label will clear the election results when clicked.
Implementation: A mouse listener was added to the caption label in BallotGUI that will end the election when pressed and reset the ballot when released, effectively erasing all votes that have been already cast. The machine will appear to continue to function normally so the election will proceed as planned, sans all votes already cast on the
targeted machine.
Motivation This hack can clear out all cast ballots in an instant and does not disable the machine, so it is rather powerful. It could be used either midday to cause a ruckus when the election ends and the number of voters and cast ballots does not add up, or could be used to delete all of the votes at the end of the election to completely invalidate a machine or even a full district. Either way, this is a destructive hack used to cast doubt on an election.
The source code was immensely helpful in this project, as almost all of the hacks we found were a result of inspecting code and flagging areas that looked out of place. Our preliminary and sparse black box testing yielded no results for this code base. Beyond that, we would have been lost to find any of the other hacks and bugs that were introduced. It is possible that we could have found the bugs that affect the ‘Start over’ button, with enough testing, but given our method we simply found it via source code inspection.
One reason that this was such a helpful thing is that Java is a very difficult language to do strange or tricky things in. It is very verbose, so most hacks require adding several lines of code just to do one thing. Java also does not have pointers, so data flow is much easier to determine. The hacks would have been much more difficult to find even given the source code had the voting machine been written in C or C++.