AlphaNum

Description

No zero byte encoder, with polymorphic decoder stub

AlphaNum encodes every byte into 2 printable characters. This increases the shellcode size but you don’t have to worry about 0x00 bytes.

  • polymorphic decoder stub
  • variable registers which will be used for decoding the shellcode
  • variable instruction sets
  • automatic compile with nasm.exe
  • extract shellcode from compiled object file

You have to provide nasm.exe in your shencode directory. Download your copy here.

Workflow

  1. Load the payload
  2. Encode the payload with AlphaNum
  3. Create the stub with random registers and instructions
  4. Append the encoded payload
  5. Conpile with nasm
  6. Extract the .text section as final shellcode

Command

shencode encoder alphanum [-h] [-i INPUT] [-o OUTPUT] [-c] [-d] [-v]
 
Encode bytes to alphanumeric output
 
options:
  -h, --help            show this help message and exit
  -i, --input           Input file to use
  -o, --output          Output file to use
 
Additional:
  -c, --compile         Compile object file and extract shellcode
  -d, --decode          Decode the input to bytes
  -v, --variable-padding
                        Inserts a random NOP to differ the padding
Example output
shencode encoder alphanum -i calc.raw -o calc.an -c
[AlphaNum]-[0.1.4]
 
[*] Try to open file calc.raw
[+] File calc.raw loaded
[+] Size of shellcode 251 bytes
[+] Hash: 7c1bb19fe6606cfe29e750326db2972c4743e623
[*] Encoder running...
100%|███████████████████████████████████████████████████████████████████████████| 251/251 [00:00<00:00, 2876421.60it/s]
[*] Writing to file calc.an
[+] File calc.an created
[+] Size 572 bytes
[+] Hash: e3ac89a2e8f0820b9bf2940cff3d27bcf42fae1c
[+] DONE!

JSON Parameter

ArgumentsValuesType
inputfilenamestr
ouputfilenamestr
decodetrue, falsebool
compiletrue, falsebool
variable_paddingtrue, falsebool