A teenager was arrested in North Carolina on Wednesday after a months-long investigation led authorities to believe that he broke into a high school computer system and altered several students’ grades in a Ferris Bueller-styled hack.

High school senior Saivamsi Hanumanthu, 17, faces charges of felony accessing government computers, felony breaking and entering and misdemeanor accessing government computers. If convicted, he could be sentenced to more than four years behind bars.

Police in Cary, North Carolina, launched their investigation in October after administrators at Panther Creek High School said someone had “unlawfully accessed” an internal database and changed six students’ grades, altering their class rank and GPA, and prompting educators to contact colleges that had received inaccurate academic transcripts.

Shortly before the hacking spree again, authorities claim that an email sent from one Panther Creek teacher to another contained malware that logged keystrokes, which may have allowed their database credentials to become compromised.

A total of 90 grades were changed, and half belonged to Mr. Hanumanthu, reported WRAL News, a local television station. Police eventually traced the hack back to a library where Mr. Hanumanthu had volunteered for more than 250 hours, and said in the warrant that he had been observed by a teacher at the high school as well as in security camera footage as being on campus after hours.

Police seized a laptop and seven USB flash drives from the student’s home less than a month after their investigation began but did not file charges until this week, previous reports revealed.

“I guarantee that they know right now who did it,” cybersecurity expert Duke Rogers told WNCN News early on in the probe. “If you have the teacher’s credentials, you may think you have all kinds of anonymity, but you really don’t.”

Mr. Hanumanthu was given a $15,000 unsecured bond and is due back in court on Feb. 25.