# Nebula - 14

### **Objective**

> *This program resides in /home/flag14/flag14. It encrypts input and writes it to standard output. An encrypted token file is also in that home directory, decrypt it :)*

> *To do this level, log in as the level14 account with the password level14. Files for this level can be found in /home/flag14.*

### **Getting the flag**

We don't have any source code this time.

Let's navigate to the folder and see what's inside:

![](https://telegra.ph/file/54c3c4aec89649b298156.png align="left")

If we open a **flag14** binary, it will notify as the **\-e** flag is required

![](https://telegra.ph/file/186b2aae0c1812ca5d701.png align="left")

The binary is taking input, making some changes, and returning the result:

![](https://telegra.ph/file/a75503bd8ce7e8300696c.png align="left")

Let's check how it's reacting on some other characters, like numbers

![](https://telegra.ph/file/10975a5fb0b8315b29f16.png align="left")

![](https://telegra.ph/file/33c42e95d9a5c830569a1.png align="left")

![](https://telegra.ph/file/f8580eec60be8396bf8a1.png align="left")

At this point, we can assume that the binary is taking symbols as input, and doing something like +i, where i would be a position starting from the beginning of the input (**aaa** turns into **abc**, etc.).

We also have a token in this directory:

![](https://telegra.ph/file/9baead766ce3ec9940c40.png align="left")

So, the token is **857:g67?5ABBo:BtDA?tIvLDKL{MQPSRQWW.** and we need to decrypt it.

It sounds like quite basic cryptography that can be solved without any technical skills, but I decided to write a script. I would intentionally not share the source code of it, as it's the main takeaway of this level - sometimes you need to write simple stuff to test your theories, and you'd need some proficiency in the scripting languages (python, bash, etc.)

Let's run the script and test the result:

![](https://telegra.ph/file/14f8a193d92d76c2779e5.png align="left")

![](https://telegra.ph/file/233f7c2c2288df1d08968.png align="left")

Woohoo, just five levels to go!
