Shellcode
Important: This index contains examples of Assembly and its corresponding shellcode. It is strictly for Educational Purposes ONLY!
Linux
Intel x86
- execve("/bin/sh", NULL, 0) - Spawn shell [23 bytes]
- execve("/bin/sh", ["/bin/sh", "-p"], 0) - Spawn shell maintaining privileges [33 bytes]
- chmod("/bin/bash", 4755) - Make bash SUID [32 bytes]
- read("/etc/passwd"); write(stdout) - Read /etc/passwd and write contents to stdout [53 bytes]
- setuid(0); execve("/bin/sh", NULL, 0) - Set UID to 0 and spawn shell [27 bytes]
- Add new root user to /etc/passwd with password [108 bytes]
- Set UID to 0 and add new root user to /etc/passwd with password [112 bytes]
- write("Hello World", stdout) - Write "Hello World" [36 bytes]
- Self-Decrypting XOR Encrypted execve("/bin/sh", NULL, 0) - Spawn shell [56 bytes]
- Self-Decrypting XOR Encrypted execve("/bin/sh", ["/bin/sh", "-p"], 0) - Spawn shell maintaining privileges [66 bytes]
Intel x86-64
- execve("/bin/sh", NULL, 0) - Spawn shell [30 bytes]
- execve("/bin/sh", ["/bin/sh", "-p"], 0) - Spawn shell maintaining privileges [49 bytes]
- chmod("/bin/bash", 4755) - Make bash SUID [39 bytes]
- read("/etc/passwd"); write(stdout) - Read /etc/passwd and write contents to stdout [84 bytes]
- setuid(0); execve("/bin/sh", NULL, 0) - Set UID to 0 and spawn shell [35 bytes]
- Add new root user to /etc/passwd with password [131 bytes]
- Set Real-UID to 0 and add new root user to /etc/passwd with password [141 bytes]
- write("Hello World", stdout) - Write "Hello World" [46 bytes]
- Self-Decrypting XOR Encrypted execve("/bin/sh", NULL, 0) - Spawn shell [69 bytes]
- Self-Decrypting XOR Encrypted execve("/bin/sh", ["/bin/sh", "-p"], 0) - Spawn shell maintaining privileges [88 bytes]