mirror of
https://github.com/ufrisk/pcileech.git
synced 2026-06-20 16:15:59 +08:00
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
# compile instructions for the windows x64 kernel module code
|
|
#
|
|
#================================ STAGE 1 ================================
|
|
#
|
|
# COMPILE ASM TO EXE
|
|
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 AND LINK C OBJ FILE TO EXE
|
|
ml64 wx64_stage2.asm /link /NODEFAULTLIB /RELEASE /MACHINE:X64 /entry:main
|
|
#
|
|
# EXTRACT SHELLCODE (shellcode saved as wx64_stage2.bin, c-ify by xxd -i wx64_stage2.bin)
|
|
shellcode64.exe -o wx64_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 wx64_stage3_c.c
|
|
#
|
|
# COMPILE ASM AND LINK C OBJ FILE TO EXE
|
|
ml64 wx64_stage3.asm /link /NODEFAULTLIB /RELEASE /MACHINE:X64 /entry:main "wx64_stage3_c.obj"
|
|
#
|
|
# EXTRACT SHELLCODE (shellcode saved as wx64_stage3.bin, c-ify by xxd -i wx64_stage3.bin)
|
|
shellcode64.exe -o wx64_stage3.exe |