Nebula Level14: A Newbie’s Approach

Nebula Level14: A Newbie’s Approach

Level14 is a simple challenge, which is why I’ll solve it quickly. You will need knowledge in one programming language if you want to solve this without too much hard work. If not, you can solve it only consulting an ASCII table.


What you’ll need to know…

  • Some programming language



In level14, we have a simple program that encrypts input. We run flag14 with the option -e and the program will wait for input. After you provide it some input, it’ll output the encrypted string.

In /home/flag14 you can see two files, as in the image below.


Token file has the encrypted password for flag14 account.


In the next image, you can see some tests that I executed.


It’s better if you have an ASCII table at hand. Let’s consider the first example. In the ASCII table, 0 has the value 48. As you probably guessed, the program always adds the current index to the value present in that index.

Let’s see it with the second example. The number 1 has the value 49 on the ASCII table and it’s on the first index. So, the program will encrypt it to 2, because 49 plus index 1 equals to 50, which corresponds to 2. The number 9 has the value 57 and it’s on index 9. So, 57 plus 9 equals to 66 which corresponds to B on the ASCII table.

It’s not that hard, and if you want, you can do it by hand. In my case, I’ll take the chance to start using programming languages to help me solve challenges.

For this, I wrote the following python script.

offset = 0
cleartext = ""
encrypted = "857:g67?5ABBo:BtDA?tIvLDKL{MQPSRQWW"

for char in encrypted:
  cleartext += chr(ord(char)-offset)
  offset += 1


If you prefer in C…

#include <stdio.h>
#include <string.h>

int main(){

  int i = 0;
  char encrypted[] = "857:g67?5ABBo:BtDA?tIvLDKL{MQPSRQWW";

  for (i = 0; i < strlen(encrypted); i++){
    printf("%c", encrypted[i]-i);

You can do it on your favorite programming language.

When you run one of these programs, the output will be 8457c118-887c-4e40-a5a6-33a25353165.

Solution level14


Challenges completed: 15/20



The problem is similar to the last challenge, so the solution is probably to use libraries built for this purpose.




Further Reading

Leave a Reply

Your email address will not be published. Required fields are marked *