[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EJS2KJ6Y5EK3B7Q86X7SMP":3,"skill-same:01M7EJS2KJ6Y5EK3B7Q86X7SMP":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M7EJS2KJ6Y5EK3B7Q86X7SMP","reverser-yara-hunting",null,"YARA rule authoring + hunting — `condition:` syntax, hex patterns with wildcards, `for`\u002F`any of them`, PE module, ELF module, hash module, math module. Build per-family signatures, hunt at scale via VT\u002FMalwareBazaar\u002FHybrid Analysis. Avoid common pitfalls (collisions, slow rules, regex traps).","a18268941610-crypto\u002FDecepticon-shentou","a18268941610-crypto","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F241464571?v=4","01M7EHA2V2KTCYTX78QJKXCZ8Y","fubai","01M7EHA2VKDD5RCWJJKC0ZA101",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Freverser\u002Fyara-hunting\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: reverser-yara-hunting\ndescription: \"YARA rule authoring + hunting — `condition:` syntax, hex patterns with wildcards, `for`\u002F`any of them`, PE module, ELF module, hash module, math module. Build per-family signatures, hunt at scale via VT\u002FMalwareBazaar\u002FHybrid Analysis. Avoid common pitfalls (collisions, slow rules, regex traps).\"\nallowed-tools: Bash Read Write\nmetadata:\n  when_to_use: \"yara rule signature hunting virustotal vt malshare malwarebazaar hybrid analysis pe elf hash condition any all of\"\n  subdomain: reverser\n  tags: yara, malware, hunting, signatures\n  mitre_attack: T1518.001\n---\n\n# YARA Rule Authoring + Hunting\n\n## Anatomy of a good rule\n\n```yara\nimport \"pe\"\nimport \"hash\"\n\nrule MalFamily_DropperVariant_Q4_2024 {\n    meta:\n        author = \"you\"\n        date = \"2024-11-20\"\n        description = \"MalFamily dropper, observed Q4 2024 campaign\"\n        hash = \"deadbeefdeadbeefdeadbeefdeadbeef\"\n        tlp = \"amber\"\n        confidence = \"high\"\n        false_positives = \"low (test against AV vendor samples)\"\n        mitre = \"T1055\"\n\n    strings:\n        $magic = { 4D 5A 90 00 03 }            \u002F\u002F MZ + DOS header\n        $config_marker = { 7A 89 ?? ?? 4F 8C } \u002F\u002F 6-byte signature, 2 wildcards\n        $string1 = \"loader_stage_2\" wide\n        $string2 = \"cmd.exe \u002Fc \" ascii\n        $api1   = \"VirtualAllocEx\"\n        $api2   = \"WriteProcessMemory\"\n        $api3   = \"CreateRemoteThread\"\n        \u002F\u002F Avoid generic strings — they cause FPs.\n\n    condition:\n        uint16(0) == 0x5A4D and                    \u002F\u002F PE header\n        filesize \u003C 5MB and                          \u002F\u002F bounded — avoids huge-file scans\n        $config_marker and                          \u002F\u002F unique marker\n        2 of ($api1, $api2, $api3) and             \u002F\u002F at least 2 of the 3 process-inject APIs\n        any of ($string*) and\n        pe.imports(\"ws2_32.dll\", \"WSAStartup\") and  \u002F\u002F network capability\n        not pe.is_signed                            \u002F\u002F unsigned\n}\n```\n\n## The condition tools you need\n\n```yara\n\u002F\u002F Filesize \u002F offset reads (no module)\nfilesize > 100KB and filesize \u003C 5MB\nuint32(0x3c) > 0 and uint32(uint32(0x3c)) == 0x4550  \u002F\u002F valid PE\n\n\u002F\u002F \"for\" loops over offsets \u002F sections\nfor any i in (0..pe.number_of_sections - 1):\n    (pe.sections[i].name == \".text\" and pe.sections[i].entropy > 7.0)\n\n\u002F\u002F \"of\"\n1 of them                              \u002F\u002F any one string\nall of ($a*)                           \u002F\u002F all $a*-prefix strings\n3 of ($s1, $s2, $s3, $s4, $s5)         \u002F\u002F at least 3 of 5\n\n\u002F\u002F Hash module\nhash.sha256(0, filesize) == \"...\"      \u002F\u002F exact-match rule\nhash.imphash() == \"...\"                \u002F\u002F PE import hash (fragile but high-signal)\n```\n\n## High-leverage patterns\n\n### Family-stable byte patterns\nLook for unique byte sequences that survive obfuscation:\n- Crypto constants (SHA-256 IVs, AES sbox, RC4 init pattern)\n- Hard-coded SID strings\n- C2 packet headers (magic bytes, fixed offsets)\n- Reflective loader entry stub bytes (Donut, Cobalt Strike's PE loader)\n\n### Capability rules\nDon't fingerprint a sample — fingerprint a TECHNIQUE:\n\n```yara\nrule Suspicious_ProcessInjection {\n    meta: description = \"VirtualAlloc + WriteProcessMemory + CreateRemoteThread = injection\"\n    condition:\n        pe.imports(\"kernel32.dll\", \"VirtualAllocEx\") and\n        pe.imports(\"kernel32.dll\", \"WriteProcessMemory\") and\n        pe.imports(\"kernel32.dll\", \"CreateRemoteThread\")\n}\n```\n\nThis catches every injector regardless of family. False-positive: legitimate tools (Procmon, IDA, debuggers). Reduce via additional conditions (unsigned, in temp dir, etc.).\n\n### Anti-analysis fingerprinting\n```yara\nrule AntiVm_VMware_Strings {\n    strings:\n        $s1 = \"VMware\" ascii nocase\n        $s2 = \"VBoxService\" ascii nocase\n        $s3 = \"qemu\" ascii nocase\n        $s4 = { 56 4D 58 68 } \u002F\u002F \"VMXh\" — VMware backdoor port magic\n    condition: 2 of them\n}\n```\n\n## Hunting at scale\n\n### VirusTotal Retrohunt (paid)\n```yara\n\u002F\u002F Upload rule to VT — runs against the past 90 days of submissions\n\u002F\u002F Outputs new hashes matching the signature\n```\n\n### MalwareBazaar (free)\n```bash\n# yarafs.io \u002F abuse.ch — runs YARA against MB corpus\ncurl https:\u002F\u002Fmb-api.abuse.ch\u002Fapi\u002Fv1\u002F -X POST -d 'query=get_yara&yara_rule=YourRule'\n```\n\n### Local corpus scan\n```bash\n# Recursive scan\nyara -r rules\u002F \u002Fsamples\u002F\n# JSON output for downstream processing\nyara -r rules\u002F \u002Fsamples\u002F -m -p 4    # -m: metadata, -p: parallel threads\n\n# Fast pre-filter with capa first\ncapa \u002Fsamples\u002Fsample.exe   # extracts capabilities; rule-driven, JSON-output\n```\n\n## Common pitfalls\n\n| Pitfall | Fix |\n|---|---|\n| Too-short strings (4 bytes) → false positives | Use 8+ byte strings; require multiple matches |\n| Regex `\u002Fpattern\u002F` with `[`, `?`, `*` → slow | Prefer literal strings; if regex needed, anchor with `^`\u002F`\\b` |\n| No filesize bound → scans 5GB files | Always include `filesize \u003C N` |\n| Multiple wildcards in one hex `??` → exponential matcher cost | Limit to 2-3 wildcards per byte string |\n| `condition: any of them` with one common string → constant FPs | Use `2 of them` minimum |\n| Rule name with version | Use a separate `meta.version` so rule survives bumps |\n\n## Mass-hunt workflow\n\n1. Triage a sample (see `reverser\u002Fmalware-triage` skill)\n2. Extract unique byte patterns, strings, capabilities\n3. Write a YARA rule with `meta` for context + bounded `condition`\n4. Test against:\n   - The known sample (must match)\n   - A clean corpus (must NOT match — false positive rate)\n   - A different malware family corpus (must NOT match)\n5. Submit to VT Retrohunt + MalwareBazaar\n6. Track results, iterate\n\n## Tooling\n\n- `yara` \u002F `yara-python` (writing + running)\n- `yarGen` (auto-generate rules from a sample set)\n- `valhalla.nextron-systems.com` (commercial YARA feed by Florian Roth)\n- `Neo23x0\u002Fsignature-base` (open-source canonical rule set)\n- `capa` (Mandiant — capability-level rules)\n\n## References\n\n- VirusTotal YARA guide\n- \"YARA, the pattern matching swiss knife for malware researchers\"\n- Florian Roth's blog (the canonical YARA author of our era)\n- \"Practical YARA Rules\" — Andre Tavares\n","# YARA Rule Authoring + Hunting\n\n## Anatomy of a good rule\n\n```yara\nimport \"pe\"\nimport \"hash\"\n\nrule MalFamily_DropperVariant_Q4_2024 {\n    meta:\n        author = \"you\"\n        date = \"2024-11-20\"\n        description = \"MalFamily dropper, observed Q4 2024 campaign\"\n        hash = \"deadbeefdeadbeefdeadbeefdeadbeef\"\n        tlp = \"amber\"\n        confidence = \"high\"\n        false_positives = \"low (test against AV vendor samples)\"\n        mitre = \"T1055\"\n\n    strings:\n        $magic = { 4D 5A 90 00 03 }            \u002F\u002F MZ + DOS header\n        $config_marker = { 7A 89 ?? ?? 4F 8C } \u002F\u002F 6-byte signature, 2 wildcards\n        $string1 = \"loader_stage_2\" wide\n        $string2 = \"cmd.exe \u002Fc \" ascii\n        $api1   = \"VirtualAllocEx\"\n        $api2   = \"WriteProcessMemory\"\n        $api3   = \"CreateRemoteThread\"\n        \u002F\u002F Avoid generic strings — they cause FPs.\n\n    condition:\n        uint16(0) == 0x5A4D and                    \u002F\u002F PE header\n        filesize \u003C 5MB and                          \u002F\u002F bounded — avoids huge-file scans\n        $config_marker and                          \u002F\u002F unique marker\n        2 of ($api1, $api2, $api3) and             \u002F\u002F at least 2 of the 3 process-inject APIs\n        any of ($string*) and\n        pe.imports(\"ws2_32.dll\", \"WSAStartup\") and  \u002F\u002F network capability\n        not pe.is_signed                            \u002F\u002F unsigned\n}\n```\n\n## The condition tools you need\n\n```yara\n\u002F\u002F Filesize \u002F offset reads (no module)\nfilesize > 100KB and filesize \u003C 5MB\nuint32(0x3c) > 0 and uint32(uint32(0x3c)) == 0x4550  \u002F\u002F valid PE\n\n\u002F\u002F \"for\" loops over offsets \u002F sections\nfor any i in (0..pe.number_of_sections - 1):\n    (pe.sections[i].name == \".text\" and pe.sections[i].entropy > 7.0)\n\n\u002F\u002F \"of\"\n1 of them                              \u002F\u002F any one string\nall of ($a*)                           \u002F\u002F all $a*-prefix strings\n3 of ($s1, $s2, $s3, $s4, $s5)         \u002F\u002F at least 3 of 5\n\n\u002F\u002F Hash module\nhash.sha256(0, filesize) == \"...\"      \u002F\u002F exact-match rule\nhash.imphash() == \"...\"                \u002F\u002F PE import hash (fragile but high-signal)\n```\n\n## High-leverage patterns\n\n### Family-stable byte patterns\nLook for unique byte sequences that survive obfuscation:\n- Crypto constants (SHA-256 IVs, AES sbox, RC4 init pattern)\n- Hard-coded SID strings\n- C2 packet headers (magic bytes, fixed offsets)\n- Reflective loader entry stub bytes (Donut, Cobalt Strike's PE loader)\n\n### Capability rules\nDon't fingerprint a sample — fingerprint a TECHNIQUE:\n\n```yara\nrule Suspicious_ProcessInjection {\n    meta: description = \"VirtualAlloc + WriteProcessMemory + CreateRemoteThread = injection\"\n    condition:\n        pe.imports(\"kernel32.dll\", \"VirtualAllocEx\") and\n        pe.imports(\"kernel32.dll\", \"WriteProcessMemory\") and\n        pe.imports(\"kernel32.dll\", \"CreateRemoteThread\")\n}\n```\n\nThis catches every injector regardless of family. False-positive: legitimate tools (Procmon, IDA, debuggers). Reduce via additional conditions (unsigned, in temp dir, etc.).\n\n### Anti-analysis fingerprinting\n```yara\nrule AntiVm_VMware_Strings {\n    strings:\n        $s1 = \"VMware\" ascii nocase\n        $s2 = \"VBoxService\" ascii nocase\n        $s3 = \"qemu\" ascii nocase\n        $s4 = { 56 4D 58 68 } \u002F\u002F \"VMXh\" — VMware backdoor port magic\n    condition: 2 of them\n}\n```\n\n## Hunting at scale\n\n### VirusTotal Retrohunt (paid)\n```yara\n\u002F\u002F Upload rule to VT — runs against the past 90 days of submissions\n\u002F\u002F Outputs new hashes matching the signature\n```\n\n### MalwareBazaar (free)\n```bash\n# yarafs.io \u002F abuse.ch — runs YARA against MB corpus\ncurl https:\u002F\u002Fmb-api.abuse.ch\u002Fapi\u002Fv1\u002F -X POST -d 'query=get_yara&yara_rule=YourRule'\n```\n\n### Local corpus scan\n```bash\n# Recursive scan\nyara -r rules\u002F \u002Fsamples\u002F\n# JSON output for downstream processing\nyara -r rules\u002F \u002Fsamples\u002F -m -p 4    # -m: metadata, -p: parallel threads\n\n# Fast pre-filter with capa first\ncapa \u002Fsamples\u002Fsample.exe   # extracts capabilities; rule-driven, JSON-output\n```\n\n## Common pitfalls\n\n| Pitfall | Fix |\n|---|---|\n| Too-short strings (4 bytes) → false positives | Use 8+ byte strings; require multiple matches |\n| Regex `\u002Fpattern\u002F` with `[`, `?`, `*` → slow | Prefer literal strings; if regex needed, anchor with `^`\u002F`\\b` |\n| No filesize bound → scans 5GB files | Always include `filesize \u003C N` |\n| Multiple wildcards in one hex `??` → exponential matcher cost | Limit to 2-3 wildcards per byte string |\n| `condition: any of them` with one common string → constant FPs | Use `2 of them` minimum |\n| Rule name with version | Use a separate `meta.version` so rule survives bumps |\n\n## Mass-hunt workflow\n\n1. Triage a sample (see `reverser\u002Fmalware-triage` skill)\n2. Extract unique byte patterns, strings, capabilities\n3. Write a YARA rule with `meta` for context + bounded `condition`\n4. Test against:\n   - The known sample (must match)\n   - A clean corpus (must NOT match — false positive rate)\n   - A different malware family corpus (must NOT match)\n5. Submit to VT Retrohunt + MalwareBazaar\n6. Track results, iterate\n\n## Tooling\n\n- `yara` \u002F `yara-python` (writing + running)\n- `yarGen` (auto-generate rules from a sample set)\n- `valhalla.nextron-systems.com` (commercial YARA feed by Florian Roth)\n- `Neo23x0\u002Fsignature-base` (open-source canonical rule set)\n- `capa` (Mandiant — capability-level rules)\n\n## References\n\n- VirusTotal YARA guide\n- \"YARA, the pattern matching swiss knife for malware researchers\"\n- Florian Roth's blog (the canonical YARA author of our era)\n- \"Practical YARA Rules\" — Andre Tavares\n",{"name":5,"metadata":24,"description":7,"allowed-tools":29},{"tags":25,"subdomain":26,"when_to_use":27,"mitre_attack":28},"yara, malware, hunting, signatures","reverser","yara rule signature hunting virustotal vt malshare malwarebazaar hybrid analysis pe elf hash condition any all of","T1518.001","Bash Read Write","main","d6bfd87ad9f910cfff715da04c804638990a8538","packages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Freverser\u002Fyara-hunting",1,"https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto","2026-10-12 03:35:17",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add a18268941610-crypto\u002FDecepticon-shentou --skill reverser-yara-hunting",{"tool":43,"command":44},"bunx","bunx skills add a18268941610-crypto\u002FDecepticon-shentou --skill reverser-yara-hunting",{"tool":46,"command":47},"pnpm","pnpm dlx skills add a18268941610-crypto\u002FDecepticon-shentou --skill reverser-yara-hunting","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Freverser\u002Fyara-hunting\u002FSKILL.md",true,[],[52,59,66,73,80,87],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7EJXTEFYQPHY32431RWJENT","wps-pixie-dust","WPS Pixie-Dust offline nonce attack (reaver -K \u002F pixiewps) and fallback online PIN brute (bully) to recover the AP's WPA PSK without capturing a handshake.","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwps-pixie-dust\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7EJXHKBXYF3QSYNW5YSK10H","wpa3-sae","WPA3-SAE transition-mode downgrade (DragonShift), SSID Confusion CVE-2023-52424, Dragonblood side-channels, and SAE captive-portal credential recovery against WPA3-Personal networks.","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa3-sae\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7EJXAC5W1C1MACKKP1RRT8K","wpa2-psk","WPA\u002FWPA2-PSK handshake capture via targeted deauth + PMKID (no deauth required) + offline hashcat cracking. The most common consumer\u002FSMB encryption mode in 2026.","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa2-psk\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7EJX02A5FFBM2V7VG52GNSK","wpa-enterprise-eap","WPA\u002FWPA2\u002FWPA3-Enterprise (802.1X\u002FEAP) rogue-RADIUS evil-twin for MSCHAPv2 capture, GTC downgrade, and PEAP relay. MSCHAPv2 capture equals a NetNTLM hash — the primary wireless on-ramp to Active Directory.","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa-enterprise-eap\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7EJWNRRMBRZQTKH3VFYAK58","krack-fragattacks","KRACK key-reinstallation (CVE-2017-13077..13082) and FragAttacks fragmentation\u002Faggregation flaws (CVE-2020-24586..24588, CVE-2020-26139..26147) against legacy or embedded 802.11 supplicants with poor patch cadence.","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fkrack-fragattacks\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7EJWB0CC58R8Z4HW6YRQCZW","evil-twin-karma","Evil-twin rogue AP with KARMA\u002FMana PNL-probe response, captive-portal credential capture, and post-association MITM for PSK\u002Fopen networks. Distinct from wpa-enterprise-eap which targets 802.1X.","https:\u002F\u002Fgithub.com\u002Fa18268941610-crypto\u002FDecepticon-shentou\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fevil-twin-karma\u002FSKILL.md",[],[]]