Let's tie everything together by writing a complete NSE script that uses all the libraries seen in this chapter. On this occasion, we will target devices running MikroTik RouterOS 3.x and higher versions with API access enabled.
The API service usually runs on TCP port 8728
, and it allows administrative access to the devices running this operating system. Often, administrators will lock down HTTP and SSH but not the API. Let's write a script that helps us perform brute-force password-auditing against this service:
First, let's start with the information tags and required libraries:
description = [[ Performs brute force password auditing against Mikrotik RouterOS devices with the API RouterOS interface enabled. Additional information: * http://wiki.mikrotik.com/wiki/API * http://wiki.mikrotik.com/wiki/API_in_C * https://github.com/mkbrutusproject/MKBRUTUS ]] author = "Paulino Calderon <calderon()websec...