DFA 2020: MISC

This category is a mix of javascript, crypto and zip file recovery. To repair the corrupted zip file, you will need a hex editor (if repairing manually). Otherwise, it's not very time-consuming and you can easily score extra points.

Information

Category Name: DFA2020: MISC

Files:
– just_some_js : 46.2 KB
– this_is_not_js: 321 bytes
– file.zip_broken: 215 bytes

My Recommendations

If you already created the dfa20 working directory:

mkdir Documents/dfa20/misc

If not, create it:

mkdir Documents/dfa20 && mkdir Documents/dfa20/misc

In your VM, open Firefox and download all three files in the “MISC” category to the Working Directory.

node --version

Walkthrough

1. Just some JS (100)

Check out what I can do!
file: just_some_js

The file is a java script file, to run it in your Terminal, you need to use node:

				
					node just_some_js
				
			

Answer: flag<what_a_cheeky_language!1!>

2. This is not JS (150)

I’m tired of Javascript. Luckily, I found the grand-daddy of that lame last language!
file: this_is_not_js

I use cat to see the full contents of the file:

				
					cat this_is_not_js
				
			

Googling for “programming language punctuation only” takes me to this Wikipedia page. This file appears to be in “Brainf*ck” language. I’m going to one of my favorite websites to decode this. The output is:

Answer: flag<Now_THIS_is_programming>

3. Unzip Me (375)

I zipped flag.txt and encrypted it with the password “password” but I think the header got messed up… You can have the flag if you fix the file.
file: file.zip_broken

From the question we know the following:
The zip contains the file “flag.txt”
The zip is encrypted
The header is corrupted

To recover the zip file, I use this site which explains the structure of PKZip archives very well.

I open the file: zip.broken in Okteta (you can use Cyberchef or any Hex Editor)
I copy all its hex content to a new file, and modify the following values:

0x1400 = PKVersion Needed to Extract

0x0000 = General Bit Purpose Flag (00 means encrypted).

0x0800 = Filename length (flag.txt = 8 bytes).

Original file.zip_broken
Modified file.zip_broken

I save the new file as “test.zip”, and unzip it:

				
					unzip test.zip
##password prompt
password
##read flag
cat flag.txt
				
			

Answer: flag<R3ad_th3_spec>

TLDR

– Short section dealing with JavaScript & file recovery.

Recent Posts

Follow Us

Featured Video

Guide

Discover more from forensicskween

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%