修改后DLL未加载
我有一个 dll,其中存在一些文本,例如 myname,现在我想将其更改为 mynaam。当我在 Windows 中用记事本打开 DLL 时,我可以看到 myname,我将其更改为 mynaam 并保存。但我的应用程序甚至没有加载这个 dll。由于 myname 和 mynaam 具有相同的大小,因此 dll 不会损坏。请提出建议,这对我来说会有很大的帮助。我需要使用任何二进制编辑器或十六进制编辑器来执行此操作吗?
我观察到另一件事是我已将原始 dll 重命名为其他名称,并使用原始名称制作了此修改后的 dll。然后,即使名称不同,应用程序仍会识别旧的 DLL。我想知道 Windows 如何检查库。请就此提出建议,
谢谢 StackOverFlow......
Sunny
I have a dll in which some text like myname is present and now i wanted to change it to mynaam. When i open the DLL with notepad in windows i am able to see the myname and i am changing this to mynaam and saving it. But my application is not even loading this dll. As myname and mynaam are having the same size the dll won't corrupt. Please suggest on this it would be a great help for me. Do i need to use any binary editor or hex editor to do this?
I Observed another thing that i have renamed my original dll to some other name and made this modified dll with the original name. Then the application is still identifying the old DLL even though the name is different. I wonder how windows checks for a library. Please suggest on this also
Thanks StackOverFlow.....
Sunny
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不建议这样做,但这是可能的。我以前也做过一次类似的事情。您将需要使用一些好的十六进制编辑器。您唯一可以更改的是字符串内容。该字符串必须在 .data 节中静态分配(全局变量或 C 外部链接编译变量,其内容最初设置为某个非空字符串)。接下来尝试使用 PE 二进制文件中的十六进制编辑器找到该字符串内容。找到它后,您可以随意更改实际的字符串内容 - 只需用新内容覆盖旧内容即可。提示 - 新内容的长度不得超过旧内容的长度(包括空终止符)。替换旧内容时 - 不要忘记将空终止符明确地放在新字符串的末尾。提示 - 覆盖内容但强烈不要添加一些新字节。
此致,亚历克斯。
It is not recommended to do that but it is possible though. I did something like that once before. You will need to use some good hex editor. The only thing that you can change is string content. The string must be statically allocated within .data section(Global variable or C extenally linkage compiled variable with the contents initially set to some non-empty string). Next try to locate this string content with the HEX editor within your PE binary. After you managed to find it you are free to change the actual string content - just overwrite the old content with a new one. Hint - The length of a new content must not exceed the length of an old one including null terminator. When replacing an old content - don't forget to put null terminator explicitly in the end of a new string. Hint - OVERWRITE content but strongly DON'T ADD some new bytes.
Sincerely yours, Alex.
试试这个:http://www.hexworkshop.com/
Try this: http://www.hexworkshop.com/