Rating:

## [See original writeup on site](https://barelycompetent.dev/post/ctfs/2021-04-11-ritsecctf/#inception-ctf-dream-1)

### Inception CTF: Dream 1
> The purpose of this CTF challenge is to identify common methods of hiding malicious files and code. In most cases adversaries will attempt to evade defenses in many cases by masquerading, hiding files, and more. There are five directories like the five levels in the movie Inception, Reality -> Van Chase -> The Hotel -> Snow Fortress -> Limbo. You will find one flag in each of the levels, that flag will also be the password to extract the next directory. Requirements: • You must have 7zip installed • Drop the InceptionCTF.7z on the Desktop as “InceptionCTF” • Use the option “Extract to "<name of directory>\” for the CTF to function properly Missing either of the above may result in complications which may cause issues when attempting to find flags.
>
> NOTE: These challenges have a flag format of RITSEC{}
>
> Dream 1: We have to get to their subconscious first, look for a hidden text file within the directory “Reality” this flag will unlock the next directory.

Oh boy, here we go. We are given a 7z file, `InceptionCTFRITSEC.7z`.

Extracting the given folder, we get another archive:

```bash
7z x InceptionCTFRITSEC.7z
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,32 CPUs AMD Ryzen 9 3950X 16-Core Processor (870F10),ASM,AES-NI)

Scanning the drive for archives:
1 file, 160289 bytes (157 KiB)

Extracting archive: InceptionCTFRITSEC.7z
--
Path = InceptionCTFRITSEC.7z
Type = 7z
Physical Size = 160289
Headers Size = 130
Method = LZMA2:192k
Solid = -
Blocks = 1

Everything is Ok

Size: 160149
Compressed: 160289

ls
# created Reality.7z
```

Extracting `Reality.7z`, we find another archive (for the next level), and a text file:

```bash
7z x Reality.7z

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,32 CPUs AMD Ryzen 9 3950X 16-Core Processor (870F10),ASM,AES-NI)

Scanning the drive for archives:
1 file, 160149 bytes (157 KiB)

Extracting archive: Reality.7z
--
Path = Reality.7z
Type = 7z
Physical Size = 160149
Headers Size = 196
Method = LZMA2:192k
Solid = +
Blocks = 1

Everything is Ok

Files: 2
Size: 159943
Compressed: 160149
```

The text file is `Subconscious.txt`:

```bash
cat Subconscious.txt
Wait a minute, whose subconscious are we going into, exactly? {dnalmaerD}CESTIR
```

Which is easily reversed for the lazy using Python:

```python
python -c 'print("{dnalmaerD}CESTIR"[::-1])'
RITSEC}Dreamland{
```

Flag is `RITSEC{Dreamland}`

Original writeup (https://barelycompetent.dev/post/ctfs/2021-04-11-ritsecctf/#inception-ctf-dream-1).