I find the kirikiri has some interesting data format and there are some many tools to deal with the special data format such as .xp3
, .tlg
and so on... So I think it will be an interesting challenge about .xp3
file.
- First, use
crass
and you will get many files frommisc.xp3
. I hope you can find there is a hint ing01.ks
:the “Flag” is out there ―― there is a secret in the script and pictures
. - Then, you may find
504B0304
is at the end ofg01.ks
, and other.ks
files also have some strange text like this. If you are familiar withzip
format, you will understand there is a zip file in scripts. - It's easy to write a python script to get the zip file from
g01.ks
~g55.ks
. You will find it is encrypted and you need a key. - You will find the
pic25.tlg
is237KB
while others are50KB
- Use
tlg2png
and make.tlg
=>.png
. You only need to getpic25.tlg.png
and one of others such aspic2.tlg.png
. - Useing BlindWaterMark Tool and you will find the key
Key: NoGalgameNoLife
- With the key, you can get flag from zip:
*ctf{Hope_Every0ne_Has_A_Happy_End2333}
import codecs
from pwn import *
with open('./out.zip', 'w') as f1:
for i in range(1, 56):
ks = './g%02d.ks' % (i)
f2 = codecs.open(ks, 'r', 'utf16')
line = f2.readlines()[-1]
data = line[3::]
f1.write(p32(int(data, 16))[::-1])
f2.close()
Actually you don't need to care about what the text is but someone has read it(lll¬ω¬)
The text is useless since I just want to use long text to make you confused.
This challenge can be solved by basic tool such as crass
, you don't need to find out what the game is and whether you need a special tool.
And, as the flag mentioned, I hope everyone has a happy end~~