You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A cryptographic payload loader and executor designed for advanced in-memory execution techniques. This project combines strong encryption, compression, and sophisticated evasion capabilities to execute both shellcode and PE files directly in memory.
3
+
this is a loader that consists of two parts - the encrypter and the loader, both PEs and shellcode can be encrypted and embedded
4
+
into a loader that offers multiple execution options for shellcode, pe's are just mapped and their entry point is executed with ntdll!rtlcreateuserthread. for shellcode, you can take a few different paths each with their own upsides and downsides evasion wise. this project is meant to be compiled on win10+ x64 only.
4
5
5
-
## Features
6
+
# enclave
7
+
1. uses mscoree!GetProcessExecutableHeap, vdsutil!VdsHeapAlloc, and ntdll!LdrCallEnclave
8
+
2. memory region of shellcode is RWX by default, as GetProcessExecutableHeap is usually used for JIT stuff
6
9
7
-
### Encryption & Compression
10
+
# indirect syscalls
11
+
1. uses ntdll!NtAllocateVirtualMemory, ntdll!ProtectVirtualMemory to allocate memory and flip prots (takes PAGE_READWRITE -> PAGE_EXECUTE_READ path
12
+
2. uses ntdll!RtlCreateUserThread to execute entry point
13
+
14
+
# run once
15
+
1. uses ntdll!NtAllocateVirtualMemory, ntdll!ProtectVirtualMemory to allocate memory and flip prots (also takes PAGE_READWRITE -> PAGE_EXECUTE_READ path
16
+
2. executes entry point with ntdll!RtlRunOnceExecuteOnce which does exactly what it says
-**Argon2id key derivation** with configurable parameters for enhanced security
10
23
-**Automatic compression** using zlib to reduce payload size
11
24
-**CBOR serialization** for efficient binary encoding
12
25
13
-
### Execution Capabilities
14
-
-**Dual payload support**: Handles both raw shellcode and PE executables
15
-
-**In-memory PE execution**: Full RunPE implementation with proper relocation and import resolution
16
-
-**Shellcode injection**: Direct shellcode execution using advanced injection techniques
17
-
18
-
### Evasion Features
19
-
-**Self-deletion**: Automatic removal of the stub executable from disk (this being called prior to execution may seem weird, but as long as your payload is mapped into memory already (it is, it's embedded) execution will fire off, and the stub gets removed)
20
-
-**Anti-monitoring patches**: Disables AMSI, ETW, debugging, and trace logging
21
-
-**Direct syscalls**: Utilizes [go-direct-syscall](https://github.com/carved4/go-direct-syscall) for API evasion
22
-
-**Memory-only execution**: No disk artifacts after initial execution
26
+
### capabilities
27
+
-**Dual payload support**: handles both raw shellcode and PE executables
28
+
-**In-memory PE execution**: Full runpe implementation with proper relocation and import resolution
29
+
-**Shellcode injection**: direct shellcode execution using some silly injection techniques
1.**crypt**: encrypts and packages payloads into CBOR format with embedded metadata
50
+
2.**stub**: self-contained executable that decrypts and executes the embedded payload
103
51
104
52
## Building
105
53
106
54
```bash
107
-
# Build the encryption tool
108
-
go build -o crypt.exe ./crypt
109
-
110
-
# Build the stub (after encrypting a payload)
111
-
go build -o stub.exe ./stub
55
+
# build the stub (after encrypting a payload)
56
+
cd ../stub && go build -o stub.exe
112
57
```
113
58
114
-
## Running
59
+
## running
115
60
```bash
116
61
# after running the crypter tool and building the stub, you can pass some flags to specify how you want to run
117
62
118
-
./stub.exe -sleepy # self inject with page no access delay to trip EDRs
63
+
./stub.exe -enclave
119
64
120
-
./stub.exe -ghost # self inject standard
65
+
./stub.exe -indirec
121
66
122
-
./stub.exe -phantom # inject with queueapc + page no access delay
67
+
./stub.exe -once
123
68
124
69
# or
125
70
126
71
./stub.exe # with no flags to run an embedded EXE or shellcode with the default methods
127
72
128
73
```
129
-
130
-
131
-
## Security Considerations
132
-
133
-
This tool is designed for security research, penetration testing, and red team exercises. Users are responsible for ensuring compliance with applicable laws and regulations in their jurisdiction.
0 commit comments