How to Investigate Your Friends and Enemies