mirror of
https://github.com/martanne/bitpixie
synced 2026-06-08 15:44:32 +00:00
69 lines
2.3 KiB
Makefile
69 lines
2.3 KiB
Makefile
# Folders
|
|
PXE ?= ./pxe
|
|
TFTP = ${PXE}/tftp
|
|
SMB = ${PXE}/smb
|
|
|
|
# Artifacts Linux
|
|
INITRAMFS = ${TFTP}/alpine-initrd.xz
|
|
KERNEL = ${TFTP}/linux
|
|
SHIM = ${TFTP}/shimx64.efi
|
|
GRUB = ${TFTP}/grubx64.efi
|
|
|
|
# Artifacts WinPE
|
|
BOOT_SDI = ${TFTP}/Boot/boot.sdi
|
|
BOOT_WIM = ${TFTP}/Boot/boot.wim
|
|
DUMPIT_EXE = ${SMB}/winpe/DumpIt.exe
|
|
WINPMEM_EXE = ${SMB}/winpe/winpmem.exe
|
|
SEARCH_VMK_EXE = ${SMB}/winpe/search-vmk.exe
|
|
DISLOCKER_METADATA_EXE = ${SMB}/winpe/dislocker-metadata.exe
|
|
|
|
all: linux winpe
|
|
|
|
linux: ${SHIM} ${GRUB} ${KERNEL} ${INITRAMFS}
|
|
@echo "Building Linux based bitpixie exploitation components..."
|
|
|
|
${INITRAMFS} ${KERNEL}:
|
|
@echo "Preparing initramfs and kernel..."
|
|
linux/initramfs/bitpixie build
|
|
linux/initramfs/bitpixie deploy
|
|
|
|
${SHIM} ${GRUB}:
|
|
@echo "Preparing shim and GRUB..."
|
|
docker run --platform linux/amd64 --rm -v "${CURDIR}/linux/bootloader:/build" -v "${PXE}":/mnt -w /root \
|
|
alpine:3.20.3 "/build/download.sh"
|
|
|
|
winpe: ${BOOT_SDI} ${BOOT_WIM} ${WINPMEM_EXE} ${SEARCH_VMK_EXE} ${DISLOCKER_METADATA_EXE}
|
|
@echo "Building WinPE based bitpixie exploitation components..."
|
|
|
|
${BOOT_SDI} ${BOOT_WIM}:
|
|
@echo "Preparing Windows boot.{sdi,wim} files..."
|
|
docker run --platform linux/amd64 --rm -v "${CURDIR}/winpe:/build" -v "${PXE}":/mnt -w /root \
|
|
alpine:3.20.3 "/build/download-winpe.sh"
|
|
|
|
${WINPMEM_EXE}:
|
|
@echo "Bulding $@..."
|
|
docker run --platform linux/amd64 --rm -v "${CURDIR}/winpe:/build" -v "${PXE}":/mnt -w /root \
|
|
alpine:3.20.3 "/build/build-winpmem.sh"
|
|
|
|
${DUMPIT_EXE}:
|
|
@echo "Please download Magnet DumpIt for Windows"
|
|
@echo "\n https://www.magnetforensics.com/resources/magnet-dumpit-for-windows/\n"
|
|
@echo "And place it into $@\n"
|
|
@exit 1
|
|
|
|
${SEARCH_VMK_EXE}:
|
|
@echo "Bulding $@..."
|
|
docker run --platform linux/amd64 --rm -v "${CURDIR}/search-vmk:/src" -v "${CURDIR}/winpe:/build" -v "${PXE}":/mnt -w /root \
|
|
alpine:3.20.3 "/build/build-search-vmk.sh"
|
|
|
|
${DISLOCKER_METADATA_EXE}:
|
|
@echo "Bulding $@..."
|
|
docker run --platform linux/amd64 --rm -v "${CURDIR}/winpe:/build" -v "${PXE}":/mnt -w /root \
|
|
alpine:3.20.3 "/build/build-dislocker-metadata.sh"
|
|
|
|
clean:
|
|
@rm -f "${SHIM}" "${GRUB}" "${KERNEL}" "${INITRAMFS}"
|
|
@rm -f "${BOOT_SDI}" "${BOOT_WIM}" "${WINPMEM_EXE}" "${SEARCH_VMK_EXE}" "${DISLOCKER_METADATA_EXE}"
|
|
|
|
.PHONY: all linux winpe clean
|