YARA rules identify and classify malware families through binary patterns, strings, and metadata. Rules below come from multiple open repositories. Expand any rule to see its raw signature.
◈
Rules
50 shown of 5,941
APT_Backdoor_Win_DShell_1
This rule is looking for sections of an integer array which contains the encoded payload along with a selection of Windows functions that are present within a DShell payload
This rule looks for strings specific to the D programming language in combination with a selection of Windows functions that are present within a DShell payload
This rule looks for strings specific to the D programming language in combination with sections of an integer array which contains the encoded payload found within DShell
This detects if a sample is less than 50KB and has a number of strings found in the Gorat shellcode (stage0 loader). The loader contains an embedded DLL (stage0.dll) that contains a number of unique strings. The 'Cookie' string found in this loader is important as this cookie is needed by the C2 server to download the Gorat implant (stage1 payload).
source signature-baseauthor FireEye
view YARA rule
rule APT_Backdoor_Win_GORAT_1
{
meta:
description = "This detects if a sample is less than 50KB and has a number of strings found in the Gorat shellcode (stage0 loader). The loader contains an embedded DLL (stage0.dll) that contains a number of unique strings. The 'Cookie' string found in this loader is important as this cookie is needed by the C2 server to download the Gorat implant (stage1 payload)."
md5 = "66cdaa156e4d372cfa3dea0137850d20"
reference = "https://www.fireeye.com/blog/products-and-services/2020/12/fireeye-shares-details-of-recent-cyber-attack-actions-to-protect-community.html"
author = "FireEye"
id = "5ac84cf1-49fb-533d-b211-b1a92239063b"
strings:
$s1 = "httpComms.dll" ascii wide
$s2 = "Cookie: SID1=%s" ascii wide
$s3 = "Global\\" ascii wide
$s4 = "stage0.dll" ascii wide
$s5 = "runCommand" ascii wide
$s6 = "getData" ascii wide
$s7 = "initialize" ascii wide
$s8 = "Windows NT %d.%d;" ascii wide
$s9 = "!This program cannot be run in DOS mode." ascii wide
condition:
filesize < 50KB and all of them
}
APT_Backdoor_Win_GORAT_2
Verifies that the sample is a Windows PE that is less than 10MB in size and has the Go build ID strings. Then checks for various strings known to be in the Gorat implant including strings used in C2 json, names of methods, and the unique string 'murica' used in C2 comms. A check is done to ensure the string 'rat' appears in the binary over 1000 times as it is the name of the project used by the implant and is present well over 2000 times.
source signature-baseauthor FireEye
view YARA rule
rule APT_Backdoor_Win_GORAT_2
{
meta:
description = "Verifies that the sample is a Windows PE that is less than 10MB in size and has the Go build ID strings. Then checks for various strings known to be in the Gorat implant including strings used in C2 json, names of methods, and the unique string 'murica' used in C2 comms. A check is done to ensure the string 'rat' appears in the binary over 1000 times as it is the name of the project used by the implant and is present well over 2000 times."
md5 = "f59095f0ab15f26a1ead7eed8cdb4902"
reference = "https://www.fireeye.com/blog/products-and-services/2020/12/fireeye-shares-details-of-recent-cyber-attack-actions-to-protect-community.html"
author = "FireEye"
id = "e2c47711-d088-5cb4-8d21-f8199a865a28"
strings:
$go1 = "go.buildid" ascii wide
$go2 = "Go build" ascii wide
$json1 = "json:\"pid\"" ascii wide
$json2 = "json:\"key\"" ascii wide
$json3 = "json:\"agent_time\"" ascii wide
$json4 = "json:\"rid\"" ascii wide
$json5 = "json:\"ports\"" ascii wide
$json6 = "json:\"agent_platform\"" ascii wide
$rat = "rat" ascii wide
$str1 = "handleCommand" ascii wide
$str2 = "sendBeacon" ascii wide
$str3 = "rat.AgentVersion" ascii wide
$str4 = "rat.Core" ascii wide
$str5 = "rat/log" ascii wide
$str6 = "rat/comms" ascii wide
$str7 = "rat/modules" ascii wide
$str8 = "murica" ascii wide
$str9 = "master secret" ascii wide
$str10 = "TaskID" ascii wide
$str11 = "rat.New" ascii wide
condition:
uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and filesize < 10MB and all of ($go*) and all of ($json*) and all of ($str*) and #rat > 1000
}
APT_Backdoor_Win_GORAT_3
This rule uses the same logic as FE_APT_Trojan_Win_GORAT_1_FEBeta with the addition of one check, to look for strings that are known to be in the Gorat implant when a certain cleaning script is not run against it.
source signature-baseauthor FireEye
view YARA rule
rule APT_Backdoor_Win_GORAT_3
{
meta:
description = "This rule uses the same logic as FE_APT_Trojan_Win_GORAT_1_FEBeta with the addition of one check, to look for strings that are known to be in the Gorat implant when a certain cleaning script is not run against it."
md5 = "995120b35db9d2f36d7d0ae0bfc9c10d"
reference = "https://www.fireeye.com/blog/products-and-services/2020/12/fireeye-shares-details-of-recent-cyber-attack-actions-to-protect-community.html"
author = "FireEye"
id = "94c195b5-b8e8-56a7-bc11-dbbe2f969b06"
strings:
$dirty1 = "fireeye" ascii nocase wide
$dirty2 = "kulinacs" ascii nocase wide
$dirty3 = "RedFlare" ascii nocase wide
$dirty4 = "gorat" ascii nocase wide
$dirty5 = "flare" ascii nocase wide
$go1 = "go.buildid" ascii wide
$go2 = "Go build" ascii wide
$json1 = "json:\"pid\"" ascii wide
$json2 = "json:\"key\"" ascii wide
$json3 = "json:\"agent_time\"" ascii wide
$json4 = "json:\"rid\"" ascii wide
$json5 = "json:\"ports\"" ascii wide
$json6 = "json:\"agent_platform\"" ascii wide
$rat = "rat" ascii wide
$str1 = "handleCommand" ascii wide
$str2 = "sendBeacon" ascii wide
$str3 = "rat.AgentVersion" ascii wide
$str4 = "rat.Core" ascii wide
$str5 = "rat/log" ascii wide
$str6 = "rat/comms" ascii wide
$str7 = "rat/modules" ascii wide
$str8 = "murica" ascii wide
$str9 = "master secret" ascii wide
$str10 = "TaskID" ascii wide
$str11 = "rat.New" ascii wide
condition:
uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and filesize < 10MB and all of ($go*) and all of ($json*) and all of ($str*) and #rat > 1000 and any of ($dirty*)
}
APT_Backdoor_Win_GORAT_4
Verifies that the sample is a Windows PE that is less than 10MB in size and exports numerous functions that are known to be exported by the Gorat implant. This is done in an effort to provide detection for packed samples that may not have other strings but will need to replicate exports to maintain functionality.
source signature-baseauthor FireEye
view YARA rule
rule APT_Backdoor_Win_GORAT_4
{
meta:
description = "Verifies that the sample is a Windows PE that is less than 10MB in size and exports numerous functions that are known to be exported by the Gorat implant. This is done in an effort to provide detection for packed samples that may not have other strings but will need to replicate exports to maintain functionality."
md5 = "f59095f0ab15f26a1ead7eed8cdb4902"
reference = "https://www.fireeye.com/blog/products-and-services/2020/12/fireeye-shares-details-of-recent-cyber-attack-actions-to-protect-community.html"
author = "FireEye"
id = "ae67445c-e7fd-5858-be8b-7ee84a16a031"
condition:
uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and filesize < 10MB and pe.exports("MemoryCallEntryPoint") and pe.exports("MemoryDefaultAlloc") and pe.exports("MemoryDefaultFree") and pe.exports("MemoryDefaultFreeLibrary") and pe.exports("MemoryDefaultGetProcAddress") and pe.exports("MemoryDefaultLoadLibrary") and pe.exports("MemoryFindResource") and pe.exports("MemoryFindResourceEx") and pe.exports("MemoryFreeLibrary") and pe.exports("MemoryGetProcAddress") and pe.exports("MemoryLoadLibrary") and pe.exports("MemoryLoadLibraryEx") and pe.exports("MemoryLoadResource") and pe.exports("MemoryLoadString") and pe.exports("MemoryLoadStringEx") and pe.exports("MemorySizeofResource") and pe.exports("callback") and pe.exports("crosscall2") and pe.exports("crosscall_386")
}
APT_Backdoor_Win_GORAT_5
source signature-baseauthor FireEye
view YARA rule
rule APT_Backdoor_Win_GORAT_5
{
meta:
date = "2020-12-02"
modified = "2020-12-02"
md5 = "cdf58a48757010d9891c62940c439adb, a107850eb20a4bb3cc59dbd6861eaf0f"
reference = "https://www.fireeye.com/blog/products-and-services/2020/12/fireeye-shares-details-of-recent-cyber-attack-actions-to-protect-community.html"
author = "FireEye"
id = "73102bd2-7b94-5c7b-b9a4-cfc9cf5e3212"
strings:
$1 = "comms.BeaconData" fullword
$2 = "comms.CommandResponse" fullword
$3 = "rat.BaseChannel" fullword
$4 = "rat.Config" fullword
$5 = "rat.Core" fullword
$6 = "platforms.AgentPlatform" fullword
$7 = "GetHostID" fullword
$8 = "/rat/cmd/gorat_shared/dllmain.go" fullword
condition:
(uint16(0) == 0x5A4D) and (uint32(uint32(0x3C)) == 0x00004550) and all of them
}
APT_Backdoor_Win_GoRat_Memory
Identifies GoRat malware in memory based on strings.
Piece of Base64 encoded data from Agent CSharp version
source signature-baseauthor Fox-IT SRT
view YARA rule
rule APT_MAL_CN_Wocao_agent_powershell_b64encoded {
meta:
description = "Piece of Base64 encoded data from Agent CSharp version"
author = "Fox-IT SRT"
reference = "https://www.fox-it.com/en/news/whitepapers/operation-wocao-shining-a-light-on-one-of-chinas-hidden-hacking-groups/"
id = "14e1702d-6229-5989-8bb7-cc9c0c321676"
strings:
$header = "LFNVT0hBBnVfVVJDSx0sU1VPSEEGdV9VUkNLCG9pHSxTVU9IQQZ1X1VSQ0sIZUlK"
condition:
all of them
}
APT_MAL_CN_Wocao_agent_powershell_dropper
Strings from PowerShell dropper of CSharp version of Agent
source signature-baseauthor Fox-IT SRT
view YARA rule
rule APT_MAL_CN_Wocao_agent_powershell_dropper {
meta:
description = "Strings from PowerShell dropper of CSharp version of Agent"
author = "Fox-IT SRT"
reference = "https://www.fox-it.com/en/news/whitepapers/operation-wocao-shining-a-light-on-one-of-chinas-hidden-hacking-groups/"
id = "833ce607-56a9-5580-bbd1-e72392945fec"
strings:
$a = "function format([string]$source)"
$b = "foreach($c in $bb){$tt = $tt + [char]($c -bxor"
$c = "[agent]::Main($args);"
condition:
1 of them
}
APT_MAL_CN_Wocao_agent_py
Strings from Python version of Agent
source signature-baseauthor Fox-IT SRT
view YARA rule
rule APT_MAL_CN_Wocao_agent_py {
meta:
description = "Strings from Python version of Agent"
author = "Fox-IT SRT"
reference = "https://www.fox-it.com/en/news/whitepapers/operation-wocao-shining-a-light-on-one-of-chinas-hidden-hacking-groups/"
id = "ca30dd6a-b596-54ab-b4f0-50e6b1382f73"
strings:
$a = "vpshex.decode"
$b = "self._newsock.recv"
$c = "Rsock.connect"
$d = /MAX_DATALEN\s?=\s?10240/
$e = /LISTEN_MAXCOUNT\s?=\s?80/
$f = "ListenSock.listen(LISTEN_MAXCOUNT)"
$g = "nextsock.send(head)"
$h = "elif transnode"
$i = "infobuf[4:6]"
$key = "L\\x1bh\\x0bj\\x18\\tAZ6\\x1fV&*\\x03D}_\\x03{\\x07n\\x03w0pRBSg\\n*"
condition:
1 of them
}
APT_MAL_CN_Wocao_agent_py_b64encoded
Piece of Base64 encoded data from Agent Python version
source signature-baseauthor Fox-IT SRT
view YARA rule
rule APT_MAL_CN_Wocao_agent_py_b64encoded {
meta:
description = "Piece of Base64 encoded data from Agent Python version"
author = "Fox-IT SRT"
reference = "https://www.fox-it.com/en/news/whitepapers/operation-wocao-shining-a-light-on-one-of-chinas-hidden-hacking-groups/"
id = "eb2701e9-4358-5d24-bfcd-b4dde24f13bf"
strings:
$header = "QlpoOTFBWSZTWWDdHjgABDTfgHwQe////z/v/9+////6YA4cGPsAl2e8M9LSU128"
condition:
all of them
}
Piece of Base64 encoded data from the XServer PowerShell dropper
source signature-baseauthor Fox-IT SRT
view YARA rule
rule APT_MAL_CN_Wocao_xserver_powershell_b64encoded {
meta:
description = "Piece of Base64 encoded data from the XServer PowerShell dropper"
author = "Fox-IT SRT"
reference = "https://www.fox-it.com/en/news/whitepapers/operation-wocao-shining-a-light-on-one-of-chinas-hidden-hacking-groups/"
id = "01e38cfb-b245-5398-b037-6d1d2fb726ee"
strings:
$header_47000 = "5T39c9u2kr/nr2A0Ny2VKIzkfLRJntuJHafPN/nwWG777rUZDy3BNq8UqSEpx26b"
$header_25667 = "5T1rc9u2st/zKxjNmZZKFEZyErdJ6nZsx+nxnTjxWGp77mkzHlqCbd5SpIak/Gjr"
condition:
any of them
}
APT_MAL_CN_Wocao_xserver_powershell_dropper
Strings from the PowerShell dropper of XServer
source signature-baseauthor Fox-IT SRT
view YARA rule
rule APT_MAL_CN_Wocao_xserver_powershell_dropper {
meta:
description = "Strings from the PowerShell dropper of XServer"
author = "Fox-IT SRT"
reference = "https://www.fox-it.com/en/news/whitepapers/operation-wocao-shining-a-light-on-one-of-chinas-hidden-hacking-groups/"
id = "97169ab4-d68d-5137-83de-d9cac975747e"
strings:
$encfile = "New-Object IO.Compression.DeflateStream([IO.MemoryStream][Convert]::FromBase64String($encfile)"
condition:
all of them
}
APT_MAL_HP_iLO_Firmware_Dec21_1
Detects suspicios ELF files with sections as described in malicious iLO Board analysis by AmnPardaz in December 2021
rule APT_MAL_HP_iLO_Firmware_Dec21_1 {
meta:
description = "Detects suspicios ELF files with sections as described in malicious iLO Board analysis by AmnPardaz in December 2021"
author = "Florian Roth (Nextron Systems)"
reference = "https://threats.amnpardaz.com/en/2021/12/28/implant-arm-ilobleed-a/"
date = "2021-12-28"
score = 80
id = "7f5fa905-07a3-55da-b644-c5ab882b4a9d"
strings:
$s1 = ".newelf.elf.text" ascii
$s2 = ".newelf.elf.libc.so.data" ascii
$s3 = ".newelf.elf.Initial.stack" ascii
$s4 = ".newelf.elf.libevlog.so.data" ascii
condition:
filesize < 5MB and 2 of them or
all of them
}
APT_MAL_IR_DruidFly_Wiper_Jun25
Detects Wiper used by the Iranian DruidFly group
source signature-baseauthor Florian Roth
view YARA rule
rule APT_MAL_IR_DruidFly_Wiper_Jun25 {
meta:
description = "Detects Wiper used by the Iranian DruidFly group"
author = "Florian Roth"
reference = "https://x.com/threatintel/status/1936049254432231444"
date = "2025-06-21"
score = 80
hash1 = "81eb22828306f3197b35fef2035cef2c548f587f8511902852964850023389d7"
strings:
$xc1 = { 2E 62 61 63 6B 75 70 00 2E 63 6F 6E 66 69 67 00 // .backup .config
2E 64 62 00 00 00 00 00 2E 73 71 6C 69 74 65 00 } // // .db.... .sqlite
$xc2 = { 00 5C 5C 2E 5C 25 63 3A 00 25 63 3A 5C 00 00 00
00 4E 54 46 53 00 00 00 00 5C } // \\.\%c: %c:\0\0\0 NTFS\0\0\0\
$x1 = "%s:%d:%s(): [+] Overwriting \"%s\" \"..." ascii
$s1 = "C:\\Windows\\System32\\drivers\\beep.sys" ascii fullword
$s2 = "\\DosDevices\\sectorio" wide fullword
condition:
uint16(0) == 0x5a4d
and filesize < 2000KB
and (
1 of ($x*)
or 2 of them
)
or 3 of them
}
APT_MAL_NK_3CX_ICONIC_Stealer_Mar23_1
Detects ICONIC stealer payload used in the 3CX incident