I already used a Teensy to send a CONTROL keypress every 10 seconds. This came in handy to keep machines from going to sleep or auto-locking.
Today I wrote a script for my Bash Bunny to do the same.
Warning: if you use this, make sure you unplug the Bash Bunny before you start typing on the computer. Otherwise the CONTROL keypresses will interfere with your typing, potentially ending up in unwanted commands like CTRL-Q: Quit
#!/bin/bash # Title: Infinite Control # Author: Didier Stevens (https://DidierStevens.com) # Version: 0.0.1 2017/04/08 # # Hit the CONTROL key every 10 seconds in an infinite loop, # while blinking the red LED with every keypress. # # Can be used to prevent a machine from sleeping or auto-locking. # # WARNING: Do not type on the machine's keyboard while this script # is running, or your keystrokes might become commands, # for example CTRL-Q: Quit # # Red ...............Hitting CONTROL key # Red Blinking.......Wow! We broke out of the infinite while loop! ATTACKMODE HID # infinite while loop while true do LED R QUACK CTRL LED sleep 10 done # this code will never be reached LED R 100
Hey Didier! Love your posts and the contributions you’ve made over the years. I’ve seen some anti sleep programs press the F15 key. Yup, F-fifteen so it doesn’t do what you mentioned while typing.
Cheers!
Comment by Mathew Locke — Saturday 8 April 2017 @ 15:23
Thanks for the tip! I’ll check it out.
Comment by Didier Stevens — Saturday 8 April 2017 @ 15:26
Awesome. I’ve been using teensy since a long time. Waiting for my BB now – once received will redo all described here. Kudos!
Comment by Lukas — Monday 10 April 2017 @ 18:10
[…] is an update to my Bash Bunny payload Infinite Control: it sends a CONTROL keypress every 10 seconds. I changed the LED colors, and if you uncomment line […]
Pingback by Quickpost: Update: Infinite Control For Bash Bunny | Didier Stevens — Sunday 17 September 2017 @ 16:39