Home Capture the Flag FristiLeaks – VulnHub CTF Challenge Walkthrough

FristiLeaks – VulnHub CTF Challenge Walkthrough

by Unallocated Author

FristiLeaks is available at VulnHub. It requires a lot of enumeration to root this VM. This VM is intended for beginners.

In this walkthrough, I’ll be using Parrot Security OS but you can use any other Linux distro.

 

Now, edit your “/etc/hosts” file to register this IP in your local DNS.

 

Run a full Nmap Scan

 

HTTP Server’s default webpage,

 

Nothing useful found in the source code, let’s check “robots.txt”.

 

The files in “robots.txt” contain nothing. Now, check “/fristi/”.

 

The source code of this page reveals a base64 encoded text.

 

Save this text to a file and then decode it and store it as an image file.

cat base64enc | base64 --decode > output.png

 

Now, open the image file.

 

This text looks like a password. For username, try “eezeepz”.

 

Try these credentials on the login page.

We’re successfully logged in. Now, try uploading a PHP reverse shell (from pentest monkey).

Edit your reverse shell extension and change it from “.php” to “.php.png” and then upload and alter the http request

 

Now, access this file “/fristi/uploads/php-reverse-shell.php”.

 

We got a reverse shell. After some enumeration, there is a file named notes.txt that contains something interesting.

 

Now, change permissions of “/home/admin/” using “runthis”.

echo "/home/admin/chmod -R 7777 /home/admin" > /tmp/runthis

 

Spawn a pty shell.

 

“whoisyourgodnow.txt” and “cryptedpass.txt” contains an encrypted password and “cryptpass.py” which is used to encrypt these files. Now, try creating a reverse algorithm of “cryptpass.py” on the attacker machine.

import base64,codecs,sys

string="=RFn0AKnlMHMPIzpyuTI0ITG"
def encodeString(str):
    decoded = codecs.decode(str[::-1], 'rot13')
    return base64.b64decode(decoded)

print encodeString(string)

 

Now, run this.

 

Try this as a password for “fristigod”.

 

File “/var/fristigod/.secret_admin_stuff/doCom” can be run as root. Now, try running BASH using this file.

 

Want to learn more about ethical hacking?

We have a  networking hacking course that is of a similar level to OSCP, get an exclusive 95% discount HERE

You may also like

Latest Hacking News

Privacy Preference Center

Necessary

The __cfduid cookie is used to identify individual clients behind a shared IP address and apply security settings on a per-client basis.

cookie_notice_accepted and gdpr[allowed_cookies] are used to identify the choices made from the user regarding cookie consent.

For example, if a visitor is in a coffee shop where there may be several infected machines, but the specific visitor's machine is trusted (for example, because they completed a challenge within your Challenge Passage period), the cookie allows Cloudflare to identify that client and not challenge them again. It does not correspond to any user ID in your web application, and does not store any personally identifiable information.

__cfduid, cookie_notice_accepted, gdpr[allowed_cookies]

Advertising

DoubleClick by Google refers to the DoubleClick Digital Marketing platform which is a separate division within Google. This is Google’s most advanced advertising tools set, which includes five interconnected platform components.

DoubleClick Campaign Manager: the ad-serving platform, called an Ad Server, that delivers ads to your customers and measures all online advertising, even across screens and channels.

DoubleClick Bid Manager – the programmatic bidding platform for bidding on high-quality ad inventory from more than 47 ad marketplaces including Google Display Network.

DoubleClick Ad Exchange: the world’s largest ad marketplace for purchasing display, video, mobile, Search and even Facebook inventory.

DoubleClick Search: is more powerful than AdWords and used for purchasing search ads across Google, Yahoo, and Bing.

DoubleClick Creative Solutions: for designing, delivering and measuring rich media (video) ads, interactive and expandable ads.

doubleclick

Analytics

The _ga is asssociated with Google Universal Analytics - which is a significant update to Google's more commonly used analytics service. This cookie is used to distinguish unique users by assigning a randomly generated number as a client identifier. It is included in each page request in a site and used to calculate visitor, session and campaign data for the sites analytics reports. By default it is set to expire after 2 years, although this is customisable by website owners.

The _gat global object is used to create and retrieve tracker objects, from which all other methods are invoked. Therefore the methods in this list should be run only off a tracker object created using the _gat global variable. All other methods should be called using the _gaq global object for asynchronous tracking.

_gid works as a user navigates between web pages, they can use the gtag.js tagging library to record information about the page the user has seen (for example, the page's URL) in Google Analytics. The gtag.js tagging library uses HTTP Cookies to "remember" the user's previous interactions with the web pages.

_ga, _gat, _gid