<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hari Prasanth on Medium]]></title>
        <description><![CDATA[Stories by Hari Prasanth on Medium]]></description>
        <link>https://medium.com/@blackhood?source=rss-4555ec664c88------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7_A4jdVWmI1mcqdBZbhaPw.jpeg</url>
            <title>Stories by Hari Prasanth on Medium</title>
            <link>https://medium.com/@blackhood?source=rss-4555ec664c88------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 14:30:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@blackhood/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Capturing WPA2-PSK Handshake (aircrack-ng)]]></title>
            <link>https://medium.com/@blackhood/capturing-wpa2-psk-handshake-aircrack-ng-d8f58d40dcf5?source=rss-4555ec664c88------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8f58d40dcf5</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[wpa2]]></category>
            <category><![CDATA[aircrack-ng]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[wifihacking]]></category>
            <dc:creator><![CDATA[Hari Prasanth]]></dc:creator>
            <pubDate>Thu, 18 Jul 2019 13:15:04 GMT</pubDate>
            <atom:updated>2019-07-18T13:15:04.294Z</atom:updated>
            <content:encoded><![CDATA[<p>In this report, I am going to demonstrate a Wi-Fi attack by building my own Wi-Fi network using ESP8266 IEEE 802.11 Wi-Fi and penetrate into it with the help of the Aircrack-ng suite.</p><h3>Software and Tools used</h3><ul><li>NodeMCU ESP8266 board</li><li>Arduino IDE</li><li>TP-LINK TL-WN822N 300Mbps Wireless USB Adapter</li><li>Kali Linux OS</li><li>Aircrack-ng suite</li></ul><p>Before getting into an actual demonstration we shall dive into some important topics.</p><h3>Wi-Fi Protected Access (WPA)</h3><ul><li>Wi-Fi Protected Access (WPA) is a security standard for users of computing devices equipped with WIRELESS INTERNET CONNECTIONS.</li><li>It is actually introduced in response to the weakness that Wired Equivalent Privacy (WEP) had of being cracked easily.</li></ul><h3>ESP8266 Wi-Fi Module Features</h3><ul><li>Integrated TR switch, power amplifier, and matching network.</li><li>WEP or WPA/WPA2 authentication, or open network.</li></ul><h3>Wireless USB Adapter</h3><ul><li>If you don’t need to poke and prod in the 5 GHz band, the Alfa (and NH) USB Wi-Fi adapter is one of the best options you have for wireless pen-testing.</li><li>Enabling Monitor mode, Monitor mode is different from promiscuous mode, also used for packet sniffing.Because monitor mode doesn’t require association with an Access Point.</li></ul><h3>Setting up ARDUINO IDE with ESP8266 board:</h3><blockquote><strong>Step 1:</strong> Open the preferences window from the Arduino IDE. Go to File &gt; Preferences</blockquote><blockquote><strong>Step 2:</strong> Enter <a href="http://arduino.esp8266.com/stable/package_esp8266com_index.json">http://arduino.esp8266.com/stable/package_esp8266com_index.json</a> into the “Additional Board Manager URLs” field.</blockquote><blockquote><strong>Step 3:</strong> Open boards manager. Go to Tools &gt; Board &gt; Boards Manager…</blockquote><blockquote><strong>Step 4</strong>: Choose your ESP8266 board from Tools &gt; Board &gt; Generic ESP8266 Module</blockquote><h3><strong>Server-to-Client.ino</strong></h3><p>I created a simple Server-to-Client code where the server generates a random number (made this script for the testing purpose it could be anything). Any clients connected to the WAP and go to the specified [eg .http://192.168.11.4] URL gets a random number.</p><p>And also while generating random numbers it logs those numbers in CSV format and stores it as a spreadsheet in the local computer (in our case the SERVER).</p><p>You can view the script from my repo, <a href="https://github.com/b1ackh00d/ESP8266-server-to-client/blob/master/Server-to-Client.ino">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/0*kdgmUz5rwaLQeN7I" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/0*1BXuSyg47zKANIax" /></figure><h3>Attacking</h3><ul><li>First, we connect our Wireless USB Adapter to the attacking computer (Kali Linux OS installed) and we don’t need to be connected to “ESP8266’s network.</li><li>`<em>iwconfig</em>` — displays the network interfaces which are specific to the wireless operations.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/0*hvkdzZK3c4h2zWZ5" /></figure><p>In our case, the <strong>wlan1 </strong>interface is associated with our adapter and is in Managed mode.</p><ul><li>We need to change it to Monitor mode. Remember that monitor mode is more powerful than the promiscuous mode since it allows us to sniff all radio traffic without having to be connected to an AP.</li><li><em>`airmon-ng start wlan1` </em>— enables Monitor mode. [<em>wlan1 &gt;&gt; wlan1mon</em>]</li><li><em>`airodump-ng wlan1mon` — </em>displays the nearby access points.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/0*ZoCYrRZiDVfoxuSP" /></figure><p>From the above picture, we can see all AP’s nearby us and their information.</p><p>Here our “ESP8266_server’s” MAC addr is 3E:71:BF:32:80:A0 and channel is 1 (one).</p><ul><li><em>`airodump-ng — bssid 3E:71:BF:32:80:A0 — channel 1 -w wpa_log wlan1mon` — </em>displays all the Wi-Fi clients that are connected to “ESP8266_server” , captures WPA handshake b/w server and client and store it in the file “wpa_log”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/0*_mCLsEU1MXcXWQAr" /></figure><p>We can see only one client (I’m using a mobile phone) connected to the AP and also it captured WPA handshake, which is really important to break the password.</p><ul><li>If you don’t see the WPA handshake after a series amount of time, then you need to perform “deauth” attack.</li><li><em>`aireplay-ng — deauth 20 -a 3E:71:BF:32:80:A0 -c BC:2F:3D:83:9E:A2 wlan1mon` — </em>tries to fake that it is the connected client, by sending 20 packets through any client to the server.</li><li>Once we capture WPA handshake, the next step is to crack our “wpa_log-01.cap” or “wpa_log-02.cap” file.</li><li>I’m using aircrack-ng to crack the handshake. But use “<a href="https://github.com/v1s1t0r1sh3r3/airgeddon">airgeddon</a>” where we can customize the wordlists to perform attack.</li><li><em>`aircrack-ng wpa_log-02.cap -w /usr/share/wordlists/rockyou.txt` </em>— should crack. [Dictionary attack]</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/0*v95mFIIqwECq_krR" /></figure><ul><li>So the password is “123password”. We all know this is a weak password( yeah! ikr). But you need to know the main thing that all passwords are crackable and you should be aware of that.</li><li>In Real-World it may not apply unless users using common-passwords.</li><li>There are also other attacks like “<strong>evil twin attack</strong>” which steals the host key and cracks the password within a minute.</li><li>The WPS PIN attack becomes incredibly effective and short if the attacker somehow has knowledge of a neighbor’s WPS PIN.</li></ul><h3>Preventing yourself from Wi-Fi Attacks:</h3><blockquote>Never leave the access point ‘open’ or unsecured. Access the control panel of the wireless router and configure it to use a complex WPA2 key.</blockquote><blockquote>Since the use of WEP is now deprecated due to serious security flaws, you should use WPA2 (AES) instead.</blockquote><blockquote>Make sure you have the latest firmware installed and that your router has a WPS lockout policy (AP rate limiting) after a certain number of unsuccessful attempts. In absence of such lockout policy, turn off WPS in your router.</blockquote><blockquote><strong>Configure complex passphrases that are a combination of special characters, numbers, letters, etc. Never use personal information such as your phone number as the WPA passphrase, as it might be guessed.</strong></blockquote><blockquote>Always be wary of any page asking for a password. Avoid giving out the WPA password over shady pages.</blockquote><blockquote>Get a <strong>VPN </strong>(Virtual Private Network), which will take your sent and received data, encrypt it, and channel it through a server somewhere else. While they don’t guarantee 100% protection, especially against a determined attacker, they will usually stop you from being selected as an easy target.</blockquote><blockquote>Using authentication tools, such as<strong> two-factor Authentication</strong>, for all users connecting to the wireless networks other than inputting a password.</blockquote><h3>Preventing deauth attacks:</h3><p>Realistically, you cannot stop an attacker from sending deauthentication packets.</p><p>Instead, you should focus on ensuring you are resilient to a deauth attack. Make sure your network is configured in a way that the deauth attack doesn’t enable an attacker to compromise your network.</p><p>To do that, you need to make sure you are using WPA2. If you are using a pre- shared key (a passphrase), make sure the passphrase is very long and strong. If it is not already, change it immediately! If you are not using WPA2, fix that immediately!</p><h3>Conclusion</h3><p>In this internet world, nothing is secure. Once you are connected to the “<strong>INTERNET</strong>” you can’t insist that you are secure. But you can reduce the amount of data being stolen. Make sure you are up to date and have the latest firmware installed on the devices.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8f58d40dcf5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simple JWT hacking]]></title>
            <link>https://medium.com/iqube-kct/simple-jwt-hacking-73870a976750?source=rss-4555ec664c88------2</link>
            <guid isPermaLink="false">https://medium.com/p/73870a976750</guid>
            <category><![CDATA[ctf2019]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[json-web-token]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Hari Prasanth]]></dc:creator>
            <pubDate>Thu, 07 Mar 2019 20:42:55 GMT</pubDate>
            <atom:updated>2019-06-05T06:41:05.960Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>JWT (JSON Web Token)</blockquote><p>While attending Nullcon International Security Conference 2019 at Goa, they conducted a Battle Underground CTF which was a jeopardy style CTF. I’ve come across one of the Web challenges JWT worth 300 points (btw it isn’t that hard :-p). I would like to share my way of completing the challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fCTL7iDq-C0fSAaLzGF1NA.png" /><figcaption><a href="https://nullcon.net/website/goa-2019/ctf.php">https://nullcon.net/website/goa-2019/ctf.php</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*XAdkEEupsApQ73PO9qyH1g.png" /><figcaption><a href="http://braindead.battleunderground.in/">braindead.battleunderground.in</a></figcaption></figure><p><strong>Motive :</strong></p><p>We need to generate a JWT token having an admin role instead of having a user.</p><p><strong>About JWT’s :</strong></p><blockquote>JSON Web Tokens used for creating access tokens that assert some number of claims. For example, a server could generate a token that has the claim “<strong>logged in as admin</strong>” and provide that to a client. The client could then use that token to prove that it is logged in as admin.</blockquote><p><strong>Tools :</strong></p><ul><li>JWT_TOOL is a toolkit for validating, forging and cracking JJWTs.GitHub: <a href="https://github.com/ticarpi/jwt_tool">https://github.com/ticarpi/jwt_tool</a></li></ul><p><strong>Steps :</strong></p><p>By intercepting the web request with Burp Suite, it gives an “X-Auth Token’s” value which is nothing but dots separated base64URL encoded values generally known as JWT token.</p><blockquote>X-Auth Token : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYWRtaW4ifQ==.heBq_EtfVfbCTp9nxaWOi_cN4wXgrwdDxUvii6B_8A</blockquote><p>Now we can use jwt_tool.py to forge the token.</p><pre>python jwt_tool.py eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYWRtaW4ifQ==.heBq_EtfVfbCTp9nxaWOi_cN4wXgrwdDxUvii6B_8A /usr/share/wordlists/rockyou.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MBkMVTBr9KlJlAptWKiCHQ.png" /></figure><p>We have the Payload as “role = user”. As you guessed we need to change the Payload and get the flag. But how ??</p><p>JWT assembly : &lt; Header + “.” + Payload + “.” + Signature &gt;</p><p>Answer :</p><p>The above data and the “secret key” creates the token.</p><p>So, we need to find the key. If the signature is invoked by weak key we could crack it with our rockyou word list, so let us try it out.</p><ul><li>For cracking, we need to select option 5.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*io1QJVjIeRRV9vkzwEQUVA.png" /></figure><p>Hurrah! We got the key as ‘jamesbond007’.</p><ul><li>We need to play with Payload so now option 6.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*xw82VsTrcvJA4vAXD7xjmQ.png" /></figure><ul><li>All good select field number 0 to continue.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*2yYhx27gPujJBniR9IeaIw.png" /></figure><ul><li>Select a field number 1 and enter new value “admin” and select 0 to continue to next step.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*TmLaljKWRS_BlNwTFPCZ6Q.png" /></figure><ul><li>Option 1 is so juicy go ahead and Sign token with a known key and choose key length as HMAC-SHA256.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*ra586zd5FpR6ihqEKmDZwQ.png" /></figure><p>Yess! We got a forged token claiming “role = admin”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XrKZ0Jbwu4JFdTb1DywUaA.png" /></figure><p>We could able to access the admin page by replacing our payload in X-Auth token’s parameter and retrieved the flag!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X4J9oK6bo5CRr3kxZRXIUw.png" /></figure><p>The Flag is: <em>braindead{4lways_us3_str0ng_k3y$}</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73870a976750" width="1" height="1" alt=""><hr><p><a href="https://medium.com/iqube-kct/simple-jwt-hacking-73870a976750">Simple JWT hacking</a> was originally published in <a href="https://medium.com/iqube-kct">iQube</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>