21.03.2013 Views

Quantitatively Assessing and Visualising Industrial System Attack Surfaces

Quantitatively Assessing and Visualising Industrial System Attack Surfaces

Quantitatively Assessing and Visualising Industrial System Attack Surfaces

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 2. METHODOLOGY 25<br />

Of course, it is simple to extend <strong>and</strong> customize the visualisation to reflect other types of<br />

vulnerabilities, with a minimum of code.<br />

Initially in vulnerability searching we simply use the same product name or query given<br />

to Shodan to find the device. In initial tests this returned no vulnerabilities, when we<br />

knew that some existed for a particular result. This is often because the query is a blunt<br />

tool to find products of a particular type. The results returned by Shodan queries are<br />

a richer source of information though, often providing the name <strong>and</strong> version number of<br />

the operating system <strong>and</strong> applications. These are more targeted pieces of software with a<br />

longer list of exploits available, <strong>and</strong> make much better sources for accurate vulnerability<br />

assessments.<br />

To run ExploitDB queries utilising these richer sources of information we need to de-<br />

compose the banners more carefully. This is tractable <strong>and</strong> automatable, but only with<br />

effort placed into disambiguating <strong>and</strong> decomposing each result differently. Currently this<br />

involves pre-processing the banners of different queries to some degree by h<strong>and</strong>. This<br />

begins with query dependent processing, <strong>and</strong> rapidly fans out to variations found in the<br />

subsets of data types present in different Shodan queries. There are conflicts between<br />

these differing data structures in banners that must be overcome to fully automate the<br />

process into a scalable unsupervised approach.<br />

For example, consider two server strings:<br />

Firstly one with multiple applications <strong>and</strong> operating system information.<br />

Apache/1.3.31 (Unix)<br />

PHP/4.3.9 mod_ssl/2.8.20 OpenSSL/0.9.7e<br />

And secondly, one with only the webserver information exposed.<br />

ioLogik Web Server/1.0<br />

The top banner is of a type we encounter frequently. A long string separated by spaces,<br />

with each application helpfully providing its version number to aid our exploit searches. So<br />

the simple approach would seem to be to tokenising the string by splitting it at the spaces<br />

to produce the search terms: ‘Apache/1.3.31’, ‘(Unix)’, ‘PHP/4.3.9’, ‘mod ssl/2.8.20’,<br />

‘OpenSSL/0.9.7e’. Of course when doing this we need to use some regular expressions<br />

to clean up these search terms as well so they become the more useful ‘Apache 1.3.31’,<br />

‘Unix’, ‘PHP 4.3.9’, ‘mod ssl 2.8.20’, ‘OpenSSL 0.9.7e’.<br />

However, as can be seen the bottom banner is not conducive to this technique, as we<br />

would be searching for exploits using ‘ioLogik’,‘Web’,‘Server 1.0’. Incidentally, ‘ioLogik’<br />

happens to be the original product name <strong>and</strong> search term, so it has already been searched.<br />

‘Web’ <strong>and</strong> ‘Server 1.0’ are ambiguous search terms returning all vulnerabilities related to

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!