<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Krishnaa Saravanan</title>
    <description>The latest articles on DEV Community by Krishnaa Saravanan (@krishnaa_saravanan_e9f898).</description>
    <link>https://dev.to/krishnaa_saravanan_e9f898</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1557750%2F7dac9e29-f398-4cb0-9e9e-a2b432bb0968.jpg</url>
      <title>DEV Community: Krishnaa Saravanan</title>
      <link>https://dev.to/krishnaa_saravanan_e9f898</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/krishnaa_saravanan_e9f898"/>
    <language>en</language>
    <item>
      <title>Lesson Learned? Writeup || TryHackMe</title>
      <dc:creator>Krishnaa Saravanan</dc:creator>
      <pubDate>Wed, 24 Jul 2024 14:57:01 +0000</pubDate>
      <link>https://dev.to/krishnaa_saravanan_e9f898/lesson-learned-writeup-tryhackme-hcp</link>
      <guid>https://dev.to/krishnaa_saravanan_e9f898/lesson-learned-writeup-tryhackme-hcp</guid>
      <description>&lt;p&gt;Yo.&lt;/p&gt;

&lt;p&gt;This is my first writeup and if any mistakes present, kindly ignore them T_T&lt;/p&gt;

&lt;p&gt;This room is called as 'Lesson Learned' and after I cleared it, I indeed learned a valuable lesson.&lt;/p&gt;

&lt;p&gt;Start the machine and wait for around 5-6 seconds to boot up.&lt;/p&gt;

&lt;p&gt;IT'S ENUMERATING TIME.&lt;/p&gt;

&lt;p&gt;Start a nmap scan to know about the ports that its running on and other cool stuff about the victim.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffuzemhcnp3ckjsjg0rvt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffuzemhcnp3ckjsjg0rvt.png" alt="Image description" width="800" height="123"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can notice that there are two ports running - one is SSH and the other one would be HTTP. &lt;/p&gt;

&lt;p&gt;hmmmm. The HTTP one seems interesting since websites are run on where? Port 80!&lt;/p&gt;

&lt;p&gt;Paste the IP_ADDRESS:80 on the browser. You'll be presented with a boring page actually :[&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr768lc4qqpiezt5djacb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr768lc4qqpiezt5djacb.png" alt="Image description" width="800" height="916"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whenever a login page is present before a script kiddie, what would he/she do? Launch SQLi like a mad person! Yes, I tried to do the same, but nah no use. &lt;/p&gt;

&lt;p&gt;I went a level above to exploit the vulnerability, but had second thoughts, and gave a deep thought about this. &lt;/p&gt;

&lt;p&gt;After browsing for around half-an-hour, this OWASP site's information on 'Username and password enumeration' caught my eye. It said:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The &lt;strong&gt;scope of this test&lt;/strong&gt; is to verify if it is possible to collect a set of valid usernames &lt;strong&gt;by interacting with the authentication mechanism of the application&lt;/strong&gt;. This test will be useful for &lt;strong&gt;brute force testing&lt;/strong&gt;, in which the tester verifies if, given a valid username, it is possible to find the corresponding password.&lt;br&gt;
Often, web applications &lt;strong&gt;reveal&lt;/strong&gt; when a username &lt;strong&gt;exists&lt;/strong&gt; on system, either as &lt;strong&gt;a consequence of mis-configuration or as a design decision&lt;/strong&gt;. For example, sometimes, when we submit wrong credentials, we receive a message that states that either the username is present on the system or the provided password is wrong.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Well, that's enough of information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc5zteijqobjtx4la8fkb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc5zteijqobjtx4la8fkb.png" alt="Image description" width="574" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Indeed, "invalid username and password."&lt;/p&gt;

&lt;p&gt;Let's try bruteforcing.&lt;/p&gt;

&lt;p&gt;In order to do this, send that request to Burp Intruder!&lt;br&gt;
Your request might look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fve67lq9vyn2fx1x7mnyt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fve67lq9vyn2fx1x7mnyt.png" alt="Image description" width="637" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After specifying the payloads, start a sniper attack. I used the wordlist from &lt;a href="https://github.com/danielmiessler/SecLists/blob/master/Usernames/Names/names.txt" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
Also, refer BurpSuite's documentation on how to launch a Brute-force attack using the intruder since I want you to do some heavylifting lol&lt;/p&gt;

&lt;p&gt;While running the payload, one of the responses that I got had a change in content length. The username was 'arnold'. When I used this username in the login page with a invalid password, it throwed the below error and I knew that I'm halfway to the flag:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftm5u3644sgqjn0qvj1be.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftm5u3644sgqjn0qvj1be.png" alt="Image description" width="406" height="84"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, I thought of bypassing the login with a simple SQL injection. And yes it did! Gave me a flag with the lengthy congratulations! message.&lt;br&gt;
So puzzled, I tried reading it and understood I did completely the right way of SQLi. Not gonna say what was the message because I want you all to find out since it is an important lesson to be learned by us, script-kiddies. XD&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk09e8qoc1oo5u5leh9pk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk09e8qoc1oo5u5leh9pk.png" alt="Image description" width="610" height="77"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And yes, will be back with more writeups/walkthroughs!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F98ntgzkdm9pmb5h9s8xq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F98ntgzkdm9pmb5h9s8xq.jpg" alt="Image description" width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>capturetheflag</category>
      <category>ctf</category>
      <category>writeup</category>
    </item>
  </channel>
</rss>
