Capture the Flag Portfolio ๐๐ดโโ ๏ธ
Welcome to my CTF portfolio! Here I showcase some of the cybersecurity challenges I've conquered and the creative solutions I devised. In particular, youโll find highlights from the SANS Holiday Hack Challenges in 2015 and 2014, where I earned special recognition for my solutions.
SANS Holiday Hack Challenge 2015 โ โGnome in Your Homeโ
In 2015, I solved all the technical challenges of the Holiday Hack A Hackerโs Holiday event, which earned me a Super Honorable Mention for creativity. I approached the challenges by thinking outside the box โ for example, exploiting an IoT "Gnome" device and analyzing its network traffic in unexpected ways.
Interested in the detailed tech details? SANS Holiday Hack Tech Breakdowns
**Technical Breakdown (2015)** โ *Click to expand*
๐งฉ Challenge Synopsis
An advanced adversary deployed surveillance Gnomes globally disguised as holiday decorations. These IoT devices captured images and exfiltrated them via DNS to covert Command & Control (C2) servers. My mission: identify, analyze, and exploit the vulnerabilities in five globally distributed "SuperGnome" servers and uncover the larger plot.
๐ ๏ธ Key Techniques Used
- ๐ก DNS Tunneling Analysis โ Intercepted Base64-encoded command and image exfiltration via DNS queries.
- ๐งฉ Firmware & Filesystem Extraction โ Used
binwalk
andsquashfs-tools
to extract and analyze the Gnome OS. - ๐ธ๏ธ Web Application Exploitation โ Exploited NoSQL injection, file traversal, and command injection vulnerabilities.
- ๐ Database Analysis โ Accessed MongoDB directly to extract credentials and sensitive configuration.
- ๐ฆ Reverse Engineering โ Analyzed binaries, bypassed stack canaries, used ROP gadgets to gain execution control.
- ๐ Shodan Reconnaissance โ Identified C2 servers via unique HTTP headers.
- ๐งช Custom Payload Development โ Crafted shellcode using Metasploit and delivered it via Netcat.
- ๐งฎ Image XOR Decryption โ Used ImageMagick to XOR multiple PNGs and reveal the villain's identity.
๐ง Detailed Technical Findings
SG-01 โ Ashburn, USA
- ๐ Weak Credential Management
- Logged in using default credentials:
admin : SittingOnAShelf
- Downloaded sensitive files from
/gnome/www/files/
- Logged in using default credentials:
SG-02 โ Boardman, USA
- ๐ Directory Traversal via Filename Injection
- Exploited insufficient sanitization in upload path.
- Bypassed
.png
check to traverse directories:GET /cam?camera=../../../[path]/.png/../../../../files/gnome.conf
SG-03 โ Sydney, Australia
- ๐ NoSQL Injection
- Crafted POST request:
{"username": "admin", "password": { "$gt": "" }}
- Gained admin access via forged session cookie.
- Crafted POST request:
SG-04 โ Tokyo, Japan
- ๐งฌ Command Injection via
eval()
- Injected Node.js in
postproc()
:require('fs').readFileSync('files/gnome.conf')
- Delivered reverse shell via
netcat
.
- Injected Node.js in
SG-05 โ Sรฃo Paulo, Brazil
- ๐ฅ Buffer Overflow (Port 4242)
- Exploited a hidden command input with:
- Stack canary bypass
- JMP ESP gadget
- Custom shellcode
- Resulted in remote shell with file transfer capabilities.
- Exploited a hidden command input with:
๐งจ History of Exploited Vulnerabilities
- Default Credentials โ Common across early IoT and database deployments (notably MongoDB pre-2.6).
- NoSQL Injection โ First surfaced around 2013; especially dangerous in MongoDB due to JSON query flexibility.
- Command Injection โ OWASP Top 10 vulnerability for over a decade; use of
eval()
is strongly discouraged. - Directory Traversal โ Known since the 90s; still widely exploited due to improper input validation.
- Buffer Overflows โ Among the oldest forms of exploitation, still viable when stack protections are misconfigured.
๐ก๏ธ Recommendations to Mitigate
-
Credential Management
- Enforce strong passwords
- Never store passwords in plaintext
-
Sanitize User Input
- Use parameterized queries and safe serialization
- Avoid
eval()
in any backend service
-
Database Hardening
- Require authentication
- Implement role-based access controls
-
Firmware Security
- Encrypt sensitive files
- Validate integrity pre-deployment
-
Web Application Firewalls (WAF)
- Deploy WAFs to mitigate injection and traversal attacks
-
Exploit Mitigations
- Properly implement ASLR, DEP, and stack canaries
- Avoid static return addresses and hardcoded secrets
-
DNS Monitoring
- Watch for anomalous DNS activity suggesting tunneling
- Log and alert on Base64 patterns in DNS queries
-
Incident Response Readiness
- Build playbooks for embedded device threats
- Train staff in analyzing C2 traffic and reverse engineering binaries
๐ โUnless someone like you cares a whole awful lot, nothing is going to get better. Itโs not.โ โ Dr. Seuss
SANS Holiday Hack Challenge 2014 โ Most Creative Winner
The 2014 challenge had a story centered around Charles Dickensโ A Christmas Carol, with a cyber twist. I won the Most Creative Technical category for this competition by crafting an imaginative narrative-style report and solving challenges in unique ways.
Interested in the detailed tech details? SANS Holiday Hack Tech Breakdowns
**Technical & Creative Highlights (2014)** โ *Click to expand*
๐งฉ Challenge Synopsis
In a time-traveling twist on cyber forensics, I was tasked with uncovering the event that changed Mr. Scrooge from a malicious hacker into a force for good. Guided by a mysterious specter and assisted by none other than Alan Turing, I investigated a series of USB artifacts and a legacy website to trace the evolution of Scroogeโs ethical hacking journey.
๐ ๏ธ Key Techniques Used
- ๐พ Disk Image Forensics โ Extracted metadata and hidden files from a USB image using tools like
dd
,Autopsy
,Foremost
, andBulk Extractor
. - ๐งช Packet Capture Analysis โ Discovered secrets embedded in PCAPNG packet comments.
- ๐ Password Cracking โ Used
CeWL
and dictionary attacks to access password-protected ZIPs. - ๐ Heartbleed and Shellshock Exploits โ Successfully exploited critical vulnerabilities on a live website.
- ๐ Web Directory Fuzzing โ Employed
DirBuster
to locate vulnerable scripts. - ๐งฌ Steganography Detection โ Applied
F5 Stegoextract
to find hidden messages in image files. - ๐ค Chatbot Manipulation โ Interacted with a remote Eliza instance and extracted secrets via custom headers.
- ๐ TARDIS Logic โ Combined narrative storytelling with pentest tactics to deliver ethical lessons.
๐ง Detailed Technical Findings
๐พ USB Analysis
๐ Secret #1: Your demise is a source of mirth
- Found in metadata comments of a
.doc
file using a hex dump search for the word "secret".
๐ Secret #2: Your demise is a source of relief
- Found a Base64-encoded message in frame 2000 of a
.pcapng
file:
VVNCIFNlY3JldCAjMjogWW91ciBkZW1pc2UgaXMgYSBzb3VyY2Ugb2YgcmVsaWVmLg==
๐ Secret #3: Your demise is a source of gain for others
- ZIP file hidden in an alternate data stream (ADS).
- Cracked password using a
CeWL
wordlist scraped fromwww.scrooge-and-marley.com
. - Extracted metadata from
Bed_Curtains.png
.
๐ Secret #4: Hack for good, not evil or greed
- Discovered Steganographic message using F5 Stegoextract from an image of Tiny Tomโs crutches.
๐ Website Analysis: www.scrooge-and-marley.com
๐ Website Secret #1: Hacking can be noble
- Exploited Heartbleed vulnerability (CVE-2014-0160) on port 443.
- Memory leak revealed text from "A Christmas Carol" followed by the hidden message.
๐ Website Secret #2: Use your skills for good
- Attempted Shellshock (CVE-2014-6271) injection via
User-Agent
and later viaCookie
header:
Cookie: () { :;}; echo -e "\n\r" 123 && cd / && echo "$(</secret)"
- Used OWASP ZAP for manual HTTP request crafting and Bash-only methods to read contents of the
secret
file.
๐ค Eliza Chatbot Secret
-
Missed due to relying on Nmap top ports โ eventually discovered open port 31124.
-
Queried the bot about Alan Turing and Enigma; was prompted to input a URL.
-
Opened a Netcat listener and had Eliza โsurfโ to my system, revealing:
"Machines take me by surprise with great frequency." โ Alan Turing
๐งจ History of Exploited Vulnerabilities
- Metadata & ADS Abuse โ Often used by malware and advanced attackers; known for over a decade.
- Heartbleed (CVE-2014-0160) โ Exposed server memory; one of the most severe OpenSSL bugs in history.
- Shellshock (CVE-2014-6271) โ Allowed arbitrary command execution via environment variables in Bash.
- Steganography โ Covert channel commonly used by advanced persistent threats (APTs).
- Chatbot Coercion โ Reflects manipulation risks of machine-learning interfaces and protocol abuse.
๐ก๏ธ Recommendations to Mitigate
-
Secure File Metadata
- Strip metadata from all public documents.
- Monitor NTFS Alternate Data Streams.
-
Patch Known Vulnerabilities
- Implement immediate patching for Heartbleed, Shellshock, and similar critical CVEs.
-
Sanitize Web Inputs
- Validate and sanitize headers, cookies, and all client input.
- Avoid dynamic evaluation of untrusted data.
-
Deep Network Scanning
- Donโt rely solely on top ports; perform comprehensive scans regularly.
-
Educate Ethical Hacking
- Encourage story-driven, mission-based learning for new ethical hackers.
- Promote โhacking for goodโ values through immersive training.
๐ โHack for good, not for greed.โ โ The Ghost of Hacking Yet to Come