CG-CTF 480 hours proficient in C ++

1. Drag it into ida and see
Insert picture description here
it is a bit different from the previous question. The difference is that this program is equivalent to printing the unencrypted string directly, but The Encrypted is caught my attention, so I went See if there is an encryption function, the result is really there, a bunch, but in the main method, I found the real encryption function, I
Insert picture description here
probably know what this question is to test, it is to test a patch, a bit similar to the kind of brainless blasting, od Change the assembly inside and arrange it directly, dynamic debugging at the assembly level, similar to od.
Insert picture description here
A bunch of nop, seeing other masters wp said it was smc, personally did not feel it, maybe my smc is also rare, and it can be done as normal.
Insert picture description here
ALT + SHIFT + K Open the patcher and modify it directly. At the same time, this parameter is the address of the flag and the length of the flag. You can modify the register. Then F7 enters, and then F9. I also set a breakpoint in the function.
Insert picture description here
Here is the encrypted thing, just take the website to decrypt it, and you should pay attention to the little-endian storage, so you need to reverse the order

161 original articles published · Liked 14 · Visitors 7617

Guess you like

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