Mac users beware: Law enforcement agents are investigating malware that's been affecting Mac computers. The malicious code appears to be purely for targeted surveillance, according to Forbes.

The malware, called FruitFly, allows hackers to jump into webcams of affected computers and take screenshots. The malware also has the capability to take over the entire computer, according to CBS Sacramento.

Patrick Wardle, an ex-NSA analyst, uncovered FruitFly after registering one of the domains the hackers had planned to use as back up. After doing so, Wardle could see victim IP addresses and 90 percent of them were located in the U.S., according to Forbes.

"This didn't look like cybercrime type behavior, there were no ads, no keyloggers, or ransomware," Wardle told Forbes. "Its features had looked like they were actions that would support interactivity: it had the ability to alert the attacker when users were active on the computer, it could simulate mouse clicks and keyboard events."

The malware appears to be old, as comments in the code indicate that the spyware was running before 2014, according to Forbes.

MalwareBytes first detected FruitFly in January when it was apparently targeting biomedical research centers. Apple released an update that protected against infections, but variants of the malware can still leave some Macs vulnerable, according to Fortune.