picoCTF - Forensics - File types
Forensics - File types - writeup
description
This file was found among some files marked confidential but my pdf reader cannot read it, maybe yours can. You can download the file from here.
writeup
Let’s download the file!
|
|
lets see what file we got here…
|
|
|
|
Looks like this is a shell archive file (.shar)
lets rename the file to a proper file extension first.
|
|
Now I will try to simply execute it.
|
|
I get the following output:
|
|
Looks like I am missing uudecode
After a quick google search I found out that I need to install sharutils
So lets install it quick
|
|
After running the file Flag.shar again I get a new file called ‘flag’ with a lot of nonsense:
|
|
Cheking with the file command what that file actually is we can see that it is an ‘ar archive’
|
|
So lets rename the file to flag.ar
|
|
check the file type again…
|
|
rename the file to .cpio
|
|
lets extract that cpio archive
|
|
We successfully extracted a new file called ‘flag’
lets see what that is now:
|
|
Lets extract that with bunzip2 real quick
|
|
We got a file ‘flag.out’
lets see what it is:
|
|
Lets rename it to a proper file extension again
|
|
Now I will try to extract that gzip file
|
|
We got a new file flag
lets see what it is this time:
|
|
lets extract it using lunzip
|
|
we get a new file flag.out
lets see what we have now…
|
|
lets rename it to a proper file extension first…
|
|
now i will try to extract it…
|
|
lets check again….
|
|
lets rename it to a proper file extension first ….
|
|
lets decompress it again….
|
|
lets check again….
|
|
lets extract it ….
|
|
Looks like I need to specify a different destination file
|
|
Checking with file again it is still an lzop archive
So I will try to extract it again…
|
|
It is still an lzop file
|
|
If I now check the filetype
|
|
It is an lzip archive this time…
|
|
By checking the filetype I get
|
|
let’s rename it to a proper extension
|
|
Now extract it one more time…
|
|
|
|
cat’ing out this file we finally get some text …
|
|
The first line is hex and translates to
|
|
The second line is also hex and translates to
|
|
So the flag is:
|
|