首页
社区
课程
招聘
[转帖]Reverse Engineering Go Binaries with Ghidra
2020-11-18 19:18 1846

[转帖]Reverse Engineering Go Binaries with Ghidra

2020-11-18 19:18
1846

Reverse Engineering Go Binaries with Ghidra

Go (also called Golang) is an open source programming language designed by Google in 2007 and made available to the public in 2012. It gained popularity among developers over the years, but it’s not always used for good purposes. As it often happens, it attracts the attention of malware developers as well.

Using Go is a tempting choice for malware developers because it supports cross-compiling to run binaries on various operating systems. Compiling the same code for all major platforms (Windows, Linux, macOS) make the attacker’s life much easier, as they don’t have to develop and maintain different codebases for each target environment.


The Need to Reverse Engineer Go Binaries

Some features of the Go programming language give reverse engineers a hard time when investigating Go binaries. Reverse engineering tools (e.g. disassemblers) can do a great job analyzing binaries that are written in more popular languages (e.g. C, C++, .NET), but Go creates new challenges that make the analysis more cumbersome.

Go binaries are usually statically linked, which means that all of the necessary libraries are included in the compiled binary. This results in large binaries, which make malware distribution more difficult for the attackers. On the other hand, some security products also have issues handling large files. That means large binaries can help malware avoid detection. The other advantage of statically linked binaries for the attackers is that the malware can run on the target systems without dependency issues.

As we saw a continuous growth of malware written in Go and expect more malware families to emerge, we decided to dive deeper into the Go programming language and enhance our toolset to become more effective in investigating Go malware.

In this article, I will discuss two difficulties that reverse engineers face during Go binary analysis and show how we solve them.

Ghidra is an open source reverse engineering tool developed by the National Security Agency, which we frequently use for static malware analysis. It is possible to create custom scripts and plugins for Ghidra to provide specific functionalities that researchers need. We used this feature of Ghidra and created custom scripts to aid our Go binary analysis.

The topics discussed in this article were presented at the Hacktivity2020 online conference. The slides and other materials are available in our Github repository.


https://cujo.com/reverse-engineering-go-binaries-with-ghidra/


[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
点赞1
打赏
分享
最新回复 (2)
雪    币: 85263
活跃值: (198560)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
linhanshi 2020-11-18 19:46
2
0

谢谢会员Hey~world

https://pan.baidu.com/s/1_tXYaO6uckjhPJAun5Bp0w 

pass:zrgd 


雪    币: 41
活跃值: (198)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
sqhua 2020-11-18 22:49
3
0
看了一下,大概是Linux下的文件会有_gopclntab段,可以从中识别出函数名和地址。但如果是编译到Win的PE文件则只能根据Go的共用函数的特征来定位到用户自定义函数了。
游客
登录 | 注册 方可回帖
返回