Skip to content

Two C programs. One RC4 encrypts shellcode. The other decrypts the encrypted shellcode at runtime and executes it.

Notifications You must be signed in to change notification settings

devdevg00se/rc4_shellcode_runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shellcode Runner in C with RC4 Encryption

Example illustrating how to use basic encryption to obfuscate a payload in order to evade AV. Two C programs: One encrypts shellcode via RC4; The other decrypts the RC4-encrypted shellcode at runtime and executes it.

How to use

  1. Add your unencrypted shellcode to source file encrypt_shellcode.c and modify rc4 password if desired. If you change password, make sure you update it in encrypt_shellcode.c and execute_encrypted_shellcode.c
  2. Build gcc -s encrypt_shellcode.c -o encrypt_shellcode.exe and run encrypt_shellcode.exe
  3. Copy output from encrypt_shellcode.exe and into source file execute_encrypted_shellcode.c
  4. Build gcc -s execute_encrypted_shellcode.c -o execute_encrypted_shellcode.exe
  5. Running execute_encrypted_shellcode.exe will decrypt and then execute the shellcode

References

  1. Red Teaming 101: Executing Malicious Shellcode with C — a guide for beginners
  2. A Beginner's Guide to Windows Shellcode Execution Techniques

About

Two C programs. One RC4 encrypts shellcode. The other decrypts the encrypted shellcode at runtime and executes it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages