使用 IDA Pro 5 进行逆向工程简单应用程序
该应用程序是 hackthissite.org 网站上的第一个应用程序挑战。
这个想法是找到连续剧。当您输入序列号并按“确定”时,如果正确,则会弹出一个消息框,其中包含质询密码,否则会弹出一条消息,提示序列号错误。 为了解决这个挑战,你应该找到二进制文件中 0x1670FE 处的明文密码。
我试图找到 IDA Pro,将您输入的字符串与二进制文件中的序列进行比较。
我希望能够找到它的比较位置,能够更改跳转以允许它接受任何错误的密码,或者更改它以使其接受任何密码。
我似乎无法做到这一点。我找到了显示消息框的位置(通过搜索 Messagebox 并添加断点),它将“抱歉”或“正确”字符串的地址推入堆栈。
我尝试在这些字符串的地址和串行本身上添加断点,但它似乎不起作用。 IDA 似乎无法将这些识别为字符串,它们不会显示在字符串窗口中。
我也尝试过跟踪这个函数,但我已经达到了似乎无法再返回的地步。
任何帮助、信息或提示将不胜感激。我真的很想知道如何解决这种问题。
抱歉,如果这是一个非常基本的问题。
谢谢。
This application is the first application challenge on the site hackthissite.org.
The idea is to find the serial. When you enter the serial number and press ok, it pops up a message box with a password for the challenge if correct, or a message saying the serial is wrong.
To solve the challenge you are supposed to find the password which is in plaintext in the binary at 0x1670FE.
I was trying to find IDA Pro where the string you enter is compared to the serial in the binary.
I want to be able to find where it's compared, be able to change the jump to allow it to accept any wrong password, or change it so it accepts any password.
I can't seem to do this. I've found where the message box is displayed (by searching for Messagebox and adding breakpoints), where it pushes the addresses of the "Sorry" or "Correct" strings on to the stack.
I've tried adding breakpoints on the addresses of these strings and on the Serial itself, but it doesn't seem to work.
IDA doesn't seem to recognise these as strings, they don't show up in the sting window.
I've also tried to follow this function back but I reach a point where I can't seem to go back any further.
Any help, information, or tips would be greatly appreciated. I really want to know how to figure this kind of problem out.
Sorry if it is a very basic question.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我无法使用 IDA Pro 解决这个问题,所以我尝试使用 Ollydbg。
通过将序列设置为“TEST”之类的内容,在按“验证”后,我能够在内存中或序列本身中找到该字符串。
通过在串行内存访问上设置断点,我能够向后工作并找到比较两个字符串的比较字符串函数。
稍后,它检查 edx 是否大于 2 并执行跳转。我将其设置为无条件跳转,过了一会儿,它似乎再次检查字符串的长度是否相同,我也将其设置为始终为真。
现在,无论您输入什么,程序都会给出密码。
有趣的是,似乎有 5/6 的有效序列,可能是从内存中生成的或从其他地方获取的。当您输入无效序列号时,它将与每个序列号进行比较,直到找到匹配项,然后显示成功或失败的消息框。
遗憾的是我在 IDA Pro 中找不到这个问题的答案,但我认为 ollydbg 是完成这项工作的更好工具。
如果我返回 IDA 并再次查看,我现在可能能够找到支票。
I wasn't able to solve this using IDA Pro, so I gave it a go using Ollydbg.
By setting the serial to something like "TEST", after pressing Authenticate, I was able to find that string in memory or the serial itself.
By setting a breakpoint on the serial memory access, I was able to work backwards and find the comparestring function where it compared the two strings.
A little while after this, it checks if edx is greater than 2 and performs a jump. I set this to an unconditional jump and a little while after that it seems to check again if the strings are the same length, which I set to always true too.
Now the program gives the password regardless of what you enter.
Interestingly, it seems that there is 5/6 valid serials, that maybe it generates from the one in memory or gets from somewhere else. When you enter an invalid serial, it compares it to each of the serials until it finds a match and then displays the message box for success or failure.
It was a pity I couldn't find the answer to this in IDA Pro, but I think ollydbg was the better tool for the job.
If I went back in IDA and looked again, I would probably now be able to find the check.
给出了一个提示,可能你可能没有注意到。它说密码是纯文本格式的。
那么您可以尝试找到更多有关如何了解二进制文件中的字符串的信息吗?
逆向工程并不总是意味着使用反汇编器或调试器打开。
有字符串、十六进制转储等命令,了解更多信息。
希望有帮助。 :)
There is a HINT given, probably you may not have noticed. Its saying that the password is in plain-text format.
So can you try to find more on how to know the strings inside a binary.
Reverse Engineering doesn't always imply opening with a dis-assembler or debugger.
There are commands like strings, hexdump etc., know more on that.
Hope it helps. :)