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

<channel>
	<title>Explore Security &#187; tool</title>
	<atom:link href="http://www.exploresecurity.com/tag/tool/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.exploresecurity.com</link>
	<description>IT security tools, techniques and commentary</description>
	<lastBuildDate>Wed, 15 Jun 2022 09:21:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6.1</generator>
		<item>
		<title>Are you oversharing (in Salesforce)?</title>
		<link>http://www.exploresecurity.com/are-you-oversharing-in-salesforce/</link>
		<comments>http://www.exploresecurity.com/are-you-oversharing-in-salesforce/#comments</comments>
		<pubDate>Mon, 28 Jun 2021 11:42:18 +0000</pubDate>
		<dc:creator>Jerome</dc:creator>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://www.exploresecurity.com/?p=468</guid>
		<description><![CDATA[Unauthorised access to data is a primary concern of clients who commission a Salesforce assessment. The Salesforce documentation acknowledges that the sharing model is a &#8220;complex relationship between role hierarchies, user permissions, sharing rules, and exceptions for certain situations&#8221;. It is often said that complexity and security are natural enemies. Salesforce empowers its users with [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Unauthorised access to data is a primary concern of clients who commission a Salesforce assessment. The Salesforce documentation acknowledges that the sharing model is a &#8220;complex relationship between role hierarchies, user permissions, sharing rules, and exceptions for certain situations&#8221;. It is often said that complexity and security are natural enemies. Salesforce empowers its users with a multifaceted sharing framework in order to cover a wide variety of business use cases. But with great power comes great responsibility. This <a href="https://research.nccgroup.com/2021/06/28/are-you-oversharing-in-salesforce/">blog post</a> over on the NCC Group research site discusses the topic of misconfigured sharing, and announces the release of a new open-source tool <a href="https://www.github.com/nccgroup/raccoon">Raccoon</a> to help identify such misconfigurations, which could otherwise expose sensitive data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exploresecurity.com/are-you-oversharing-in-salesforce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing for POODLE_TLS Manually</title>
		<link>http://www.exploresecurity.com/testing-for-poodle_tls-manually/</link>
		<comments>http://www.exploresecurity.com/testing-for-poodle_tls-manually/#comments</comments>
		<pubDate>Fri, 13 Mar 2015 12:25:24 +0000</pubDate>
		<dc:creator>Jerome</dc:creator>
				<category><![CDATA[SSL/TLS]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[penetration testing]]></category>
		<category><![CDATA[POODLE]]></category>
		<category><![CDATA[TLS]]></category>
		<category><![CDATA[tlslite]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://www.exploresecurity.com/?p=362</guid>
		<description><![CDATA[Testing for the original POODLE vulnerability was easy because it was an inherent problem with SSLv3, so if you find SSLv3 enabled then you&#8217;ve found POODLE (although other factors such as cipher suite preference have a role to play &#8211; see my previous post). Like Heartbleed, though, testing for POODLE over TLS is conceptually easy [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Testing for the original POODLE vulnerability was easy because it was an inherent problem with SSLv3, so if you find SSLv3 enabled then you&#8217;ve found POODLE (although other factors such as cipher suite preference have a role to play &#8211; see my previous <a title="Thoughts on Testing for POODLE" href="http://www.exploresecurity.com/thoughts-on-testing-for-poodle/">post</a>). Like Heartbleed, though, testing for POODLE <em>over TLS</em> is conceptually easy but it falls within a class of flaws that requires bespoke tools as an unpatched version of <code>openssl</code>, for example, won&#8217;t do what you want it to do. This article discusses how the Python <em>tlslite</em> library can be used to test for POODLE_TLS &#8211; and so much more.<span id="more-362"></span></p>
<h3>What is <em>tlslite</em>?</h3>
<p>From the <a href="https://github.com/trevp/tlslite">source</a> &#8220;TLS Lite is an open source python library that implements SSL and TLS&#8221;. I&#8217;d seen references to it in the original BEAST <a href="http://vnhacker.blogspot.co.uk/2011/09/beast.html">post</a> written by Thai Duong and an article on <a href="https://vivaldi.net/blogs/entry/what-is-tls-testing-tlsprober-net">TLS Prober</a> by Yngve Pettersen. This gave me some confidence that <em>tlslite</em> would be a good starting point. Obviously it&#8217;s not going to be fast but that doesn&#8217;t matter. With a SSL/TLS implementation in a high level language, it would be much easier to make the changes required for the sorts of tests I wanted to run, and I thought POODLE_TLS would be a good one to try first.</p>
<p>TLS Prober is in fact where I wanted to be heading. It works on a modified version of <em>tlslite</em> to test for various SSL/TLS bugs. However, the public source code hasn&#8217;t been updated since Yngve left Opera in 2013 and thus wouldn&#8217;t cover POODLE_TLS. While I could have added that capability, I decided to ignore TLS Prober (for now) and start afresh with the latest <em>tlslite</em> &#8211; mainly as it would be a good learning experience.</p>
<h3>How to test for POODLE_TLS</h3>
<p>I&#8217;m not going to re-hash theory that&#8217;s already <a href="https://www.imperialviolet.org/2014/10/14/poodle.html">covered</a> <a href="https://www.imperialviolet.org/2014/12/08/poodleagain.html">elsewhere</a>. Suffice to say that implementations of TLS that are faithful to the RFC shouldn&#8217;t be vulnerable to POODLE because the spec states what the contents of the padding bytes should be. Therefore, the way to test for POODLE_TLS is to ignore that rule and see if the connection is terminated by the server. This isn&#8217;t the same as performing a full attack but like all testing you have to compromise between accuracy and aggressiveness. I think this test is a good indication. After some rummaging through the source code and a bit of debugging, I found what I wanted.</p>
<h3>Changes to <em>tlslite</em></h3>
<p>It seemed a bit crazy to fork the <a href="https://github.com/trevp/tlslite">original project</a> as my changes were tiny. I also thought that working through the changes here may be helpful to anyone else who wants to do the same sort of thing.</p>
<p>So to begin with I needed to signal to <em>tlslite</em> that I wanted to send TLS messages with invalid padding. You get things going with <em>tlslite</em> through the <code>TLSConnection</code> class so I changed how that was instantiated. <code>TLSConnection</code> inherits from <code>TLSRecordLayer</code>, which is where the padding code lives, so that needed changing too. Within the &#8220;tlslite&#8221; folder I made the following changes (obviously line numbers will be version dependent so I&#8217;ve added the original code too; my version was 0.4.8):</p>
<p><strong>tlsconnection.py</strong><br />
Line 52 was:<br />
<code>def __init__(self, sock):</code><br />
Now:<br />
<code>def __init__(self, sock, check_poodle_tls=False):</code><br />
# now i can signal whether or not I want to perform the test<br />
# if you already have <em>tlslite</em>, you can change it safely because <code>check_poodle_tls</code> defaults to <code>False</code> so it&#8217;s backward-compatible with any existing code that makes use of <em>tlslite</em></p>
<p>Line 61 was:<br />
<code>TLSRecordLayer.__init__(self, sock)</code><br />
Now:<br />
<code>TLSRecordLayer.__init__(self, sock, check_poodle_tls)</code><br />
# I need to pass that signal on to the parent</p>
<p><strong>tlsrecordlayer.py</strong><br />
Line 102 was:<br />
<code>def __init__(self, sock):</code><br />
Now:<br />
<code>def __init__(self, sock, check_poodle_tls):</code></p>
<p>After line 103 <code>self.sock = sock</code> added new line:<br />
<code>self.check_poodle_tls = check_poodle_tls</code></p>
<p>After line 600 <code>paddingBytes = bytearray([paddingLength] * (paddingLength+1))</code> added new lines:<br />
<code>if self.check_poodle_tls == True:<br />
<span style="padding-left: 30px;">paddingBytes = bytearray(x ^ 42 for x in paddingBytes[0:-1])</span><br />
<span style="padding-left: 30px;">paddingBytes.append(paddingLength)</span></code><br />
# change all but the last of the padding bytes to be invalid (just XOR with 42, the answer to everything)<br />
# make the last byte of padding valid = the number of padding bytes</p>
<p>And that&#8217;s it! Remember, as it&#8217;s Python, that tabs are important and the new code needs to be properly aligned.</p>
<h3>POODLE_TLS test script</h3>
<p>I then created the test script (available <a href="https://github.com/exploresecurity/test_poodle_tls">here</a>), which attempts a normal TLS connection first before testing for POODLE using the invalid padding trick. Place the script within the modified <em>tlslite</em> and run it as <code>test_poodle_tls.py &lt;hostname&gt;</code>. Remember, it only tests for POODLE <em>over TLS, <u>not</u> SSLv3.</em></p>
<p>I&#8217;ve noticed that sometimes the normal connection fails and one of the reasons for this is that the server does not support any of the small number of cipher suites offered by <em>tlslite</em>. In this case no conclusion can be drawn &#8211; and the script catches that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exploresecurity.com/testing-for-poodle_tls-manually/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Sophie &#8211; a web SQL shell</title>
		<link>http://www.exploresecurity.com/sophie-a-web-sql-shell/</link>
		<comments>http://www.exploresecurity.com/sophie-a-web-sql-shell/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 15:46:15 +0000</pubDate>
		<dc:creator>Jerome</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://www.exploresecurity.com/?p=38</guid>
		<description><![CDATA[Download v.0.2 If you can exploit a flaw to upload files to an executable directory in an IIS environment, there are plenty of web shells around (some of which may be trojaned but that&#8217;s another issue) to give you an interactive command prompt via your browser. If the application makes use of a MS-SQL database, [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="/wp-content/uploads/custom/sophie.aspx">Download v.0.2</a></p>
<p>If you can exploit a flaw to upload files to an executable directory in an IIS environment, there are plenty of web shells around (some of which may be trojaned but that&#8217;s another issue) to give you an interactive command prompt via your browser. If the application makes use of a MS-SQL database, the same flaw can be used to upload Sophie, a &#8220;web SQL shell&#8221;, giving you access to the database via your browser as well:<span id="more-38"></span><span style="line-height: 1.714285714; font-size: 1rem;"><br />
</span></p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2013/04/sophie0.png"><img class="alignnone size-full wp-image-45" alt="sophie0" src="http://www.exploresecurity.com/wp-content/uploads/2013/04/sophie0.png" width="902" height="697" /></a></p>
<p><span style="line-height: 1.714285714; font-size: 1rem;">As with SQL injection, the level of access will depend on how the application and database have been configured.</span></p>
<p><span style="line-height: 1.714285714; font-size: 1rem;">Sophie automatically parses the </span><code style="line-height: 1.714285714;">web.config</code><span style="line-height: 1.714285714; font-size: 1rem;"> file from the current application context for connection strings. In ASP.NET 1.0 and 1.1, connection strings were stored in the </span><code style="line-height: 1.714285714;">&lt;appSettings&gt;</code><span style="line-height: 1.714285714; font-size: 1rem;"> section. From ASP.NET 2.0, a specific </span><code style="line-height: 1.714285714;">&lt;connectionStrings&gt;</code><span style="line-height: 1.714285714; font-size: 1rem;"> section was made available for just this purpose. Nonetheless, it&#8217;s still possible (and you often see) connection strings stored in </span><code style="line-height: 1.714285714;">&lt;appSettings&gt;,</code><span style="line-height: 1.714285714; font-size: 1rem;"> therefore Sophie looks in both sections. What&#8217;s easy about the </span><code style="line-height: 1.714285714;">&lt;connectionStrings&gt;</code><span style="line-height: 1.714285714; font-size: 1rem;"> section is that, because it is precisely designed to hold connection strings, ASP.NET provides a convenient way to access them. In contrast, </span><code style="line-height: 1.714285714;">&lt;appSettings&gt;</code><span style="line-height: 1.714285714; font-size: 1rem;"> can contain all sorts of information so there aren&#8217;t any functions that distinguish connection strings from other settings. Sophie uses some good old-fashioned guesswork, enumerating all keys within </span><code style="line-height: 1.714285714;">&lt;appSettings&gt;</code><span style="line-height: 1.714285714; font-size: 1rem;"> and for each one looking at its name and value for keywords that suggest it is a connection string. This is obviously prone to false positives and false negatives. To account for the latter, Sophie has a button &#8220;Get All&#8221; that shows all </span><code style="line-height: 1.714285714;">&lt;appSettings&gt;</code><span style="line-height: 1.714285714; font-size: 1rem;"> keys for you to review (and if you spot a connection string that Sophie missed by default, please let me know):</span></p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2013/04/sophie1.png"><img class="alignnone size-full wp-image-46" alt="sophie1" src="http://www.exploresecurity.com/wp-content/uploads/2013/04/sophie1.png" width="680" height="473" /></a></p>
<p>If you find nothing of interest and are now facing an overwhelming number of keys, you can always click &#8220;Revert&#8221;.</p>
<p>Having selected a connection string, you can click &#8220;Get Info&#8221; to collect some basic information about the level of access that the connection string provides:</p>
<p><a style="line-height: 1.714285714; font-size: 1rem;" href="http://www.exploresecurity.com/wp-content/uploads/2013/04/sophie2.png"><img class="alignnone size-full wp-image-47" style="border: 0px;" alt="sophie2" src="http://www.exploresecurity.com/wp-content/uploads/2013/04/sophie2.png" width="389" height="477" /></a></p>
<p>Or you can type some arbitrary SQL and click &#8220;Execute&#8221;:</p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2013/04/sophie3.png"><img class="alignnone size-full wp-image-48" alt="sophie3" src="http://www.exploresecurity.com/wp-content/uploads/2013/04/sophie3.png" width="637" height="423" /></a></p>
<p>The error handling (like the styling!) is, er, shall we say basic, but hopefully you will find Sophie a useful addition to your pentesting toolkit.</p>
<p><a href="/wp-content/uploads/custom/sophie.aspx">Download v.0.2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.exploresecurity.com/sophie-a-web-sql-shell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>William &#8211; WPA/WPA2 4-way handshake extraction script</title>
		<link>http://www.exploresecurity.com/william-wpawpa2-4-way-handshake-extraction-script/</link>
		<comments>http://www.exploresecurity.com/william-wpawpa2-4-way-handshake-extraction-script/#comments</comments>
		<pubDate>Tue, 16 Apr 2013 23:12:03 +0000</pubDate>
		<dc:creator>Jerome</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Wireless]]></category>
		<category><![CDATA[aircrack]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[wireless]]></category>
		<category><![CDATA[wpa]]></category>
		<category><![CDATA[wpa2]]></category>

		<guid isPermaLink="false">http://www.exploresecurity.com/?p=14</guid>
		<description><![CDATA[Download v.0.1 If you&#8217;ve ever tested Aircrack against a packet capture containing a handshake from a network whose WPA/WPA2 passphrase is known, you may have sometimes frowned at the &#8220;Passphrase not in dictionary&#8221; message. One possibility for this is noted on the (excellent) Aircrack website – http://www.aircrack-ng.org/doku.php?id=aircrack-ng#wpa_wpa2_handshake_analysis_fails. Essentially Aircrack hasn&#8217;t parsed the handshake from the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="/wp-content/uploads/custom/william.sh">Download v.0.1</a></p>
<p>If you&#8217;ve ever tested Aircrack against a packet capture containing a handshake from a network whose WPA/WPA2 passphrase is known, you may have sometimes frowned at the &#8220;Passphrase not in dictionary&#8221; message. One possibility for this is noted on the (excellent) Aircrack website – <a title="http://www.aircrack-ng.org/doku.php?id=aircrack-ng#wpa_wpa2_handshake_analysis_fails" href="http://www.aircrack-ng.org/doku.php?id=aircrack-ng#wpa_wpa2_handshake_analysis_fails">http://www.aircrack-ng.org/doku.php?id=aircrack-ng#wpa_wpa2_handshake_analysis_fails</a>. Essentially Aircrack hasn&#8217;t parsed the handshake from the capture correctly because there is too much “noise”. If Aircrack picks packets from <em>different</em> 4-way handshake exchanges then the passphrase will not be found, even if it&#8217;s in the dictionary. A tool called &#8220;wpaclean&#8221; (which is included in Backtrack) tidies up four-way handshake captures but, in my experiments, it didn&#8217;t always work so I wrote an alternative clean-up script, called William, that gives you more control. <span id="more-14"></span>The usage is:</p>
<p><code>william.sh &lt;output_file&gt; &lt;input_file&gt; [&lt;input_file_2&gt;...] [&lt;mth_packet_2&gt; [&lt;nth_packet_1&gt;]] [-f | -a] [-A &lt;dict_file&gt;] [-d]</code></p>
<p><code>m mth second packet of 4-way handshake (default 1)<br />
n nth first packet of 4-way handshake that precedes the chosen second packet (default 1)<br />
-f seek first message from start of capture working forwards<br />
-a pair up ALL message 1s that precede the chosen message 2 (multiple output files)<br />
-A run aircrack-ng against output files using the supplied dictionary file<br />
-d don't skip duplicate packets<br />
--help extra help</code></p>
<p>William is a bash script. If I&#8217;d known how it would turn out, I would have chosen another programming route, but never mind, it still works as a proof of concept. Let me explain how it works, which in turn will explain what the switches do. Here&#8217;s a messy capture file from attempts to crack the WPA2 key of a client using Airbase as a rogue access point. (In my experiments, using Airbase against clients as opposed to sniffing legitimate 4-way handshakes tended to make noisier capture files.) As a client-side attack, only the first 2 of the 4 messages in the 4-way handshake were captured (but that&#8217;s enough for Aircrack to work on):</p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2013/04/ss1.png"><img class="alignnone size-full wp-image-15" alt="ss1" src="http://www.exploresecurity.com/wp-content/uploads/2013/04/ss1.png" width="932" height="504" /></a></p>
<p>The first EAPOL frame is selected, which Wireshark informs us is the first of the 4 messages in the 4-way handshake. Note the &#8220;WPA Key Nonce&#8221; value. Now let&#8217;s move to the second EAPOL frame:</p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2013/04/ss2.png"><img class="alignnone size-full wp-image-16" alt="ss2" src="http://www.exploresecurity.com/wp-content/uploads/2013/04/ss2.png" width="932" height="502" /></a></p>
<p>The &#8220;WPA Key Nonce&#8221; is exactly the same. So the packet was either transmitted twice or recorded twice, which can happen when you&#8217;re sniffing on an interface that&#8217;s also engaged in active testing. Let&#8217;s move to the third EAPOL frame:</p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2013/04/ss3.png"><img class="alignnone size-full wp-image-17" alt="ss3" src="http://www.exploresecurity.com/wp-content/uploads/2013/04/ss3.png" width="939" height="503" /></a></p>
<p>Now the &#8220;WPA Key Nonce&#8221; is different, so this constitutes a second attempt at sending a first handshake message. Now let&#8217;s look at the first instance of a second message in the 4-way handshake:</p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2013/04/ss4.png"><img class="alignnone size-full wp-image-18" alt="ss4" src="http://www.exploresecurity.com/wp-content/uploads/2013/04/ss4.png" width="931" height="498" /></a></p>
<p>It turns out that there have been 14 unique first packets sent up to this point so the question is, which of them does this second message correspond to? Park that problem for now and note the &#8220;WPA Key MIC&#8221; value above instead. Let&#8217;s move to the next second message:</p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2013/04/ss5.png"><img class="alignnone size-full wp-image-19" alt="ss5" src="http://www.exploresecurity.com/wp-content/uploads/2013/04/ss5.png" width="937" height="499" /></a></p>
<p>It&#8217;s apparently the same &#8211; no surprise, given what we saw earlier. But it turns out the third instance of the second handshake message is the same too.  And so is the fourth, the fifth, the sixth&#8230;When all these first and second handshake messages are mixed up, it&#8217;s no wonder that Aircrack can sometimes produce false negatives. When I ran wpaclean it picked the 14th (i.e. the last) first message and the 1st second message. In other words it picks the first instance of a second message and works backwards to pick the first handshake message. Perfectly reasonable &#8211; but in this particular case Aircrack failed to find the passphrase from this pairing. Like Aircrack, wpaclean&#8217;s logic is fixed, so I wrote William to give you more options. The default is that it works just like wpaclean, as there&#8217;s nothing wrong with its logic. If you use the -f switch, however, William picks the first handshake message by working <em>forwards</em> from the start of the capture.</p>
<p>The n and m switches give you the freedom to try out your own pairings. If you run William with a single number 2 (i.e. <code>william.sh &lt;out_file&gt; &lt;in_file&gt; 2</code>) it picks the 2nd instance of a second handshake message and works backwards to find the first handshake message. The second message is always counted forwards from the start of the capture file. If you run William with the numbers 2 4, it picks the 4th first handshake message working backwards from the 2nd instance of a second handshake message. Adding -f to this would count the 4th first message from the start of the capture file. The &#8211;help switch gives more examples.</p>
<p>If you think about it, the second message of the handshake must correspond to one of the first messages that preceded it (assuming the capture is complete). So William informs you of how many unique first messages there were as a guide. If you select the -a option, William will generate capture files that pair the chosen second message with all the preceding first messages (working backwards from the second message), each file containing a different pairing. This brute-force method should succeed, assuming the passphrase is in your dictionary, but it will be more time-consuming.</p>
<p>AUTOMATED AIRCRACK</p>
<p>If you use the -A switch followed by the path to a dictionary file, William will run all output files through Aircrack automatically. It&#8217;s especially worth running this with -a because William will run Aircrack as the message pairs are written to file, so you may find the passphrase without having to wait for all the combinations to be generated. A successful screenshot follows:</p>
<p><a href="http://www.exploresecurity.com/wp-content/uploads/2013/04/ss6.png"><img class="alignnone size-full wp-image-20" alt="ss6" src="http://www.exploresecurity.com/wp-content/uploads/2013/04/ss6.png" width="747" height="353" /></a></p>
<p>DUPLICATES</p>
<p>As noted above, it&#8217;s possible that your capture file contains duplicate messages. By default, duplicates are ignored when counting the packet positions. If you use the -d option, duplicates are not ignored, i.e. the nth first packet and mth second packet are counted based entirely on their order of appearance in the file. As before, the second message is always counted forwards from the start of the capture file and the direction in which the first message is counted is set by the presence or absence of -f. The -d option won&#8217;t have much practical effect, it&#8217;s really just for experimentation.</p>
<p>THE NEED FOR A CORRECT SSID</p>
<p>When Aircrack parses a capture file, it first looks for the SSID of the network(s) whose traffic has been sniffed, and if it doesn&#8217;t find any it gives up. Why? Because the SSID is used with the passphrase to generate the Pairwaise Master Key. So even if you have the correct first and second handshake packets, without the correct SSID Aircrack will fail. William looks for packets that disclose the SSID based on the BSSID of the chosen second EAPOL message. If for some reason you&#8217;re unlucky enough to miss this, the script will ask you for a SSID and create a fake probe response packet to satisfy Aircrack.</p>
<p>INPUT</p>
<p>Multiple input files can be specified. If you&#8217;ve used Airodump with &#8211;write wpa, for example, it&#8217;s best to run William with the input wpa*.cap.</p>
<p>OUTPUT</p>
<p>The output file is the first parameter. If the -a switch has been used, the output filenames include a number to distinguish them. The number is an ordinal reflecting the position of the first message in the capture file so, as William works backwards from the second message, the number starts high and counts down to 1.</p>
<p>THE REAL WORLD</p>
<p>On a pentest job, outside the comfort of a known test environment, if Aircrack tells you the password isn&#8217;t in the dictionary, you have to believe it. Hopefully this posting will give you a few more ideas and you may want to run a few iterations of William just in case. I would suggest the following order, using <code>-A &lt;dictionary_file&gt;</code> each time:</p>
<ol>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Try REVERSE mode to mimic wpaclean (default, don&#8217;t specify -f or -a)</span></li>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Try FORWARD mode with -f</span></li>
<li><span style="line-height: 1.714285714; font-size: 1rem;">Run ALL mode with -a</span></li>
</ol>
<p>DOWNLOAD</p>
<p><a href="/wp-content/uploads/custom/william.sh">Download v.0.1</a></p>
<p>NODS</p>
<p>This script is an extension of wpaclean and owes everything to the fantastic Wireshark command-line toolset, specifically tshark, mergecap and text2pcap.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exploresecurity.com/william-wpawpa2-4-way-handshake-extraction-script/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>
