remove module tainting proxies

This commit is contained in:
Abyss Watcher
2025-01-16 16:24:38 +01:00
parent 0e4e751844
commit b447bfa81c
2 changed files with 14 additions and 27 deletions
@@ -140,9 +140,21 @@ class Modxview(interfaces.plugins.PluginInterface):
seen_addresses.add(module.vol.offset)
if self.config.get("plain_taints"):
taints = module.get_taints_as_plain_string()
taints = tainting.Tainting.get_taints_as_plain_string(
self.context,
kernel_name,
module.taints,
True,
)
else:
taints = ",".join(module.get_taints_parsed())
taints = ",".join(
tainting.Tainting.get_taints_parsed(
self.context,
kernel_name,
module.taints,
True,
)
)
yield (
0,
@@ -19,7 +19,6 @@ from volatility3.framework.layers import linear, intel
from volatility3.framework.objects import utility
from volatility3.framework.symbols import generic, linux, intermed
from volatility3.framework.symbols.linux.extensions import elf
from volatility3.framework.symbols.linux.utilities import tainting
vollog = logging.getLogger(__name__)
@@ -279,30 +278,6 @@ class module(generic.GenericIntelProcess):
return None
def get_taints_as_plain_string(self) -> str:
"""Convert the module's taints value to a 1-1 character mapping.
Convenient wrapper around framework's Tainting capabilities.
Returns:
The raw taints string.
"""
return tainting.Tainting(
self._context,
linux.LinuxUtilities.get_module_from_volobj_type(self._context, self).name,
).get_taints_as_plain_string(self.taints, True)
def get_taints_parsed(self) -> List[str]:
"""Convert the module's taints string to a 1-1 descriptor mapping.
Convenient wrapper around framework's Tainting capabilities.
Returns:
A comprehensive (user-friendly) taint descriptor list.
"""
return tainting.Tainting(
self._context,
linux.LinuxUtilities.get_module_from_volobj_type(self._context, self).name,
).get_taints_parsed(self.taints, True)
@property
def section_symtab(self):
if self.has_member("kallsyms"):