- Published on
Hacky Holidays - Space Race: BowShock
- Authors
- Name
- Royce Hoe
Challenge Description
[50 points]/ Can you find out how to minimize bow shock and prevent everything from turning into dust?
Introduction
So, we are presented with a single jar.
file. Opening .jar
files seem to yield an incomprehensible mess. But since a .jar
file is a zip file, let me unzip this file.
Now I am presented with 2 files:
- A metadata file
- A
.class
file
The metadata file is useless to me; it is just a text file containing metadata. There is nothing for me to reverse engineer. The .class
file on the other hand.....is another incomprehensible mess? Why? Because it is compiled java code. To read it, I need to disassemble it with the javap -c
command.
Thankfully, the disassembled file contains helpful comments from the creator. One of them reads:
// String Set the amount of plasma to the correct amount to minimize bow shock
Great! That means I need to set plasma to the correct amount, whatever that may be, or however I can set it.
After updating my Java Runtime with these instructions and these instructions, and setting up my $PATH, I am ready to attempt to solve this challenge!
The comment was indeed helpful. When I ran the file, I got this screen, prompting me to a "correct amount". Presumably, I will need to enter the correct number or numbers into this program to get the flag.
Back to the disassembly. In the disassembled file, I see the following numbers:
Hmm, let me try inputting non #
numbers as the amount of plasma. Seems like a good place to start.
Excellent! Turns out, through trial and error, keying in the numbers in the sections for sipush
in order of which they appear is the solution. Got the flag!
Flag: CTF{bowsh0ckd_1417}