Skip to spray console
[v] 1.0.0 [py] PYTHON 3.10+ [!] AUTHORIZED USE

CRED-SPRAY

Bounded, protocol-aware credential spraying

Build explicit endpoint plans, run credentials sequentially per endpoint, and keep all seven outcomes distinct in terminal and JSON reports. For lab and explicitly authorized testing only.

Target protocols 2 selected · 6 planned
Lockout guard & execution bounds 3 lab credentials
[ok] WITHIN CAP
60%

2 concurrent endpoints · 3 sequential credentials per endpoint · 2s per-endpoint delay. Does not calculate domain lockout policy.

[shell] DRY-RUN PLAN
cred-spray -t dc01.lab:445:smb -t dc01.lab:389:ldap -C credentials.txt --no-scan --dry-run --max-attempts 10 --delay 2 --mask-creds -o plan.json
[i] MASKED

All seven ResultStatus values stay distinct. Select a status to filter rows; toggle --mask-creds on the left to inspect secret redaction.

Illustrative lab outcome ledger showing all seven cred-spray ResultStatus values
Endpoint Account Secret Status Outcome
dc01.lab:445 smb alice *** [ok] SUCCESS authentication succeeded · read-only proof when --verify is set
dc01.lab:445 smb bob *** [x] LOCKED account lockout reported · halts further attempts for bob on dc01.lab
dc01.lab:389 ldap bob *** [i] SKIPPED account lockout or revocation already reported on this host (attempted: false)
srv02.lab:5985 winrm svc_backup *** [x] ERROR native pywinrm rejects NT hashes; use --nxc or evil-winrm
app01.lab:22 ssh deploy *** [x] FAILURE authentication rejected · only status counted toward --fail-limit
dc01.lab:88 kerberos alice *** [ok] SUCCESS authentication succeeded · TGT issued for lab realm (2x timeout)
wks04.lab:3389 rdp alice *** [!] TIMEOUT connection timed out · skips endpoint after --endpoint-skip-after 3
web01.lab:80 http admin *** [i] OPEN accessible without authentication · never misclassified as SUCCESS

Illustrative lab fixture demonstrating all seven ResultStatus records. Rows matching your selected left-hand protocols are highlighted with a Steel bar. No live domain was tested.

DOCS/PROTOCOLS.MD · 28 MODULES

Protocol & Backend Matrix

Run cred-spray --list-modules to inspect modules available in your runtime. Python libraries form the core native set; external executables remain explicit prerequisites rather than silent installs. See the complete protocol reference.

Showing 28 of 28 modules
cred-spray protocol implementations, default ports, backend type, credential support, and notes
Protocol Port Backend Auth Support Notes
SMB445Python · Impacket (--nxc)Password, NT hashAlternate port 139; automatic domain discovery uses NetExec unless -d or --no-auto-domain
LDAP389Python · ldap3 (--nxc)Password, NT hashSupports TLS options and common global-catalog ports
MSSQL1433Python · Impacket TDS (--nxc)Password, NT hashWindows/domain authentication behavior depends on server configuration
Kerberos88Python · ImpacketPassword, NT hash2x timeout multiplier; domain/realm behavior depends on target configuration
SSH22Python · Paramiko (--nxc)PasswordHost keys are not verified unless --ssh-known-hosts is supplied
WinRM5985Python · pywinrm NTLM (--nxc)Password2x timeout; native module rejects NT hashes with actionable error — use --nxc or evil-winrm
HTTP80Python · RequestsPasswordBasic auth and explicit form login (^USER^/^PASS^ + criteria); unauthenticated access returns OPEN
FTP21Python · ftplib (--nxc)PasswordExplicit service/port selection supported
Telnet23Python · telnetlibPasswordPrompt handling is heuristic; stdlib telnetlib removed in Python 3.13
SMTP587Python · smtplibPasswordSupports ports 25, 465, and 2525
IMAP143Python · imaplibPasswordSupports implicit TLS on port 993
POP3110Python · poplibPasswordSupports implicit TLS on port 995
MySQL3306Python · PyMySQLPasswordDirect TCP credential authentication
PostgreSQL5432Python · psycopg2PasswordDirect TCP credential authentication
Oracle1521Python · python-oracledbPassword--oracle-sid selects the SID or service name (default ORCL)
Redis6379Python · redis-pyPasswordUnauthenticated command access returns OPEN
MongoDB27017Python · PyMongoPasswordUnauthenticated command access returns OPEN
CouchDB5984Python · RequestsPasswordUnauthenticated database listing returns OPEN
Elasticsearch9200Python · RequestsPasswordUnauthenticated cluster access returns OPEN
Memcached11211Python · Binary SASL PLAINPasswordDoes not rely on unavailable pymemcache SASL helpers; open stats return OPEN
MQTT1883Python · paho-mqttPasswordAnonymous broker access returns OPEN; port 8883 supported
SNMP161Python · pysnmpPasswordv2c community strings; --snmpv3 selects authNoPriv; no-response returns TIMEOUT
VNC5900Python · PyCryptodome DES (--nxc)PasswordExact RFB handshake reads; no-authentication offers return OPEN
Cassandra9042Python · cassandra-driverPlatform-dependentUnavailable on tested Windows Python 3.12 (no libev or removed asyncore); open access returns OPEN
RDP3389External · FreeRDP / nxcPassword, NT hash3x timeout; prefers xfreerdp3/xfreerdp (/cert:ignore), falls back to NetExec
IPMI623External · ipmitoolPasswordInvokes ipmitool -I lanplus; requires ipmitool on PATH
WMI135External · NetExecPassword, NT hashRequires nxc on PATH
evil-winrm5985External · evil-winrmPassword, NT hash2x timeout; selected explicitly for hash-based WinRM testing; requires evil-winrm on PATH
CONTROL BOUNDARIES

Operator Safety Invariants

Controls are explicit and auditable in source. Read the operator guide before running against an authorized target.

[01] SEQUENTIAL EXECUTION

Concurrent endpoints, sequential per-endpoint credentials

Up to -w/--threads endpoints run in parallel while credentials stay strictly sequential on each endpoint. Distinct host:port:service endpoints are never collapsed during deduplication.

Per-endpoint pacing
--delay SECONDS
Stop on hit
--stop-on-success
Timeout cutoff
--endpoint-skip-after 3
[02] BUDGET & LOCKOUT STOPS

Refuse oversized plans and halt locked accounts

--dry-run skips Nmap, domain discovery, and all sockets. --max-attempts rejects oversized plans before execution. A LOCKED response marks later attempts for that username on that host SKIPPED. Budgets do not read domain policy or retract in-flight attempts.

Pre-flight cap
--max-attempts N
Rejection budget
--fail-limit N
Offline guarantee
--dry-run only
[03] MASKING & EXIT CODES

Secret redaction, atomic JSON, and scripting exits

--mask-creds replaces complete passwords and NT hashes with *** in terminal and JSON output and suppresses --commands. Debug output always redacts. NO_COLOR and TERM=dumb strip ANSI while keeping ASCII tags.

Completed run
Exit 0
Error / --fail-on-error
Exit 1
Invalid usage / input
Exit 2
LOCAL-FIRST INSTALL

Install with pipx

Requires Python 3.10+. System binaries (nmap, nxc, xfreerdp3/xfreerdp, ipmitool, evil-winrm) remain separate system prerequisites on PATH.

[shell] pipx install
git clone https://github.com/Real-Fruit-Snacks/cred-spray.git
cd cred-spray
pipx install .
cred-spray --version
cred-spray --list-modules
VERIFICATION BOUNDARY

Tested on & limitations

[ok] TESTED SUITE
  • Windows · Python 3.12: 49 pytest tests passed with -W error covering parsing, planning, dry-run isolation, budgets, masking, JSON schema, command quoting, local HTTP, and protocol outcomes.
  • Quality gates: Ruff lint and formatting checks passed; CI checks Windows and Ubuntu on Python 3.10 and 3.12.
  • Verification gap: Protocol tests use mocks and local fixtures. No live credential spray, domain controller, or service fleet was tested.
  • Cassandra on Windows Python 3.12: Reported unavailable by discovery (no libev or removed asyncore event loop) rather than crashing.
[!] KNOWN LIMITATIONS
  • Not a lockout guarantee: --fail-limit counts recognized FAILURE responses only; lockout matching is backend-dependent and in-flight attempts may finish.
  • TLS & host keys: SSH host keys require --ssh-known-hosts; FreeRDP auth-only checks use /cert:ignore.
  • SNMP ambiguity: No-response returns TIMEOUT, not proof that a community string or USM identity was rejected.
  • Sensitive artifacts: JSON reports and .cred-spray/scans/ Nmap caches still carry host, service, and username metadata even when secrets are masked.