Floormat Mega Sale
Binary Exploitation
My blog has migrated to https://wintertia.pages.dev/ ! This Gitbook will no longer be maintained.
The Floor Mat Store is running a mega sale, check it out!
Author: CryptoCat
Arch: amd64-64-little
RELRO: Partial RELRO
Stack: No canary found
NX: NX enabled
PIE: No PIE (0x400000)
Stripped: NoA simple shop challenge, the goal is to buy the exclusive employee mat:
setvbuf(stdout,(char *)0x0,2,0);
local_48[0] = "1. Cozy Carpet Mat - $10";
local_48[1] = "2. Wooden Plank Mat - $15";
local_48[2] = "3. Fuzzy Shag Mat - $20";
local_48[3] = "4. Rubberized Mat - $12";
local_28 = "5. Luxury Velvet Mat - $25";
local_20 = "6. Exclusive Employee-only Mat - $9999";
local_10 = getegid();The problem is, attempting to buy the Exclusive Employee-only Mat calls a special check for the employee variable:
Since the employee variable is global, we can make a format string payload using pwntools and input it as the "Shipping Address". Full script:

Last updated