HACKvent 2020 - Day -1

01-01-2021 - 1 minute, 46 seconds - CTF

This is the teaser challenge, released a day before the start of this capture the flag event. We were presented the following text.

On the third day of christmas my true love sent to me…

three caesar salads,
two to (the) six basic arguments,
one quick response.

Sbopb 3 alkb! Lcc tfqe vlr! Dbq yxzh ql tloh! Vlr'ob klq alkb ebob...

fSYLOt0HDdlXXXXKPReBRdXXXWlXXXDxZXXXXXXQyan/XXXGfUmRTEOPVUzdzEGsWjipWPY0bUYi
FDS4xTVXXEgxoSeyhrP4AcwkHUtBdf+Nu+Bwtgct8W0Gnnlc07sbfUCUiHPfHYYBGeGNr/2ccu/3
I/vCCouITTqmmUg8mWWx6Ifl/s41L4mMaouA/yjPo+MrcPMdEEDL94y2buybwu8MsKxN8UUz1baL
nF+e5tVJ21/hvoubk53BbIgghi4b7UqOTqUMol7E0EtjjfsMK73arfc+ai8DCCCxDNsCBExR6L1V
otcucgqDYJzNCcJhni0EWwabueZNI9q7ky3/EHXsNU5arb/Oc199Z354dOH/uyF8JzICgwzhcurM
72UZ54Ug26Mt7Ryt/WcqMK9wSg1k3931SYAO8gAHdf0sJ5d4BMGlguS8CK+Jx7SMt6afjNkFi59+
4ALiPRZNg5JhP7lz2UxbJrCfZgpXhuAZAKEDHgYnVRyfiMfOBwP2rDFCWgKpCvLDt9pUpUTyoQbi
VrRijYlBulNt/9UE/a3K3/j4zvWAGI6+VtT/XkhKK4dzg5dCNLN8rDRI8LswtL8/8NaRYVIWtivu
tb7EKQDvcEXoDp4O8wILK4UB6UlJFBOVL8JWmBXPUvOjHbF1YYSYEZpX6sX8uYNDBGZzt4HQFzSV
dqKNX9cDJvl2K+ONXlbeQNXfu4G8nhZlX6vRJsfgnVGAMzbzzp4ix64rq9uIIHkhRllTfiwUnBjw
CiTq2oQUTCMKqSPqqyyxT2dODmeyxamnx6334AlT6oASJy9gWFNOOum5iHDgggy6YE1jjkjTnyML
KspHHv7FuZmIS11q9P1rNvi22kjUoysrqspY10486bOQgm562ris1Y5R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jfBYl3NlKB5rtDgpH5aiw3v/oJHiOJB8p9sDQRjKHBODgOZd0Wl
eLWgatLf69+b8tY6MfiNrQyXMNTBYl3NlYBxlRBgKEVA7fe6U8E92g6/T1B5C9DlJxBGgaZdBOl0
NfJ0adKDzZ2+U22sKw3bZH7381zVLBUNeZV0xFODxKXFAOl9bQbd533u2ct38r/dO/zMWrBWDARj
KHCYFwOZd0Wl0LgGrtB9m+SS7e9NrWcc/gJFMTzQgMQ+dSCgNeJxKBFgKDfBYl1r7MUiKQYneXxK
0HXODnCYFwOleBWl0XdKDnBODgOZd0WleXxK0HXODnCYFwOleXxK0XdKDnCYFwOZ89Q+Xb9rY3Zy
veGRXXXXXBiCQhPrNjZZ

Solution

Step 1: “three caesar salads” is clearly a hint to the caesar cipher. We decoded the first line (“Sbopb 3 alkb! Lcc tfqe vlr! Dbq yxzh ql tloh! Vlr’ob klq alkb ebob…”) with a random online tool. It turned out to be ROT3 encoded:

Verse 3 done! Off with you! Get back to work! You're not done here...

Step 2: “two to (the) six basic arguments” could be a hint to base64 (2^6 = 64, basic). Decoded, the message seems to be just garbage, but when you ROT3 it as well (kudos to @jakob) you get a png file with an QR code in it:

Step 3: "one quick response". We got that one, but its not exactly high contrast enough for QR readers to a accept. So lets make the gray pixels black:

using System;
using System.Drawing;

Console.WriteLine("Enter Path to Image: ");
var path = Console.ReadLine();

var colorConverter = new ColorConverter();
var colorToChange = (Color)colorConverter.ConvertFromString("#FFFCFCFC");

var image = new Bitmap(path);

for (int x = 0; x < image.Width; x++)
{
    for (int y = 0; y < image.Height; y++)
    {
        Color clr = image.GetPixel(x, y);

        if (clr == colorToChange)
        {
            image.SetPixel(x, y, Color.Black);
        }

    }
}

image.Save(path + "1.png");

The result is the pretty QR-Code you can see below. When you scan it, you get the flag:

Before After
Low contrast QR code High contrast QR code
HV20{34t-sl33p-haxx-rep34t}

Next Post Previous Post