传送 PDB 文件是否会使混淆在 .net 中变得毫无用处?

发布于 2024-12-02 06:02:40 字数 249 浏览 0 评论 0原文

如果我使用 Eazfuscator 混淆 vb.net 程序集并打开符号名称加密(以便我可以使用 Eazfuscator 堆栈跟踪解码器),如果我发送 PDB 文件,这是否会有效地撤消?我想发送 PDB 文件,以便在错误报告中返回给我的堆栈跟踪中获取行号。

我知道我可以通过保留发布版本的 PDB 文件来获取行号,但这是我现在不需要的额外复杂层,我将在将来实现它。我只是想确保我没有通过包含 PDB 文件来有效地传送非混淆代码。

预先感谢您的任何建议。

If I obfuscate a vb.net assembly using Eazfuscator with symbol names encryption turned on (so that I can use the Eazfuscator stack trace decoder), is this effectively undone if I ship the PDB file? I want to ship the PDB file so that I get line numbers in stack traces that are sent back to me in error reports.

I know I can get line numbers by keeping the PDB file for the shipped version but this is an extra layer of complexity that I don't need right now, I will implement this in the future. I just want to make sure I am not effectively shipping non-obfuscated code by including the PDB file.

Thanks in advance for any advice.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

葬シ愛 2024-12-09 06:02:40

PDB 不包含实际代码。但我有一种强烈的感觉,混淆后 PDB 将与二进制不兼容。 以下是 PDB 内部的内容

  • 公共、私有和静态函数地址
  • 全局变量名称
    和地址
  • 参数和局部变量名称和偏移量,其中
    在堆栈上找到它们
  • 类型数据由类、结构组成,
    和数据定义
  • 帧指针省略(FPO)数据,这是
    在 x86 上进行本机堆栈的关键
  • 源文件名及其行据

我所知,混淆会破坏非公共类型、方法、参数等内容。因此,如果它不更改原始 IL 偏移量,则显示行号可能会起作用,但它会提供一些实际上被混淆的信息,问题是否可以恢复。

如果您非常关心反混淆,我建议添加丰富的日志记录。

PDBs don't contain actual code. But I have a strong feeling that after obfuscation PDB will be incompatible with binary. Here is what located inside PDB:

  • Public, private, and static function addresses
  • Global variable names
    and addresses
  • Parameter and local variable names and offsets where
    to find them on the stack
  • Type data consisting of class, structure,
    and data definitions
  • Frame Pointer Omission (FPO) data, which is the
    key to native stack walking on x86
  • Source file names and their lines

As far as I understand obfuscation will ruin things like non-public types, methods, parameters etc. So if it doesn't change original IL offsets, showing line numbers might work, but it will provide some information that was actually obfuscated, question is it recoverable or not.

What I suggest is to add rich logging if you are very concerned about deobfuscation.

小ぇ时光︴ 2024-12-09 06:02:40

不,传送 PDB 文件并不会使混淆变得无用。但请注意,PDB 文件可以包含局部变量的名称,因此这是像 Reflector 这样的反汇编器可以使用的另一条信息。 PDB 文件还可以包含源代码文件的完整路径,但是,这在泄露敏感信息方面很少造成任何损害。

一些混淆器如 Crypto Obfuscator 支持 PDB 文件生成 - 混淆后,它输出新的 PDB与混淆的程序集同步的文件,以便您的堆栈跟踪保持正确。此外,PDB文件包含上述源代码文件的混淆名称。它还从 PDB 文件中删除所有局部变量名称。

免责声明:我在 LogicNP Software 工作,该公司是 Crypto Obfuscator 的开发者。

No, shipping PDB files does not make obfuscation useless. Note however that PDB files can contain names of local variables so that is another piece of information which a disassembler like Reflector can use. PDB files can also contain full paths of the source code files, however, this rarely does any harm in terms of revealing sensitive information.

Some obfuscators like Crypto Obfuscator support PDB file generation - after obfuscation, it outputs new PDB files which are in sync with the obfuscated assemblies so that your stack traces remain correct. Further, the PDB files contain obfuscated names of the source code files mentioned above. It also strips all local variable names from the PDB files.

DISCLAIMER: I work for LogicNP Software, the developer of Crypto Obfuscator.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文