XCTF EasyRE

1. Check the shell
Insert picture description here
without shell, and found that it was compiled by vc ++
. 2. Drag into ida, to static analysis, this question makes me deeply feel the assembly of nb.
Insert picture description here
Insert picture description here
This paragraph is a spiritual one. From the standpoint of static statements, I found that there is nothing to analyze, I can only guess. I guessed at the time that the input string was assigned to a new character array. Later, write the script there is a problem, has been garbled, and return analysis, combined with wp know, this thing, depending on compile, compile again I read it again, I realized that 2333 reverse order,
Insert picture description here
is this, a careful analysis down, Can know, and then write out the script flag and it comes out.
Three. Script

res=[0x78, 0x49, 0x72, 0x43, 0x6A, 0x7E, 0x3C, 0x72, 0x7C, 0x32, 0x74, 0x57, 0x73, 0x76, 0x33, 0x50, 0x74, 0x49, 0x7F, 0x7A, 0x6E, 0x64, 0x6B, 0x61]
print(len(res))
flag=""
for i in range(len(res)):
    flag+=chr((res[23-i]^6)-1)
print(flag)

4. To summarize
this question, the encryption algorithm itself is not difficult, an XOR and addition, count as an entry, I feel the test is whether I will read the compilation, this is also my thinking, I found F5 when I came up, and then did not go Compilation, to be improved in the future.

161 original articles published · Liked 14 · Visitors 7617

Guess you like

Origin blog.csdn.net/YenKoc/article/details/105183873