NHNC official writeUP
b@by_r3v3rs3
difficulty 2/10
as the question we can get a web assembling file when we download it as we need do disassemble the web assembling to c we can use
a tool call wabt
and how to use it just do
1 | wasm2c b@by_r3v3rs3.wasm -o main.c |
and we can get a c file
as seeing the code we know it is AES and also can know the key has been xor
1 | static const u8 data_segment_data_w2c_challenge_d1[] = { |
we know how to write an exploit
so mine official exploit is
1 | from pwn import * |
clannad_is_g00d_anim3
difficulty 3/10
at first see the source
1 |
|
as we can see the code has use a things call gets()
so we can do buffer overflow. Note that the stack needs to be aligned to a 16-byte boundary because of the calling convention of x86_64.
As we put it into the debugger you can find out you can just use the address 0x4011bb
final exploit:
1 | from pwn import * |