It's not just your friends that hackers and scammers impersonate to get you to trust them. Particularly if you work on sensitive material (such as military or other government matters), there are quite a few attacks out there impersonating government officials to spread viruses or steal money. The FBI's "E-Scams and Warnings" page currently has a long list of attacks impersonating government officials.
The only way to protect yourself against these sorts of attacks is to be suspicious of any email that comes into your inbox and any page you view on the internet. Just because something claims to be from a particular source doesn't mean that's really where it comes from. Learn to identify malicious email and stay safe out there. Don't worry, if you've fallen for one of these scams, here is some advice of how to recover. Also, I strongly urge everyone to report these scams to the Internet Crime Complaint Center (http://www.ic3.gov).
The Internet is a dangerous place, but we can all do our part to keep it a bit safer.