728x90
반응형
1. intro
2. code 및 분석
2.1. code
N/A
2.2. 분석
문제 설명을 보면 싱글 바이트와 xor 했다고 되어있다.
그러므로 0x1부터 0xff까지 쭉 뽑아보면 답이 나올 것이다.
조금 더 빠르게 하려면 아무래도 flag 형식이 crypto 이기에 첫 문자가 c인 경우만 추려내도 좋을 것이다.
3. exploit
e = bytes.fromhex('73626960647f6b206821204f21254f7d694f7624662065622127234f726927756d')
d = ''
for i in range(0xff):
for j in range(len(e)):
d += chr(e[j] ^ i)
if d[0] == 'c':
print(d)
d = ''
┌──(kali㉿kali)-[~/Downloads]
└─$ python solve.py
crypto{0x10_15_my_f4v0ur173_by7e}
728x90
반응형
'Wargame > Cryptohack' 카테고리의 다른 글
Greatest Common Divisor (2) | 2023.02.01 |
---|---|
You either know, XOR you don't (0) | 2023.02.01 |
XOR properties (0) | 2023.01.31 |
XOR Starter (0) | 2023.01.31 |
Bytes and Big Integers (0) | 2023.01.31 |