Skip to content

Commit 91ff5eb

Browse files
committed
Plugins: make get_executable_path more accurate in process_spoofing
1 parent 93bdcb3 commit 91ff5eb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

volatility3/framework/plugins/linux/malware/process_spoofing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def get_executable_path(
5959
task: task_struct object of the process
6060
6161
Returns:
62-
Tuple of (basename, is_deleted) or (None, False) if not available
62+
Tuple of (full_path, is_deleted) or (None, False) if not available
6363
"""
6464
is_deleted = False
6565

@@ -105,8 +105,7 @@ def get_executable_path(
105105
)
106106
# Continue without deletion info - we still have the path
107107

108-
basename = PurePosixPath(exe_path).name
109-
return basename, is_deleted
108+
return exe_path, is_deleted
110109

111110
@classmethod
112111
def get_cmdline_basename(
@@ -185,7 +184,8 @@ def _extract_process_names(
185184
Returns:
186185
Tuple of (exe_basename, cmdline_basename, comm, is_deleted)
187186
"""
188-
exe_basename, is_deleted = self.get_executable_path(self.context, task)
187+
exe_path, is_deleted = self.get_executable_path(self.context, task)
188+
exe_basename = PurePosixPath(exe_path).name if exe_path else None
189189
cmdline_basename = self.get_cmdline_basename(self.context, task)
190190
comm = self.get_comm(task)
191191

0 commit comments

Comments
 (0)