Official


Spotlight.

Week of 2026-11-15



Challenges

Perform an advanced heap exploit to obtain the flag

Now, try to make your browser do a POST request without the website providing a form. Hint: can you bring your own form to the table?

Now in C!

Your two-digit atoi did first * 10 + second. What if there are more than two digits? Of course, you'd keep a running total, and for each new digit do total = total * 10 + digit. That repetition is a loop, which you practiced in Writing Loops and will adapt here.

Read the digits left to right:

"123":
  total = 0
  '1':  total =  0*10 + 1  =   1
  '2':  total =  1*10 + 2  =  12
  '3':  total = 12*10 + 3  = 123

You would do this until the end of the string, which, by the convention of the C programming language (and used here), is represented by a byte with a value of 0x00 (that is, binary 00000000 or decimal value 0). Note that this is distinct from the character '0', which, again, has a value of 0x30 (binary 00110000).

So, your loop is: look at the next byte, if it's 0, jump beyond the loop (look back at Writing Loops for reference), otherwise convert the digit just like atoi_digit did, multiply the total by 10, add the digit, and loop back to the head of the loop.

Your atoi receives a pointer to the string in rdi and must return the integer value in rax. Loop the digits and return the number.


Debugging: This can get tricky to get right. To debug this challenge, our advice is to add a _start to your code that fakes the call, as so:

.global _start
_start:
    push 0x333231   # "123" on the stack -- little-endian, so 0x31 ('1') is the first byte, and the high zero bytes terminate it
    mov rdi, rsp    # a pointer to that string, as the first argument to atoi
    int3            # this is optional, if you want gdb to break here without having to set a breakpoint!
    call atoi       # there we go!

    mov rdi, rax    # atoi's result comes back in rax; exit with it so you can read it back with `echo $?`
    mov rax, 60     # exit
    syscall

Assemble and link it as a normal executable (no -shared --- this version has an entry point), then load it in gdb:

hacker@dojo:~$ as -o debug.o debug.s
hacker@dojo:~$ ld -o debug debug.o
hacker@dojo:~$ gdb ./debug
(gdb) run

Execution stops at your int3, and from there you can step through with the techniques you learned in Software Introspection, watching rdi walk the string and your running total build up in rax, until things work!

Overflow a buffer and smash the stack to obtain the flag, but this time bypass a check designed to prevent you from doing so!

Defeat yan85's seccomp implementation.

You can specify all sorts of paths as arguments to commands, and we'll practice some more with cat. In this level, I'll put the flag in some crazy directory, and I will not allow you to change directories with cd, so no cat flag for you. You must retrieve the flag by absolute path, wherever it is.

Perform an advanced heap exploit to obtain the flag

So far, our WHERE conditions have been pretty simple. This challenge complicates it somewhat by injection decoy data into your database. Luckily, the flag tag is back.

You'll need to filter on both the flag tag and the flag value. Analogous to other programming languages, you can join together conditional expressions with boolean operators such as AND and OR. Craft a powerful expression and filter the flag from the decoys!

Write and execute shellcode to read the flag!


30-Day Scoreboard:

This scoreboard reflects solves for challenges in this module after the module launched in this dojo.

Rank Hacker Badges Score