Skip to content

Commit 64e7862

Browse files
committed
Added new project
1 parent 3c5699d commit 64e7862

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

ShellcodeTest/shellcode.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
#include<stdio.h>
22
#include<string.h>
33

4-
unsigned char code[] ="\xb8\x04\x00\x00\x00\xbb\x01\x00\x00\x00\xb9\xa0\x90\x04\x08\xba\x1c\x00\x00\x00\xcd\x80\xb8\x01\x00\x00\x00\xcd\x80";
4+
char code[] ="\x31\xc0\x31\xdb\x31\xd2\x31\xc9\xb0\x04\xb3\x01\xb9\xa0\x90\x04\x08\xba\x1c\x00\x00\x00\xcd\x80\x31\xc0\xb0\x01\x31\xdb\xcd\x80";
55

66
int main(int argc, char *argv[])
77
{
88
printf("Shellcode Length: %d\n", (int)strlen(code));
9+
10+
int (*func)();
11+
func = (int (*)()) code;
12+
(int)(*func)();
913

10-
int (*ret)() = (int(*)())code;
11-
ret();
12-
}
14+
//int (*ret)() = (int(*)())code;
15+
//ret();
16+
}

ShowStars/ShowStars.asm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
; hello.asm
2+
; x86 architecture
3+
; Intel specification
4+
section .data
5+
6+
7+
section .text
8+
global _start
9+
10+
_start:
11+
12+
13+

0 commit comments

Comments
 (0)