It all started innocently enough:
$ file forensics200-20c6d7dee480b31b28802f2c3b951313
forensics200-20c6d7dee480b31b28802f2c3b951313: LHarc 1.x/ARX archive data [lh0]
"Ah, an LHA archive. No problem, I can uncompress that."
$ sudo apt-get install lha
...
$ lha x ../forensics200-20c6d7dee480b31b28802f2c3b951313 # 1
key - Melted : ooooo
$ file key
key: PPMD archive data
What the hell is that? Luckily, Debian and Ubuntu have a pile of packaged archivers:
$ apt-cache search ppmd
ppmd - fast archiver program with good compression ratio
$ sudo apt-get install ppmd
...
$ mv key key.ppmd
$ ppmd d key.ppmd # 2
Fast PPMII compressor for textual data, variant I, Jun 21 2006
key: 9386 > 9156, 8.20 bpb, used: 0.1MB, speed: 915 KB/sec
$ file key
data
Dang, up to us now.
$ hexdump -C key | head -n 8
00000000 44 43 54 c3 00 08 29 00 00 00 00 00 00 23 8c 00 |DCT...)......#..|
00000010 00 00 01 00 00 23 91 00 00 00 00 14 04 00 03 6b |.....#.........k|
00000020 65 79 00 00 04 d7 3b 6f 12 01 00 04 d7 3b 6f 12 |ey....;o.....;o.|
00000030 00 23 91 1a 02 6b 65 79 00 00 b1 07 28 00 00 00 |.#...key....(...|
00000040 00 80 6d 23 00 00 bb 38 64 11 ee 81 6d 23 00 00 |..m#...8d...m#..|
00000050 60 ea 2b 00 22 0b 01 02 10 00 02 64 bd 6d 3b 48 |`.+."......d.m;H|
00000060 bd 6d 3b 48 00 00 00 00 00 00 00 00 00 00 00 00 |.m;H............|
00000070 00 00 00 00 00 00 6b 65 79 2e 61 72 6a 00 00 42 |......key.arj..B|
Hm. No idea what DCT is, but it seems to store file contents in the
clear, since we can read both "key" and "key.arj". Maybe ARJ isn't picky
about the state of file contents...
$ sudo apt-get install arj
...
$ mv key key.arj
$ arj x key.arj # 3, 4
ARJ32 v 3.10, Copyright (c) 1998-2004, ARJ Software Russia. [10 Dec 2007]
Processing archive: key.arj
Archive created: 2008-05-26 19:11:09, modified: 2008-05-26 19:11:09
Extracting key OK
1 file(s)
$ file key
key: 7-zip archive data, version 0.2
$ sudo apt-get install p7zip
...
$ mv key key.7z
$ p7zip -d key.7z # 5
p7zip Version 4.57 (locale=C,Utf16=off,HugeFiles=on,4 CPUs)
Processing archive: key.7z
Extracting key
Everything is Ok
Size: 8771
Compressed: 8951
$ file key
key: bzip2 compressed data, block size = 900k
$ mv key key.bz2
$ bunzip2 key.bz2 # 6
$ file key
key: data
$ hexdump -C key | head -n 8
00000000 00 e9 55 43 4c ff 01 1a 00 00 00 01 2d 07 00 04 |..UCL.......-...|
00000010 00 00 00 00 20 46 00 00 20 46 1f 8b 08 08 bc 6d |.... F.. F.....m|
00000020 3b 48 00 03 6b 65 79 00 15 97 89 7f d5 54 fe fe |;H..key......T..|
00000030 cf c9 be 27 dd 6f f7 74 01 0a 14 08 58 a0 40 29 |...'.o.t....X.@)|
00000040 69 41 a8 80 18 10 b0 0a 23 61 11 0a b2 44 a8 5a |iA......#a...D.Z|
00000050 64 f1 dc 7b 0b 14 28 18 14 b1 2a 3a 61 fd 56 40 |d..{..(...*:a.V@|
00000060 27 8c 8c 76 b4 3a b9 80 d0 41 d4 20 38 56 65 98 |'..v.:...A. 8Ve.|
00000070 b0 88 55 19 8d 23 62 9d 41 fd f5 f7 27 9c f3 fa |..U..#b.A...'...|
UCL? Don't know that one yet.
$ apt-cache search ucl
libucl-dev - Portable compression library - development
libucl1 - Portable compression library - runtime
...
$ apt-cache showsrc libucl1 | grep ^Binary
Binary: libucl1, libucl-dev
$ sudo apt-get install libucl1 libucl-dev
...
$ dpkg -L libucl-dev libucl1 | grep bin
$
Hmm, no binaries to actually
use UCL. But looking more closely:
$ dpkg -L libucl-dev libucl1
...
/usr/share/doc/libucl-dev/examples/Makefile
/usr/share/doc/libucl-dev/examples/uclpack.c.gz
...
$ cp /usr/share/doc/libucl-dev/examples/Makefile /usr/share/doc/libucl-dev/examples/uclpack.c.gz /usr/share/doc/libucl-dev/examples/portab.h .
$ make uclpack
gzip -d uclpack.c.gz
gcc -O2 -c -o uclpack.o uclpack.c
gcc -lucl uclpack.o -o uclpack
$ mv key key.ucl
$ ./uclpack -d key.ucl key # 7
UCL data compression library (v1.03, Jul 20 2004).
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
http://www.oberhumer.com/opensource/ucl/
uclpack: block-size is 262144 bytes
uclpack: decompressed 8296 into 8262 bytes
$ file key
key: gzip compressed data, was "key", from Unix, last modified: Mon May 26 19:11:08 2008
$ mv key key.gz
$ gunzip key.gz # 8
$ file key
key: compress'd data 16 bits
$ my key key.Z
$ uncompress key.Z # 9
$ file key
key: RAR archive data, v1d, os: Unix
$ sudo apt-get install rar
...
$ mv key key.rar
$ rar x key.rar # 10
RAR 3.71 Copyright (c) 1993-2007 Alexander Roshal 20 Sep 2007
Shareware version Type RAR -? for help
Extracting from key.rar
Extracting key OK
All OK
$ file key
key: Microsoft Cabinet archive data, 6474 bytes, 1 file
$ sudo apt-get install cabextract
...
$ mv key key.cab
$ cabextract key.cab # 11
Extracting cabinet: key.cab
extracting key
All done, no errors.
$ file key
key: rzip compressed data - version 2.1 (6316 bytes)
$ sudo apt-get install rzip
...
$ mv key key.rz
$ rzip -d key.rz # 12
$ file key
key: Squeezed (apple ][) data
Now that's going to take some more research. After digging around for a while,
an
Apple ][ unsqueezer was found.
$ wget http://www.apple2.org.za/mirrors/ftp.gno.org/unix.tools/usq.310.tar.Z
$ tar Zxf usq.310.tar.Z
$ (cd sciibin; make)
...
$ mv key key.sq
$ ./sciibin/usq key.sq # 13
$ file key
key: ARJ archive data, v11, slash-switched, original name: , os: Unix
$ mv key key.arj
$ arj x key.arj # 14
ARJ32 v 3.10, Copyright (c) 1998-2004, ARJ Software Russia. [10 Dec 2007]
Processing archive: key.arj
Archive created: 2008-05-26 19:11:08, modified: 2008-05-26 19:11:08
Extracting key OK
1 file(s)
$ file key
key: bzip2 compressed data, block size = 900k
$ mv key key.bz2
$ bunzip2 key.bz2 # 15
$ file key
key: compress'd data 16 bits
$ mv key key.Z
$ uncompress key.Z # 16
$ file key
key: 7-zip archive data, version 0.2
$ mv key key.7z
$ p7zip -d key.7z # 17
7-Zip (A) 4.57 Copyright (c) 1999-2007 Igor Pavlov 2007-12-06
p7zip Version 4.57 (locale=C,Utf16=off,HugeFiles=on,4 CPUs)
Processing archive: key.7z
Extracting key
Everything is Ok
Size: 3636
Compressed: 3761
$ file key
key: Microsoft Cabinet archive data, 3636 bytes, 1 file
$ mv key key.cab
$ cabextract key.cab # 18
Extracting cabinet: key.cab
extracting key
All done, no errors.
$ file key
key: RAR archive data, v1d, os: Unix
$ mv key key.rar
$ rar x key.rar # 19
RAR 3.71 Copyright (c) 1993-2007 Alexander Roshal 20 Sep 2007
Shareware version Type RAR -? for help
Extracting from key.rar
Extracting key OK
All OK
$ file key
key: data
$ hexdump -C key | head -n 1
00000000 00 e9 55 43 4c ff 01 1a 00 00 00 01 2d 07 00 04 |..UCL.......-...|
$ mv key key.ucl
$ ./uclpack -d key.ucl key # 20
UCL data compression library (v1.03, Jul 20 2004).
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
http://www.oberhumer.com/opensource/ucl/
uclpack: block-size is 262144 bytes
uclpack: decompressed 3501 into 3467 bytes
$ file key
key: rzip compressed data - version 2.1 (3381 bytes)
$ mv key key.rz
$ rzip -d key.rz # 21 (half way done!)
$ file key
key: ARC archive data, uncompressed
$ sudo apt-get install arc
...
$ mv key key.arc
$ arc x key.arc # 22
Extracting file: key
$ file key
key: data
$ hexdump -C key | head -n 8
00000000 44 43 54 c3 00 08 29 00 00 00 00 00 00 0c de 00 |DCT...).........|
00000010 00 00 01 00 00 0c e3 00 00 00 00 14 04 00 03 6b |...............k|
00000020 65 79 00 00 04 8d 15 52 79 01 00 04 8d 15 52 79 |ey.....Ry.....Ry|
00000030 00 0c e3 1c 5e 2d 6c 68 30 2d bf 0c 00 00 ac 0c |....^-lh0-......|
00000040 00 00 63 11 bb 38 20 01 03 6b 65 79 cd 82 55 05 |..c..8 ..key..U.|
00000050 00 50 a4 81 07 00 51 00 00 00 00 07 00 54 bb 6d |.P....Q......T.m|
00000060 3b 48 00 00 1f 8b 08 08 bb 6d 3b 48 00 03 6b 65 |;H.......m;H..ke|
00000070 79 00 0d d3 07 3b 15 0c 1b 00 e0 c7 28 92 91 bc |y....;......(...|
Well, LHa doesn't seem as easy to skip DCT headers as ARJ does, so we can just compare where LHa headers start, and trim off the DCT headers instead:
$ hexdump -C forensics200-20c6d7dee480b31b28802f2c3b951313 | head -n 1
00000000 1c 76 2d 6c 68 30 2d d0 24 00 00 bd 24 00 00 64 |.v-lh0-.$...$..d|
$ dd if=key of=key.lha bs=1 skip=51 # 23
3299+0 records in
3299+0 records out
3299 bytes (3.3 kB) copied, 0.00964225 s, 342 kB/s
$ rm key
$ lha x key.lha # 24
key - Melted : oo
$ file key
key: gzip compressed data, was "key", from Unix, last modified: Mon May 26 19:11:07 2008
$ mv key key.gz
$ gunzip key.gz # 25
$ file key
key: Squeezed (apple ][) data
$ mv key key.sq
$ ./sciibin/usq key.sq # 26
$ file key
key: PPMD archive data
$ mv key key.ppmd
$ ppmd d key.ppmd # 27
Fast PPMII compressor for textual data, variant I, Jun 21 2006
key: 2324 > 2239, 8.30 bpb, used: 0.0MB, speed: 2239 KB/sec
$ file key
key: ARJ archive data, v11, slash-switched, original name: , os: Unix
$ mv key key.arj
$ arj x key.arj # 28
ARJ32 v 3.10, Copyright (c) 1998-2004, ARJ Software Russia. [10 Dec 2007]
Processing archive: key.arj
Archive created: 2008-05-26 19:11:07, modified: 2008-05-26 19:11:07
Extracting key OK
1 file(s)
$ file key
key: rzip compressed data - version 2.1 (2042 bytes)
$ mv key key.rz
$ rzip -d key.rz # 29
$ file key
key: 7-zip archive data, version 0.2
$ mv key key.7z
$ p7zip -d key.7z # 30
7-Zip (A) 4.57 Copyright (c) 1999-2007 Igor Pavlov 2007-12-06
p7zip Version 4.57 (locale=C,Utf16=off,HugeFiles=on,4 CPUs)
Processing archive: key.7z
Extracting key
Everything is Ok
Size: 1961
Compressed: 2042
$ file key
key: compress'd data 16 bits
$ mv key key.Z
$ uncompress key.Z # 31
$ file key
key: LHarc 1.x/ARX archive data [lh0]
$ mv key key.lha
$ lha x key.lha # 32
key - Melted : o
$ file key
key: ARC archive data, packed
$ mv key key.arc
$ arc x key.arc # 33
Extracting file: key
$ file key
key: data
$ hexdump -C key | head -n 4
00000000 44 43 54 c3 00 08 29 00 00 00 00 00 00 05 a3 00 |DCT...).........|
00000010 00 00 01 00 00 05 a8 00 00 00 00 14 04 00 03 6b |...............k|
00000020 65 79 00 00 04 3a 00 c2 0a 01 00 04 3a 00 c2 0a |ey...:......:...|
00000030 00 05 a8 52 61 72 21 1a 07 00 cf 90 73 00 00 0d |...Rar!.....s...|
$ dd if=key of=key.rar bs=1 skip=51 # 34
$ rm key
$ rar x key.rar # 35
RAR 3.71 Copyright (c) 1993-2007 Alexander Roshal 20 Sep 2007
Shareware version Type RAR -? for help
Extracting from key.rar
Extracting key OK
All OK
$ file key
key: data
$ hexdump -C key | head -n 1
00000000 00 e9 55 43 4c ff 01 1a 00 00 00 01 2d 07 00 04 |..UCL.......-...|
$ mv key key.ucl
$ ./uclpack -d key.ucl key # 36
UCL data compression library (v1.03, Jul 20 2004).
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
http://www.oberhumer.com/opensource/ucl/
uclpack: block-size is 262144 bytes
uclpack: decompressed 1535 into 1501 bytes
$ file key
key: CDC Codec archive data
Stumped again. Searching around for CDC we found reference to DQT, which
seemed to dead-end into VMS and IBM tape backups. Finally in some random
Google hit, we see something referring to it as "squeezed" data, so we
try our unsqueezer on it:
$ mv key key.sq
$ ./sciibin/usq key.sq # 37
$ file key
key: bzip2 compressed data, block size = 900k
$ mv key key.bz2
$ bunzip2 key.bz2 # 38
$ file key
key: Microsoft Cabinet archive data, 485 bytes, 1 file
$ mv key key.cab
$ cabextract key.cab # 39
Extracting cabinet: key.cab
extracting key
All done, no errors.
$ file key
key: gzip compressed data, was "key", from Unix, last modified: Mon May 26 19:11:07 2008
$ mv key key.gz
$ gunzip key.gz # 40
$ file key
key: PPMD archive data
$ mv key key.ppmd
$ ppmd d key.ppmd # 41
Fast PPMII compressor for textual data, variant I, Jun 21 2006
key: 367 > 3472, 0.85 bpb, used: 0.0MB, speed: 3472 KB/sec
$ file key
key: ASCII text
$ cat key # 42!
# #
# # #### # # # # ## # # # #
# # # # # # ## ## # # ## # # #
####### # # # # # ## # # # # # # #
# # # # # ## # # # ###### # # # #
# # # # ## ## # # # # # ## #
# # #### # # # # # # # # #
#### # # #### # # #### ##### #### ###### #### # #####
# # # # # # # # # # # # # # # # #
# # # # #### #### # # # # ##### #### # #
# # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # #
#### ###### # #### # # #### ##### #### ###### #### # #
##### ## # # ###### ##### #### #### ###### #####
# # # # # # # # # # # # #
# # # #### ##### # # # # ##### #
# ###### # # # # # # # ### # #
# # # # # # # # # # # # #
# # # # # ###### # #### #### ###### #
##### #### ##### # # ######
# # # # # # #
# # # # ###### #####
# # # # # # #
# # # # # # #
# #### # # # ######
#### ###### # # ##### ###### ##### #### ######
# # # ## # # # # # # # #
# ##### # # # # ##### # # # # #####
# # # # # # # ##### # # #
# # # # ## # # # # # # #
#### ###### # # # ###### # # #### #
##### # # # ####
# # # # #
# ###### # ####
# # # # #
# # # # # #
# # # # ####
###### #### ##### ###### # # #### # #### ####
# # # # # # ## # # # # # #
##### # # # # ##### # # # #### # # ####
# # # ##### # # # # # # # #
# # # # # # # ## # # # # # # #
# #### # # ###### # # #### # #### ####
#### # # ## # # ###### # # #### ######
# # # # # # # # # ## # # # #
# ###### # # # # ##### # # # # #####
# # # ###### # # # # # # # ### #
# # # # # # # # # # ## # # #
#### # # # # ###### ###### ###### # # #### ######
And so, this becomes the first question to actually follow the Jeopardy-style
"Give the question to this answer" rules.