Did you accidentally friend a North Korean hacker on Facebook?

File photo - A North Korean flag flies on a mast at the Permanent Mission of North Korea in Geneva Oct. 2, 2014. (REUTERS/Denis Balibouse/File Photo)

North Korean hackers have been preying on potential targets using Facebook, but the company has thwarted at least some of their activities.

Last week, Facebook joined Microsoft and others in the security community to disrupt a covert campaign, the White House said on Tuesday. The scheme involved creating fake personal Facebook accounts that attempted to build relationships with potential targets and coordinate other activities.

In a statement, Facebook confirmed its involvement and said the Lazarus Group, a hacking collective that many security experts suspect works for North Korea, was behind the fake accounts. "We also notified people who may have been in contact with these accounts and gave suggestions to enhance their account security," Facebook said.

It isn't clear why North Korean hackers targeted Facebook users. However, social media is often ripe with people's personal information, including email addresses, phone numbers and location data. In this case, North Korea may have sought to trick their victims into installing malware, which could then be used to take over their computers.

For internet users, it's a good idea not to accept friend requests on Facebook or LinkedIn from those you don't know. Even legitimate-looking accounts can be fake. Placing too much personal data on your social media page can also leave you vulnerable to hacking schemes.