pwnable.kr is a free Korean wargame where every challenge hides a flag behind a buggy Linux program, and your job is to make that program hand it over. It has been running since 2014, it is one of the most recommended places to learn binary exploitation, and in 2026 it changed the way you connect, which broke most of the tutorials you will find online. If you want the theory behind the bugs before you start, HackerDNA's buffer overflow chapter covers the stack in plain language.
This guide explains what pwnable.kr is, how the new socat and netcat access works now that SSH is gone, and solves the first two challenges, fd and collision, step by step. Then you get a spoiler-free map of the rest of Toddler's Bottle with what each challenge teaches, the tools worth installing, and an honest comparison with other pwn platforms.
TL;DR: pwnable.kr is a free binary exploitation wargame run by Pwnlab at Kyung Hee University. Its 59 challenges are split into four categories, and beginners should start with the 16 Toddler's Bottle challenges. Since September 2026 there is no SSH access: you connect to each challenge with socat or nc on its own port, and you can download every challenge's files and Docker setup to practice locally.
What Is pwnable.kr?
What is pwnable.kr? pwnable.kr is a non-commercial wargame website where each challenge is a small vulnerable program running on a remote Linux server. A flag file sits next to the program, readable only with the program's privileges. You exploit a bug in the program to read that file, then submit the flag on the website for points.
The site's homepage defines "pwn" as compromising or taking control of a computer or application, and says solving the challenges takes skills in programming, reverse engineering, bug exploitation, system knowledge and cryptography. The admin is Daehee, and the footer credits Pwnlab@KHU, a security lab at Kyung Hee University in Korea.
A few facts that explain why older guides look so different from what you see today:
- 2014: the site launches. The footer still reads "pwnable.kr since 2014."
- April 2025: the service moves from a Georgia Tech server in the USA to a Kyung Hee University server. Challenges are ported from Ubuntu 16.04 to 22.04, the scoreboard is reset, and old accounts are kept.
- May 2025: the renewal removes 14 old challenges (including flag, shellshock, blukat and unexploitable) and adds six new ones such as asm2, chatbot and leakme.
- September 20, 2026: SSH access is discontinued "due to internal security policy." Every challenge now has its own remote environment.
The challenges are grouped into four categories. The descriptions in quotes come straight from the pwnable.kr homepage, and the counts and points come from the live challenge list in November 2026.
| Category | Challenges | Points each | Official description |
|---|---|---|---|
| Toddler's Bottle | 16 | 1 to 20 | "very easy challenges with simple mistakes" |
| Rookiss | 17 | 25 to 200 | "typical bug exploitation challenges for rookies" |
| Grotesque | 16 | 100 to 300 | "painful to solve it, but very tasty flag" |
| Hacker's Secret | 10 | 150 to 500 | "real-world level challenges which involve special techniques/secrets" |
Do not let "Toddler" fool you. The category is easy compared to the rest of pwnable.kr, not easy compared to a beginner web CTF. Since the 2025 reset, fd has 7,429 solvers while passcode, the last challenge of the same category, has 1,406.
Is pwnable.kr Good for Beginners?
Yes, if you already know a little C and can move around a Linux terminal. pwnable.kr teaches by handing you real source code with one deliberate mistake in it, and the first few challenges need nothing more than reading carefully. It does not teach you C or Linux from zero, and there are no lessons or hints on the site itself.
What you should be comfortable with before your first connection:
- Reading C: pointers, arrays,
argv, and what functions likeread(),strcmp()andsystem()do. - The Linux shell:
ls -la,cat, file permissions, and why a program can read a file you cannot. Our Linux terminal chapter on users and permissions covers exactly that. - Hexadecimal: converting
0x1234to decimal without panicking. - A bit of Python: enough to print raw bytes or open a socket.
Our honest take: pwnable.kr is the best free place to get your first ten pwn flags on real x86 Linux binaries, because the challenges are tiny and each one isolates a single idea. If you have never solved a CTF challenge of any kind, though, start with our beginner's guide to CTFs and come back once reading source code feels normal.
How to Connect to pwnable.kr in 2026
If a write-up tells you to run ssh [email protected] -p2222 with the password guest, it is out of date. That was the classic access method for years. Today each challenge listens on its own TCP port, from 10001 for fd up to 10016 for horcruxes in Toddler's Bottle, and comes in one of two flavors.
- Interactive shell challenges (fd, collision, input2, cmd1, cmd2): you get a real
/bin/shas the challenge user. The site recommends socat over netcat so the terminal behaves properly, with working arrow keys, vi and nano. - Direct connection challenges (bof, passcode, random, coin1, lotto, asm and others): the vulnerable program itself is wired to the port. You talk to it with
ncor a Python script, and you analyze the binary on your own machine.
Here is the workflow that works today:
- Create an account on pwnable.kr. The challenge list is public, but connection info, downloads and flag submission require you to sign in.
- Install socat if your system does not have it:
sudo apt install socaton Kali or Ubuntu,brew install socaton macOS. - Open the challenge page and copy the "Access" line. For fd it is
socat STDIO,raw,echo=0,opost,onlcr TCP:pwnable.kr:10001. - Download the challenge files. Most zips contain the binary, its C source, a dummy flag, a Dockerfile and a
run.shthat hosts the same environment on127.0.0.1. A few, like coin1, ship only a readme. - Solve it locally first, then repeat the exploit against the remote port to get the real flag, and paste it into the submission box on the challenge page.
Watch the clock: the shell banner warns "You got 500s in /bin/sh." Direct-connection challenges like bof are wrapped in a 300-second timeout, and all challenge servers restart daily at 00:00 UTC. Write your exploit locally and paste it in, do not type it live on the server.
In practice, the local Docker files are the biggest improvement of the 2026 version. You can break things, attach GDB and retry a hundred times without a timer. Read the Dockerfile and run.sh before you run them, though: the shell challenges start their container with --privileged so they can mount a temporary filesystem, which is fine for a disposable VM but not something to run blindly on your main machine.
One more detail from the challenge's loader script: when you connect to a shell challenge, you land in a fresh temporary directory holding the binary, its source and the flag. You can write files there, but the directory is wiped when your session ends, and /tmp itself is not listable.
fd Walkthrough: Your First pwnable.kr Flag
pwnable.kr's rules allow public solutions for Toddler's Bottle only, and ask players not to spoil the harder categories. So here is fd, the 1-point opener, solved in full. The hint on the challenge page is "Mommy! what is a file descriptor in Linux?"
Connect with the socat command, run ls -la, and you will see three files: fd, fd.c and flag. You cannot cat flag directly, because the flag belongs to a group your user is not in. The fd binary has the setgid bit, so it runs with that group and can read it. Here is the heart of fd.c:
char buf[32];
int main(int argc, char* argv[], char* envp[]){
...
int fd = atoi( argv[1] ) - 0x1234;
int len = 0;
len = read(fd, buf, 32);
if(!strcmp("LETMEWIN\n", buf)){
printf("good job :)\n");
setregid(getegid(), getegid());
system("/bin/cat flag");
exit(0);
}
printf("learn about Linux file IO\n");
return 0;
}
Read it line by line and the bug appears. The program takes your first argument, subtracts 0x1234, and uses the result as a file descriptor for read(). Then it checks whether the 32 bytes it read are exactly LETMEWIN followed by a newline.
Every Linux process starts with three open file descriptors: 0 is standard input (your keyboard), 1 is standard output and 2 is standard error. If you make fd equal 0, the program reads from your keyboard, and you can type the magic string yourself.
- Convert the offset:
0x1234is 4660 in decimal. You can check withpython3 -c "print(0x1234)". - Run the binary with that number:
./fd 4660. The program now waits on standard input. - Type the string and press Enter:
LETMEWIN. Enter adds the newline thatstrcmpexpects. - Read the output: the program prints
good job :)followed by the flag. Copy it and submit it on the fd page.
The lesson is bigger than the flag. The program trusted a number from the user and used it as a resource handle. That pattern, user input deciding which file, object or account a program touches, shows up again and again in real software.
collision Walkthrough: Little-Endian Bytes
collision is worth 3 points and its hint mentions "cool MD5 hash collision." There is no MD5 anywhere in the code. The "hash" is just a sum, and the challenge is really about how a CPU turns bytes into integers.
unsigned long hashcode = 0x21DD09EC;
unsigned long check_password(const char* p){
int* ip = (int*)p;
int i;
int res=0;
for(i=0; i<5; i++){
res += ip[i];
}
return res;
}
The program demands a 20-byte argument. check_password treats those 20 bytes as five 4-byte integers, adds them up and compares the total with 0x21DD09EC. So you need five integers that sum to that value, written as raw bytes.
- Split the target:
0x21DD09ECis 568,134,124. Divided by 5 that is 113,626,824 (0x06C5CEC8) with a remainder of 4. Four copies of0x06C5CEC8plus one0x06C5CECCgives exactly the target. - Flip to little-endian: the binary is 32-bit x86, which stores the lowest byte first.
0x06C5CEC8becomes the bytesc8 ce c5 06. - Check for bad bytes: none of those bytes is a null, a space or a newline, so they survive being passed as a shell argument.
- Send it:
./col $(python3 -c 'import sys; sys.stdout.buffer.write(b"\xc8\xce\xc5\x06"*4 + b"\xcc\xce\xc5\x06")')
The remote shell for collision ships both python2 and python3. Stick with Python 3 and sys.stdout.buffer.write: printing raw bytes with a plain Python 3 print() encodes them as UTF-8 and silently changes your payload, which is the single most common reason this exploit "almost works" for beginners.
The Rest of Toddler's Bottle: A Spoiler-Free Map
After collision, the difficulty climbs quickly. This table lists every Toddler's Bottle challenge in the order we suggest, with its points and the concept it tests, without giving away solutions.
| Challenge | Points | Access | What it teaches |
|---|---|---|---|
| fd | 1 | Shell | File descriptors and standard input |
| collision | 3 | Shell | Integer casting and little-endian bytes |
| random | 1 | nc | Why rand() without a seed is not random |
| mistake | 4 | nc | Operator precedence in C (based on a real event) |
| cmd1 | 1 | Shell | The PATH variable and string filters |
| bof | 5 | nc | Your first stack buffer overflow with gets() |
| blackjack | 1 | nc | Missing input validation in game logic |
| lotto | 2 | nc | A flawed comparison loop |
| coin1 | 5 | nc | Scripting a socket game with binary search |
| cmd2 | 9 | Shell | A much stricter command filter |
| input2 | 10 | Shell | Feeding data through argv, stdin, env, files and sockets |
| leg | 5 | QEMU | Reading ARM assembly and the program counter |
| asm | 6 | nc | Writing shellcode under a seccomp sandbox |
| memcpy | 10 | nc | Memory alignment and SSE instructions |
| passcode | 20 | nc | A scanf() pointer bug and overwriting memory |
| horcruxes | 7 | nc | Building a first ROP chain |
Points are a poor guide to difficulty here. blackjack and cmd1 are worth 1 point each and are gentle, while horcruxes is only worth 7 and asks for return-oriented programming. Solvers since the reset tell the real story: bof has 2,612, horcruxes has 513.
Three nudges, without spoilers:
- bof: the C code is short, but the distance from the buffer to
keyis set by the compiler. Disassemble the binary you downloaded and measure it, do not guess 32. If you want the theory first, our buffer overflow explainer draws the stack frame step by step. The security community has a whole entry, CWE-242, for dangerous functions likegets(). - random: run the binary locally twice and compare what
rand()returns. That one observation solves the challenge. - passcode: compile with warnings on and read every warning. The description literally says the author ignored them.
Tools Worth Installing Before You Start
You can solve fd with nothing but a terminal. From bof onward, a small toolkit saves hours. Install these in a Linux VM such as Kali or Ubuntu:
- GDB with pwndbg or GEF: plain GDB works, but a plugin shows registers, the stack and disassembly at every step.
- pwntools: the Python library almost every pwn player uses.
remote("pwnable.kr", 10003),p32()for little-endian packing andsendline()replace a lot of fragile shell one-liners. Learn it by bof at the latest. - objdump or Ghidra:
objdump -d -M intelis enough for Toddler's Bottle. Ghidra's decompiler becomes useful once a challenge ships without source. - 32-bit libraries: the binaries are 32-bit, so a 64-bit machine needs
libc6:i386to run them, plusgcc-multilibif you want to compile your own 32-bit test programs. The Dockerfiles installlibc6:i386for you.
When you get stuck, the site's rules allow you to ask for hints on the official Discord, as long as nobody spoils too much. Our advice: give a challenge two honest sessions before you look at a Toddler's Bottle write-up, and when you do, read only until you see the idea you missed.
pwnable.kr vs Other Pwn Practice Platforms
pwnable.kr is one of several free places to learn exploitation, and they are built for different moments in your learning.
| Platform | Style | Guidance | Best for |
|---|---|---|---|
| pwnable.kr | Wargame, 59 challenges | None on site | Short, focused x86 and ARM bugs once you know C |
| pwn.college | Structured course with dojos | Lectures and modules | A complete, ordered path from zero |
| OverTheWire | SSH wargames | Level hints | Linux basics (Bandit) before binary exploitation |
| HackerDNA labs | Browser-based labs | Guided tasks | Reversing and exploitation with no local setup or VPN |
If you want a structured curriculum before you tackle unguided challenges, our pwn.college guide for beginners explains how its belts and dojos work. Many players use both: pwn.college for the lessons, pwnable.kr to test whether the ideas stuck.
Legal and Ethical Considerations
pwnable.kr is legal to play because its servers exist to be exploited, within the site's rules. Those rules are explicit: no denial of service, no excessive process or file creation, and no challenge ever needs heavy brute forcing. The site says the intended solution "always gets you the flag in less than a minute."
Critical reminder: The techniques you learn on pwnable.kr, from buffer overflows to shellcode, work on real systems. Never use them against software, servers or devices you do not own or have explicit written authorization to test.
- Exploit only the challenge you are connected to. If you find a bug in the platform itself, report it to the admin, as the players listed in the site's credits have done.
- Share solutions only for Toddler's Bottle, as the rules allow. Keep Rookiss, Grotesque and Hacker's Secret spoiler-free.
- Never post real flags publicly. Write-ups should explain the method, not hand out the answer.
Frequently Asked Questions
Is pwnable.kr free?
Yes. pwnable.kr describes itself as a non-commercial website, and its challenges are free for individuals for non-commercial use. You need a free account to see connection details, download challenge files and submit flags.
Why does ssh to pwnable.kr port 2222 no longer work?
pwnable.kr discontinued SSH access on September 20, 2026, citing its internal security policy. Each challenge now has its own port: shell challenges use socat, for example port 10001 for fd, and others use a direct nc connection.
What is the easiest pwnable.kr challenge?
fd, the first Toddler's Bottle challenge, is the easiest and most solved one. It teaches Linux file descriptors and needs only a number and a typed string. collision and random are good next steps.
Can I post pwnable.kr write-ups?
For Toddler's Bottle, yes: the rules allow free public solutions. For the other categories, the site asks players not to post solutions, or at most to post easy ones without spoiling too much.
What is the difference between pwnable.kr and pwnable.tw?
They are separate wargames. pwnable.tw describes itself as a site for hackers "to test and expand their binary exploiting skills," and write-ups there are visible only to players who solved the same challenge. pwnable.kr has a category built explicitly for very easy challenges, Toddler's Bottle, so it is usually the better place to start.
Do I need Linux to play pwnable.kr?
You need a terminal with socat or nc, which works on macOS and in WSL on Windows. For analyzing binaries and running the local Docker environments, a Linux virtual machine such as Kali or Ubuntu is much easier.
Last verified: November 2026. Categories, challenge names, points and solver counts checked against the live pwnable.kr challenge list. Access methods, ports, time limits and file layouts checked against the official challenge downloads. History taken from the pwnable.kr notice board (April 2025 migration, May 2025 renewal, September 2026 SSH shutdown).
Your Next Steps
pwnable.kr remains one of the best free wargames for learning binary exploitation, as long as you ignore the outdated SSH tutorials. Create an account on pwnable.kr, solve fd and collision with this guide open, then download bof and work on it locally until the overflow makes sense. Expect a wall around passcode and horcruxes. Everyone hits it.
For the guided version of the same skills, work through the buffer overflow chapter of HackerDNA's Binary Exploitation course, then test yourself on the License Key Crackme lab, where you reverse a real Linux ELF and forge your own key. Everything runs in your browser with no VPN, and you can start with HackerDNA's free tier - no credit card required.