usbrubberducky-payloads/payloads/extensions/protected_storage_mode.txt

71 lines
2.7 KiB
Plaintext
Raw Normal View History

EXTENSION PROTECTED_STORAGE_MODE
2023-03-14 22:19:57 +00:00
REM VERSION 1.1
REM AUTHOR: Korben
REM_BLOCK
Example hidden storage mode
Forces user to padlock style unlock storage mode by setting
the HOSTs lock keys and pressing the duck button to submit a
combination three times.
The wrong combination will immediately fail silently.
The correct combination will trigger ATTACKMODE STORAGE and LED_G
TARGET:
Any host that will reflect CAPSLOCK,NUMLOCK, and SCROLLLOCK
USAGE:
BUTTON_DEF
STORAGE_PASSWORD_CHECK()
END_BUTTON
CONFIGURATION:
Available combinations provided as DEFINEs below,
change within the STORAGE_PASSWORD_CHECK as desired
Method of input submission can be changed using SUBMIT_FOR_CHECK
But will obviously convolute combination checks.
END_REM
REM Combinations provided as defines for convenience (verbosely spaced - DEFINES aren't re-formatted by preprocessor)
DEFINE #ALL_LOCKS_OFF ( ( $_CAPSLOCK_ON == FALSE ) && ( $_NUMLOCK_ON == FALSE ) && ( $_SCROLLLOCK_ON == FALSE ) )
DEFINE #ALL_LOCKS_ON ( ( $_CAPSLOCK_ON == TRUE ) && ( $_NUMLOCK_ON == TRUE ) && ( $_SCROLLLOCK_ON == FALSE ) )
DEFINE #ONLY_CAPS_ON ( ( $_CAPSLOCK_ON == TRUE ) && ( $_NUMLOCK_ON == FALSE ) && ( $_SCROLLLOCK_ON == FALSE ) )
DEFINE #ONLY_NUM_ON ( ( $_CAPSLOCK_ON == FALSE ) && ( $_NUMLOCK_ON == TRUE ) && ( $_SCROLLLOCK_ON == FALSE ) )
DEFINE #ONLY_SCROLL_ON ( ( $_CAPSLOCK_ON == FALSE ) && ( $_NUMLOCK_ON == FALSE ) && ( $_SCROLLLOCK_ON == TRUE ) )
DEFINE #ONLY_CAPS_OFF ( ( $_CAPSLOCK_ON == FALSE ) && ( $_NUMLOCK_ON == TRUE ) && ( $_SCROLLLOCK_ON == TRUE ) )
DEFINE #ONLY_NUM_OFF ( ( $_CAPSLOCK_ON == TRUE ) && ( $_NUMLOCK_ON == FALSE ) && ( $_SCROLLLOCK_ON == TRUE ) )
DEFINE #ONLY_SCROLL_OFF ( ( $_CAPSLOCK_ON == TRUE ) && ( $_NUMLOCK_ON == TRUE ) && ( $_SCROLLLOCK_ON == FALSE ) )
DEFINE #SUBMIT_FOR_CHECK WAIT_FOR_BUTTON_PRESS
FUNCTION STORAGE_PASSWORD_CHECK()
2022-09-29 06:06:15 +00:00
VAR $ACCEPED = FALSE
LED_R
2023-03-14 22:19:57 +00:00
#SUBMIT_FOR_CHECK
2022-09-29 06:06:15 +00:00
REM first combination ALL LOCKS OFF
2023-03-14 22:19:57 +00:00
IF #ALL_LOCKS_OFF THEN
2022-09-29 06:06:15 +00:00
STRING .
2023-03-14 22:19:57 +00:00
#SUBMIT_FOR_CHECK
2022-09-29 06:06:15 +00:00
REM second combination ONLY CAPS ON
2023-03-14 22:19:57 +00:00
IF #ONLY_CAPS_ON THEN
2022-09-29 06:06:15 +00:00
STRING .
2023-03-14 22:19:57 +00:00
#SUBMIT_FOR_CHECK
2022-09-29 06:06:15 +00:00
REM third combination ONLY NUM ON
2023-03-14 22:19:57 +00:00
IF #ONLY_NUM_ON THEN
2022-09-29 06:06:15 +00:00
$ACCEPTED = TRUE
END_IF
END_IF
END_IF
IF $ACCEPTED THEN
LED_G
ATTACKMODE STORAGE
END_IF
END_FUNCTION
END_EXTENSION