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. Hack the Boo 2023

Spellbrewery

Personal Rating: Easy

I used ChatGPT for creating a first draft of the decoder script to save time.

We have a dll file that we have to analyze. The program that comes with it seems to be a game where you have to enter the correct ingredients for a potion.

  • Opening the dll file in ILSpy, I could immediately see the correct ingredients and how they are processed. I will try to write a Python decoder:

  • The decoder is based on the information I gained from ILSpy, but I must admit I used ChatGPT to create the script. I learned that you can create an indexmap to do a string search on an array in Python, which is super useful.

import os

list1 = open("allflags.txt","r")
list2 = open("correctflags.txt","r")

indexmap = {item: index for index, item in enumerate(list1)}

result = []

for string in list2:
    if string in indexmap:
        index = indexmap[string] + 32
        result.append(chr(index))

concatenatedresult = ''.join(result)
print(concatenatedresult)

HTB{y0ur3_4_tru3_p0t10n_m45st3r_n0w}

Flag Decoder:

byte[] bytes = recipe.Select((Ingredient ing) => (byte)(Array.IndexOf(IngredientNames, ing.ToString()) + 32)).ToArray();
Console.WriteLine("The spell is complete - your flag is: " + Encoding.ASCII.GetString(bytes));

For Reference:

Correct Ingredients:

Phantom Firefly Wing
Ghastly Gourd
Hocus Pocus Powder
Spider Sling Silk
Goblin's Gold
Wraith's Tear
Werewolf Whisker
Ghoulish Goblet
Cursed Skull
Dragon's Scale Shimmer
Raven Feather
Dragon's Scale Shimmer
Zombie Zest Zest
Ghoulish Goblet
Werewolf Whisker
Cursed Skull
Dragon's Scale Shimmer
Haunted Hay Bale
Wraith's Tear
Zombie Zest Zest
Serpent Scale
Wraith's Tear
Cursed Crypt Key
Dragon's Scale Shimmer
Salamander's Tail
Raven Feather
Wolfsbane
Frankenstein's Lab Liquid
Zombie Zest Zest
Cursed Skull
Ghoulish Goblet
Dragon's Scale Shimmer
Cursed Crypt Key
Wraith's Tear
Black Cat's Meow
Wraith Whisper

All Ingredients:

Witch's Eye
Bat Wing
Ghostly Essence
Toadstool Extract
Vampire Blood
Mandrake Root
Zombie Brain
Ghoul's Breath
Spider Venom
Black Cat's Whisker
Werewolf Fur
Banshee's Wail
Spectral Ash
Pumpkin Spice
Goblin's Earwax
Haunted Mist
Wraith's Tear
Serpent Scale
Moonlit Fern
Cursed Skull
Raven Feather
Wolfsbane
Frankenstein's Bolt
Wicked Ivy
Screaming Banshee Berry
Mummy's Wrappings
Dragon's Breath
Bubbling Cauldron Brew
Gorehound's Howl
Wraithroot
Haunted Grave Moss
Ectoplasmic Slime
Voodoo Doll's Stitch
Bramble Thorn
Hocus Pocus Powder
Cursed Clove
Wicked Witch's Hair
Halloween Moon Dust
Bog Goblin Slime
Ghost Pepper
Phantom Firefly Wing
Gargoyle Stone
Zombie Toenail
Poltergeist Polyp
Spectral Goo
Salamander Scale
Cursed Candelabra Wax
Witch Hazel
Banshee's Bane
Grim Reaper's Scythe
Black Widow Venom
Moonlit Nightshade
Ghastly Gourd
Siren's Song Seashell
Goblin Gold Dust
Spider Web Silk
Haunted Spirit Vine
Frog's Tongue
Mystic Mandrake
Widow's Peak Essence
Wicked Warlock's Beard
Crypt Keeper's Cryptonite
Bewitched Broomstick Bristle
Dragon's Scale Shimmer
Vampire Bat Blood
Graveyard Grass
Halloween Harvest Pumpkin
Cursed Cobweb Cotton
Phantom Howler Fur
Wraithbone
Goblin's Green Slime
Witch's Brew Brew
Voodoo Doll Pin
Bramble Berry
Spooky Spellbook Page
Halloween Cauldron Steam
Spectral Spectacles
Salamander's Tail
Cursed Crypt Key
Pumpkin Patch Spice
Haunted Hay Bale
Banshee's Bellflower
Ghoulish Goblet
Frankenstein's Lab Liquid
Zombie Zest Zest
Werewolf Whisker
Gargoyle Gaze
Black Cat's Meow
Wolfsbane Extract
Goblin's Gold
Phantom Firefly Fizz
Spider Sling Silk
Widow's Weave
Wraith Whisper
Siren's Serenade
Moonlit Mirage
Spectral Spark
Dragon's Roar
Banshee's Banshee
Witch's Whisper
Ghoul's Groan
Toadstool Tango
Vampire's Kiss
Bubbling Broth
Mystic Elixir
Cursed Charm
PreviousHauntmartNextTrick or Treat

Last updated 1 year ago