update check syscall

This commit is contained in:
Andrew Case
2018-12-08 17:34:48 +00:00
committed by ikelos
parent ade6aa1e74
commit dc91a16a2f
+12 -3
View File
@@ -5,10 +5,11 @@ import logging
from volatility.framework import renderers, constants
from volatility.framework.automagic import linux
from volatility.framework.interfaces import plugins
from volatility.framework.renderers import format_hints
from volatility.framework.objects import utility
from volatility.framework import exceptions
from volatility.plugins.linux import lsmod
from volatility.framework.configuration import requirements
vollog = logging.getLogger(__name__)
@@ -19,9 +20,17 @@ try:
except ImportError:
has_capstone = False
class Check_syscall(lsmod.Lsmod):
class Check_syscall(plugins.PluginInterface):
"""Check system call table for hooks"""
@classmethod
def get_requirements(cls):
return [requirements.TranslationLayerRequirement(name = 'primary',
description = 'Kernel Address Space',
architectures = ["Intel32", "Intel64"]),
requirements.SymbolRequirement(name = "vmlinux",
description = "Linux Kernel")]
def _get_table_size_next_symbol(self, table_addr, ptr_sz, vmlinux):
"""
Returns the size of the table based on the next symbol
@@ -157,7 +166,7 @@ class Check_syscall(lsmod.Lsmod):
symbols = list(self.context.symbol_space.get_symbols_by_location(call_addr))
if len(symbols) > 0:
sym_name = str(symbols[0])
sym_name = str(symbols[0].split("!")[1])
else:
sym_name = "UNKNOWN"