The Elf C0de⚓︎
Elf: Ribb Bonbowford
Direct link: elfcode website
Objective: Frost Tower Website Checkup
Request⚓︎
Ribb Bonbowford
Hello, I'm Ribb Bonbowford. Nice to meet you!
Are you new to programming? It's a handy skill for anyone in cyber security.
This here machine lets you control an Elf using Python 3. It's pretty fun, but I'm having trouble getting beyond Level 8.
Tell you what… if you help me get past Level 8, I'll share some of my SQLi tips with you. You may find them handy sometime around the North Pole this season.
Most of the information you'll need is provided during the game, but I'll give you a few more pointers, if you want them.
Not sure what a lever requires? Click it in the Current Level Objectives
panel.
You can move the elf with commands like elf.moveLeft(5)
, elf.moveTo({"x":2,"y":2})
, or elf.moveTo(lever0.position)
.
Looping through long movements? Don't be afraid to moveUp(99)
or whatever. You elf will stop at any obstacle.
You can call functions like myFunction()
. If you ever need to pass a function to a munchkin, you can use myFunction
without the ()
.
Hints⚓︎
Moving the Elf
You can move the elf with commands like elf.moveLeft(5)
, elf.moveTo({"x":2,"y":2})
, or elf.moveTo(lever0.position)
.
Lever Requirements
Not sure what a lever requires? Click it in the Current Level Objectives
panel.
Bumping into Walls
Looping through long movements? Don't be afraid to moveUp(99)
or whatever. You elf will stop at any obstacle.
Function Calls
You can call functions like myFunction()
. If you ever need to pass a function to a munchkin, you can use myFunction
without the ()
.
Solution⚓︎
This is a similar challenge to last year's event, but using Python instead of JavaScript. Only the first 8 levels count towards solving the challenge. Bonus levels 9 and 10 are not required (but are a lot of fun). Some of the scripts include additional empty lines to enhance readability, but all solutions still fit within the maximum line requirements.
Main levels⚓︎
Level 1
1 2 3 |
|
Level 2
1 2 3 4 5 |
|
Level 3
1 2 3 4 5 6 |
|
Level 4
1 2 3 4 5 6 7 8 |
|
Level 5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
Level 6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Level 7
1 2 3 4 5 6 |
|
Level 8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Bonus levels⚓︎
Level 9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
Level 10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Response⚓︎
Ribb Bonbowford
Gosh, with skills like that, I'll bet you could help figure out what's really going on next door...
And, as I promised, let me tell you what I know about SQL injection.
I hear that having source code for vulnerability discovery dramatically changes the vulnerability discovery process.
I imagine it changes how you approach an assessment too.
When you have the source code, API documentation becomes tremendously valuable.
Who knows? Maybe you'll even find more than one vulnerability in the code.
Wow - even the bonus levels! That's amazing!