🌟
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
  • Premise of Alert
  • Enumeration of evidence
  • Analysis of malware sample
  • Magic Numbers anyone?
  • Hunting down suspicious elements
  • Conclusion
  • Your opinion matters
  1. BTLO Walkthroughs

BTLO: Suspicious USB Stick Challenge

Digital Forensics

PreviousBTLO: Network Analysis-Web Shell ChallengeNextWiCYS CyberStart

Last updated 3 years ago

Hello, blue teamers. In this blog entry, join me as I attempt to conquer the , hosted on . This is a retired challenge and falls under the Digital Forensics domain. It was pretty fun to investigate!

Premise of Alert

One of our clients informed us they recently suffered an employee data breach. As a startup company, they had a constrained budget allocated for security and employee training. I visited them and spoke with the relevant stakeholders. I also collected some suspicious emails and a USB drive an employee found on their premises. While I am analyzing the suspicious emails, can you check the contents on the USB drive?

Let’s start

Download the USB Image attached with this task. In my opinion, it is better to unzip and extract the files, using GUI mode

Opening the attachment, we get these files:-

Proceed to unzip the USB.zip file using the passphrase ‘btlo’ and get the USB directory.

Extract it in your Downloads file. Inside this directory, we get:-

Enumeration of evidence

Opening the README.pdf file to view its contents, we see the following text:-

Opening up the autorun.inf file, we can see the following instructions:-

Let’s answer the challenge questions:-

Q) What file is the autorun.inf running?

A) README.pdf

Analysis of malware sample

Q) Does the pdf file pass Virustotal scan? (No malicious results returned)

A) False

Magic Numbers anyone?

Q) Does the file have the correct magic number?

From a quick google search, we find that the magic number of a PDF file is- (hex 25 50 44 46 )

Going to our CLI and testing out the following command

Command — xxd README.pdf | head

From the first line of the output, it is evident that the PDF file is not disguised in any way

A) True

Q) What OS type can the file exploit? (Linux, MacOS, Windows, etc)

To understand the payload executed by any malicious file, it’s wise to see the actions taken by it. It is viewable from the ‘Behaviour’ section for this file, on VirusTotal

It is evident that the payload targets Windows systems and spawns Windows processes

A) Windows

Q) A Windows executable is mentioned in the pdf file, what is it?

A) cmd.exe

Hunting down suspicious elements

Q) How many suspicious /OpenAction elements does the file have?

Executable files are always flagged by antivirus tools and are increasingly treated as suspicious and untrusted by default. PDF files are instead treated with less suspicion and attackers often use them to trick targets into running malicious code, to obtain an initial foothold into their machines.

Code obfuscation and other techniques are used in malicious PDF files to bypass antiviruses. Therefore, in case of suspicion, it is useful to check the file manually.

Syntax — python3 pdf-parser.py <file.pdf>

Running the script against the PDF file and skimming along with the results, we find that 1 suspicious action was found

A) 1

Challenge conquered!

Conclusion

It is good to experiment and practice analysis with malware, especially when you finally get exposed to one in a SOC environment. These small tasks are sure to help me in the future

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!

Let’s submit this file for analysis on .The following report is received, indicating that the file is indeed malicious

To test this, I suggest reading this . Magic numbers are usually used to indicate and differentiate the formats of files. These numbers are visible on hex editors

To extract strings from this malicious PDF, I prefer uploading it to and then filtering it out by .exe.Two hits are received

Luckily for us, PDFs can identify suspicious elements, which we can identify by using .This is a CLI tool, that can pull out the information we want. Download it

🤺
VirusTotal
article
Hybrid-Analysis
pdf-parser.py
Suspicious USB Stick challenge
Security Blue Team Labs Online