A trojan-spy is a type of trojan with a wide range of capabilities, including performing keylogging, monitoring processes on the computer and stealing data from files saved on the machine.
Attackers often distribute trojan-spies as part of the payload of another harmful program, such as a trojan-dropper, which silently drops and installs the trojan-spy on a device.
They may also be distributed as disguised files attached to emails. In these cases, the attackers rely on social engineering to trick users into opening the attached files, which then silently installs the trojan-spy.
Some trojans (particularly on the Android platform) are actually copies of legitimate apps that have been repackaged or trojanized to include harmful components. These are often distributed using the same (or very similar) names and designs as popular programs, to increase the chances that users will mistake the trojan for the legitimate app and install it instead.
Once installed, a trojan-spy will search for specific files or data on the machine. The type of information sought varies depending on the attackers' interests, and can include:
- Targeting critical files that contain authentication information for certain programs or services
- Harvesting all documents stored on the machine
- Monitoring communications or connections made on the machine (.e.g, eavesdropping, or intercepting banking transactions)
Once the desired information is found, the trojan-spy may either copy the files and send the data to a remote server where it can be retrieved by the attacker. Alternatively, the trojan-spy may save the information to a file or folder on the machine itself, which the attacker may retrieve in the future by another method.