मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी6.5k · #14180

reverser-yara-hunting

यह क्या करती है

यह बताती है कि मैलवेयर के पैटर्न का वर्णन करने वाले YARA नियम कैसे लिखें और गलत अलार्म से कैसे बचें। यह मैलवेयर विश्लेषकों और थ्रेट हंटरों के लिए है।

कब इस्तेमाल करें

  • ✓जब थ्रेट हंटर को फ़ाइलों के समूह में किसी खास मैलवेयर परिवार को ढूँढने वाला नियम चाहिए।
  • ✓जब विश्लेषक को मौजूदा YARA नियम में गलत अलार्म कम करने हों।
  • ✓जब टीम सार्वजनिक मैलवेयर सैंपल संग्रह में कोई पैटर्न खोजना चाहे।

Skill का लिंक

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/reverser/yara-hunting/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/reverser/yara-hunting/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस मैलवेयर परिवार की फ़ाइलें उसकी अनोखी स्ट्रिंग से पहचानने वाला YARA नियम लिखिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह स्किल AI को मेटाडेटा, खास टेक्स्ट या बाइट पैटर्न, और फ़ाइल आकार व साइनिंग स्थिति जैसी शर्तों वाले नियम लिखने को कहती है, फिर उन्हें आम गलतियों के खिलाफ़ जाँचती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

YARA Rule Authoring + Hunting

Anatomy of a good rule

import "pe"
import "hash"

rule MalFamily_DropperVariant_Q4_2024 {
    meta:
        author = "you"
        date = "2024-11-20"
        description = "MalFamily dropper, observed Q4 2024 campaign"
        hash = "deadbeefdeadbeefdeadbeefdeadbeef"
        tlp = "amber"
        confidence = "high"
        false_positives = "low (test against AV vendor samples)"
        mitre = "T1055"

    strings:
        $magic = { 4D 5A 90 00 03 }            // MZ + DOS header
        $config_marker = { 7A 89 ?? ?? 4F 8C } // 6-byte signature, 2 wildcards
        $string1 = "loader_stage_2" wide
        $string2 = "cmd.exe /c " ascii
        $api1   = "VirtualAllocEx"
        $api2   = "WriteProcessMemory"
        $api3   = "CreateRemoteThread"
        // Avoid generic strings — they cause FPs.

    condition:
        uint16(0) == 0x5A4D and                    // PE header
        filesize < 5MB and                          // bounded — avoids huge-file scans
        $config_marker and                          // unique marker
        2 of ($api1, $api2, $api3) and             // at least 2 of the 3 process-inject APIs
        any of ($string*) and
        pe.imports("ws2_32.dll", "WSAStartup") and  // network capability
        not pe.is_signed                            // unsigned
}

The condition tools you need

// Filesize / offset reads (no module)
filesize > 100KB and filesize < 5MB
uint32(0x3c) > 0 and uint32(uint32(0x3c)) == 0x4550  // valid PE

// "for" loops over offsets / sections
for any i in (0..pe.number_of_sections - 1):
    (pe.sections[i].name == ".text" and pe.sections[i].entropy > 7.0)

// "of"
1 of them                              // any one string
all of ($a*)                           // all $a*-prefix strings
3 of ($s1, $s2, $s3, $s4, $s5)         // at least 3 of 5

// Hash module
hash.sha256(0, filesize) == "..."      // exact-match rule
hash.imphash() == "..."                // PE import hash (fragile but high-signal)

High-leverage patterns

Family-stable byte patterns

Look for unique byte sequences that survive obfuscation:

  • Crypto constants (SHA-256 IVs, AES sbox, RC4 init pattern)
  • Hard-coded SID strings
  • C2 packet headers (magic bytes, fixed offsets)
  • Reflective loader entry stub bytes (Donut, Cobalt Strike's PE loader)

Capability rules

Don't fingerprint a sample — fingerprint a TECHNIQUE:

rule Suspicious_ProcessInjection {
    meta: description = "VirtualAlloc + WriteProcessMemory + CreateRemoteThread = injection"
    condition:
        pe.imports("kernel32.dll", "VirtualAllocEx") and
        pe.imports("kernel32.dll", "WriteProcessMemory") and
        pe.imports("kernel32.dll", "CreateRemoteThread")
}

This catches every injector regardless of family. False-positive: legitimate tools (Procmon, IDA, debuggers). Reduce via additional conditions (unsigned, in temp dir, etc.).

Anti-analysis fingerprinting

rule AntiVm_VMware_Strings {
    strings:
        $s1 = "VMware" ascii nocase
        $s2 = "VBoxService" ascii nocase
        $s3 = "qemu" ascii nocase
        $s4 = { 56 4D 58 68 } // "VMXh" — VMware backdoor port magic
    condition: 2 of them
}

Hunting at scale

VirusTotal Retrohunt (paid)

// Upload rule to VT — runs against the past 90 days of submissions
// Outputs new hashes matching the signature

MalwareBazaar (free)

# yarafs.io / abuse.ch — runs YARA against MB corpus
curl https://mb-api.abuse.ch/api/v1/ -X POST -d 'query=get_yara&yara_rule=YourRule'

Local corpus scan

# Recursive scan
yara -r rules/ /samples/
# JSON output for downstream processing
yara -r rules/ /samples/ -m -p 4    # -m: metadata, -p: parallel threads

# Fast pre-filter with capa first
capa /samples/sample.exe   # extracts capabilities; rule-driven, JSON-output

Common pitfalls

Pitfall Fix
Too-short strings (4 bytes) → false positives Use 8+ byte strings; require multiple matches
Regex /pattern/ with [, ?, * → slow Prefer literal strings; if regex needed, anchor with ^/\b
No filesize bound → scans 5GB files Always include filesize < N
Multiple wildcards in one hex ?? → exponential matcher cost Limit to 2-3 wildcards per byte string
condition: any of them with one common string → constant FPs Use 2 of them minimum
Rule name with version Use a separate meta.version so
अक्सर पूछे जाने वाले सवाल

YARA क्या है?

YARA एक पैटर्न-मिलान भाषा है जिससे मैलवेयर फ़ाइलों का वर्णन और पहचान होती है।

यह गलत अलार्म से कैसे बचती है?

यह खास स्ट्रिंग इस्तेमाल करने और नियमों पर भरोसा करने से पहले उन्हें जाँचने की सलाह देती है।

सैंपल कहाँ खोजे जाते हैं?

यह VirusTotal और MalwareBazaar जैसी सार्वजनिक मैलवेयर सैंपल सेवाओं का ज़िक्र करती है।

जानकारी

लेखक का मूल विवरण

YARA rule authoring + hunting — `condition:` syntax, hex patterns with wildcards, `for`/`any of them`, PE module, ELF module, hash module, math module. Build per-family signatures, hunt at scale via VT/MalwareBazaar/Hybrid Analysis. Avoid common pitfalls (collisions, slow rules, regex traps).

repo: BitterSecurity/Decepticon

लोकप्रियता

GitHub स्टार
6.5k
रैंकिंग में स्थान
#14180
लाइसेंस
Apache-2.0
अपडेट की गई
1/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

detector-overview

6.5k

यह आपके एजेंट को स्कैनर से चिह्नित कोड पढ़ने और तय करने में मदद करती है कि कौन सी जगहें असली सुरक्षा बग हैं और कौन सी गलत चेतावनी।

कोडिंगसिक्योरिटी

exploiter-overview

6.5k

यह आपके एजेंट को कई पक्की सुरक्षा कमज़ोरियों को एक परीक्षण श्रृंखला में जोड़ने और जाँचने में मदद करती है कि वह श्रृंखला कितनी दूर तक पहुँच सकती है।

कोडिंगसिक्योरिटी

llm-redteam-overview

6.5k

यह आपके एजेंट को परीक्षण के लिए सही AI रेड-टीम गाइड खोजने में मदद करती है, प्रॉम्प्ट इंजेक्शन से लेकर मॉडल के दुरुपयोग तक 15 रणनीति समूहों में।

कोडिंगसिक्योरिटी

aatmf-t01-prompt-injection

6.5k

समझाती है कि प्रॉम्प्ट इंजेक्शन क्या है, जिसमें छिपे निर्देश AI सिस्टम के नियम बदलने की कोशिश करते हैं, ताकि सुरक्षा परीक्षक उसकी जाँच कर सकें।

कोडिंगसिक्योरिटी

मिलती-जुलती skills