proxytoworld
V2EX  ›  问与答

为什么 go build -ldflags "-s -w" 生成的 exe 在逆向之后仍然保留了包名和函数名

  •  
  •   proxytoworld · May 15, 2024 · 1416 views
    This topic created in 729 days ago, the information mentioned may be changed or developed.

    例如我有 awesome.util.Func 函数,使用 ida 反编译,在生成的 exe 内调用该函数的位置会有完整的awesome_util_Func名字,从而逆向出一部分信息。

    感觉符号去除的不够彻底啊,有什么办法可用将其路径完全去除吗?

    4 replies    2024-05-15 23:20:28 +08:00
    serialt
        1
    serialt  
       May 15, 2024
    go build -trimpath -ldflags "-s -w"
    hingle
        2
    hingle  
       May 15, 2024
    包名不知道,函数名没办法去除吧?不然反射都用不了
    proxytoworld
        3
    proxytoworld  
    OP
       May 15, 2024
    @serialt 这个有点用
    Zy143L
        4
    Zy143L  
       May 15, 2024 via Android
    有个工具叫做 gostrip 可以了解下
    或者 go 的混淆编译
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1259 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 23:39 · PVG 07:39 · LAX 16:39 · JFK 19:39
    ♥ Do have faith in what you're doing.