Skip to content

Commit 3c7bb25

Browse files
authored
Merge branch 'kevoreilly:master' into master
2 parents 7e28221 + b28d42c commit 3c7bb25

File tree

275 files changed

+3090
-20276
lines changed

Some content is hidden

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

275 files changed

+3090
-20276
lines changed

.github/actions/python-setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ runs:
1616
1717
- name: Install poetry
1818
shell: bash
19-
run: PIP_BREAK_SYSTEM_PACKAGES=1 pip install poetry
19+
run: PIP_BREAK_SYSTEM_PACKAGES=1 pip install poetry poetry-plugin-export
2020

2121
- name: Set up Python ${{ inputs.python-version }}
2222
uses: actions/setup-python@v5

.github/workflows/python-package-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
timeout-minutes: 20
1616
strategy:
1717
matrix:
18-
python-version: ["3.10", "3.11"]
18+
python-version: ["3.10"]
1919

2020
steps:
2121
- name: Check out repository code

.github/workflows/python-package.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
timeout-minutes: 20
1616
strategy:
1717
matrix:
18-
python-version: ["3.10", "3.11"]
18+
python-version: ["3.10"]
1919
steps:
2020
- name: Check out repository code
2121
uses: actions/checkout@v4
@@ -37,23 +37,11 @@ jobs:
3737
poetry run pip install pyattck==7.1.2 maco
3838
3939
- name: Run Ruff
40-
run: poetry run ruff . --line-length 132 --ignore E501,E402
40+
run: poetry run ruff check . --line-length 132 --ignore E501,E402
4141

4242
- name: Run unit tests
4343
run: poetry run python -m pytest --import-mode=append
4444

45-
- name: See if any parser changed
46-
uses: dorny/paths-filter@v3
47-
id: changes
48-
with:
49-
filters: |
50-
src:
51-
- 'modules/processing/parsers/CAPE/*.py'
52-
53-
- name: Test parsers only if any parser changed
54-
if: steps.changes.outputs.src == 'true'
55-
run: poetry run python -m pytest tests_parsers -s --import-mode=append
56-
5745
format:
5846
runs-on: ubuntu-latest
5947
timeout-minutes: 20

analyzer/windows/data/yara/Al-khaser.yar

Lines changed: 0 additions & 12 deletions
This file was deleted.

analyzer/windows/data/yara/NitrogenLoader.yar

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,17 @@ rule NitrogenLoaderBypass
3838
$exit = {33 C9 E8 [4] E8 [4] 48 8D 84 24 [4] 48 89 44 24 ?? 4? B? E4 00 00 00 4? 8B 05 [4] B? 03 00 00 00 48 8D}
3939
condition:
4040
all of them
41-
}
41+
}
42+
43+
rule NitrogenLoaderConfig
44+
{
45+
meta:
46+
author = "enzok"
47+
description = "NitrogenLoader Config Extraction"
48+
cape_options = "bp0=$decrypt1*+6,hc0=1,count=0,action0=string:rcx,typestring=NitrogenLoader Config"
49+
strings:
50+
$decrypt1 = {48 8B 8C 24 [4] 0F B6 04 01 89 ?? 24 [1-4] 48 63 4C 24 ?? 33 D2 48 8B C1 48 F7 B4 24 [4] 48 8B C2 48 8B 8C}
51+
$decrypt2 = {8B ?? 24 [1-4] 33 C8 8B C1 48 63 4C 24 ?? 48 8B 94 24 [4] 88 04 0A}
52+
condition:
53+
all of them
54+
}

analyzer/windows/data/yara/Pafish.yar

Lines changed: 0 additions & 14 deletions
This file was deleted.

analyzer/windows/lib/core/packages.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,7 @@ def choose_package(file_type, file_name, exports, target):
147147
return "autoit"
148148
elif file_name.endswith(("cmd", "bat")) or b"@echo off" in file_content:
149149
return "batch"
150+
elif file_name.endswith(".rdp"):
151+
return "rdp"
150152
else:
151153
return "generic"

analyzer/windows/modules/auxiliary/amsi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ def _unpackSimpleType(self, record, info, event_property):
10021002

10031003
data = formatted_data.value
10041004
# Convert the formatted data if necessary
1005-
if out_type in TDH_CONVERTER_LOOKUP and type(data) != TDH_CONVERTER_LOOKUP[out_type]:
1005+
if out_type in TDH_CONVERTER_LOOKUP and type(data) is TDH_CONVERTER_LOOKUP[out_type]:
10061006
data = TDH_CONVERTER_LOOKUP[out_type](data)
10071007

10081008
return {name_field: data}

analyzer/windows/modules/auxiliary/disguise.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
from lib.common.rand import random_integer, random_string
3131

3232
log = logging.getLogger(__name__)
33-
PERSISTENT_ROUTE_GATEWAY = "192.168.1.1"
3433
si = subprocess.STARTUPINFO()
3534
si.dwFlags |= subprocess.STARTF_USESHOWWINDOW
3635

@@ -243,18 +242,14 @@ def randomizeUUID(self):
243242
# Replace the UUID with the new UUID
244243
SetValueEx(key, "MachineGuid", 0, REG_SZ, createdUUID)
245244

246-
def add_persistent_route(self):
247-
self.run_as_system(
248-
["C:\\Windows\\System32\\ROUTE.exe", "-p", "add", "0.0.0.0", "mask", "0.0.0.0", PERSISTENT_ROUTE_GATEWAY]
249-
)
250-
self.run_as_system(
251-
["C:\\Windows\\System32\\ROUTE.exe", "-p", "change", "0.0.0.0", "mask", "0.0.0.0", PERSISTENT_ROUTE_GATEWAY]
252-
)
245+
def add_persistent_route(self, gateway: str):
246+
self.run_as_system(["C:\\Windows\\System32\\ROUTE.exe", "-p", "add", "0.0.0.0", "mask", "0.0.0.0", gateway])
247+
self.run_as_system(["C:\\Windows\\System32\\ROUTE.exe", "-p", "change", "0.0.0.0", "mask", "0.0.0.0", gateway])
253248

254249
def start(self):
255250
if self.config.windows_static_route:
256251
log.info(f"Config for route is: {str(self.config.windows_static_route)}")
257-
self.add_persistent_route()
252+
self.add_persistent_route(self.config.windows_static_route_gateway)
258253
self.change_productid()
259254
self.set_office_mrus()
260255
self.ramnit()

analyzer/windows/modules/auxiliary/human.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"don't send",
7272
"don't save",
7373
"continue",
74+
"connect",
7475
"unzip",
7576
"open",
7677
"close the program",
@@ -115,6 +116,7 @@
115116
DONT_CLICK_BUTTONS = (
116117
# english
117118
"check online for a solution",
119+
"don't ask me again for remote connections from this publisher",
118120
"don't run",
119121
"do not ask again until the next update is available",
120122
"cancel",

0 commit comments

Comments
 (0)