Gatekeeper

Published: March 20, 2026

Description

What's behind the numeric gate? Download `gatekeeper`, reverse the numeric checks, and enter the one value that passes.

Download the binary and make it executable.

Run it and observe what kind of input it expects.

chmod +x gatekeeper
./gatekeeper

Solution

  1. Step 1Run the binary
    Execute gatekeeper and read the prompt. It asks for a number, and internally the program checks the input against a signed/unsigned boundary condition.
    ./gatekeeper
  2. Step 2Send -1 as the input
    The binary uses an unsigned comparison on a signed integer, so -1 (which wraps to 0xFFFFFFFF as uint32) satisfies the condition and passes the gate. Simply pipe -1 into the binary.
    echo '-1' | ./gatekeeper
    # Or on the remote instance:
    echo '-1' | nc <HOST> <PORT_FROM_INSTANCE>
  3. Step 3Read the flag
    The gate opens and the binary prints the flag directly.

Flag

picoCTF{g4t3k33p3r_byp4ss_...}

The gatekeeper checks the input with a signed/unsigned integer mismatch -- passing -1 satisfies the unsigned comparison and bypasses the gate.