Hawera High School has temporarily shut down its computer system after hackers broke in and demanded a $5000 ransom to be paid.
The hackers asked for the ransom in exchange for returning students' course work, but police advised the school not to pay it Stuff reported.
The school sent out an urgent notice on Tuesday to parents and staff, saying: "We've had an 'intrusion' to our computer network. The staff and student files on our school server are currently unavailable."
It shut down access to its systems to avoid further attacks.
"Information from police and Ministry of Education suggest some intrusions start in a dormant phase and may be quite complex. It is possible the intrusion has been present for some time and has only now become active," the school advised on Tuesday.
The hack did not appear to have affected emails or the school's website.
The school said it is working with NZQA to make sure no students are disadvantaged in their assessments.
It's working with police to assess the damage and risk to the network before going back online, but could not provide an exact timeline at this stage.
Local computer repair service 4U Computer Solutions is offering to scan all USB devices, laptops and computers for students and staff free of charge to check for viruses.
Ministry of Education deputy secretary enablement and support Katrina Casey said the Ministry is providing support to the high school where it can.
"Schools are responsible for maintaining a safe digital network for students' learning," she said.
"The operation of a school's network is a contractual relationship between a school and an external provider."
Police Cybercrime Unit detective sergeant Damian RapiraDavies said the incident occurred at the school over the weekend.
"A known variant of ransomware malware was identified as causing the issue, and inquiries are continuing into the case."
The cybercrime unit are working with Hawera High School, the Ministry of Education, and IT providers to respond to the incident.
Newshub.