Browse Source

Initial Commit

Roman Hergenreder 5 years ago
commit
dd508a8100

BIN
Day 1/HV18_Ball_Day1_color.png


BIN
Day 1/data.png


+ 14 - 0
Day 1/decode.py

@@ -0,0 +1,14 @@
+#!/usr/bin/python
+
+from PIL import Image
+
+# Load Image
+im = Image.open('HV18_Ball_Day1_color.png')
+offsetX = 307
+offsetY = 362
+imageSize = 364
+
+# Crop Image
+im.crop((offsetX, offsetY, offsetX+imageSize, offsetY+imageSize)).save("data.png")
+
+# Go on https://jabcode.org/scan/ and upload image :]

+ 34 - 0
Day 2/decode.py

@@ -0,0 +1,34 @@
+#!/usr/bin/python
+
+import urllib.request
+import urllib.parse
+import base64
+
+with open("input.txt", "r") as content_file:
+    content = content_file.read().replace("\n", "")
+    data = content.split(" ")
+
+    # Octal Bytes -> Decimal
+    data_oct = [int(c,8) for c in data]
+
+    # Decimal -> Ascii
+    string = ''.join(chr(i) for i in data_oct)
+
+    # Ascii -> Base32
+    string = base64.b32decode(string, casefold=False).decode("utf-8")
+
+    # Base32 -> 14-Segment-Code
+    url = "https://kryptografie.de/cgi-bin/MysteryMaster.exe"
+    params = {
+        "app": "Kryptografie.de",
+        "user": "",
+        "pass": "",
+        "chiffre": "14-Segment",
+        "opnum": 2,
+        "key": "",
+        "code": string
+    }
+
+    response = urllib.request.urlopen(url,  urllib.parse.urlencode(params, True).encode('utf-8'))
+    result = response.read().decode('utf-8').replace("%0D%0A", "")
+    print(result)

+ 1 - 0
Day 2/input.txt

@@ -0,0 +1 @@
+115 112 122 127 113 132 124 110 107 106 124 124 105 111 104 105 115 126 124 103 101 131 124 104 116 111 121 107 103 131 124 104 115 122 123 127 115 132 132 122 115 64 132 103 101 132 132 122 115 64 132 103 101 131 114 113 116 121 121 107 103 131 124 104 115 122 123 127 115 63 112 101 115 106 125 127 131 111 104 103 115 116 123 127 115 132 132 122 115 64 132 103 101 132 132 122 115 64 132 103 101 131 114 103 115 116 123 107 113 111 104 102 115 122 126 107 127 111 104 103 115 116 126 103 101 132 114 107 115 64 131 127 125 63 112 101 115 64 131 127 117 115 122 101 115 106 122 107 107 132 104 106 105 102 123 127 115 132 132 122 116 112 127 123 101 131 114 104 115 122 124 124 105 62 102 101 115 106 122 107 107 132 104 112 116 121 121 107 117 115 114 110 107 111 121 107 103 131 63 105 115 126 124 107 117 115 122 101 115 106 122 107 113 132 124 110 107 106 124 124 105 111 104 102 115 122 123 127 115 132 132 122 115 64 132 103 101 131 114 103 115 116 123 107 117 115 124 112 116 121 121 107 117 115 114 110 107 111 121 107 103 131 63 105 115 126 124 107 117 115 122 101 115 106 122 107 107 132 104 106 105 102 121 127 105 132 114 107 115 64 131 127 117 115 122 101 115 112 122 127 111 132 114 107 105 101 75 75 75 75 75 75

+ 37 - 0
Day 4/decode.py

@@ -0,0 +1,37 @@
+#!/usr/bin/python
+
+pirates = ['0' for i in range(48)]
+
+p = ''.join(pirates)
+s = '::)"<.vd]!&a{":r>Qyh 7';
+length = len(s)
+
+f='HV18-';
+
+def subnum(i):
+    return int(p[i*2:i*2+2])
+
+for i in range(length):
+    a = ord(s[i])
+    b = subnum(i)
+    f += chr(a ^ b)
+
+print(f)
+
+# indizes: 4, 9, 14, 19
+# xxxx-xxxx-xxxx-xxxx
+correctKey = "00000000"
+for i in range(4):
+    pos = 4 + i*5
+    key = ord(s[pos]) ^ ord('-')
+    correctKey += "%02d%s" % (key, "00000000")
+
+data = [correctKey[i:i+4] for i in range(0, len(correctKey), 4)]
+
+print(correctKey)
+print(data)
+
+js = ""
+for i in range(len(data)):
+    js += "document.getElementById('pirate%02d').value='%s';\n" % (i + 1, data[i])
+print(js)

BIN
Teaser/Teaser.png


BIN
Teaser/Teaser2.png


BIN
Teaser/ZOoxjUSe1OVB7OPoVrsX.pdf


BIN
Teaser/data.png


BIN
Teaser/data2.png


+ 47 - 0
Teaser/decode.py

@@ -0,0 +1,47 @@
+#!/usr/bin/python
+
+
+from PIL import Image
+
+# Load Image
+im = Image.open('Teaser.png')
+offsetX = 154
+offsetY = 183
+imageSize = 180
+
+# Crop Image
+im.crop((offsetX, offsetY, offsetX+imageSize, offsetY+imageSize)).save("data.png")
+
+# Braillecode
+string = "http://bit.ly/2TJvxHt"
+# forwared to https://hackvent.hacking-lab.com/T34s3r_MMXVIII/index.php?flag=UI18-GAUa-lXhq-htyV-w2Wr-0yiV
+# decoded ROT13: https://hackvent.hacking-lab.com/T34s3r_MMXVIII/index.php?flag=HV18-TNHn-yKud-uglI-j2Je-0lvI
+
+# Second Image
+im = Image.open('Teaser2.png')
+im.crop((offsetX, offsetY, offsetX+imageSize, offsetY+imageSize)).save("data2.png")
+
+# follow the white rabbit ...
+# rushed by ...
+
+# HACKvent 2018
+# .... ...- .---- ---.. -....- --. --- .-. .. -....- --.. .-. ... -... -....- ..- ..-. .- . -....- - ... -.... -.-. -....- -.-. ...- - -
+# Morse code: HV18-GORI-ZRSB-UFAE-TS6C-CVTT
+im = Image.open('pdf_data.png')
+pix = im.load()
+size = im.size
+
+# pixels = []
+#
+# for x in range(size[0]):
+#     for y in range(size[1]):
+#
+#         if pix[x,y] not in pixels:
+#             pixels.append(pix[x,y])
+#
+#         r = 255 - pix[x,y][0]
+#         g = 255 - pix[x,y][1]
+#         b = 255 - pix[x,y][2]
+#         pix[x,y] = (r,g,b,255)
+
+# im.save('pdf_data_decrypted.png')

+ 1 - 0
Teaser/passphrase.txt

@@ -0,0 +1 @@
+ZOoxjUSe1OVB7OPoVrsX.pdf

BIN
Teaser/pdf_data.png


BIN
Teaser/pdf_data_decrypted.png


BIN
Teaser/test.png