Making HTTP requests to identify vulnerable Trendnet webcams
The Nmap Scripting Engine offers a library to handle requests and other common functions of an HTTP client. With this library, NSE developers can accomplish many tasks, from information gathering to vulnerability exploitation.
This recipe will show you how to use the HTTP library to send an HTTP request to identify vulnerable Trendnet TV-IP110W webcams.
How to do it...
Trendnet TV-IP110W webcams allow unauthenticated access to their video feed by simply requesting the URI /anony/mjpg.cgi
. Let's write an NSE script to detect these devices. For now, let's ignore the documentation tags:
Create the file
http-trendnet-tvip110w.nse
and start by filling up the NSE script basic information fields:description = [[ Attempts to detect webcams Trendnet TV-IP110W vulnerable to unauthenticated access to the video stream by querying the URI "/anony/mjpg.cgi". Original advisory: http://console-cowboys.blogspot.com/2012/01/trendnet-cameras-i-always...