security:malware:yara
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| security:malware:yara [2021/06/26 11:00] – wikiadm | security:malware:yara [2021/07/03 15:52] (aktuell) – wikiadm | ||
|---|---|---|---|
| Zeile 35: | Zeile 35: | ||
| ====== Rule to detect maleware in PE Files ====== | ====== Rule to detect maleware in PE Files ====== | ||
| + | ===== Generate Rule from Strings ===== | ||
| generate_rule.sh | generate_rule.sh | ||
| < | < | ||
| #!/bin/bash | #!/bin/bash | ||
| - | echo " | + | echo " |
| echo " | echo " | ||
| - | echo " | ||
| + | echo " | ||
| count=1 | count=1 | ||
| while read s; do | while read s; do | ||
| Zeile 51: | Zeile 52: | ||
| echo "" | echo "" | ||
| + | |||
| echo " | echo " | ||
| echo " | echo " | ||
| Zeile 58: | Zeile 60: | ||
| echo " | echo " | ||
| </ | </ | ||
| - | ====== Rule to detect maleware in PE Files ====== | + | ===== Final Rule ===== |
| malware.yar | malware.yar | ||
| - | < | + | --> generated, but left only relevant string |
| - | --> generated | + | |
| - | </ | + | rule mw_rule |
| - | ... | + | { |
| + | strings: | ||
| + | $s176 = "cmd.exe /c \" | ||
| + | |||
| + | condition: | ||
| + | $s176 and | ||
| + | uint16(0) == 0x5A4D and | ||
| + | uint32(uint32(0x3C)) == 0x4550 | ||
| + | } | ||
| < | < | ||
| yara / | yara / | ||
| </ | </ | ||
security/malware/yara.1624698015.txt.gz · Zuletzt geändert: von wikiadm
