Skip to content

Commit

Permalink
Linux: Update malfind plugin to use symbols.symbol_table_is_64bit whe…
Browse files Browse the repository at this point in the history
…n determining if a 32bit OS is detected in the sample
  • Loading branch information
eve-mem committed Oct 1, 2024
1 parent 5d2a5f9 commit ba351f5
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions volatility3/framework/plugins/linux/malfind.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import List
import logging
from volatility3.framework import constants, interfaces
from volatility3.framework import renderers
from volatility3.framework import renderers, symbols
from volatility3.framework.configuration import requirements
from volatility3.framework.objects import utility
from volatility3.framework.renderers import format_hints
Expand Down Expand Up @@ -63,15 +63,9 @@ def _list_injections(self, task):
def _generator(self, tasks):
# determine if we're on a 32 or 64 bit kernel
vmlinux = self.context.modules[self.config["kernel"]]
if (
self.context.symbol_space.get_type(
vmlinux.symbol_table_name + constants.BANG + "pointer"
).size
== 4
):
is_32bit_arch = True
else:
is_32bit_arch = False
is_32bit_arch = not symbols.symbol_table_is_64bit(
self.context, vmlinux.symbol_table_name
)

for task in tasks:
process_name = utility.array_to_string(task.comm)
Expand Down

0 comments on commit ba351f5

Please sign in to comment.