Skip to main content
Skip to main content
Microsoft Security Intelligence
Published Jul 24, 2025 | Updated Aug 18, 2025

Trojan:MSIL/njRAT!rfn

Detected by Microsoft Defender Antivirus

Aliases: No associated aliases

Summary

Trojan:MSIL/NjRat!rfn is a .NET-based remote access trojan (RAT) variant detected through behavioral heuristics, signified by the "!rfn" designation. First observed in 2012 and linked to Middle Eastern threat actors, this trojan uses the Microsoft Intermediate Language (MSIL) framework for cross-platform compatibility with .NET runtime. As a “commodity RAT” with publicly leaked source code, it allows extensive customization by threat actors.  

Propagation occurs through phishing campaigns like weaponized email attachments, drive-by downloads, infected USB devices, and compromised software supply chains, which include malicious npm packages like jdb.js and db-json.js that deploy binaries such as patch.exe. Post-infection, threat actors gain remote device control for credential theft, keylogging, webcam activation, cryptocurrency theft, and deployment of secondary payloads like ransomware. 

  • Disconnect from networks/internet. 
  • Check scheduled tasks (schtasks /query) and remove malicious entries 
  • End task all instances of svchos.exe in Task Manager and use File Explorer to delete it from Windows. Boot to Safe Mode as needed and perform that action. 
  • Restore the Windows Hosts file (C:\Windows\System32\drivers\etc\hosts) from backups 
  • Reset all passwords stored in browsers or cached applications. 

Microsoft Defender Antivirus automatically removes threats as they are detected. However, many infections can leave remnant files and system changes. Updating your antimalware definitions and running a full scan might help address these remnant artifacts. 

You can also visit our advanced troubleshooting page or search the Microsoft virus and malware community for more help. 

Follow us