Skip to content

Commit

Permalink
Update packer_nspack.py
Browse files Browse the repository at this point in the history
Update signature for correct PE static format
  • Loading branch information
kevross33 authored Oct 4, 2024
1 parent 2bcef9d commit a797efe
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions modules/signatures/all/packer_nspack.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ class NsPacked(Signature):
mbcs = ["OB0001", "OB0002", "OB0006", "F0001"]

def run(self):
for section in self.results.get("static", {}).get("pe", {}).get("sections", []):
if section["name"].lower().startswith(".nsp"):
self.data.append({"section": section})
return True
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"].lower().startswith(".nsp"):
self.data.append({"section": section})
ret = True

return False
return ret

0 comments on commit a797efe

Please sign in to comment.