← Back to SOC feed Coverage →

Njrat

yara LOW Yara-Rules
backdoorcommunity
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Yara-Rules →
Retrieved: 2026-07-13T11:00:00Z · Confidence: medium

Hunt Hypothesis

This detection rule identifies potential NjRAT remote access trojan activity by monitoring for its characteristic command-and-control communications and file execution patterns within Azure Sentinel. Proactively hunting for this behavior is critical because NjRAT’s low-severity footprint often allows it to establish persistence undetected, enabling adversaries to conduct long-term reconnaissance before escalating to data exfiltration or lateral movement.

YARA Rule

rule Njrat: RAT
{
    meta:
        description = "Njrat"
	author = "botherder https://github.com/botherder"

    strings:
        $string1 = /(F)romBase64String/
        $string2 = /(B)ase64String/
        $string3 = /(C)onnected/ wide ascii
        $string4 = /(R)eceive/
        $string5 = /(S)end/ wide ascii
        $string6 = /(D)ownloadData/ wide ascii
        $string7 = /(D)eleteSubKey/ wide ascii
        $string8 = /(g)et_MachineName/
        $string9 = /(g)et_UserName/
        $string10 = /(g)et_LastWriteTime/
        $string11 = /(G)etVolumeInformation/
        $string12 = /(O)SFullName/ wide ascii
        $string13 = /(n)etsh firewall/ wide
        $string14 = /(c)md\.exe \/k ping 0 & del/ wide
        $string15 = /(c)md\.exe \/c ping 127\.0\.0\.1 & del/ wide
        $string16 = /(c)md\.exe \/c ping 0 -n 2 & del/ wide
        $string17 = {7C 00 27 00 7C 00 27 00 7C}

    condition:
        10 of them
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 17 string patterns in its detection logic.

False Positive Guidance

Here are 5 specific false positive scenarios for the Njrat detection rule in an enterprise environment, along with suggested filters and exclusions:

Original source: https://github.com/Yara-Rules/rules/blob/main/malware/RAT_Njrat.yar