Skip to content

Commit 3f5fce3

Browse files
authored
Merge pull request #1208 from dadokkio/develop
yara-x support for yarascan
2 parents 517f46e + a219685 commit 3f5fce3

File tree

12 files changed

+129
-74
lines changed

12 files changed

+129
-74
lines changed

.github/workflows/build-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-20.04
1919
strategy:
2020
matrix:
21-
python-version: ["3.7"]
21+
python-version: ["3.8"]
2222
steps:
2323
- uses: actions/checkout@v4
2424
- name: Set up Python ${{ matrix.python-version }}

.github/workflows/install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
fail-fast: false
99
matrix:
1010
host: [ ubuntu-latest, windows-latest ]
11-
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
11+
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
1212
steps:
1313
- uses: actions/checkout@v4
1414

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-20.04
77
strategy:
88
matrix:
9-
python-version: ["3.7"]
9+
python-version: ["3.8"]
1010
steps:
1111
- uses: actions/checkout@v4
1212
- name: Set up Python ${{ matrix.python-version }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ more details.
2020

2121
## Requirements
2222

23-
Volatility 3 requires Python 3.7.3 or later. To install the most minimal set of dependencies (some plugins will not work) use a command such as:
23+
Volatility 3 requires Python 3.8.0 or later. To install the most minimal set of dependencies (some plugins will not work) use a command such as:
2424

2525
```shell
2626
pip3 install -r requirements-minimal.txt

doc/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ sphinx_autodoc_typehints>=1.4.0
44
sphinx-rtd-theme>=0.4.3
55

66
yara-python
7+
yara-x
78
pycryptodome
89
pefile

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ readme = "README.md"
66
authors = [
77
{ name = "Volatility Foundation", email = "[email protected]" },
88
]
9-
requires-python = ">=3.7.3"
9+
requires-python = ">=3.8.0"
1010
license = { text = "VSL" }
1111
dynamic = ["dependencies", "optional-dependencies", "version"]
1212

test/requirements-testing.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ pefile>=2017.8.1 #foo
66

77
# This is required for the yara plugins
88
yara-python>=3.8.0
9+
yara-x>=0.5.0
910

1011
pytest>=7.0.0

volatility3/framework/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88
import zipfile
99

10-
required_python_version = (3, 7, 3)
10+
required_python_version = (3, 8, 0)
1111
if (
1212
sys.version_info.major != required_python_version[0]
1313
or sys.version_info.minor < required_python_version[1]

volatility3/framework/plugins/linux/vmayarascan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ def get_requirements(cls) -> List[interfaces.configuration.RequirementInterface]
3131
name="pslist", plugin=pslist.PsList, version=(2, 0, 0)
3232
),
3333
requirements.PluginRequirement(
34-
name="yarascan", plugin=yarascan.YaraScan, version=(1, 2, 0)
34+
name="yarascan", plugin=yarascan.YaraScan, version=(2, 0, 0)
3535
),
3636
requirements.VersionRequirement(
37-
name="yarascanner", component=yarascan.YaraScanner, version=(2, 0, 0)
37+
name="yarascanner", component=yarascan.YaraScanner, version=(2, 1, 0)
3838
),
3939
requirements.ModuleRequirement(
4040
name="kernel",

volatility3/framework/plugins/windows/mftscan.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def get_requirements(cls):
2929
architectures=["Intel32", "Intel64"],
3030
),
3131
requirements.VersionRequirement(
32-
name="yarascanner", component=yarascan.YaraScanner, version=(2, 0, 0)
32+
name="yarascanner", component=yarascan.YaraScanner, version=(2, 1, 0)
3333
),
3434
]
3535

@@ -38,7 +38,7 @@ def _generator(self):
3838

3939
# Yara Rule to scan for MFT Header Signatures
4040
rules = yarascan.YaraScan.process_yara_options(
41-
{"yara_rules": "/FILE0|FILE\\*|BAAD/"}
41+
{"yara_string": "/FILE0|FILE\\*|BAAD/"}
4242
)
4343

4444
# Read in the Symbol File
@@ -197,7 +197,7 @@ def _generator(self):
197197

198198
# Yara Rule to scan for MFT Header Signatures
199199
rules = yarascan.YaraScan.process_yara_options(
200-
{"yara_rules": "/FILE0|FILE\\*|BAAD/"}
200+
{"yara_string": "/FILE0|FILE\\*|BAAD/"}
201201
)
202202

203203
# Read in the Symbol File

0 commit comments

Comments
 (0)