Skip to content

Commit

Permalink
Merge pull request #453 from kevross33/patch-62
Browse files Browse the repository at this point in the history
Update packer_yoda.py
  • Loading branch information
doomedraven authored Oct 5, 2024
2 parents 38cf48d + a3e4834 commit 5a6c536
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions modules/signatures/all/packer_yoda.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from lib.cuckoo.common.abstracts import Signature


class YodaPacked(Signature):
name = "packer_yoda"
description = "Executable file is packed/obfuscated with Y0da"
Expand All @@ -29,9 +28,15 @@ class YodaPacked(Signature):
mbcs = ["OB0001", "OB0002", "OB0006", "F0001"]

def run(self):
for section in self.results.get("static", {}).get("pe", {}).get("sections", []):
if section["name"].startswith(".yP") or section["name"].startswith(".y0da"):
self.data.append({"section": section})
return True
ret = False

target = self.results.get("target", {})
if target.get("category") in ("file", "static") and target.get("file"):
pe = self.results["target"]["file"].get("pe", [])
if pe:
for section in pe["sections"]:
if section["name"].startswith(".yP") or section["name"].startswith(".y0da"):
self.data.append({"section": section})
ret = True

return False
return ret

0 comments on commit 5a6c536

Please sign in to comment.