Add scripts to nmap - termcap/cybersecurity GitHub Wiki

  • Nmap uses .nse scripts
  • Search where current .nse scripts are located via the following command
    locate *.nse
  • Add your nse script there and call it via the command
    nmap --script=your_script 1.1.1[.]1
  • Example: To scan an IP for cobalt strike C2. Taken from here
[kali@kali]$ #Download the NSE script 
[kali@kali]$ cd "path-to-where-nmap-nse-scripts-reside"
[kali@kali]$ sudo wget https://github.com/whickey-r7/grab_beacon_config/blob/main/grab_beacon_config.nse
[kali@kali]$ sudo mv grab_beacon_config.nse cobalt-scan.nse # Give it an easy name
[kali@kali]$ nmap --script=cobalt_scan 1.1.1[.]1