The Nmap Scripting Engine (NSE) enhances its already powerful version detection functionality by allowing scripts to perform additional fingerprinting tasks against scanned targets. Some version scripts can be translated into probes, and sometimes it is easier to write an NSE script. In this chapter, you will learn when to do so.
NSE scripts belonging to the version category will automatically run when version detection mode is enabled. Therefore, it is important that we learn how to recognize whether a script belongs to this category or not. Also, script execution rules should not trigger false positives if they are run against a different service.
You will learn the fundamentals of version detection with NSE and how to write your own NSE scripts. We will review the most common execution host and port rules in version scripts; by the end of the chapter, you will know everything about version detection in Nmap and NSE.
You may skip this chapter if you...