Crear y guardar el fichero ducky_script.txt dentro de la carpeta switch1 o switch2, además hay que incorporar el fichero payload.txt
El contenido del fichero ducky_script.txt consiste en abrir Notepad y escribir el texto «Hola»
1 2 3 4 5 6 7 8 |
DELAY 3000 GUI r DELAY 200 STRING notepad ENTER DELAY 2000 STRING Hola ENTER |
El contenido del fichero payload.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
LED G ATTACKMODE HID STORAGE # Set your language here LANGUAGE='es' DUCKY_LANG='es' LED R G # Check for switch position to make it easier for us. (can be replaced in the future with bunny helpers) check_switch() { switch1=`cat /sys/class/gpio_sw/PA8/data` switch2=`cat /sys/class/gpio_sw/PL4/data` switch3=`cat /sys/class/gpio_sw/PL3/data` echo "--- switch1 = $switch1, switch2 = $switch2, switch3 = $switch3" if [ "x$switch1" = "x0" ] && [ "x$switch2" = "x1" ] && [ "x$switch3" = "x1" ]; then SWITCH_POSITION="switch1" elif [ "x$switch1" = "x1" ] && [ "x$switch2" = "x0" ] && [ "x$switch3" = "x1" ]; then SWITCH_POSITION="switch2" elif [ "x$switch1" = "x1" ] && [ "x$switch2" = "x1" ] && [ "x$switch3" = "x0" ]; then SWITCH_POSITION="switch3" else SWITCH_POSITION="invalid" fi } check_switch if [ -f "/root/udisk/payloads/${SWITCH_POSITION}/ducky_script.txt" ]; then QUACK ${SWITCH_POSITION}/ducky_script.txt LED G else LED R echo "Unable to load ducky_script.txt" >> /root/debuglog.txt exit 1 fi |