HTB Writeups
  • HTB Writeups
  • Boxes: Very Easy
    • Academy
    • Archetype
    • Arctic
    • Base
    • Bike
    • Blue
    • Explosion
    • Included
    • Markup
    • Oopsie
    • Redeemer
    • Responder
    • Shield
    • Unified
    • Vaccine
  • Boxes: Easy
    • Analytics
    • Armageddon
    • Bashed
    • Beep
    • Blocky
    • Bounty Hunter
    • Buff
    • Cap
    • CozyHosting
    • Devel
    • Explore
    • Forest
    • Grandpa
    • Granny
    • Horizontall
    • Jerry
    • Keeper
    • Knife
    • Lame
    • Late
    • Legacy
    • Mirai
    • Netmon
    • Nibbles
    • Optimum
    • Paper
    • Photobomb
    • Precious
    • RedPanda
    • Return
    • Sau
    • ScriptKiddie
    • Sense
    • Servmon
    • Shocker
    • Shoppy
    • Squashed
    • Trick
  • Boxes: Medium
    • Poison
  • Challenges
    • Behind the Scenes
    • Canvas
    • Debugging Interface
    • Digital Cube
    • Easy Phish
    • Find the Easy Pass
    • Forest
    • Infiltration
    • misDIRection
    • Pusheen Loves Graphs
    • Retro
    • Signals
    • The Secret of a Queen
    • Wrong Spooky Season
  • Fortresses
  • Cyber Apocalypse 2023: The Cursed Mission
    • The Cursed Mission
    • Alien Cradle
    • Critical Flight
    • Debug
    • Extraterrestrial Persistence
    • Getting Started
    • Needle in the Haystack
    • Orbital
    • Packet Cyclone
    • Passman
    • Perfect Sync
    • Persistence
    • Plaintext Tleasure
    • Questionnaire
    • Reconfiguration
    • Relic Maps
    • Roten
    • Secret Code
    • Shattered Tablet
    • Small StEps
  • Hack the Boo 2023
    • Hauntmart
    • Spellbrewery
    • Trick or Treat
    • Valhalloween
  • Cyber Apocalypse 2024: Hacker Royale
    • Hacker Royale
    • An Unusual Sighting
    • BoxCutter
    • BunnyPass
    • Character
    • Data Siege
    • Delulu
    • Dynastic
    • Fake Boost
    • Flag Command
    • Game Invitation
    • It has begun
    • KORP Terminal
    • Labyrinth Linguist
    • LockTalk
    • Lucky Faucet
    • Makeshift
    • Maze
    • Packed Away
    • Phreaky
    • Primary Knowledge
    • Pursue the Tracks
    • Rids
    • Russian Roulette
    • Stop Drop and Roll
    • Testimonial
    • TimeKORP
    • Unbreakable
    • Urgent
  • CYBER APOCALYPSE 2025: Tales from Eldoria
    • Tales from Eldoria
    • A New Hire
    • Cave Expedition
    • Echoes in Stone
    • Eldorion
    • Embassy
    • EncryptedScroll
    • HeliosDEX
    • Quack Quack
    • Silent Trap
    • Stealth Invasion
    • Tales for the Brave
    • The Ancient Citadel
    • The Hillside Haven
    • The Stone That Whispers
    • Thorins Amulet
    • ToolPie
    • Traces
    • Trial by Fire
    • Whispers of the Moonbeam
Powered by GitBook
On this page
  1. Cyber Apocalypse 2024: Hacker Royale

Phreaky

Personal Rating: Easy

PreviousPacked AwayNextPrimary Knowledge

Last updated 1 year ago

We have a pcap file

I identified tcp stream 0 to include just a ubuntu update, so I filtered it out with tcp.stream ne 0

What remains is mostly SMTP packets in several streams

Password: S3W8yzixNoL8

Following one of the streams we find a zip file as it seems

There were 15 streams. I copied all of the relevant data to a text file and cleaned it up like so:

Then I wrote a python and sh script that handles the base64 and passwords etc. finally concatenate them to the finished pdf file:

decoder.py

import base64
import os
from zipfile import ZipFile
# Format: Password1,zipname1,b64_1,Password2,zipname2,b64_2 ...

# open the file with the content
mainarray = []
with open('zipstreams') as z:
    for line in z:
        line = line.replace('\n','')
        mainarray.append(line)

c = 0

while c < 45:
    # decode base64
    a = base64.b64decode(mainarray[c+2])

    # write to zipfile
    name = str(c+1)+".zip"
    with open(name,"wb") as file:
        file.write(a)

    # extract the zipfile
    with ZipFile(name,"r") as zip:
        zip.extractall(path="./", pwd=mainarray[c].encode("utf-8"))

    c += 3

import subprocess
    subprocess.run(["./concat.sh"])

concat.sh

for i in {1..15};do cat phreaks_plan.pdf.part$i >> final.pdf;done

The final PDF contained the flag.

HTB{Th3Phr3aksReadyT0Att4ck}