Scavenger hunt of June 2018
https://nixers.net/showthread.php?tid=2206
This hunt is less of a hunt and more of a linear quiz-like game.
It starts here:
https://venam.nixers.net/scavenger_hunt_2018_june/
Simply click the <START>
Question 1:
"More and more CLI are using ANSI colors by default, a website proposed a solution to this via an environment variable.
What is it?"
This was mentioned in issue 71 of the newsletter in the entry "Everything is color". The answer is $NO_COLOR or NO_COLOR.
Linter:
You are presented with a c99 code and asked to compile it using gcc and the most annoying warnings you can come up with.
After compiling it using ` -std=c99 -Wall -Wextra -pedantic ` you get the following:
Code:
t.c: In function ‘main’:
t.c:30:7: error: unused variable ‘Run’ [-Werror=unused-variable]
int *Run = p;
^
t.c:14:26: error: unused parameter ‘Fast’ [-Werror=unused-parameter]
int main(int nope, char *Fast[], char **Chips)
^
t.c:14:41: error: unused parameter ‘Chips’ [-Werror=unused-parameter]
int main(int nope, char *Fast[], char **Chips)
^
t.c: At top level:
t.c:11:14: error: ‘_NAME_NUMBER’ defined but not used [-Werror=unused-variable]
static char *_NAME_NUMBER = "Memory alloc test";
^
cc1: all warnings being treated as errors
The thing that pops out are the upper case letters. If we join them we obtain:
RFC_NAME_NUMBER
This is the challenge solution.
Rfc:
The question is " Give the RFC dedicated to naming machines. ", which was in "Naming a new machine" issue 69. The RFC number is 1178.
Special text:
It's a page that says the text is special, plus a hint " thieves and 0s ".
"Are you having fun this scavenger hunt?"
There's something hidden in this text, it's clear when you paste it in vim for example, there are zero width characters in it. To get the hidden text you have to use the tool presented in "Keeping thieves away" of issue 69.
You'll get back: "Github:scavjunixers", which is the solution
User:
There's not much here, you should use the hint of the previous hunt to continue.
Go on Github and clone on your machine the only repo of the user scavjunixers.
Code:
git clone 'https://github.com/scavjunixers/make_me_happy'
There's a hint that in this repo there's a shell script made using makeself.io
So it should be a compressed directory in a script, let's execute it and get that, not much else to do here.
You get back the directory "username_step" which contains "first.mp3" and "hint.sh".
The hint says "metadata, zip, not-really-meta".
We inspect the ID3 tags for the mp3 file, there's an image in it.
You have to extract the image from the mp3.
Next step is zip. That image is concatenated with a zip, executing unzip image.png does the trick and greets you with a new file "9999.mp3"
Now for the "not-really-meta". call up the "strings" utility on your unix machine for this file to find a base64 encoded value, and you'll know the final answer.
QR code:
This page only has a Qr code. The hint is pretty clear " Do literally what it says! ".
So we scan it and it tells us to give it its weight.
Weight of what?
Let's dig the newsletter.
There's an interesting entry called "File physical weight" in 12 accompanied by an implementation code.
We run it, get back the weight of the image and that's it, voilà.
Email:
There are two inputs, one for email and the other for the final answer.
The hint says " Only the ASCII version of the text is required for the answer. "
Alright, we put our email and see what happens.
We receive an email with this text:
Code:
Scavenger Hunt - What encoding is this?
Z4G3AgEHBARVQ1M0MIGrBFwAAABxAAAdawAA+wYAAABpAAH1GwAAACAAAABmAAAAbwAAAHUAAABy
AAAAIAAAACYAAAAgAAD7AQAAAHYAAABlAAAAIAAB9wcAAABlAAAAIAAAAG4AAABlAACizwRLVGhp
cyBpcyB3cmFwcGVyIGluIGEgZm9ybWF0IGxvdmVkIGJ5IGdwZyxvcGVuc3NsIGFuZCBvdGhlciBl
bmNyeXB0aW9uIHRvb2xz
It seems to be base64 at first sight, so let's try that.
It still comes back as garbled but there's some readable bits in it "This is wrapper in a format loved by gpg,openssl and other encryption tools".
There have been a bunch of entries in the newsletter about those tool and the format they use, so let's remind ourselves "Let's play with encoding and formats" in 71 for example.
The format used for certificates and gpg key is the ASN1 format, openssl and asn1dump can help.
Code:
> openssl asn1parse -inform PEM -in t.pem <
0:d=0 hl=3 l= 183 cons: appl [ 7 ]
3:d=1 hl=2 l= 1 prim: INTEGER :07
6:d=1 hl=2 l= 4 prim: OCTET STRING :UCS4
12:d=1 hl=3 l= 171 cons: SEQUENCE
15:d=2 hl=2 l= 92 prim: OCTET STRING [HEX DUMP]:0000007100001D6B0000FB06000000690001F51B00000020000000660000006F00000075000000720000002000000026000000200000FB010000007600000065000000200001F70700000065000000200000006E000000650000A2CF
109:d=2 hl=2 l= 75 prim: OCTET STRING :This is wrapper in a format loved by gpg,openssl and other encryption tools
Alright, so there are 3 strings in here, one seems to have been dumped as hex the others are readable. The first one says UCS4, which is a unicode format. This is what the hex dump is in.
Let's try to decode it then, UCS4 is close enough to UTF-32 so a website like
https://www.branah.com/unicode-converter should do.
That's what we get back "qᵫsti? four & five ?e neꋏ", oh that's unicode but the first hint said we needed only ascii back. So here we go to the next question.
Q4 & 5:
Those ones are straight forward:
" An extended attribute used to avoid destroying information that is already there while still allowed editing. "
and
" The gcc flag that wraps together the generation of a PGO. "
The answers are "a" or "+a" and "-fprofile-generate"
gaufres:
Also straight forward:
"gopher://188.166.241.192/"
Simply visit the gopher website using a client that supports the gopher protocol. it's the default page with an extra special entry, which is where the answer is.
jargon:
" The name of jargon file representing a period in which beginners get extremely obsessed with programming. "
The answer is "larval stage"
File type:
This is the last challenge.
There's a file with the extension "sfp"
That's a Spline Font Database file, a file used in fontforge.
Once opened in fontforge it becomes obvious that certain characters have something special, they are highlighted in red. They are the "n" "i" "x" "e" "r" "s" letters. They contain comments that together form the last solution.
Congratz!