cscg24-haunted

CSCG 2024 Challenge 'Haunted'
git clone https://git.sinitax.com/sinitax/cscg24-haunted
Log | Files | Refs | sfeed.txt

build (467B)


      1#!/bin/sh
      2
      3set -ex
      4
      5sudo umount mnt || :
      6sudo losetup -D || :
      7
      8cp disk.img exploit.img
      9mkfs.vfat -i 10552EB2 exploit.img
     10sudo losetup -P /dev/loop0 exploit.img
     11sudo mount /dev/loop0 mnt
     12sudo mkdir -p mnt/efi/boot
     13sudo cp "$1" mnt/efi/boot/BOOTX64.efi
     14sudo chmod 755 mnt/efi/boot/BOOTX64.efi
     15sudo mkdir -p mnt/efi/tools
     16sudo cp ~/ext/UefiVarTool/target/x86_64-unknown-uefi/release/uvt.efi mnt/efi/tools
     17sudo cp startup.nsh mnt
     18find mnt
     19sudo umount mnt
     20sudo losetup -D