From 78e51714e06760b0de0850f63ca034d0959b1ecf Mon Sep 17 00:00:00 2001 From: kevross33 Date: Fri, 4 Oct 2024 16:08:54 +0100 Subject: [PATCH] Update packer_titan.py Update signature for PE static format --- modules/signatures/all/packer_titan.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/modules/signatures/all/packer_titan.py b/modules/signatures/all/packer_titan.py index ad393d35..9c8f8e1e 100644 --- a/modules/signatures/all/packer_titan.py +++ b/modules/signatures/all/packer_titan.py @@ -15,7 +15,6 @@ from lib.cuckoo.common.abstracts import Signature - class TitanPacked(Signature): name = "packer_titan" description = "Executable file is packed/obfuscated with Titan" @@ -29,9 +28,15 @@ class TitanPacked(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(".titan"): - 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"].lower().startswith(".titan"): + self.data.append({"section": section}) + ret= True - return False + return ret