Home Hackvent 2016 Dec 10: I want to play a Game
Writeup
Cancel

Dec 10: I want to play a Game

Challenge

Reversing Day 1: we’ll start with an easy one.

Gimme that thing!

Solution

we unzip the file and find and a playstation executable:

1
2
3
4
5
6
7
8
9
10
11
12
13
$ strings HV16.EXE
PS-X EXE
Sony Computer Entertainment Inc. for Japan area
0123456789ABCDEF
$Id: sys.c,v 1.140 1998/01/12 07:52:27 noda Exp yos $

[..]

wwc4$
decrypt the flag you n00b
KR40*^d?r!CdhX<w$\`B;G
T{6*,TW
Library Programs (c) 1993-1997 Sony Computer Entertainment Inc., All Rights Reserved.

Hmm, the string KR40*^d?.. looks like it might be an encrypted flag, with some trial and error we find that

1
2
3
4
5
6
7
8
>>> ord('K') ^ ord('H')
3
>>> ord('R') ^ ord('V')
4
>>> ord('4') ^ ord('1')
5
>>> ord('0') ^ ord('6')
6

Ok, that’s a clear pattern! Let’s do it for the whole string!

1
2
3
4
5
6
7
8
9
s="KR40*^d?r!CdhX<w$`B;G\x7fT{6*,TW"

pt=''
count = 3
for c in s:
    pt += chr(ord(c) ^ count)
    count += 1

print pt

Flag

HV16-Vm5y-NjgH-e7tW-PgMa-61JH