
已更新Aug 7, 2026
shellcode — 已更新!
我的 shellcode 样本集合。
shellcode
“漏洞为一台从未被编程过、且并非为可编程性而设计的计算机提供了一种汇编语言。”
-- Halvar Flake
一系列新旧 shellcode 样本。

文章
Shellcode
x86
- setuid-linux.c。适用于 Linux/x86 的旧版 setuid/execve shellcode(30 字节)。
- portbind-linux.c。适用于 Linux/x86 的旧版 setuid/portbind shellcode(96 字节)。
- reusage-linux.c。适用于 Linux/x86 的旧版 execve shellcode,重用 .rodata 中的 "/bin/sh"(16 字节)。
- gets-linux.c。适用于 Linux/x86 的旧版 stdin-reopen/execve shellcode,可用于对抗 gets() 缓冲区溢出。
- raptorcode.c。适用于 Linux/x86 的旧版 shellcode,向当前 tty 写入一条消息。
- setuid-bsd.c。适用于 BSD/x86 的旧版 setuid/execve shellcode(30 字节)。
- portbind-bsd.c。适用于 BSD/x86 的旧版 setuid/portbind shellcode(94 字节)。
- leetcode.c。适用于 BSD/x86 的旧版 setuid/execve shellcode,代码中嵌入了一条 ASCII 消息。
x86_64
- read-no-H.s。不含 0x48 字节的 Linux/x86_64 sendfile shellcode。
- exec-no-H.s。不含 0x48 字节的 Linux/x86_64 exec shellcode。
- read-no-syscall.s。不含 0x0f05 字节的 Linux/x86_64 sendfile shellcode。
- read-write.s。Linux/x86_64 文件读/写 shellcode。
- chmod-tiny.s。12 字节的 Linux/x86_64 chmod 4 shellcode。
- exec-tiny.s。12 字节的 Linux/x86_64 exec shellcode。
SPARC
- sparc_solaris_exec.c。Solaris/SPARC setuid/execve shellcode(60 字节)。
- sparc_solaris_chmod.c。Solaris/SPARC setuid/chmod/exit shellcode(64 字节)。
- sparc_solaris_chmod2.c。非常小的 Solaris/SPARC chmod shellcode(36 字节)。
MIPS
- mips_n32_msb_linux_revsh.c。基本的 MIPS N32 MSB Linux 反向 shellcode。