From 730333ed3bc6cbade2d15070b479ac233419ea60 Mon Sep 17 00:00:00 2001 From: Fernando Urbano Date: Thu, 25 Jul 2024 20:52:36 +0900 Subject: [PATCH] add depth failsafe --- modules/signatures/windows/virus.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/signatures/windows/virus.py b/modules/signatures/windows/virus.py index 18411762..ccaaf949 100644 --- a/modules/signatures/windows/virus.py +++ b/modules/signatures/windows/virus.py @@ -96,8 +96,10 @@ def on_call(self, call, process): if handle in self.handles: key = self.handles[handle] if key in self.copydests: - while key in self.readcopyfiles: + key_max_depth = 3 + while key_max_depth and key in self.readcopyfiles: key = self.readcopyfiles[key] + key_max_depth -= 1 self.infected_files.add(key) self.saw_virus = True if self.pid: