<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Security Viewpoints &#187; Vulnerability assessment</title>
	<atom:link href="http://advosys.ca/viewpoints/category/vulnerability-assessment/feed/" rel="self" type="application/rss+xml" />
	<link>http://advosys.ca/viewpoints</link>
	<description>Security, operating systems and the IT industry</description>
	<lastBuildDate>Tue, 31 Aug 2010 13:06:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Nmap 5.00 is out</title>
		<link>http://advosys.ca/viewpoints/2009/07/nmap-500-is-out/</link>
		<comments>http://advosys.ca/viewpoints/2009/07/nmap-500-is-out/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 19:44:23 +0000</pubDate>
		<dc:creator>D Webber</dc:creator>
				<category><![CDATA[Vulnerability assessment]]></category>
		<category><![CDATA[auditing]]></category>
		<category><![CDATA[port scanning]]></category>
		<category><![CDATA[vulnerability+assessment]]></category>

		<guid isPermaLink="false">http://advosys.ca/viewpoints/?p=513</guid>
		<description><![CDATA[Fyodor et al. have just released version 5.00 of the essential Nmap port scanner. Lots of changes in this major release: Performance improvements for scanning. Improvements to the Zenmap GUI. New toolÂ Ncat, &#8220;a a much-improved reimplementation of the venerable Netcat.&#8221; The Ndiff scan comparison tool. Improved and new scripts for the NSE scripting engine. More [...]]]></description>
			<content:encoded><![CDATA[<p>Fyodor et al. have just released version 5.00 of the essential Nmap port scanner.</p>
<p>Lots of <a title="Top 5 Improvements in Nmap 5" href="http://nmap.org/5/#5changes">changes</a> in this major release:</p>
<ul>
<li>Performance improvements for scanning.</li>
<li>Improvements to the <a href="http://nmap.org/zenmap/">Zenmap</a> GUI.</li>
<li>New toolÂ <a href="http://nmap.org/ncat/">Ncat</a>, &#8220;a a much-improved reimplementation of the venerable Netcat.&#8221;</li>
<li>The <a href="http://nmap.org/ndiff/">Ndiff</a> scan comparison tool.</li>
<li>Improved and new scripts for the <a title="Nmap sripting engine" href="http://nmap.org/book/nse.html">NSE scripting engine</a>.</li>
<li>More documentation: a <a href="http://nmap.org/ncat/guide/index.html">users&#8217; guide</a> and <a href="http://nmap.org/book/">Nmap Network Scanning</a> book.</li>
</ul>
Copyright &copy; 2012 <a href="http://advosys.ca/">Advosys Consulting Inc.</a>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://advosys.ca/viewpoints/2009/07/nmap-500-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing SSL with command line tools</title>
		<link>http://advosys.ca/viewpoints/2006/08/testing-ssl-with-command-line-tools/</link>
		<comments>http://advosys.ca/viewpoints/2006/08/testing-ssl-with-command-line-tools/#comments</comments>
		<pubDate>Wed, 16 Aug 2006 23:16:59 +0000</pubDate>
		<dc:creator>D Webber</dc:creator>
				<category><![CDATA[Little-known features]]></category>
		<category><![CDATA[Vulnerability assessment]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[web security]]></category>

		<guid isPermaLink="false">http://advosys.ca/viewpoints/2006/08/testing-ssl-with-command-line-tools/</guid>
		<description><![CDATA[In an post over at the excellent TaoSecurity blog, Richard writes about discovering nssl, an SSL-capable version of netcat. A reader reminded him that the openssl command line utility can also act as an ad hoc SSL client like so openssl s_client -connect www.example.com:443 The above lets you connect via SSL to a web server [...]]]></description>
			<content:encoded><![CDATA[<p>In an post over at the excellent <a href="http://taosecurity.blogspot.com/" target="_blank" title="Richard Bejtlich's TaoSecurity blog">TaoSecurity</a> blog, Richard <a href="http://taosecurity.blogspot.com/2006/08/nssl.html" target="_blank" title="TaoSecurity nssl">writes about</a> discovering <a href="http://sourceforge.net/projects/nssl" target="_blank" title="nssl - SSL enabled netcat">nssl</a>, an SSL-capable version of netcat. A reader reminded him that the openssl command line utility can also act as an ad hoc SSL client like so</p>
<blockquote>
<pre>openssl s_client -connect www.example.com:443</pre>
</blockquote>
<p>The above lets you connect via SSL to a web server and manually type HTTP commands just like you can with non-SSL web servers using plain old netcat and telnet.</p>
<p>The OpenSSL command-line utility is a swiss army knife for encryption protocols. You can use it for far more than just generating keys and connecting to SSL servers. But there are also many other command-line tools that are incredibly useful for SSL testing and discovery purposes:<span id="more-27"></span></p>
<ul>
<li>Gnu <a href="http://www.gnu.org/software/wget/" target="_blank" title="GNU wget">wget</a> can fetch HTTPS URLs, if it has been compiled with SSL support. To view the HTTP response headers, try wget -S</li>
<li><a href="http://lynx.browser.org/" target="_blank" title="Lynx text-based web browser">Lynx</a> and <a href="http://elinks.or.cz/" target="_blank" title="eLinks text-based web browser">elinks</a> text-based web browsers (again, assume they have been compiled with SSL support)</li>
<li><a href="http://www.webdav.org/cadaver/" target="_blank" title="Cadaver - WebDAV command-line client">Cadaver</a> for SSL-enabled <a href="http://www.webdav.org/" target="_blank" title="WebDAV publishing protocol">WebDAV</a> servers</li>
<li><a href="http://www.stunnel.org/" target="_blank" title="stunnel SSL tunnel daemon">stunnel</a> for tunnelling any traffic through SSL</li>
<li><a href="http://www.rtfm.com/ssldump/" target="_blank" title="SSLDump SSL traffic sniffer">ssldump</a> for sniffing and decrypting SSL traffic</li>
</ul>
<p>SSL tools like these are valuable for assessing more than just web servers. About a year ago we had a contract to do a security assessment of <a href="javascript:void(window.open('http://www.cisco.com/en/US/products/sw/secursw/ps5057/index.html','','resizable=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no'))" title="Cisco Security Agent host intrusion prevention system">Cisco Security Agent</a> (a host intrusion prevention tool originally developed by &quot;Okena&quot;). After a bit of network sniffing and poking around the server directories, it turned out that CSA client and server communicate using HTTP encrypted with SSL over a non-standard port (a huge number of commercial products use simple HTTP and SSL as their client-server protocol. They just run it on a port other than 443 to disguise the fact).</p>
<p>To evaluate how robust the client and server were to attack, we used ssldump to decrypt and the raw HTTP traffic (this was possible only because the CSA server held the SSL host key).</p>
<p>Once we could capture the raw HTTP and understood how requests were formatted, we used openssl, stunnel and other tools to capture and replay communications between server and client, spoof traffic, impersonate endpoints, and &quot;fuzz&quot; the communications looking for overflows and other obvious vulnerabilities. The product withstood attack fairly well.</p>
<p>Were it not for the availability of these command-line tools, especially ssldump, performing the vulnerability assessment would been much more limited and involved coding a lot of custom SSL clients using something like Perl and the <a href="http://search.cpan.org/~gaas/libwww-perl-5.800/lib/LWP.pm" target="_blank" title="Perl LWP web client module">LWP</a> library.</p>
<p>It always bugs me when vendors use the word &quot;secure&quot; when they really mean &quot;encrypted&quot;. Encryption is only one tool that can be used in security, and usually it&#8217;s not the encryption that&#8217;s the weak point. In other products we&#8217;ve evaluated, a little sniffing and investigation revealed that while SSL was the method of encryption, the key size was 48 bits or lower, making brute force decryption feasible. Worse, some products ignore the authentication features of the SSL protocol, allowing either the client or server to be impersonated by an attacker with ease. There&#8217;s not much point in encrypting traffic when there&#8217;s no authentication of the client or server.</p>
<p>Many vendors use encryption to hide how weak their client-server communications really are. It&#8217;s a good thing that excellent open source tools like the above make vulnerability assessments of SSL-encrypted communications almost the same level of difficulty as assessing non-encrypted ones.</p>
Copyright &copy; 2012 <a href="http://advosys.ca/">Advosys Consulting Inc.</a>

<p><em>Related posts:</em><ul><li><a href='http://advosys.ca/viewpoints/2009/04/owasp-meetings-are-depressing/' rel='bookmark' title='Permanent Link: OWASP meetings are depressing'>OWASP meetings are depressing</a></li>
<li><a href='http://advosys.ca/viewpoints/2006/10/public-key-request-forgery/' rel='bookmark' title='Permanent Link: Public Key Signature Forgery'>Public Key Signature Forgery</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://advosys.ca/viewpoints/2006/08/testing-ssl-with-command-line-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comparing nessus output using diff</title>
		<link>http://advosys.ca/viewpoints/2006/05/nessus-output-with-diff/</link>
		<comments>http://advosys.ca/viewpoints/2006/05/nessus-output-with-diff/#comments</comments>
		<pubDate>Tue, 02 May 2006 10:55:57 +0000</pubDate>
		<dc:creator>D Webber</dc:creator>
				<category><![CDATA[Vulnerability assessment]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[nessus]]></category>
		<category><![CDATA[server security]]></category>
		<category><![CDATA[vulnerabilities]]></category>

		<guid isPermaLink="false">http://advosys.ca/viewpoints/2006/05/nessus-output-with-diff/</guid>
		<description><![CDATA[Nessus is a popular network vulnerability scanner. It can check for a huge number of common application and operating system vulnerabilities and although no longer open source is still free to download and use for most organizations. Nessus is primarily designed for manual scanning with an operator setting up a scan, letting it run then [...]]]></description>
			<content:encoded><![CDATA[<p>
Nessus is a popular network vulnerability scanner. It can check for a huge number of common application and operating system vulnerabilities and although no longer open source is still free to download and use for most organizations.
</p>
<p>
Nessus is primarily designed for manual scanning with an operator setting up a scan, letting it run then parsing the results by hand. When you need to regularly scan a network and report on changes, it can take a lot of manual work. Nessus supports several output formats for scan reports but none are particularly easy to parse using automatic tools such as Unix &#8220;diff&#8221;.
</p>
<p>
<span id="more-9"></span>The problem is that Nessus output includes variables such as scan start and end times which are reported as changes by diff. Some plug-ins also place the all-important &#8220;risk factor&#8221; identifier in different places in the scan results making automated comparison even more difficult.
</p>
<p>
Various scripts and Per modules exist that attempt to parse Nessus output. Perl module <a href="http://search.cpan.org/~rbow/Parse-Nessus-XML-1.14/" target="_blank">Parse::Nessus::XML</a> is one, but in our testing we found it can&#8217;t always handle XML format used by Nessus 3.0. The other perl modules for Nessus output only provided aggregate information, not details. The graphical client <a href="http://nessuswx.nessus.org/" target="_blank" title="NessusWX - a graphical client for Nessus">NessusWX</a> has a comparision feature, but it can&#8217;t be automated.
</p>
<p>
We finally wound up adapting a perl script to parse NSR file output. The below file is based on work originally posted to the Nessus mailing list by Darren Bounds. Give it a Nessus .nsr file and it will spit out a sorted tab-separated list like so:
</p>
<div align="center">
ipaddress hostname risk-factor port plugin-id
</div>
<p>
Sample output:
</p>
<blockquote>
<pre>
	10.0.6.106 example.com   High    submission (587/tcp) 11499
	10.0.6.106 example.com   High    unknown (32781/tcp) 10659
	10.0.6.106 example.com   Low     filenet-pa (32772/udp) 10228
	10.0.6.106 example.com   Low     submission (587/tcp) 11088
	10.0.6.106 example.com   Medium  http (80/tcp) 11267
	</pre>
</blockquote>
<p>
Only Nessus results labeled &#8220;Report&#8221; or &#8220;Info&#8221; and having an identified Risk factor are printed. In other words, only items that need action should appear (the script actually parses some other info from the .nsr file such as CVE nummber, but doesn&#8217;t print it. It&#8217;s easily modified to include that info if you need it).
</p>
<p>
The output can be saved between runs then compared using nothing more than the &#8220;diff&#8221; command. Handy if you want to monitor a network automatically with Nessus and see only the changes.
</p>
<p>
To use the script, run the command-line Nessus client from cron with the -T parameter to force results to be output to NSR format. For example:
</p>
<div align="center">
nessus -q -T nsr localhost 1241 username password IPs-to-scan.txt output.nsr
</div>
<p>
Run the resulting output.nsr file through the parse-nsr.pl script to get a list of vulnerabilities sorted by IP address:
</p>
<div align="center">
parse-nsr.pl output.nsr &gt; today.txt
</div>
<p>
Finally, run diff to compare vulnerabilities.txt with the same output from the previous run to get a concise list of changes:
</p>
<blockquote>
<pre>
	diff yesterday.txt today.txt
	382c401,402
	&lt; 205.193.6.94	example.com	Medium	ftp (21/tcp)	10081
	---
	&gt; 205.193.6.94	205.193.6.94	High	ftp (21/tcp)	10556
	&gt; 205.193.6.94	205.193.6.94	Medium	ftp (21/tcp)	10081
	</pre>
</blockquote>
<p>
The script seems to work well with Nessus 3.0. Click the following lnks to view or download the script:
</p>
<p>
Download: <img src="/images/script.gif" alt="script icon" title="script icon" align="bottom" /> <a href="/code/parse-nsr.pl.txt" title="parse-nsr.pl perl script">parse-nsr.pl</a> (2.7k text file)</p>
Copyright &copy; 2012 <a href="http://advosys.ca/">Advosys Consulting Inc.</a>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://advosys.ca/viewpoints/2006/05/nessus-output-with-diff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

