Jeff Greenberg/Getty Images

Security experts are warning about back-to-school dangers for students who want to cut the cost of textbooks by accessing them online. Over the past academic year, cybercriminals targeting students attempted to attack Kaspersky users more than 356,000 times, Kaspersky Lab researchers said Monday. The majority of the malware was disguised as free essays, but textbooks accounted for roughly a third.

"We detected 122,000 attacks by malware that was disguised as textbooks. More than 30,000 users tried to open these files," Kaspersky said in a release.

Malware targeting K-12 students was most commonly found in English textbooks, where Kaspersky noted 2,080 attempted downloads. This was followed by math textbooks, which threatened 1,213 users, and literature was the third most dangerous subject, with 870 instances of disguised malware.

The four most popular types of malware that came disguised as textbooks were torrent application downloader MediaGet and the Stalk worm, as well as the WinLNK.Agent.gen and the Win32.Agent.ifdx downloaders.