Skip to content

Commit fa5af08

Browse files
authored
Merge branch 'develop' into linux_proc_dump
2 parents 8d47f89 + e17cb15 commit fa5af08

File tree

122 files changed

+3025
-455
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+3025
-455
lines changed

.github/workflows/black.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
lint:
77
runs-on: ubuntu-20.04
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- uses: psf/black@stable
1111
with:
1212
options: "--check --diff --verbose"

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ on:
1717
pull_request:
1818
# The branches below must be a subset of the branches above
1919
branches: [ "develop" ]
20-
schedule:
21-
- cron: '16 8 * * 0'
20+
# schedule:
21+
# - cron: '16 8 * * 0'
2222

2323
jobs:
2424
analyze:

.readthedocs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ sphinx:
1212
# Optionally build your docs in additional formats such as PDF and ePub
1313
formats: all
1414

15+
build:
16+
os: ubuntu-22.04
17+
tools:
18+
python: "3.11"
19+
1520
# Optionally set the version of Python and requirements required to build your docs
1621
python:
17-
version: 3.7
1822
install:
1923
- requirements: doc/requirements.txt

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The latest generated copy of the documentation can be found at: <https://volatil
107107

108108
## Licensing and Copyright
109109

110-
Copyright (C) 2007-2022 Volatility Foundation
110+
Copyright (C) 2007-2023 Volatility Foundation
111111

112112
All Rights Reserved
113113

doc/requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# These packages are required for building the documentation.
2-
sphinx>=4.0.0
2+
sphinx>=4.0.0,<7
33
sphinx_autodoc_typehints>=1.4.0
44
sphinx-rtd-theme>=0.4.3
5+
6+
yara-python
7+
pycryptodome
8+
pefile
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
macOS Tutorial
2+
==============
3+
4+
This guide will give you a brief overview of how volatility3 works as well as a demonstration of several of the plugins available in the suite.
5+
6+
Acquiring memory
7+
----------------
8+
9+
Volatility3 does not provide the ability to acquire memory. The example below is an open source tool. Other commercial tools are also available.
10+
11+
* `osxpmem <https://github.com/Velocidex/c-aff4/releases/download/3.2/osxpmem_3.2.zip>`_
12+
13+
14+
15+
Procedure to create symbol tables for macOS
16+
--------------------------------------------
17+
18+
To create a symbol table please refer to :ref:`symbol-tables:Mac or Linux symbol tables`.
19+
20+
.. tip:: It may be possible to locate pre-made ISF files from the `download link <https://downloads.volatilityfoundation.org/volatility3/symbols/mac.zip>`_ ,
21+
which is built and maintained by `volatilityfoundation <https://www.volatilityfoundation.org/>`_.
22+
After creating the file or downloading it from the link, place the file under the directory ``volatility3/symbols/``.
23+
24+
25+
Listing plugins
26+
---------------
27+
28+
The following is a sample of the macOS plugins available for volatility3, it is not complete and more plugins may
29+
be added. For a complete reference, please see the volatility 3 :doc:`list of plugins <volatility3.plugins>`.
30+
For plugin requests, please create an issue with a description of the requested plugin.
31+
32+
.. code-block:: shell-session
33+
34+
$ python3 vol.py --help | grep -i mac. | head -n 4
35+
mac.bash.Bash Recovers bash command history from memory.
36+
mac.check_syscall.Check_syscall
37+
mac.check_sysctl.Check_sysctl
38+
mac.check_trap_table.Check_trap_table
39+
40+
.. note:: Here the the command is piped to grep and head in-order to provide the start of the list of macOS plugins.
41+
42+
43+
Using plugins
44+
-------------
45+
46+
The following is the syntax to run the volatility CLI.
47+
48+
.. code-block:: shell-session
49+
50+
$ python3 vol.py -f <path to memory image> <plugin_name> <plugin_option>
51+
52+
53+
Example
54+
-------
55+
56+
banners
57+
~~~~~~~
58+
59+
In this example we will be using a memory dump from the Securinets CTF Quals 2019 Challenge called Contact_me. We will limit the discussion to memory forensics with volatility 3 and not extend it to other parts of the challenge.
60+
Thanks go to `stuxnet <https://github.com/stuxnet999/>`_ for providing this memory dump and `writeup <https://stuxnet999.github.io/securinets-ctf/2019/08/24/SecurinetsQuals2019-Contact-Me.html>`_.
61+
62+
63+
.. code-block:: shell-session
64+
65+
$ python3 vol.py -f contact_me banners.Banners
66+
67+
Volatility 3 Framework 2.4.2
68+
69+
Progress: 100.00 PDB scanning finished
70+
Offset Banner
71+
72+
0x4d2c7d0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
73+
0xb42b180 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
74+
0xcda9100 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
75+
0x1275e7d0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
76+
0x1284fba4 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
77+
0x34ad0180 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64
78+
79+
80+
The above command helps us to find the memory dump's Darwin kernel version. Now using the above banner we can search for the needed ISF file.
81+
If ISF file cannot be found then, follow the instructions on :ref:`getting-started-macos-tutorial:Procedure to create symbol tables for macOS`. After that, place the ISF file under the ``volatility3/symbols`` directory.
82+
83+
mac.pslist
84+
~~~~~~~~~~~~
85+
86+
.. code-block:: shell-session
87+
88+
$ python3 vol.py -f contact_me mac.pslist.PsList
89+
90+
Volatility 3 Framework 2.4.2
91+
Progress: 100.00 Stacking attempts finished
92+
93+
PID PPID COMM
94+
95+
0 0 kernel_task
96+
1 0 launchd
97+
35 1 UserEventAgent
98+
38 1 kextd
99+
39 1 fseventsd
100+
37 1 uninstalld
101+
45 1 configd
102+
46 1 powerd
103+
52 1 logd
104+
58 1 warmd
105+
.....
106+
107+
``mac.pslist`` helps us to list the processes which are running, their PIDs and PPIDs.
108+
109+
mac.pstree
110+
~~~~~~~~~~~~
111+
112+
.. code-block:: shell-session
113+
114+
$ python3 vol.py -f contact_me mac.pstree.PsTree
115+
Volatility 3 Framework 2.4.2
116+
Progress: 100.00 Stacking attempts finished
117+
PID PPID COMM
118+
119+
35 1 UserEventAgent
120+
38 1 kextd
121+
39 1 fseventsd
122+
37 1 uninstalld
123+
204 1 softwareupdated
124+
* 449 204 SoftwareUpdateCo
125+
337 1 system_installd
126+
* 455 337 update_dyld_shar
127+
128+
``mac.pstree`` helps us to display the parent child relationships between processes.
129+
130+
mac.ifconfig
131+
~~~~~~~~~~
132+
133+
.. code-block:: shell-session
134+
135+
$ python3 vol.py -f contact_me mac.ifconfig.Ifconfig
136+
137+
Volatility 3 Framework 2.4.2
138+
Progress: 100.00 Stacking attempts finished
139+
Interface IP Address Mac Address Promiscuous
140+
141+
lo0 False
142+
lo0 127.0.0.1 False
143+
lo0 ::1 False
144+
lo0 fe80:1::1 False
145+
gif0 False
146+
stf0 False
147+
en0 00:0C:29:89:8B:F0 00:0C:29:89:8B:F0 False
148+
en0 fe80:4::10fb:c89d:217f:52ae 00:0C:29:89:8B:F0 False
149+
en0 192.168.140.128 00:0C:29:89:8B:F0 False
150+
utun0 False
151+
utun0 fe80:5::2a95:bb15:87e3:977c False
152+
153+
we can use the ``mac.ifconfig`` plugin to get information about the configuration of the network interfaces of the host under investigation.

doc/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ There is also some information to get you started quickly:
2525
:caption: Getting Started
2626

2727
getting-started-linux-tutorial
28+
getting-started-mac-tutorial
2829
getting-started-windows-tutorial
2930

3031

doc/source/simple-plugin.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ The plugin then takes the process's ``BaseDllName`` value, and calls :py:meth:`~
259259
as defined by the symbols, are directly accessible and use the case-style of the symbol library it came from (in Windows,
260260
attributes are CamelCase), such as ``entry.BaseDllName`` in this instance. Any attributes not defined by the symbol but added
261261
by Volatility extensions cannot be properties (in case they overlap with the attributes defined in the symbol libraries)
262-
and are therefore always methods and pretended with ``get_``, in this example ``BaseDllName.get_string()``.
262+
and are therefore always methods and prepended with ``get_``, in this example ``BaseDllName.get_string()``.
263263

264264
Finally, ``FullDllName`` is populated. These operations read from memory, and as such, the memory image may be unable to
265265
read the data at a particular offset. This will cause an exception to be thrown. In Volatility 3, exceptions are thrown

requirements-dev.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@ jsonschema>=2.3.0
2020

2121
# This is required for memory acquisition via leechcore/pcileech.
2222
leechcorepyc>=2.4.0
23-
24-
# This is required for analyzing Linux samples compressed using AVMLs native
25-
# compression format. It is not required for AVML's standard LiME compression.
26-
python-snappy==0.6.0

requirements.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,3 @@ pycryptodome
1616

1717
# This is required for memory acquisition via leechcore/pcileech.
1818
leechcorepyc>=2.4.0
19-
20-
# This is required for analyzing Linux samples compressed using AVMLs native
21-
# compression format. It is not required for AVML's standard LiME compression.
22-
python-snappy==0.6.0

0 commit comments

Comments
 (0)