Skip to content

Commit d08c7b3

Browse files
committed
Merge branch 'modxview_plugin' of github.com:Abyss-W4tcher/volatility3 into modxview_plugin
2 parents a4ad727 + cf4389e commit d08c7b3

File tree

15 files changed

+61
-42
lines changed

15 files changed

+61
-42
lines changed

volatility3/cli/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ def run(self):
367367
plugin,
368368
help=plugin_list[plugin].__doc__,
369369
description=plugin_list[plugin].__doc__,
370+
epilog=plugin_list[plugin].additional_description,
370371
)
371372
self.populate_requirements_argparse(plugin_parser, plugin_list[plugin])
372373

volatility3/framework/interfaces/plugins.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ class PluginInterface(
112112
# Be careful with inheritance around this (We default to requiring a version which doesn't exist, so it must be set)
113113
_required_framework_version: Tuple[int, int, int] = (0, 0, 0)
114114
"""The _version variable is a quick way for plugins to define their current interface, it should follow SemVer rules"""
115+
additional_description: str = None
116+
"""Display additional description of the plugin after the description of the arguments. See: https://docs.python.org/3/library/argparse.html#epilog"""
115117

116118
def __init__(
117119
self,

volatility3/framework/layers/registry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ def get_key(
192192
while key_array and node_key:
193193
subkeys = node_key[-1].get_subkeys()
194194
for subkey in subkeys:
195-
# registry keys are not case sensitive so compare lowercase
196-
# https://msdn.microsoft.com/en-us/library/windows/desktop/ms724946(v=vs.85).aspx
197-
if subkey.get_name().lower() == key_array[0].lower():
195+
# registry keys are not case sensitive so compare likewise
196+
# https://learn.microsoft.com/en-us/windows/win32/sysinfo/structure-of-the-registry
197+
if subkey.get_name().casefold() == key_array[0].casefold():
198198
node_key = node_key + [subkey]
199199
found_key, key_array = found_key + [key_array[0]], key_array[1:]
200200
break

volatility3/framework/plugins/linux/bash.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
22
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
33
#
4-
"""A module containing a collection of plugins that produce data typically
5-
found in Linux's /proc file system."""
4+
"""A module containing a plugin that recovers bash command history
5+
from bash process memory."""
66

77
import datetime
88
import struct

volatility3/framework/plugins/linux/check_afinfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
22
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
33
#
4-
"""A module containing a collection of plugins that produce data typically
5-
found in Linux's /proc file system."""
4+
"""A module containing a plugin that verifies the operation function
5+
pointers of network protocols."""
66
import logging
77
from typing import List
88

volatility3/framework/plugins/linux/check_syscall.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
22
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
33
#
4-
"""A module containing a collection of plugins that produce data typically
5-
found in Linux's /proc file system."""
4+
"""A module containing a plugin that checks the system call table for hooks."""
65
import contextlib
76
import logging
87
from typing import List

volatility3/framework/plugins/linux/elfs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
22
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
33
#
4-
"""A module containing a collection of plugins that produce data typically
5-
found in Linux's /proc file system."""
4+
"""A module containing a plugin for enumerating memory-mapped
5+
ELF files across all processes."""
66

77
import logging
88
from typing import List, Optional, Type

volatility3/framework/plugins/linux/envars.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import logging
66
from typing import Iterable, Tuple
77

8-
from volatility3.framework import renderers, interfaces
8+
from volatility3.framework import renderers, interfaces, exceptions
99
from volatility3.framework.configuration import requirements
1010
from volatility3.framework.interfaces import plugins
1111
from volatility3.framework.objects import utility
@@ -58,10 +58,16 @@ def get_task_env_variables(
5858
Tuples of (key, value) representing each environment variable.
5959
"""
6060

61-
task_name = utility.array_to_string(task.comm)
61+
# This ensures the `task` is valid as well as its
62+
# memory mapping structures
63+
try:
64+
task_name = utility.array_to_string(task.comm)
65+
env_start = task.mm.env_start
66+
env_end = task.mm.env_end
67+
except exceptions.InvalidAddressException:
68+
return None
69+
6270
task_pid = task.pid
63-
env_start = task.mm.env_start
64-
env_end = task.mm.env_end
6571
env_area_size = env_end - env_start
6672
if not (0 < env_area_size <= env_area_max_size):
6773
vollog.debug(

volatility3/framework/plugins/linux/lsmod.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
22
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
33
#
4-
"""A module containing a collection of plugins that produce data typically
5-
found in Linux's /proc file system."""
4+
"""A module containing a plugin that lists loaded kernel modules."""
65

76
import logging
87
from typing import List, Iterable

volatility3/framework/plugins/windows/cmdscan.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def get_filtered_vads(
6767
6868
Args:
6969
conhost_proc: the process object for conhost.exe
70+
size_filter: size above which vads will not be returned
7071
7172
Returns:
7273
A list of tuples of:
@@ -99,8 +100,8 @@ def get_command_history(
99100
kernel_layer_name: The name of the layer on which to operate
100101
kernel_symbol_table_name: The name of the table containing the kernel symbols
101102
config_path: The config path where to find symbol files
102-
procs: list of process objects
103-
max_history: an initial set of CommandHistorySize values
103+
procs: List of process objects
104+
max_history: An initial set of CommandHistorySize values
104105
105106
Returns:
106107
The conhost process object, the command history structure, a dictionary of properties for
@@ -227,7 +228,6 @@ def get_command_history(
227228
"data": command_history.CommandCountMax,
228229
}
229230
)
230-
231231
command_history_properties.append(
232232
{
233233
"level": 1,
@@ -236,6 +236,7 @@ def get_command_history(
236236
"data": "",
237237
}
238238
)
239+
239240
for (
240241
cmd_index,
241242
bucket_cmd,
@@ -352,7 +353,7 @@ def _generator(
352353

353354
def _conhost_proc_filter(self, proc: interfaces.objects.ObjectInterface):
354355
"""
355-
Used to filter to only conhost.exe processes
356+
Used to filter only conhost.exe processes
356357
"""
357358
process_name = utility.array_to_string(proc.ImageFileName)
358359

0 commit comments

Comments
 (0)