Posts

Showing posts with the label ctf

Analyzing PCAPs with Claude Code

One of the most practical use cases for Claude Code in security work is rapid PCAP triage. In this post I'll walk through a live session where I asked Claude to analyze a DoublePulsar capture, extract IOCs, and summarize the activity — all from a single prompt. The Prompt analyse the /home/demo/7-DoublePulsar.pcap file, extract any IOCs, present a summary of the activity How Claude Approached It Claude Code located the file at /home/igor/demo/7-DoublePulsar.pcap and ran a series of tshark commands to build up a picture of the traffic: IP conversation summary — identified the two hosts and total frame counts Protocol hierarchy — discovered SMB, NBSS, DCE/RPC, LLMNR, and NBNS Frame-by-frame analysis — traced the full attack sequence from port scan to exploitation attempt SMB/445 filter — isolated the exploitation traffic and SMB command sequence MAC and hostname extraction — pulled NetBIOS names and ARP-derived MACs DoublePulsar fingerprint check ...

HHC 2025 - Frosty Frostafier

SANS Holiday Hack Challenge 2025 - Frosty Frostafier Flag: hhc25{Frostify_The_World_c05730b46d0f30c9d068343e9d036f80} Challenge Overview Frosty Frostafier is a multi-stage web application security challenge that combines AI prompt injection, Server-Side Template Injection (SSTI) with filter bypass, steganography, cryptography, and privilege escalation to achieve root access and capture the flag. Attack Chain Summary ┌─────────────────────────────────────────────────────────────────────────────┐ │ 1. AI Chatbot Prompt Injection │ │ └─► Extract admin credentials from AI assistant │ ├─────────────────────────────────────────────────────────────────────────────┤ │ 2. SSTI with Octal Encoding Bypass │ │ └─► Achieve RCE as www-data user │ ├─────────────────────────────────────────────────────────────────────────────┤ │ 3. Pri...

The King of Clubs

Image
Metasploitable 3 The King of Clubs From the meterpreter I found in the Elasticsearch vulnerability, I used the search command to look for files that start with king:  meterpreter > search -f king* Found 5 results...     C:\Windows\System32\kingofclubs.exe (824563 bytes)     C:\vagrant\resources\flags\kingofclubs.exe (824563 bytes)     C:\wamp\www\wordpress\wp-content\uploads\2016\09\king_of_damonds-150x150.png (46738 bytes)     C:\wamp\www\wordpress\wp-content\uploads\2016\09\king_of_damonds-214x300.png (130832 bytes)     C:\wamp\www\wordpress\wp-content\uploads\2016\09\king_of_damonds.png (585695 bytes) I downloaded the file: meterpreter > download kingofclubs.exe [*] downloading: kingofclubs.exe -> kingofclubs.exe [*] download   : kingofclubs.exe -> kingofclubs.exe I examine the file, as expected it’s a Windows executable, and 32bits.  root@ig...

The Seven of Hearts

Image
Metasploitable 3 The Seven of Hearts For this one I used SSH with the Administrator account with the password that I guessed for another flag/card. I remembered there was a flag in the C:\inetpub\wwwroot folder and went to take a look at the folder:    root@igor-kali : ~/metasploitable3 # ssh Administrator@10.20.10.23 Administrator@10.20.10.23’s password: Last login: Sat Dec 17 12:41:58 2016 from 10.20.10.18 -sh-4.3$ pwd /cygdrive/c/Users/Administrator -sh-4.3$ cd ../../inetpub -sh-4.3$ pwd /cygdrive/c/inetpub -sh-4.3$ cd wwwroot -sh-4.3$ ls aspnet_client  caidao.asp  hahaha.jpg  index.html  seven_of_hearts.html   six_of_diamonds.zip  welcome.png I used Burp Suite to intercept the response with the whole URL generated by the JavaScript embedded in the HTML file Burp Suite showing base64 URL I saved the output to text file in my system and ran a quick perl script with a regex to extract only the base64 da...

The Jack of Hearts

Image
Metasploitable 3 The Jack of Hearts I ssh'ed into the server with the Administrator credentials previously found. root@igor-kali : ~ # ssh Administrator@10.20.10.19 Administrator@10.20.10.19’s password: Permission denied, please try again. Administrator@10.20.10.19’s password: -sh-4.3$ -sh-4.3$ pwd /cygdrive/c/Users/Administrator I started navigating through the folders and ended up in Users/Public/Documents and looking at the list of files I found a Word .docx file. -sh-4.3$ cd Public -sh-4.3$ ls Desktop  Documents  Downloads  Favorites  Libraries  Music  Pictures  Videos  desktop.ini -sh-4.3$ cd Documents/ -sh-4.3$ ls My Music  My Pictures  My Videos  desktop.ini  jack_of_hearts.docx   seven_of_spades.pdf I downloaded the file with scp and doubled click on the file in Kali Linux and since I don’t have any Application to read .docx files, it saw it as a Zip file and opened in the Arc...

The Four of Clubs

Image
Metasploitable 3 The Four of Clubs Using the meterpreter’s search command I looked for the four of clubs and downloaded a WAV file. meterpreter > search -f four_of_clubs* Found 3 results...     C:\Program Files\OpenSSH\home\Public\Music\four_of_clubs.wav (550302 bytes)     C:\Users\Public\Music\four_of_clubs.wav (550302 bytes)     C:\vagrant\resources\flags\four_of_clubs.wav (550302 bytes) meterpreter > cd Users cmeterpreter > cd Public meterpreter > cd Music meterpreter > dir Listing: C:\Users\Public\Music ============================== Mode              Size    Type  Last modified              Name ----              ----    ----  -------------  ...

Jack of Diamonds - Broken flag and how to fix it

Image
Metasploitable 3 The Jack of Diamonds This card is broken, remember my post about Broken Flags ? Anyway, this one is pretty interesting because I've never seen this case before. If you remember, in my post about the Queen of Hearts  I spotted a file called jack_of_diamonds.png in the root of the C:\ drive with a zero (0) size. C:\>dir dir Volume in drive C is Windows 2008R2 Volume Serial Number is 1475-561C Directory of C:\ 11/25/2016 07:33 PM <DIR> glassfish 11/25/2016 07:25 PM <DIR> inetpub 11/25/2016 07:54 PM 0 jack_of_diamonds.png 11/25/2016 07:50 PM 103 java0.log 11/25/2016 07:50 PM 103 java1.log 11/25/2016 07:50 PM 103 java2.log 11/25/2016 07:48 PM <DIR> ManageEngine 11/25/2016 07:37 PM <DIR> openjdk6 07/13/2009 07:20 PM <DIR> PerfLogs 11/25/2016 07:53 PM <DIR> Program File...