{"tool":"ncrack","name":"Ncrack","description":"Nmap project’s high-speed network authentication cracker for RDP, SSH, SMB, FTP and other services, with timing controls.","tags":["brute force","RDP","SSH"],"homepage":"https://nmap.org/ncrack/","docs":"https://nmap.org/ncrack/man.html","install":{"apt":"sudo apt install ncrack","brew":"brew install ncrack"},"related":["hydra","medusa","nmap"],"total_commands":75,"commands":[{"id":1,"category":"Basic Ncrack Usage","command":"ncrack --version","example":"ncrack --version","explanation":"Displays the currently installed version of Ncrack to verify availability."},{"id":2,"category":"Basic Ncrack Usage","command":"ncrack --help","example":"ncrack --help","explanation":"Prints the main help menu listing supported flags and usage syntax."},{"id":3,"category":"Basic Ncrack Usage","command":"ncrack -V","example":"ncrack -V","explanation":"Runs Ncrack with increased verbosity to show detailed runtime information."},{"id":4,"category":"Basic Ncrack Usage","command":"ncrack --list-modules","example":"ncrack --list-modules","explanation":"Lists all supported authentication modules and default ports available in the current installation."},{"id":5,"category":"Single Target Testing","command":"ncrack -u admin --pass 'Password123' ftp://127.0.0.1","example":"ncrack -u admin --pass 'Password123' ftp://127.0.0.1","explanation":"Tests a single username and password against an FTP service using URL syntax."},{"id":6,"category":"Single Target Testing","command":"ncrack -u root --pass toor ssh://127.0.0.1","example":"ncrack -u root --pass toor ssh://127.0.0.1","explanation":"Tests a single username and password against an SSH service using URL syntax."},{"id":7,"category":"Single Target Testing","command":"ncrack -p 22 --user root --pass toor 127.0.0.1","example":"ncrack -p 22 --user root --pass toor 127.0.0.1","explanation":"Explicitly specifies port 22 for an SSH login attempt against a target IP."},{"id":8,"category":"Wordlist Based Testing","command":"ncrack -u admin -P passwords.txt 127.0.0.1:21","example":"ncrack -u admin -P passwords.txt 127.0.0.1:21","explanation":"Tests a single username against a list of passwords for an FTP service on port 21."},{"id":9,"category":"Wordlist Based Testing","command":"ncrack -U users.txt -P passwords.txt ssh://127.0.0.1","example":"ncrack -U users.txt -P passwords.txt ssh://127.0.0.1","explanation":"Performs a full audit using a list of users and a list of passwords against an SSH target."},{"id":10,"category":"Wordlist Based Testing","command":"ncrack -U users.txt --pass 'Summer2023!' rdp://192.168.1.10","example":"ncrack -U users.txt --pass 'Summer2023!' rdp://192.168.1.10","explanation":"Performs a password spraying attack using a list of users and one common password against RDP."},{"id":11,"category":"Target Specification","command":"ncrack -iL targets.txt -p ssh","example":"ncrack -iL targets.txt -p ssh","explanation":"Scans multiple targets provided in a text file against the default SSH port."},{"id":12,"category":"Target Specification","command":"ncrack -p ssh 192.168.1.0/24","example":"ncrack -p ssh 192.168.1.0/24","explanation":"Targets an entire CIDR subnet range for SSH authentication discovery."},{"id":13,"category":"Target Specification","command":"ncrack -p 80,443,8080 127.0.0.1","example":"ncrack -p 80,443,8080 127.0.0.1","explanation":"Specifies multiple ports manually to check for services on a single host."},{"id":14,"category":"Protocol Specific - Windows","command":"ncrack -p smb -u Administrator -P passlist.txt 192.168.1.50","example":"ncrack -p smb -u Administrator -P passlist.txt 192.168.1.50","explanation":"Targets the SMB protocol specifically for Windows authentication auditing."},{"id":15,"category":"Protocol Specific - Windows","command":"ncrack -p rdp -U users.txt -P pass.txt 192.168.1.50","example":"ncrack -p rdp -U users.txt -P pass.txt 192.168.1.50","explanation":"Audits Remote Desktop Protocol credentials using user and password lists."},{"id":16,"category":"Protocol Specific - Windows","command":"ncrack -p winrm -u admin -P passwords.txt 192.168.1.50","example":"ncrack -p winrm -u admin -P passwords.txt 192.168.1.50","explanation":"Targets Windows Remote Management service for authentication testing."},{"id":17,"category":"Protocol Specific - Database","command":"ncrack -p 3306 -u root -P mysql_pass.txt 127.0.0.1","example":"ncrack -p 3306 -u root -P mysql_pass.txt 127.0.0.1","explanation":"Audits a MySQL database instance on the default port 3306."},{"id":18,"category":"Protocol Specific - Database","command":"ncrack -p 5432 -u postgres -P pg_pass.txt 127.0.0.1","example":"ncrack -p 5432 -u postgres -P pg_pass.txt 127.0.0.1","explanation":"Audits a PostgreSQL database instance on the default port 5432."},{"id":19,"category":"Protocol Specific - Database","command":"ncrack -p 1433 -u sa -P mssql_pass.txt 192.168.1.20","example":"ncrack -p 1433 -u sa -P mssql_pass.txt 192.168.1.20","explanation":"Targets a Microsoft SQL Server instance using the 'sa' account."},{"id":20,"category":"Protocol Specific - Database","command":"ncrack -p 6379 -u default -P redis_pass.txt 127.0.0.1","example":"ncrack -p 6379 -u default -P redis_pass.txt 127.0.0.1","explanation":"Tests authentication against a Redis data store on port 6379."},{"id":21,"category":"Protocol Specific - Database","command":"ncrack -p 27017 -u admin -P mongo_pass.txt 127.0.0.1","example":"ncrack -p 27017 -u admin -P mongo_pass.txt 127.0.0.1","explanation":"Audits a MongoDB instance using the default port 27017."},{"id":22,"category":"Protocol Specific - Web","command":"ncrack -p http -u admin -P web_pass.txt 127.0.0.1","example":"ncrack -p http -u admin -P web_pass.txt 127.0.0.1","explanation":"Tests HTTP Basic Authentication against the web root."},{"id":23,"category":"Protocol Specific - Web","command":"ncrack -p https -u admin -P web_pass.txt 127.0.0.1","example":"ncrack -p https -u admin -P web_pass.txt 127.0.0.1","explanation":"Tests HTTPS Basic Authentication ensuring SSL/TLS encryption is used."},{"id":24,"category":"Protocol Specific - Web","command":"ncrack http://127.0.0.1,path=/admin","example":"ncrack http://127.0.0.1,path=/admin","explanation":"Specifies a specific URL path '/admin' for the HTTP authentication test."},{"id":25,"category":"Protocol Specific - Mail","command":"ncrack -p 110 -u user -P mail_pass.txt 127.0.0.1","example":"ncrack -p 110 -u user -P mail_pass.txt 127.0.0.1","explanation":"Targets a POP3 mail server on port 110."},{"id":26,"category":"Protocol Specific - Mail","command":"ncrack -p 143 -u user -P mail_pass.txt 127.0.0.1","example":"ncrack -p 143 -u user -P mail_pass.txt 127.0.0.1","explanation":"Targets an IMAP mail server on port 143."},{"id":27,"category":"Protocol Specific - Legacy","command":"ncrack -p 23 -u root -P telnet_pass.txt 192.168.1.1","example":"ncrack -p 23 -u root -P telnet_pass.txt 192.168.1.1","explanation":"Audits a legacy Telnet service on port 23."},{"id":28,"category":"Protocol Specific - VNC","command":"ncrack -p 5900 -u user -P vnc_pass.txt 192.168.1.5","example":"ncrack -p 5900 -u user -P vnc_pass.txt 192.168.1.5","explanation":"Tests VNC remote access passwords on default port 5900."},{"id":29,"category":"SSL/TLS Options","command":"ncrack -p ssl:21 -u admin -P pass.txt 127.0.0.1","example":"ncrack -p ssl:21 -u admin -P pass.txt 127.0.0.1","explanation":"Forces SSL connection on a standard FTP port (FTPS explicit)."},{"id":30,"category":"SSL/TLS Options","command":"ncrack -p 993 -u user -P pass.txt 127.0.0.1","example":"ncrack -p 993 -u user -P pass.txt 127.0.0.1","explanation":"Tests IMAPS (IMAP over SSL) on the standard secure port."},{"id":31,"category":"Timing and Performance","command":"ncrack -p ssh --connection-limit 5 127.0.0.1","example":"ncrack -p ssh --connection-limit 5 127.0.0.1","explanation":"Limits the number of concurrent connections per service to 5."},{"id":32,"category":"Timing and Performance","command":"ncrack -p ssh --auth-limit 2 127.0.0.1","example":"ncrack -p ssh --auth-limit 2 127.0.0.1","explanation":"Limits the number of authentication attempts per connection to 2."},{"id":33,"category":"Timing and Performance","command":"ncrack -p ssh --time-limit 1h 127.0.0.1","example":"ncrack -p ssh --time-limit 1h 127.0.0.1","explanation":"Sets a hard time limit of 1 hour for the entire cracking session."},{"id":34,"category":"Timing and Performance","command":"ncrack -p ssh -g cl=10 127.0.0.1","example":"ncrack -p ssh -g cl=10 127.0.0.1","explanation":"Uses the global option flag to set the connection limit to 10."},{"id":35,"category":"Timing and Performance","command":"ncrack -p ssh -g at=1 127.0.0.1","example":"ncrack -p ssh -g at=1 127.0.0.1","explanation":"Sets the authentication tries per connection to exactly 1 (useful for avoiding lockouts)."},{"id":36,"category":"Timing and Performance","command":"ncrack -p ssh -g to=5s 127.0.0.1","example":"ncrack -p ssh -g to=5s 127.0.0.1","explanation":"Sets the connection timeout to 5 seconds to fail fast on unresponsive hosts."},{"id":37,"category":"Output and Logging","command":"ncrack -p ssh -u user -P pass.txt 127.0.0.1 -oN output.txt","example":"ncrack -p ssh -u user -P pass.txt 127.0.0.1 -oN output.txt","explanation":"Saves the results in Normal human-readable format to a file."},{"id":38,"category":"Output and Logging","command":"ncrack -p ssh -u user -P pass.txt 127.0.0.1 -oX output.xml","example":"ncrack -p ssh -u user -P pass.txt 127.0.0.1 -oX output.xml","explanation":"Saves the results in XML format for easier parsing by other tools."},{"id":39,"category":"Output and Logging","command":"ncrack -p ssh -u user -P pass.txt 127.0.0.1 -oA ncrack_scan","example":"ncrack -p ssh -u user -P pass.txt 127.0.0.1 -oA ncrack_scan","explanation":"Saves the results in all available formats (Normal, XML, Grepable) with the given basename."},{"id":40,"category":"Output and Logging","command":"ncrack -v -p ssh 127.0.0.1","example":"ncrack -v -p ssh 127.0.0.1","explanation":"Runs in verbose mode to see more details about the connection process."},{"id":41,"category":"Output and Logging","command":"ncrack -d -p ssh 127.0.0.1","example":"ncrack -d -p ssh 127.0.0.1","explanation":"Runs in debugging mode to troubleshoot connection or module errors."},{"id":42,"category":"Output and Logging","command":"ncrack -d2 -p ssh 127.0.0.1","example":"ncrack -d2 -p ssh 127.0.0.1","explanation":"Runs with high debugging level (level 2) for deep protocol inspection."},{"id":43,"category":"Session Management","command":"ncrack -p ssh -U users.txt -P biglist.txt 127.0.0.1 --save session.dat","example":"ncrack -p ssh -U users.txt -P biglist.txt 127.0.0.1 --save session.dat","explanation":"Saves the session state to a file periodically to allow pausing."},{"id":44,"category":"Session Management","command":"ncrack --resume session.dat","example":"ncrack --resume session.dat","explanation":"Resumes a previously saved or interrupted Ncrack session from the file."},{"id":45,"category":"Advanced List Handling","command":"ncrack -p ssh --pairwise 127.0.0.1","example":"ncrack -p ssh --pairwise 127.0.0.1","explanation":"Tests usernames against passwords in pairs (u1 with p1, u2 with p2) rather than all-to-all."},{"id":46,"category":"Advanced List Handling","command":"ncrack -p ssh --passwords-first 127.0.0.1","example":"ncrack -p ssh --passwords-first 127.0.0.1","explanation":"Iterates through the password list first for each username (inverts the default loops)."},{"id":47,"category":"Advanced Targeting","command":"ncrack -iL targets.txt --exclude 192.168.1.1","example":"ncrack -iL targets.txt --exclude 192.168.1.1","explanation":"Scans a list of targets but explicitly excludes a specific IP address."},{"id":48,"category":"Advanced Targeting","command":"ncrack -p ssh --exclude-file safe_hosts.txt 192.168.1.0/24","example":"ncrack -p ssh --exclude-file safe_hosts.txt 192.168.1.0/24","explanation":"Scans a subnet but excludes all hosts listed in a specific file."},{"id":49,"category":"Advanced Protocol Options","command":"ncrack -p sip -u 100 -P pass.txt 192.168.1.50","example":"ncrack -p sip -u 100 -P pass.txt 192.168.1.50","explanation":"Audits a SIP (VoIP) server using extension numbers as usernames."},{"id":50,"category":"Advanced Protocol Options","command":"ncrack -p dicom -u admin -P pass.txt 192.168.1.60","example":"ncrack -p dicom -u admin -P pass.txt 192.168.1.60","explanation":"Audits a DICOM medical imaging server for default credentials."},{"id":51,"category":"Advanced Protocol Options","command":"ncrack -p cvs -u root -P pass.txt 127.0.0.1","example":"ncrack -p cvs -u root -P pass.txt 127.0.0.1","explanation":"Audits a CVS (Concurrent Versions System) server."},{"id":52,"category":"Advanced Protocol Options","command":"ncrack -p mqtt -u user -P pass.txt 127.0.0.1","example":"ncrack -p mqtt -u user -P pass.txt 127.0.0.1","explanation":"Audits an MQTT broker often used in IoT environments."},{"id":53,"category":"Module Specific Options","command":"ncrack -p ssh,ftp:3000 127.0.0.1","example":"ncrack -p ssh,ftp:3000 127.0.0.1","explanation":"Scans default SSH port and a non-standard FTP port (3000) simultaneously."},{"id":54,"category":"Red Team Workflows","command":"ncrack -p smb -U users.txt --pass 'Company2024!' -g at=1,cl=1 192.168.1.0/24","example":"ncrack -p smb -U users.txt --pass 'Company2024!' -g at=1,cl=1 192.168.1.0/24","explanation":"Low-and-slow password spraying attack against an SMB range to avoid account lockouts."},{"id":55,"category":"Red Team Workflows","command":"ncrack -p ssh -u root -P top500.txt 192.168.1.10 -g to=10s","example":"ncrack -p ssh -u root -P top500.txt 192.168.1.10 -g to=10s","explanation":"Targeted brute force of the root account using a curated top 500 password list."},{"id":56,"category":"Blue Team Validation","command":"ncrack -p ssh -u audit_test -P bad_passwords.txt 127.0.0.1","example":"ncrack -p ssh -u audit_test -P bad_passwords.txt 127.0.0.1","explanation":"Simulates attacks to verify if the SIEM or IDS triggers on repeated SSH failures."},{"id":57,"category":"Blue Team Validation","command":"ncrack -p http -U known_users.txt -P weak_pass.txt 127.0.0.1","example":"ncrack -p http -U known_users.txt -P weak_pass.txt 127.0.0.1","explanation":"Verifies that web application accounts have strong passwords by testing against a weak list."},{"id":58,"category":"Performance Tuning","command":"ncrack -p ftp -g cl=200,at=5 127.0.0.1","example":"ncrack -p ftp -g cl=200,at=5 127.0.0.1","explanation":"Aggressive high-speed scan with high connection limits for a stress test in a lab."},{"id":59,"category":"Combined Workflow","command":"ncrack -iL all_servers.txt -p ssh,rdp,winrm -U admins.txt -P passwords.txt -oA internal_audit","example":"ncrack -iL all_servers.txt -p ssh,rdp,winrm -U admins.txt -P passwords.txt -oA internal_audit","explanation":"Comprehensive infrastructure audit checking SSH, RDP, and WinRM across all servers."},{"id":60,"category":"Credential Stuffing Simulation","command":"ncrack -p https --pairwise -U leaked_users.txt -P leaked_pass.txt 127.0.0.1","example":"ncrack -p https --pairwise -U leaked_users.txt -P leaked_pass.txt 127.0.0.1","explanation":"Tests exact username:password pairs from a breach against a secure web portal."},{"id":61,"category":"Protocol Specific - Network","command":"ncrack -p 23 -u cisco -P cisco_pass.txt 192.168.1.254","example":"ncrack -p 23 -u cisco -P cisco_pass.txt 192.168.1.254","explanation":"Tests default credentials on network infrastructure equipment via Telnet."},{"id":62,"category":"IPv6 Targeting","command":"ncrack -6 -p ssh -u root -P pass.txt 2001:db8::1","example":"ncrack -6 -p ssh -u root -P pass.txt 2001:db8::1","explanation":"Targets an IPv6 address for SSH authentication testing."},{"id":63,"category":"Verbose Debugging","command":"ncrack -vv -d -p ssh 127.0.0.1","example":"ncrack -vv -d -p ssh 127.0.0.1","explanation":"Combines high verbosity and debug mode for maximum runtime visibility."},{"id":64,"category":"Interactive Mode","command":"ncrack -p ssh -u user -P pass.txt 127.0.0.1","example":"ncrack -p ssh -u user -P pass.txt 127.0.0.1","explanation":"Runs in interactive mode where keys like 'p', 'v', 'd' can be pressed to toggle status lines."},{"id":65,"category":"Time Limit Audit","command":"ncrack -p smb -U users.txt -P pass.txt --time-limit 10m 192.168.1.0/24","example":"ncrack -p smb -U users.txt -P pass.txt --time-limit 10m 192.168.1.0/24","explanation":"Runs an SMB audit across a subnet but strictly terminates after 10 minutes."},{"id":66,"category":"Specific MongoDB Auth","command":"ncrack -p 27017 -u admin -P pass.txt --module-opt authdb=admin 127.0.0.1","example":"ncrack -p 27017 -u admin -P pass.txt --module-opt authdb=admin 127.0.0.1","explanation":"Specifies the MongoDB authentication database explicitly using module options."},{"id":67,"category":"Cassandra DB","command":"ncrack -p 9042 -u cassandra -P pass.txt 127.0.0.1","example":"ncrack -p 9042 -u cassandra -P pass.txt 127.0.0.1","explanation":"Audits a Cassandra database service on its native protocol port."},{"id":68,"category":"Wordpress XMLRPC","command":"ncrack -p http -u admin -P pass.txt --module-opt path=/xmlrpc.php 127.0.0.1","example":"ncrack -p http -u admin -P pass.txt --module-opt path=/xmlrpc.php 127.0.0.1","explanation":"Targets the WordPress XML-RPC interface for authentication brute forcing."},{"id":69,"category":"Custom HTTP Method","command":"ncrack -p http -u admin -P pass.txt --module-opt method=HEAD 127.0.0.1","example":"ncrack -p http -u admin -P pass.txt --module-opt method=HEAD 127.0.0.1","explanation":"Uses the HEAD method instead of GET/POST for HTTP authentication attempts."},{"id":70,"category":"WinRM HTTPS","command":"ncrack -p 5986 -u Administrator -P pass.txt 192.168.1.50","example":"ncrack -p 5986 -u Administrator -P pass.txt 192.168.1.50","explanation":"Targets WinRM over HTTPS (port 5986) for secure management auditing."},{"id":71,"category":"Postgres Specific Database","command":"ncrack -p 5432 -u postgres -P pass.txt --module-opt dbname=template1 127.0.0.1","example":"ncrack -p 5432 -u postgres -P pass.txt --module-opt dbname=template1 127.0.0.1","explanation":"Connects to a specific PostgreSQL database name 'template1' during authentication."},{"id":72,"category":"FTP Passive Mode","command":"ncrack -p ftp -u admin -P pass.txt --module-opt passive 127.0.0.1","example":"ncrack -p ftp -u admin -P pass.txt --module-opt passive 127.0.0.1","explanation":"Forces the FTP module to use passive mode for data connection compatibility."},{"id":73,"category":"SSH Key Exchange","command":"ncrack -p ssh -u root -P pass.txt --module-opt kex=diffie-hellman-group1-sha1 127.0.0.1","example":"ncrack -p ssh -u root -P pass.txt --module-opt kex=diffie-hellman-group1-sha1 127.0.0.1","explanation":"Specifies a legacy key exchange algorithm for SSH to support older targets."},{"id":74,"category":"Full Automation Chain","command":"ncrack -iL targets.txt -p ssh,rdp,smb -U users.txt -P pass.txt -g cl=2,at=1 -oA full_audit --save checkpoint.dat","example":"ncrack -iL targets.txt -p ssh,rdp,smb -U users.txt -P pass.txt -g cl=2,at=1 -oA full_audit --save checkpoint.dat","explanation":"A complete, safe automation command combining throttling, logging, checkpoints, and multi-protocol targeting."},{"id":75,"category":"Quiet Scan","command":"ncrack -p ssh -u user -P pass.txt 127.0.0.1 -q","example":"ncrack -p ssh -u user -P pass.txt 127.0.0.1 -q","explanation":"Runs the scan in quiet mode, suppressing most non-critical output to stdout."}],"slug":"ncrack","category":"credentials","url":"https://terminal.rokibulroni.com/tool/credentials/ncrack","markdown":"https://terminal.rokibulroni.com/api/v1/tools/credentials/ncrack.md"}