Made some great "white hat" usage of BashBunny this week.
Bought a batch of new micro-PCs, built a golden image for them, saved it with CloneZilla. Loaded a bootable CloneZilla Live install on to BB, then made a HID/STORAGE payload that boots target into CloneZilla with pre-scripted restore, redirecting stdout back to /loot. Script on BB waits a few minutes for CloneZilla to complete, then BB reboots both the target and itself to make sure /loot is synced and visible, then checks the logfile for successful completion before LED FINISH. Bing bang boom! Fresh new PC ready to deploy with custom config.
It can be really hard to script blind HID keystrokes when the target might not be consistent each run (BIOS boot device menu sequence, for example). One workaround is to send multiple commands in a sequence that the target will ignore or fail recoverably if irrelevant.
/loot doesn't automatically stay in sync between scripts running on BB and on the target when mounted as STORAGE.Having BB reboot itself was the only way I could reliably get it to see updates saved by the target.
After a self-reboot, the same payload script can pick up where it left off by first detecting that a file is there now.
If I really want real-time two-way communication between BB and target, probably need to use network instead of storage. Next time.
Fun project! Thanks Hak5 for a truly useful tool.