Skip to content

Commit 69ff14d

Browse files
committed
VectoredOverloading
VectoredOverloading PoC in Rust
1 parent 4f6f7fb commit 69ff14d

File tree

4 files changed

+568
-0
lines changed

4 files changed

+568
-0
lines changed

VectoredOverloading/Cargo.toml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[package]
2+
name = "VectoredOverloading"
3+
version = "0.1.0"
4+
edition = "2024"
5+
authors = ["5mukx"]
6+
7+
[dependencies]
8+
9+
[dependencies.windows-sys]
10+
version = "0.61"
11+
features = [
12+
"Win32_Foundation",
13+
"Win32_Security",
14+
"Win32_Globalization",
15+
"Win32_System_Threading",
16+
"Win32_System_Services",
17+
"Win32_UI_WindowsAndMessaging",
18+
"Win32_System_Memory",
19+
"Win32_System_Registry",
20+
"Win32_System_Time",
21+
"Win32_System_Diagnostics_Debug",
22+
"Win32_System_SystemServices",
23+
"Win32_System_Environment",
24+
"Win32_UI_Shell",
25+
"Win32_System_LibraryLoader",
26+
"Win32_System_SystemInformation",
27+
"Win32_System_WindowsProgramming",
28+
"Win32_System_Diagnostics_ToolHelp",
29+
"Win32_UI_Input_KeyboardAndMouse",
30+
"Win32_Storage_FileSystem",
31+
"Win32_System_ProcessStatus",
32+
"Win32_System_Kernel",
33+
"Win32_System_IO",
34+
"Win32_System_Diagnostics_ProcessSnapshotting",
35+
"Win32_Security_Authentication_Identity",
36+
"Win32_Security_Cryptography",
37+
38+
"Wdk_Foundation",
39+
"Wdk_System_Registry",
40+
"Wdk_Storage_FileSystem",
41+
"Wdk_System_SystemServices",
42+
"Wdk_System_SystemInformation",
43+
44+
]

VectoredOverloading/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## VectoredOverloading in Rust
2+
3+
### TLDR:
4+
This poc was arrivied from the YouTube Ghost Network. which is an malware distribution network that uses compromised accounts to promote malicious videos and spread malware, such as infostealers.
5+
6+
7+
This campaign was documented and reversed by [Checkpoint Research](https://research.checkpoint.com/2025/gachiloader-node-js-malware-with-api-tracing/) in that one variant of GachiLoader deploys a second stage malware, Kidkadi, that implements a novel technique for Portable Executable (PE) injection. This technique loads a legitimate DLL and abuses Vectored Exception Handling to replace it on-the-fly with a malicious payload.
8+
9+
This is an PoC of implementing that Kidkadi aka VectoredOverloading in Rust.
10+
11+
It works by manipulating the load of a legitimate DLL using Hardware Breakpoints (HWBP) and Vectored Exception Handling (VEH) to change the DLL section object on-the-fly.
12+
13+
Essentially, the technique does the following
14+
15+
![POC](./image.png)
16+
17+
* Creates a `SEC_IMAGE` mapping from a legitimate DLL (e.g. `wmp.dll`)
18+
* Maps a payload PE over this image memory
19+
* Sets its entrypoint to `0` and forces the `DLL` flag in the `FileHeader->Characteristics` field
20+
* Sets a HWBP on `NtOpenSection` & loads any legitimate DLL
21+
* When the Windows loader calls `NtOpenSection`, the VEH emulates the syscall by skipping it and replacing the `OUT` parameters, so that section object is now that of the payload. The VEH also sets a new HWBP on `NtMapViewOfSection`
22+
* The loader tries to map the section into memory and then triggers the VEH on `NtMapViewOfSection`
23+
* The VEH replaces the `OUT` parameters of the syscall and skips its execution, emulating a mapping of the malicious PE's view
24+
* The loading proceeds and the Windows loader now takes care of handling imports and further processing of the malicious PE image
25+
* The entrypoint is invoked, executing the payload
26+
27+
28+
### Credits & Reference:
29+
30+
* https://github.com/CheckPointSW/VectoredOverloading/tree/main
31+
* https://research.checkpoint.com/2025/gachiloader-node-js-malware-with-api-tracing/
32+

VectoredOverloading/image.png

61.3 KB
Loading

0 commit comments

Comments
 (0)