V0W's Blog

HackCon18 WP

字数统计: 748阅读时长: 4 min
2018/08/17 Share

HackCon18 WP

这个CTF很tm坑,晚上11:30开,第二天早上11:30关,没做几个题,就关了==、
还好环境没关,继续做了点,学了些。

Crypto 解密

Caesar Salad

q4ex{t1g_thq_p4rf4e}p0qr
13
d4rk{g1t_gud_c4es4r}c0de

Salad Upgrades

Sure, I could toss them all using just one shift. But am I gonna?

CIPHERTEXT: e4uo{zo1b_1e_f0j4l10i}z0ce

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#coding:utf-8
# 变异凯撒

strs = string.lowercase
print strs
s = "e4uo{zo1b_1e_f0j4l10i}z0ce"
res =""
j = 1
for i in s:
if i in strs:
res += strs[strs.index(i) - j]
j += 1
else:
res += i
j += 1
print res

flag:
d4rk{th1s_1s_r0t4t10n}c0de

Find Me, ASAP

What does this look like?!

一大段ascii码,很明显,然后写脚本转化一下

1
2
3
4
5
6
7
8
9
10
11
12
13
# coding:utf-8
import os

with open('findme.txt','r') as f:
content = f.read().split()
# print content
reslist = []
for i in content:
reslist.append(chr(int(i)))
res = ''.join(reslist)
print res
with open('find_res.txt','w') as r:
r.write(res)

d4rk{4sc11_n_gr3p}c0de

Hoaxes and Hexes

My friend sent me a meme and told me to ‘look at it differently’. Tf?

Diversity

b1001000 x69 d33 d32 o127 b1100101 o154 o143 b1101111 o155 o145 d32 o164 d111 d32 x48 b1100001 x63 o153 b1000011 o157 x6e d39 o61 b111000 x2c d32 d111 b1110010 d103 d97 x6e o151 x73 d101 d100 o40 d97 b1110011 b100000 x70 o141 o162 x74 d32 x6f x66 b100000 o105 b1110011 x79 b1100001 d39 d49 b111000 x20 b1100010 d121 b100000 x49 o111 b1001001 x54 b100000 b1000100 x65 x6c o150 x69 b101110 x20 o111 d110 b100000 o143 d97 d115 o145 o40 b1111001 b1101111 x75 b100111 x72 x65 x20 x73 x65 b1100101 b1101011 x69 o156 x67 d32 b1100001 o40 o162 x65 o167 b1100001 o162 o144 d32 x66 d111 x72 b100000 o171 x6f d117 b1110010 o40 d101 x66 x66 x6f x72 d116 o163 x2c b100000 d104 b1100101 d114 o145 x27 d115 x20 b1100001 d32 d102 d108 b1100001 x67 x20 x3a b100000 o144 x34 o162 x6b x7b o151 d95 d87 o151 x73 b100011 d95 x41 o61 x6c d95 b1110100 d52 d115 b1101011 d53 o137 o167 x33 d114 o63 o137 d116 b1101000 o151 o65 x5f x33 d52 o65 o171 o137 x58 b1000100 b1000100 b1111101 x63 d48 d100 d101 d46 b100000 o101 x6e b1111001 d119 b1100001 b1111001 x73 b101100 x20 o150 d111 b1110000 b1100101 o40 x79 o157 d117 b100000 b1101000 o141 x76 x65 b100000 d97 x20 o147 d111 b1101111 d100 b100000 b1110100 b1101001 d109 b1100101 d32 x3b x29

很明显,就是不同的编码,然后写个脚本借一下就行了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Diversity
with open('Diversity.txt','r') as f:
content = f.read().split()
#print content
res = ''
for i in content:
if 'x' in i:
intval = int('0'+i,16)
elif 'b' in i:
intval = int('0'+i,2)
elif 'o' in i:
intval = int('0'+i,8)
elif 'd' in i:
intval = int(i.replace('d',''))
res += chr(intval)
print res
with open('Diversity.txt','a') as r:
r.write("\n\n\n\n\n")
r.write(res)
r.close()

结果

1
Hi! Welcome to HackCon'18, organised as part of Esya'18 by IIIT Delhi. In case you're seeking a reward for your efforts, here's a flag : d4rk{i_Wis#_A1l_t4sk5_w3r3_thi5_345y_XDD}c0de. Anyways, hope you have a good time ;)

MISC

Hoaxes and Hexes

My friend sent me a meme and told me to ‘look at it differently’. Tf?

winhex打开直接最后就有
d4rk{1m_d0wn_h3r3}c0de

Steg It Up

切换到其他通道,发现有很多二维码,于是一个个扫,得到flag。

d4rk{s000_m4ny_0f_7h3m_l0l_1_h4v33_t0_m4k333_th3_fl4g_l0ng_f0r_n0000_r3450n_1m40}c0de

Twins

mark
两个文件
相互比对,可以得到flag

1
2
3
4
5
6
7
8
9
10
11
12
file1 = open("file1", "r").read()
file2 = open("file2", "r").read()
flag = ""

if len(file1) == len(file2):
for i in xrange(len(file1)):
if file1[i] == file2[i]:
flag = flag + file1[i]

print("Flag : "+flag)

# Flag : d4rk{lo0king_p4st_0ur_d1ff3renc3s}c0de

CATALOG
  1. 1. HackCon18 WP
  2. 2. Crypto 解密
    1. 2.1. Caesar Salad
    2. 2.2. Salad Upgrades
    3. 2.3. Find Me, ASAP
    4. 2.4. Hoaxes and Hexes
    5. 2.5. Diversity
  3. 3. MISC
    1. 3.1. Hoaxes and Hexes
    2. 3.2. Steg It Up
    3. 3.3. Twins