pdb 文件包含多少信息? (C#/.NET)
将 pdb 文件与商业应用程序一起重新分发是否明智?
有时,我会使用堆栈跟踪从已部署的应用程序中获取更详细的错误报告日志; 不依赖这些文件可以实现这个功能吗?
另外,这些文件包含多少原始源代码的提示? 使用它对我的应用程序进行逆向工程会更容易吗?
Is it wise to redistribute the pdb files along with a commercial application?
Occasionally, I'm using the stack trace to get a more detailed error reporting logs from the deployed applications; can this functionality be achieved without relying to those files?
Also, how much hints of the original source code does these files contain? Would it be easier to reverse-engineer my application using it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
它基本上添加了以下信息:
所有这些结合在一起使得本机代码的逆向工程变得非常容易。
幸运的是,您可以创建 PDB 文件的精简版本,其中仅包含 / 的公共信息PDBSTRIPPED 参数。
哦,您编辑添加了 C#/.NET,所以我不确定“PDBSTRIPPED”是否适用。 然而,即使没有任何符号信息,.NET 应用程序也很容易逆向工程。 我不介意将它们包含在 .NET 项目中。
It basically adds information for:
which all combined makes reverse engineering very easy for native code.
Luckily you can create a stripped down version of your PDB files which only contains public information with /PDBSTRIPPED parameter.
Oh you edited to add C#/.NET, so I'm not sure if "PDBSTRIPPED" is applicable. However .NET applications are very easy to reverse engineer even without any symbol information. I wouldn't mind including them in a .NET project.
托管 .pdb 文件包含以下信息:
其他所有内容都包含在二进制文件本身中,包括所有类型、成员和函数参数的名称。
来源:PDB 文件:每个开发人员都必须了解。
The managed .pdb files contain the following information:
Everything else is contained in the binary itself, including the names of all types, members and function arguments.
Source: PDB files: what every developer must know.
您可以尝试使用 dia2dump 来查看内容。
You could try using dia2dump to look at the contents.
较新的 .Net 编译器版本可以在 PDB 文件中嵌入带有所有注释的完整源代码。
免费的 JetBrains dotPeek 反编译器使用此 Blob 来显示反编译的代码。 检查装配 -> 元数据-> 便携式 PDB 元数据 -> 自定义调试信息-> 种类:guid 0003 0E8A571B-6926-466E-B4AD-8AB04611F5FE(嵌入式源)。
此处记录了这一点:
https:// github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/specs/PortablePdb-Metadata.md#EmbeddedSource
Newer .Net compiler versions can embed the full source code with all comments in the PDB file.
The free JetBrains dotPeek decompiler uses this Blob to show the decompiled code. Check Assembly -> Metadata -> Portable PDB Metadata -> CustomDebugInformation -> Kind: guid 0003 0E8A571B-6926-466E-B4AD-8AB04611F5FE (Embedded Source).
This is documented here:
https://github.com/dotnet/corefx/blob/master/src/System.Reflection.Metadata/specs/PortablePdb-Metadata.md#EmbeddedSource
PDB 文件还包括源文件的所有注释。 因此,使用 EXE 和 PDB 文件可以从原始源代码生成 1:1 副本。
The PDB-files also include all comments of your source files. So with EXE AND PDB-file it is possible to generate a 1:1-copy from your original source code.