Chapter 13: Writing Your Own NSE Scripts
In this chapter, we will cover the following recipes to get you started on writing the Nmap Scripting Engine (NSE) scripts:
- Making HTTP requests to identify vulnerable Supermicro IPMI/BMC controllers
- Sending UDP payloads using NSE sockets
- Generating vulnerability reports in NSE scripts
- Exploiting an SMB vulnerability
- Writing brute-force password auditing scripts
- Crawling web servers to detect vulnerabilities
- Working with NSE threads, condition variables, and mutexes in NSE
- Writing a new NSE library in Lua
- Writing a new NSE library in C/C++
- Getting your scripts ready for submission
NSE was introduced in 2007 in version 4.5, and it extended its functionality to a whole new level using the information gathered during a network scan and performing additional tasks powered by the scripting language Lua. This feature has become a whole arsenal by itself, with more than 600 scripts distributed officially...