Using Credentials
Using credentials with NetExec
Last updated
Was this helpful?
Using credentials with NetExec
Last updated
Was this helpful?
Every protocol supports using credentials in one form or another. For details on using credentials with a specific protocol, see the appropriate wiki section.
Generally speaking, to use credentials, you can run the following commands:
Code execution results in a (Pwn3d!) added after the login confirmation. With SMB protocol, most likely your compromised users are in the local administrators group.
FTP
No check
SSH
WINRM
LDAP
SMB
RDP
VNC
WMI
Example:
By specifying a credential ID (or multiple credential IDs) with the -id
flag nxc will automatically pull that credential from the back-end database and use it to authenticate (saves a lot of typing):
You can use nxc with mulitple domain environment
Where FILE is a file with usernames in this format
All protocols support brute-forcing and password spraying. For details on brute-forcing/password spraying with a specific protocol, see the appropriate wiki section.
By specifying a file or multiple values nxc will automatically brute-force logins for all targets using the specified protocol:
Examples:
Can be usefull for protocols like WinRM and MSSQL. This option avoid the bruteforce when you use files (-u file -p file)
Authentication throttling works on a per-host basis! Keep this in mind if you are spraying credentials against multiple hosts.
If there is a need to throttle authentications during brute forcing, you can use the jitter functionality. The length of the timeout (in seconds) between requests is randomly selected from an interval unless otherwise specified. If you want to hardcode the timeout, set the upper and lower bounds of the interval to the same value. The syntax is as follows:
root (otherwise specific message)
Code execution at least
Path to domain admin
Most likely local admin
Code execution at least
Code execution at least
Most likely local admin