Linux - update handling of kernels that do not have loadable module support

This commit is contained in:
Andrew Case
2020-01-03 17:50:06 +00:00
committed by ikelos
parent fc005d08cc
commit 65556a2c92
2 changed files with 13 additions and 2 deletions
+10 -1
View File
@@ -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]