CERT-SE CTF 2023

7 min read

Published at: Dec 22, 2023

cert-se.png

See how to capture all 7 flags of the yearly CERT-SE Capture The Flag. It involves everything between network analysis, to ciphers, and hidden radio messages!

Metadata

Meta

Goal

  • Capture the 7 hidden flags of the yearly CERT-SE ctf!
  • Flag format: CTF[...]

Cheat Sheet

Before we begin, as always there is a generic Cheat Sheet for this room which could be integrated in your own notes. You find it at at the bottom of this write-up. You can also find all of my notes at https://hailstormsec.com/posts/categories/notes.

Flags

IRC Dialog

PRIVMSG #ops :is this really safe, I mean it's not encrypted right?

:[email protected] PRIVMSG #ops :we should be safe, it's only internal traffic on the hypervisor

:[email protected] PRIVMSG #ops :and the secret management system is encrypted with TLS

PRIVMSG #ops :should we proceed then?

:[email protected] PRIVMSG #ops :yes, you have to unlock the vault with the secret stored on the secret-management server

PRIVMSG #ops :yes I know I know. Just give me a sec

:[email protected] PRIVMSG #ops :ok

PRIVMSG #ops :so, I have unlocked the vault, you can do your thing now

:[email protected] PRIVMSG #ops :thanks

PRIVMSG #ops :Hey, by the way you were saying we are listed on some target list for cyber attacks?

:[email protected] PRIVMSG #ops :yes we should keep our eyes open for anomalies

PRIVMSG #ops :ok, I will ping Christina, she is really good with the FPC and the analysis backend

PRIVMSG #ops :ping @Christina

:[email protected] PRIVMSG #ops :Hi Alice, how are you?

PRIVMSG #ops :just fine, how are you?

:[email protected] PRIVMSG #ops :o fine, just a lot of work with the new IDS. So many false positives, not really useful right now

PRIVMSG #ops :I see. Here is something to cheer you up a bit

PRIVMSG Christina :SHA-256 checksum for message.wav (remote): 4e31cddd5b972ce211770aca79dc2576099ad07c303de805b89604a7bfbc8b4c

:[email protected] PRIVMSG Alice :.DCC SEND message.wav 3232235550 51991 11888756 47.

:[email protected] PRIVMSG #ops :hahaha, that was wonderful. Thank you!

PRIVMSG #ops :Bob mentioned we are on some list of potential cyber operation targets. Please let us know if you find anything suspicious.

:[email protected] PRIVMSG #ops :yeah sure will. Do you know what kind of list and who's behind the announcement?

PRIVMSG #ops :He told me the group announcing the list is known to exfiltrate information

:[email protected] PRIVMSG #ops :ok, I'll see what I can find

:[email protected] PRIVMSG #ops :damn, I found some suspicious traffic to a known bad address

PRIVMSG #ops :Oh no

:[email protected] PRIVMSG #ops :Looks like they got in to that mail server we told operations to patch weeks ago!!

:[email protected] PRIVMSG #ops :need to investigate what data they transferred but It looks like it originates from the secret-management server.......

PRIVMSG #ops :Oh no, Bob and I used the secret earlier today

Found by following the IRC stream

Flag 1 - Rebus

  1. When extracting the initial zip-file there is a file named CERT-SE CTF2023 - CompetenceLateRoadThink.odt.

  2. A google search later exposes that it's an OpenOffice document file.

  3. A quick download of LibreOffice later and I open the project - which grants me my first flag at the bottom of the page.

    Rebus on the first page
    Apparently it's an excerpt from Shakespeare's play "Henry V." It is a famous soliloquy from Act 4, Scene 3.

  4. Now we're faced with a rebus which solves the final flag.

Answers(s)

CTF[☔-ra+💿d=i+⛺t=d] -> rain-ra + cd,d=i tent,t=d -> in + ci + dent => CTF[incident]

Flag 2 - Decrypt TLS

  1. When looking at Export Objects (HTTP) I find two files.
Save all files sent over HTTP
File types

2. The HTML document is a default network simulation html file - however the gzip file contains a PEM-certificate which seem to belong to the secret-management server hinted in the IRC dialog.

private pem-certificate
If we decode it with base64 we can read it belongs to the secret-management
Network miner got me the IP of the secret-management

3. Now with this information we can try and decrypt the TLS (only TLSv2 possible). To do this I navigate to Preferences -> Protocols -> TLS -> RSA keys list, and fill in the information.

Decrypting tlsv2

4. Looking at the TLS data we find a new file which contains the flag.

We find an image named secret.png in the decrypted traffic
We now download the image as previously
We export the image like with the html and zip file from step 1

Answers(s)

CTF[GALOIS]

Flag 3 - FTP

  1. Looking at used protocols I find FTP - unencrypted file share.

    FTP traffic

  2. Searching for "ftp" and following the stream I find both the password but also an attempt at listing the files. However that data is not displayed in this stream and thus I search for the ftp ip.

    FTP-password and directory listing

  3. Here I find the data containing the flag.

    We see the flag in the directory listing

Answers(s)

CTF[HUNTER2]

Flag 4 - message.wav

  1. Looking at the the packet number (10728) of when the file was being sent by comparing the IRC conversation.
  2. Follow the TCP stream and we see it's a wav-file, as suspected. Make sure to change the conversation direction to only 192.168.0.10 as source and show data as raw before download. (Can also check against sha256 with sha256sum).
    Looking at the network flow we find a wav file
  3. I tried to look at strings, metadata and steganography but found nothing. When opening it in Audacity and turning on the spectrogram we find an anomaly.
    I find an anomaly in the spectrogram
  4. After many rabbitholes I figured out it had something with radio to do - which led me to fldigi to capture radio. To "import" the file I navigated to Audio->Playback. Making sure to capture the correct frequency lead me to the flag.
    Finding the flag in fldigi

Feedback

By far the flag I spent the most time on. To find the segment itself took a long time but the real issue is figuring out it's radio if you have no experience with radio before. Then there's the time consuming part of finding the right tool - but that is manageable. TL;DR: A hint about radio would probably be nice

Answers(s)

CTF[HAMRADIO]

Flag 5 - meta.xml

  1. At this point all that was left in the pcap was encrypted tcp with legitimate certificates - thus we go back to the odt file.
  2. I extract all source files and map it up with tree.
    Tree view of the odt file
  3. Now I start going through the text files one by one to look for anything interesting. And look what we find in the meta.xml file:
    I found the flag looking at the meta.xml file
  4. With this realisation you can also get the flag using exiftool on the .odt file.

Answers(s)

CTF[WILLIAM]

Flag 6 - Sneaky Image

  1. I have yet to check the images that came with the odt file - so this was my natural next step.
  2. Looking at the metadata on the CERT-SE logo - I found that it has been modified with Gimp. This naturally makes me believe there's some "hidden ink" of some sort.
    Found trace of the image having been edited
  3. I open it in stegsolve and play around with the filters and find the flag. (Can also find it just playing around with colours in gimp).
    sneaky.png

Answers(s)

CTF[SNEAKY]

Flag 7 - The stone cipher

  1. Now the only thing left that I can find suspicious is the image with stones. When I do strings I find that the file is ending in a weird way... Note that FF D9 indicates EOF (end of file) for a jpg.
    Finding that the file ends with a lot of E:s
  2. Copying all the E:s and putting them into CyberChef gave me the flag.
    Magic in cyberchef made the flag visable

Fun fact

I managed to find what kind of rock the image contained: Black Slate. Black Slate in swedish is "Svart Shiffer", where "Shiffer", pronounced the same was as "chiffer", the swedish word for cipher. The cipher used for the flag was Cetacean Cipher.

Answers(s)

CTF[Bluff City]


Support me

Thank you so much for reading and I hope you found it inspirational or helpful! You can best support me by doing any of the following bellow!

  • Turn off Adblocker: A simple yet impactful way to support me for free.
  • Sign Up: If you haven't already, consider signing up to get access to more content and receive optional newsletters.
  • Buy Premium: Explore the Premium option for additional perks and exclusive content.
  • Give a Tip: Your generosity is always very appreciated.

You can read more about the perks of being a Member or Subscriber here.

Additionally, you can stay updated and engage with me on social media:

  • Twitter: Follow for real-time updates and insights.
  • LinkedIn: Connect with me on a professional platform.

Discussion

Become a member and never miss a post!

By signing up you have read and agree to the Privacy Policy.

Newsletter

Bonus content

Learn more...

Continue reading

Continue reading

Continue reading