In a series of events that sounds like it was pulled from the 1983 film WarGames, a US college student faces a 20-year jail sentence for allegedly hacking his way to the top of his class.

Trevor Graves, 22, was arrested by the FBI last month for allegedly installing keylogger malware on college computers at the University of Iowa, which allowed him to collect the login details and passwords of the professors who used them.

Once he had these details, Graves then proceeded to procure advance copies of tests and changed his grades on assignments for both himself and five other students. According to the New York Times, Graves allegedly used this system to change his grades over 90 times in a 21 month period.

Graves’s scheme was busted back in December last year when a professor noticed that some test scores had been changed without her approval. At that point, the university’s IT department was contacted, who in turn involved the authorities.

The FBI conducted its own investigation, interviewing several students who pointed investigators towards Graves. A search of Graves’s off-campus apartment revealed keyloggers and thumbdrives that contained copies of tests and a boatload of text messages to other students detailing the scheme.

The University of Iowa has told the FBI that since the scheme was uncovered, $68 000 has been spent on beefing up the campus’s cyber security measures.

If all this sounds like the plot for some teen comedy, it’s not – Graves is in very serious trouble. He’s been charged with intentionally accessing a computer without authorisation to obtain information, and knowingly transmitting a computer program to cause damage. Both of these charges carry a maximum sentence of 10 years each. If found guilty – and if the presiding judge decides to show no leniency – Graves could face 20 years in prison. He probably would’ve been better off hitting the books.