Skip to content

xophidia/Shellcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

eb5abe1 · Dec 18, 2017

History

29 Commits
Dec 17, 2017
Dec 13, 2017
Dec 10, 2017
May 31, 2016
Dec 18, 2017
Dec 17, 2017
May 25, 2016
May 25, 2016
May 23, 2016
Dec 10, 2017
May 23, 2016
Feb 4, 2017

Repository files navigation

Shellcode

Utilisation

Le script compile.sh prend en argument le nom du fichier assembleur et fournit le shellcode.

./compile.sh shellcode
[+] Compilation nasm
[+] Edition de liens
[+] Shellcode ...
"\x31\xc0\xb0\x01\x31\xdb\xb3\x01\xcd\x80"
[+] Done

Pour le tester utilisez le fichier testShellcode.c

#include <stdio.h>
#include <string.h>


unsigned char code[] = \
"\x31\xc0\xb0\x01\x31\xdb\xb3\x01\xcd\x80";


int main()
{

        printf("taille %lu\n", strlen(code));

        int (*ret)() = (int(*)())code;

        ret();

        return 0;

}

puis compilez avec la commande suivante :

gcc -fno-stack-protector -z execstack test_shellcode.c -o test_shellcode

Some shellcode x86/x64

x86

  • Print a text
  • Open a shell /bin/sh
  • Open /etc/passwd
  • Open a backdoor on port 12345
  • Open a backdoor on port 12345 - polymorphic
  • XOR decode
  • Change the content of /var/www/html/index.html with your own text (stack version)

x64

  • Print a text
  • Flush iptable

About

Some shellcode x86/x64

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published