YARA · CAPE Sandbox (CAPEv2)
CAPE_Quasarrat
QuasarRAT payload
- Author
- ditekshen
- Date
- 2024-10-09
- Modified
- 2025-02-03
- Score / Quality
- 75 / 70
What this rule detects
QuasarRAT payload
Targets: Windows PE.
It defines 13 patterns (13 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
quasarrat.yarGNU General Public License v3.0
rule CAPE_Quasarrat : FILE
{
meta:
= "QuasarRAT payload"
= "ditekshen"
= "f256b88f-eee6-5f8c-afd6-32ed10ea908d"
= "2024-10-09"
= "2025-02-03"
= "https://github.com/kevoreilly/CAPEv2"
= "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/data/yara/CAPE/AsyncRAT.yar#L245-L266"
= "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/LICENSE"
= "556b19dc0980761198ea31a285f281adae084463d24bff1eda15326436ad562b"
= 75
= 70
= "FILE"
= "QuasarRAT Payload"
strings:
$s1 = "GetKeyloggerLogsResponse" fullword ascii
$s2 = "GetKeyloggerLogs" fullword ascii
$s3 = "/>Log created on" wide
$s4 = "User: {0}{3}Pass: {1}{3}Host: {2}" wide
$s5 = "Domain: {1}{0}Cookie Name: {2}{0}Value: {3}{0}Path: {4}{0}Expired: {5}{0}HttpOnly: {6}{0}Secure: {7}" wide
$s6 = "grabber_" wide
$s7 = "<virtualKeyCode>" ascii
$s8 = "<RunHidden>k__BackingField" fullword ascii
$s9 = "<keyboardHookStruct>" ascii
$s10 = "add_OnHotKeysDown" ascii
$mutex = "QSR_MUTEX_" ascii wide
$ua1 = "Mozilla/5.0 (Windows NT 6.3; rv:48.0) Gecko/20100101 Firefox/48.0" fullword wide
$us2 = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A" fullword wide
condition:
uint16( 0 ) == 0x5a4d and ( $mutex or ( all of ( $ua* ) and 2 of them ) or 6 of ( $s* ) )
}
Strings (13 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "GetKeyloggerLogsResponse" | fullword ascii |
| $s2 | text | "GetKeyloggerLogs" | fullword ascii |
| $s3 | text | "/>Log created on" | wide |
| $s4 | text | "User: {0}{3}Pass: {1}{3}Host: {2}" | wide |
| $s5 | text | "Domain: {1}{0}Cookie Name: {2}{0}Value: {3}{0}Path: {4}{0}Expired: {5}{0}HttpOnly: {6}{0}Secure: {7}" | wide |
| $s6 | text | "grabber_" | wide |
| $s7 | text | "<virtualKeyCode>" | ascii |
| $s8 | text | "<RunHidden>k__BackingField" | fullword ascii |
| $s9 | text | "<keyboardHookStruct>" | ascii |
| $s10 | text | "add_OnHotKeysDown" | ascii |
| $mutex | text | "QSR_MUTEX_" | ascii wide |
| $ua1 | text | "Mozilla/5.0 (Windows NT 6.3; rv:48.0) Gecko/20100101 Firefox/48.0" | fullword wide |
| $us2 | text | "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A" | fullword wide |
Condition
uint16( 0 ) == 0x5a4d and ( $mutex or ( all of ( $ua* ) and 2 of them ) or 6 of ( $s* ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $ua* ) must match.
- At least 2 patterns in the rule must match.
- At least 6 patterns in ( $s* ) must match.
- Pattern $mutex must be present.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.
References
Licence & attribution
Author: ditekshen
Source repository: CAPE Sandbox (CAPEv2) @ 6b15e76f28
Licence: GNU General Public License v3.0 (repository licence)
Copyright notice: Cuckoo Sandbox is copyrighted by the Cuckoo Foundation.
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: f256b88f-eee6-5f8c-afd6-32ed10ea908d
Metadata
| cape_type | QuasarRAT Payload |
|---|
Tags:FILE