User Activity

How do I get details on the who ever had compromised my friends phone and placed their own software on it? Thanks in advance 
About