mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-03 01:18:42 +02:00
Linux - update handling of kernels that do not have loadable module support
This commit is contained in:
@@ -4,16 +4,19 @@
|
||||
"""A module containing a collection of plugins that produce data typically
|
||||
found in Linux's /proc file system."""
|
||||
|
||||
import logging
|
||||
|
||||
from typing import List, Generator, Iterable
|
||||
|
||||
from volatility.framework import contexts
|
||||
from volatility.framework import renderers, constants, interfaces
|
||||
from volatility.framework import exceptions, renderers, constants, interfaces
|
||||
from volatility.framework.automagic import linux
|
||||
from volatility.framework.configuration import requirements
|
||||
from volatility.framework.interfaces import plugins
|
||||
from volatility.framework.objects import utility
|
||||
from volatility.framework.renderers import format_hints
|
||||
|
||||
vollog = logging.getLogger(__name__)
|
||||
|
||||
class Lsmod(plugins.PluginInterface):
|
||||
"""Lists loaded kernel modules."""
|
||||
@@ -44,6 +47,12 @@ class Lsmod(plugins.PluginInterface):
|
||||
|
||||
vmlinux = contexts.Module(context, vmlinux_symbols, layer_name, 0)
|
||||
|
||||
try:
|
||||
vmlinux.get_type("module")
|
||||
except exceptions.SymbolError:
|
||||
vollog.debug("The required symbol 'module' is not present in symbol table. Please check that kernel modules are enabled for the system under analysis.")
|
||||
return
|
||||
|
||||
modules = vmlinux.object_from_symbol(symbol_name = "modules").cast("list_head")
|
||||
|
||||
table_name = modules.vol.type_name.split(constants.BANG)[0]
|
||||
|
||||
Reference in New Issue
Block a user