Files
pcileech/pcileech_shellcode/macos_info.txt
2016-09-28 19:52:40 +02:00

28 lines
1.1 KiB
Plaintext

# compile instructions for the MacOS kernel module code
#
#================================ STAGE 1 ================================
#
# COMPILE ASM TO EXE (SAME CODE AS FOR WINDOWS)
ml64 wx64_stage1.asm /link /NODEFAULTLIB /RELEASE /MACHINE:X64 /entry:main
#
# EXTRACT SHELLCODE (shellcode saved as wx64_stage1.bin, c-ify by xxd -i wx64_stage1.bin)
shellcode64.exe -o wx64_stage1.exe
#
#================================ STAGE 2 ================================
#
# COMPILE ASM TO EXE
ml64 macos_stage2.asm /link /NODEFAULTLIB /RELEASE /MACHINE:X64 /entry:main
#
# EXTRACT SHELLCODE (shellcode saved as macos_stage2.bin, c-ify by xxd -i macos_stage2.bin)
shellcode64.exe -o macos_stage2.exe
#
#================================ STAGE 3 ================================
#
# COMPILE C CODE TO OBJ FILE
cl.exe /O1 /Os /Oy /FD /MT /Zp1 /GS- /J /GR- /FAcs /W4 /Zl /c /TC /kernel macos_stage3_c.c
#
# COMPILE ASM AND LINK C OBJ FILE TO EXE
ml64 macos_stage3.asm /link /NODEFAULTLIB /RELEASE /MACHINE:X64 /entry:main "macos_stage3_c.obj"
#
# EXTRACT SHELLCODE (shellcode saved as macos_stage3.bin, c-ify by xxd -i macos_stage3.bin)
shellcode64.exe -o macos_stage3.exe