🌟
Noel's Cyberkshetra Blogspace
LinkedIn ProfileGithub ProfilePersonal Blogspot
  • Welcome to my Gitbooks Page
  • 💽Let's Defend Blue Team Walkthroughs
    • SOC164 - Suspicious Mshta Behavior Alert
    • SOC147 - SSH Scan Activity Alert
    • SOC146  -  Phishing Mail Detected Alert
    • SOC145 - Ransomware Detected Alert
    • SOC144  -  New scheduled task created Alert
    • SOC143 - Password Stealer Detected Alert
    • SOC141  -  Phishing URL Detected Alert
    • SOC141 - Phishing URL Detected Alert
    • SOC137 — Malicious File/Script Download Attempt: A Walkthrough
    • SOC109  -  Emotet Malware Detected Alert
    • SOC104 - Malware Detected Alert
    • SOC101  -  Phishing Mail Detected Alert
    • HTTP Basic Auth: Let's Defend DFIR Challenge
    • ShellShock Attack: Let’s Defend Challenge
    • 2021’s 0-Day MSHTML: Let's Defend Lab
  • 🤺BTLO Walkthroughs
    • BTLO: Network Analysis-Web Shell Challenge
    • BTLO: Suspicious USB Stick Challenge
  • 💒WiCYS CyberStart
    • Chapter 1 - Amsterdam A Running Start
      • WiCYS CyberStart (Amsterdam) Challenge 1
      • WiCYS CyberStart (Amsterdam) Challenge 2
      • WiCYS CyberStart (Amsterdam) Challenge 3
      • WiCYS CyberStart (Amsterdam) Challenge 4
    • Chapter 2 - Tokyo Patterns of Behaviour
      • WiCYS CyberStart (Tokyo) Challenge 1
      • WiCYS CyberStart (Tokyo) Challenge 2
      • WiCYS CyberStart (Tokyo) Challenge 3
      • WiCYS CyberStart (Tokyo) Challenge 4
    • Chapter 3 - Barcelona In the thick of it
      • WiCYS CyberStart (Barcelona) Challenge 1
      • WiCYS CyberStart (Barcelona) Challenge 2
      • WiCYS Cyberstart (Barcelona) Challenge 3
      • WiCYS CyberStart (Barcelona) Challenge 4
  • 📕Technical Cyber articles
    • An in-depth analysis of an Intrusion Prevention System
    • DevSecOps-Making a difference from traditional DevOps
    • CVE - 2020–1472 (Zerologon Vulnerability)-Exploitation & Remediation
    • Computer Forensics Acquisition
    • Cyber Hygiene Tips
    • Hack your System - Linux Edition
    • Markovian Parallax Denigrate-Breaking the cipher
    • SIEM-Incorporating Incident Response into Network Security
    • Social Engineering-A leading cause for vulnerability occurrence
    • Report Writing in Digital & Multimedia Forensics
    • Zero-Day Vulnerabilities: A short overview
    • Zero Trust Network Access-A solution to Network Security
  • 🧑‍💻Hack The Box : Starting Point Machines
    • Meow
    • Fawn
    • Dancing
    • Redeemer
Powered by GitBook
On this page
  • The premise of the challenge
  • Conclusion
  • Your opinion matters
  1. BTLO Walkthroughs

BTLO: Network Analysis-Web Shell Challenge

Packet Sniffing

PreviousBTLO WalkthroughsNextBTLO: Suspicious USB Stick Challenge

Last updated 3 years ago

Hello, blue teamers. In this blog entry, let’s take a crack at solving the , a retired challenge hosted on

Let’s get our hands dirty with some .pcap files!

NOTE: Always remember to investigate challenges from BTLO, on a VM.

The premise of the challenge

The SOC received an alert in their SIEM for ‘Local to Local Port Scanning’ where an internal private IP began scanning another internal system. Can you investigate and determine if this activity is malicious or not? You have been provided a PCAP, investigate using any tools you wish.

Let’s proceed to open the .pcap file on Wireshark and answer the following questions:-

Q) What is the IP responsible for conducting the port scan activity?

Sorting the packet stream by the TCP protocol, we can find that a host of machines (alive and responding) are being scanned by the host going under the address  — 10.251.96.4

A) 10.251.96.4

Q) What is the port range scanned by the suspicious host?

The easy way to get the range of ports that were scanned would be to take help from the ‘Conversations’ section, from the Statistics section

Sorting the entries by TCP, we can find that the scanned ports (port B) fall under the range of 1 -1024 (a common occurrence)

A) 1–1024

Q) What is the type of port scan conducted?

When filtering and analyzing the stream of TCP packets, we can see that a common pattern is followed — Attacker makes contact with victim (SYN) and receives an acknowledgment (ACK) from the scanned host, which follows the TCP SYN scanning method

A) TCP SYN

Q) Two more tools were used to perform reconnaissance against open ports, what were they?

This question was a bit tricky, as I fell into a rabbit hole trying to enumerate TCP packets, for any traces of Nessus or Nmap tools being used

Later, when expanding my search to HTTP requests, I was able to crack it!

You need to apply the following packet filter:-

Filter — http.request.method == “GET”

Analyzing the rest of the GET requests, we can see the same tool being used

Changing gears here, let’s target POST requests

Sure enough, we find the evidence of the next tool being used

A) gobuster 3.0.1, sqlmap 1.4.7

Q) What is the name of the php file through which the attacker uploaded a web shell?

Though I was able to identify that upload.php had been used to upload the shell, it was not being accepted as the answer

Expanding the packet entry, I found that the referer field was pointing to a different webpage, which could have probably been used for uploading the web shell

This is a new lesson I learned

A) editprofile.php

Q) What is the name of the wb shell that the attacker uploaded?

Filtering packets again by TCP, you can see the sequence where the attacker host accesses the Dbfunctions.php (the supposed web shell)

A) Dbfunctions.php

Q) What is the parameter used in the web shell for executing commands?

Filtering packets again by HTTP, we can find that the parameter used is ‘cmd’

A) cmd

Q) What is the first command executed by the attacker?

This is evident from the above image

A) id

Q) What is the type of shell connection the attacker obtains through command execution?

This is the payload provided in the uploaded web shell

From my previous pentesting gig, it was evident to me that this was an attempt to gain a reverse shell. Reverse shells are usually sent with the help of uploaded attachments and use attackers use netcat to receive the shell back

A) reverse

Q) What is the port he uses for the shell connection?

It is given in the reverse shell command

A) 4422

Conclusion

Every challenge solved is a step towards perfection and I am always looking for ways to improve

Thank you for reading this blog entry. Stay tuned, as I go hunting behind some pcap files out there....

Your opinion matters

My audience has a voice. Feel free to reach out to me, on my socials (links are on top of this page) for any queries to be addressed. Dropping a sweet message would make my day

Let your opinion about this write-up be known, by selecting any one of the emojis below!

🤺
Network Analysis — Web shell
Blue Team Labs Online