This hypothesis posits that adversaries are deploying the Nanocore Remote Access Trojan to establish persistent command-and-control channels and execute remote actions on compromised endpoints within the Azure environment. The SOC team should proactively hunt for this specific RAT behavior in Azure Sentinel because its critical severity indicates a high risk of undetected lateral movement and data exfiltration that requires immediate validation beyond automated alerting.
rule Nanocore_RAT_Gen_2 {
meta:
description = "Detetcs the Nanocore RAT"
author = "Florian Roth"
score = 100
reference = "https://www.sentinelone.com/blogs/teaching-an-old-rat-new-tricks/"
date = "2016-04-22"
hash1 = "755f49a4ffef5b1b62f4b5a5de279868c0c1766b528648febf76628f1fe39050"
strings:
$x1 = "NanoCore.ClientPluginHost" fullword ascii
$x2 = "IClientNetworkHost" fullword ascii
$x3 = "#=qjgz7ljmpp0J7FvL9dmi8ctJILdgtcbw8JYUc6GC8MeJ9B11Crfg2Djxcf0p8PZGe" fullword ascii
condition:
( uint16(0) == 0x5a4d and filesize < 1000KB and 1 of them ) or ( all of them )
}
This YARA rule can be deployed in the following contexts:
This rule contains 3 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the Nanocore RAT detection rule in an enterprise environment, including suggested filters and exclusions:
Scenario: Automated Software Deployment via SCCM/MECM
nanocore.exe or utilizes the Nanocore framework for remote management, it may mimic RAT behavior by establishing persistent connections and monitoring user input during installation.ccmexec.exe) and the File Path. Exclude any nanocore related processes spawned directly from the C:\Program Files\Microsoft Configuration Manager\Client\ directory.Scenario: Scheduled Maintenance by IT Helpdesk Tools (e.g., Ivanti or ServiceNow)
--job-id=scheduled-inventory) and restrict the exclusion to the Time Window of 02:00–06:00 local time, where user interaction is minimal but maintenance jobs are active.Scenario: Legitimate Remote Support Sessions by Managed Service Providers (MSPs)