-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Enhance documentation for the project (#41) Co-authored-by: Br4guette <[email protected]> * Add build docs * Add more docs (#42) * Enhance documentation for the project * Update docs --------- Co-authored-by: Br4guette <[email protected]> * Add references (#43) * Enhance documentation for the project * Update docs * add references --------- Co-authored-by: Br4guette <[email protected]> * Add references * Add title * Title 2 * add : mkdocs navigation references * document codes * fix typo * typo * fix typo * fix typo in utils * fix docs in tutorials.md * add : How to use documentation rename : tuto to installation add : documentation for windows fix : mkdocs add paths * Add other OS documentation * fix how to * fix : typo in docs * fix : typo * fix: typo in index * add : dark mode * add : colors on documentation * fix: diataxis * Fix colors * fix readme * Fix dumpfiles (#46) * fix : Dumpfile issue with parameters * test : Create test for dumpfiles * fix context builder * fix dumpfiles : dumpfiles can now be passed with arguments * tests: add tests for each parameters of dumpfiles fix: add markers on tests to easily execute a bunch of test instead of the complete file * fix : kwargs value in set_arguments was setted to int directly * add : Add test fonctions to test dumpfiles with a virtaddr but not able to test locally * add : add pytest decorator markers to pslist_pid --------- Co-authored-by: Br4guette <[email protected]> * fix: fix error, function without parameter return an error * sorry * fix typing information (#47) * Fix/get plugins (#48) * fix : bad import on v3_plugins_mod fix : poetry lock modfied due to update dependacies fix : windows setargs * remover useless info --------- Co-authored-by: Br4guette <[email protected]> * Fix: Correct dict.get() usage in TreeGrid_to_json renderer and remove debug print - Corrected the usage of dict.get() method by removing keyword arguments and using positional arguments instead. - Ensured the render method returns a dictionary as expected. - Updated the to_list method to properly call the render method and handle exceptions. - Improved the docstrings to reflect the correct return types and behaviors of the methods. - Removed a debug print statement introduced in a previous commit. This fixes the TypeError and ensures the TreeGrid is properly rendered to JSON format. * oops * fix to dataframe * add test for volatility (#49) Co-authored-by: Br4guette <[email protected]> --------- Co-authored-by: Br4guette <[email protected]> Co-authored-by: St0n14 <[email protected]> Co-authored-by: Yann MAGNIN <[email protected]>
- Loading branch information
1 parent
c6665c7
commit 5e53bcf
Showing
30 changed files
with
1,300 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- dev | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
## Using pyDFIRRam for Linux or macOS | ||
|
||
### Introduction | ||
|
||
`pyDFIRRam` is a tool under development aimed at utilizing Volatility plugins for memory forensics on Linux and macOS systems. | ||
|
||
### Initial Setup | ||
|
||
1. **Installation**: | ||
- Ensure Python 3.10 (or compatible version) is installed. | ||
- Install `pyDFIRRam` using Poetry or manually. Example: | ||
``` | ||
pip install pydfirram | ||
``` | ||
2. **Setting up a Profile**: | ||
- Currently, there's no direct method via Python interface to add a profile. If you have a profile, place it in the Volatility symbols directory: | ||
- For Linux/macOS: | ||
``` | ||
$HOME/.local/lib/python3.10/site-packages/volatility3/symbols/ | ||
``` | ||
- For Poetry virtual environments: | ||
``` | ||
$HOME/.cache/pypoetry/virtualenvs/pydfirram-qv9SWnlF-py3.10/lib/python3.10/site-packages/volatility3/symbols/ | ||
``` | ||
### Using pyDFIRRam | ||
3. **Creating an Object**: | ||
- Import necessary modules and create an object for your memory dump: | ||
```python | ||
from pydfirram.core.base import Generic, OperatingSystem | ||
from pathlib import Path | ||
os = OperatingSystem.LINUX # Set to OperatingSystem.MACOS for macOS | ||
dumpfile = Path("dump.raw") # Replace with your actual memory dump path | ||
generic = Generic(os, dumpfile) | ||
``` | ||
4. **Listing Available Functions**: | ||
- To list all available Volatility plugins: | ||
```python | ||
generic.get_all_plugins() | ||
``` | ||
5. **Using Plugins**: | ||
- Refer to Volatility plugin documentation for parameters. Example using `pslist` plugin: | ||
```python | ||
generic.pslist(pid=[4]).to_list() | ||
``` | ||
6. **Formatting Output**: | ||
- The return from Volatility functions provides a `Rendering` class, allowing customization of output format. | ||
### Notes | ||
- Ensure your memory dump file (`dump.raw` in the example) is correctly specified. | ||
- Adjust paths and settings based on your specific environment and Python setup. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# How to Use pyDFIRRam for Windows | ||
|
||
This guide provides a brief and concise demonstration of how to use the pyDFIRRam tool for Windows. | ||
|
||
## Introduction | ||
|
||
Currently, the project is under development. To use the Volatility-related functions for Windows, follow these steps: | ||
|
||
### Initial Setup | ||
|
||
First, create an object for your memory dump: | ||
|
||
```python | ||
from pydfirram.modules.windows import Windows | ||
from pathlib import Path | ||
|
||
dump = Path("/home/dev/image.dump") | ||
win = Windows(dump) | ||
``` | ||
|
||
### Listing Available Functions | ||
|
||
The available functions are all the Volatility plugins (located in the Volatility plugin path). | ||
|
||
To list all available functions: | ||
|
||
```python | ||
win.get_all_plugins() | ||
``` | ||
|
||
You can use this function to retrieve all the plugins. | ||
|
||
### Using Parameters | ||
|
||
If you want to use Volatility parameters, refer to the plugin documentation. The parameters expected are generally the same with the same names. | ||
|
||
For example, to use the `pslist` plugin with a parameter: | ||
|
||
```python | ||
win.pslist(pid=4).to_list() | ||
``` | ||
|
||
### Note | ||
|
||
On the return of the Volatility functions, a `Rendering` class is retrieved. This allows us to format our output as desired. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Base | ||
|
||
::: pydfirram.core.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Handler | ||
|
||
::: pydfirram.core.handler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
<!-- This part of the project documentation focuses on | ||
an **information-oriented** approach. Use it as a | ||
reference for the technical implementation of the | ||
`calculator` project code. --> | ||
|
||
<!-- This part of the project documentation focuses on | ||
an **information-oriented** approach. Use it as a | ||
reference for the technical implementation of the | ||
`calculator` project code. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Renderer | ||
|
||
::: pydfirram.core.renderer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Test Documentation | ||
|
||
## Project Structure | ||
The project is organized as follows: | ||
```bash | ||
. | ||
├── __init__.py | ||
├── config.py | ||
├── data | ||
│ └── dump.raw | ||
├── test_core_base.py | ||
├── test_core_rendering.py | ||
└── test_volatility_windows_function.py | ||
``` | ||
|
||
### Files Description | ||
|
||
- **config.py** | ||
This file contains configuration settings. You need to set the path of your dump file here before running the tests. | ||
|
||
- **test_core_base.py** | ||
This script tests the core functionalities used in `pydfirram/core/base.py`. | ||
|
||
- **test_core_rendering.py** | ||
This script tests the core functionalities used in `pydfirram/core/renderer.py`. | ||
|
||
- **test_volatility_windows_function.py** | ||
This script tests all(Not All configuration an plugins for the moment) plugins of Volatility. | ||
|
||
### Test Data | ||
- **data/dump.raw** | ||
This is where your test dump file should be located. | ||
|
||
## Running the Tests | ||
|
||
### Prerequisites | ||
1. Download the Windows XP image from the Volatility Foundation: | ||
[Win XP Image](https://downloads.volatilityfoundation.org/volatility3/images/win-xp-laptop-2005-06-25.img.gz). | ||
|
||
2. Extract the downloaded image and place it in the `data` directory. Rename it to `dump.raw`. | ||
|
||
### Configuration | ||
1. Open `config.py`. | ||
2. Set the path of your dump file in the configuration. | ||
|
||
### Running the Tests | ||
To run the tests, use the following command: | ||
```bash | ||
pytest | ||
``` | ||
|
||
## Notes | ||
- The current tests only support Windows architectures. Linux architectures are not supported yet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Utils | ||
|
||
::: pydfirram.core.utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Windows | ||
|
||
::: pydfirram.modules.windows |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,22 @@ repo_url: https://github.com/PyDFIR/PyDFIRRam | |
edit_uri: edit/main/docs/ | ||
|
||
theme: | ||
palette: | ||
- media: "(prefers-color-scheme: light)" | ||
scheme: default | ||
toggle: | ||
icon: material/brightness-7 | ||
name: Switch to dark mode | ||
|
||
- media: "(prefers-color-scheme: dark)" | ||
scheme: slate | ||
toggle: | ||
icon: material/brightness-4 | ||
name: Switch to light mode | ||
name: material | ||
color_mode: auto | ||
user_color_mode_toggle: true | ||
locale: en | ||
features: | ||
- search.suggest | ||
- search.highlight | ||
|
@@ -39,11 +54,19 @@ markdown_extensions: | |
|
||
nav: | ||
- index.md | ||
- tutorials.md | ||
- how-to-guides.md | ||
- explanation.md | ||
- Usage: | ||
- Installation : Usage/installation.md | ||
- Windows : Usage/windows.md | ||
- Linux/Mac : Usage/linux.md | ||
- Reference: | ||
- Index: reference/reference.md | ||
- explanation.md | ||
- Base: reference/base.md | ||
- Handler: reference/handler.md | ||
- Renderer: reference/renderer.md | ||
- Utils: reference/utils.md | ||
- Windows : reference/windows.md | ||
- Testing : reference/test.md | ||
|
||
extra: | ||
version: | ||
|
@@ -53,4 +76,4 @@ extra: | |
link: https://github.com/PyDFIR/pyDFIRRam | ||
name: Github | ||
- icon: material/email | ||
link: "mailto:[email protected]" | ||
link: "mailto:[email protected]" |
Oops, something went wrong.