-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,40 @@ | ||
# go-strip | ||
Go编译会自带一堆信息,通过这些信息基本可以还原Go的源码架构。如果是用GO编写的恶意程序,这些信息甚至可以被溯源。 | ||
Go编译会自带一堆信息,通过这些信息基本可以还原Go的源码架构,甚至可以用作溯源。本工具可以直接从go编译好的二进制中消除这些信息。 | ||
|
||
本文就是研究如何消除或者混淆这些信息,文章结尾提供了一款工具,可以一键消除Go二进制中的敏感信息。(还在写文章..) | ||
- 支持Go编译的 Windows、Mac、Linux程序 | ||
- 支持AMD64,386架构 | ||
|
||
## Useage | ||
go编译出二进制, | ||
``` | ||
go build -ldflags "-s -w" . | ||
``` | ||
之后即可使用工具进行混淆消除 | ||
``` | ||
_ _ | ||
| | (_) | ||
__ _ ___ ______ ___| |_ _ __ _ _ __ | ||
/ _ |/ _ \______/ __| __| '__| | '_ \ | ||
| (_| | (_) | \__ \ |_| | | | |_) | | ||
\__, |\___/ |___/\__|_| |_| .__/ | ||
__/ | | | | ||
|___/ |_| | ||
Usage of go-strip: | ||
-a 是否消除Go的编译信息 | ||
-f string | ||
源文件名 | ||
-output string | ||
另保存的文件名 | ||
``` | ||
执行 | ||
``` | ||
go-strip -f binary.exe | ||
``` | ||
将会打印出读取的信息 | ||
|
||
执行 | ||
``` | ||
go-strip -f binary.exe -a -output new.exe | ||
``` | ||
new.exe即是混淆后的二进制文件 |