# Use Case Based Blended Teaching of IIoT Cybersecurity in the Industry 4.0 Era
## 4 Shodan for Practical IIoT/Industry 4.0 Cybersecurity Labs
### Lab 4: Advanced Shodan scripting
For instance, NetBotz is a solution for monitoring remotely the health of data centers. A few NetBotz instances can be detected by Shodan (Shodan query: title:\"netbotz appliance\") and, as of writing, all are open, so anyone can see the environmental conditions of the data center and, in some cases, the video-surveillance cameras can be accessed (an example is shown in Figure A7 on the left). In addition, certain sensor data that are periodically collected by remote CPSs can be accessed easily through Shodan. For example, queries like _fuel oil_, _diesel_ or _unleaded_ enable accessing information from automatic tank gauges [91] (an example of the collected data is shown in Figure A7 on the right). Figure A5: Screenshot of open VNC-controlled SCADA found with Shodan. ### Additive Manufacturing

Additive manufacturing (also commonly known as 3D printing) systems can also be detected by Shodan, since some of them are exposed on the Internet in order to allow remote users to monitor and control the manufacturing process. For the same reason, other computer-based tools like lathes, milling machines or laser cutters may also be detected by Shodan. For instance, thousands of 3D printers that make use of the open-source software OctoPrint (mostly non-industrial 3D printers) can be found by Shodan (query: _title:cotprint 200 OK_). Most of them are properly secured, but a few hundred of them still remain completely open (Shodan query: _title:\"OctoPrint\"-title:\"Login\" http:favicon.hash:1307375944_). Figure 10 shows a screenshot of one of such unprotected 3D printers. ### Big Data Software

Big data software allows for processing and storing large amounts of information that is collected from diverse sources. Once stored, such data are analyzed and then certain conclusion can be drawn and decisions can be taken. First, it must be noted that Shodan allows for detecting running instances of traditional SQL databases like MySQL (Shodan query: _product:MySQL_) or PostgreSQL (Shodan query: _product:PostgreSQL_). In addition, hundreds of thousands of NoSQL databases can be found executing popular software likeMongoDB ([PERSON] query: _product:MongoDB_), CouchDB (Shodan query: _product:CouchDB_), Cassandra (Shodan query: _product:Cassandra_) or Elasticsearch (Shodan query: _port:9200 json_). In the case of MongoDB, it is straightforward to find open databases (Shodan query: _product:MongoDB databases_), most of which have been already hacked (this can be observed since there is a database called 'READ_ME_TO_RECOVER_YOUR_DATA' or similar that in its content demands Bitcoins to restore the database data). Regarding Cassandra, Shodan finds a few hundred open databases whose keyspaces are exposed (Shodan query: _product:cassandra kespaces_). Probably, the most popular software tool for processing and managing large amounts of data is Apache Hadoop. Shodan currently exposes data of several hundred of their servers (Shodan query: _product:namenode_). Moreover, Big Data developers can manage Hadoop clusters together with another Apache tool: Ambari. As of writing, Shodan is able to find just a few Apache Ambari servers (Shodan query: _ambari_), but some of them make use of the default administration credentials (a screenshot of the dashboard of one of such systems is shown in Figure A9 on the left). There are also other Big Data tools that allow for visualizing easily large sets of data. For example, Kibana is commonly deployed together with Elasticsearch to visualize the collected information. Several thousands of open Kibana servers can be currently found with Shodan (query: _kibana content-length: 217_). As an example, Figure A9 shows on the right a screenshot of an open Kibana dashboard. Finally, it is worth mentioning another Apache project that is increasingly being used by Big Data developers: Apache Spark. Such a tool provides a general-purpose cluster-computing framework for processing large amounts of data in parallel.