wintertia's writeups
Check my GitHub!
  • Welcome
  • My Setup
  • WRITEUPS 2025
    • ♾️RECURSION 2025
      • When Yh
    • 🌌Undutmaning25 CTF
      • beep
      • Rocketlauncher
    • ♠️ACECTF 2025
      • !Underflow
      • jumPIEng
      • Running Out of Time
    • 🧱BITS CTF 2025
      • Biscuits
      • BabyPWN
    • πŸ–₯️NETCOMP CTF 2025
      • Pwn - Intro
  • Writeups 2024
    • ☝️Pointer Overflow CTF 2024
      • Exploit 300 - Empress of What
    • πŸ•΅οΈβ€β™‚οΈThe Hacker Conclave v2
      • pwnc3
      • pwnc2
      • pwnc1
    • πŸš€1337UP LIVE 2024
      • Floormat Mega Sale
      • Retro2Win
    • 🀴DTS TSA - Cyber Champion 2024
      • 101 - Pwn
    • πŸŸ₯TCP1P Playground 365
      • ret2win 4
      • ret2win 3
      • ret2win 2
      • ret2win
    • πŸ‡¦πŸ‡·MetaRed Argentina CERTUNLP 2024
      • flagshop
      • Warmup
      • Trust in my calculator
    • πŸ‘»SpookyCTF 2024
      • Phenominal-Photo
      • devil's-secret-stash
      • two-frames-one-champ
    • 🏹Huntress CTF 2024
      • Baby Buffer Overflow - 32 bit
Powered by GitBook
On this page
  1. Writeups 2024
  2. MetaRed Argentina CERTUNLP 2024

flagshop

Binary Exploitation

Last updated 6 months ago

Given a binary, it contained a simple flag shop program:

I decided to open Ghidra to analyze it further.

Looking at the decompiled binary, the vulnerability in this challenge is a simple integer overflow to make the total cost negative so I could add to the balance to buy the flag.

Using a simple calculation to divide a number above the 32-bit signed integer limit with the cost of the discounted flag, I was able to do an integer overflow to buy the flag!

πŸ‡¦πŸ‡·
19KB
flagshop