How to use Acheron to modify Go programs and try to bypass antivirus product detection.

0 35
The Acheron tool can add the ability to perform indirect system calls to Golang...

How to use Acheron to modify Go programs and try to bypass antivirus product detection.

The Acheron tool can add the ability to perform indirect system calls to Golang programs and use this to bypass user mode hooks andInstruction callbackDetected antivirus products/EDR.

Feature characteristics

1. No other dependent components are required;

2. Developed based on pure Go language or Go assembly;

3. Support custom string encryption and hash functions to counter static code analysis;

Tool operation mechanism

When a new system call proxy instance is created, the tool will perform the following steps:

1. Traverse the PEB and retrieve the base address of ntdll.dll in memory;

2. Parse the export directory and retrieve the address of each exported function;

3. Calculate the number of system services for each Zw* function;

4. Enumerate clean syscall in ntdll.dll;ret tool;

5. Create a proxy instance to send indirect/direct system calls;

Tool download

Since this tool is developed based on Golang, we first need to install and configure the Golang environment on the local device.

Next, researchers can use the following command to clone the project source code locally:

git clone https://github.com/f1zm0/acheron.git

Or use go get command to download Acheron:

go get -u github.com/f1zm0/acheron

Tool usage

After the download is complete, we just need to call acheron.New() in the code to create a system call proxy instance, and use acheron.Syscall() to send indirect system calls to Nt* API.

Simplified example:

package main

 

import (

"fmt"

"unsafe"

 

"github.com/f1zm0/acheron"

)

 

func main() {

var (

baseAddr uintptr

hSelf = uintptr(0xffffffffffffffff)

)

 

// creates Acheron instance, resolves SSNs, collects clean trampolines in ntdll.dlll, etc.

ach, err := acheron.New()

if err != nil {

panic(err)

}

 

// indirect syscall for NtAllocateVirtualMemory



if retcode, err := ach.Syscall(

s1,                                 // function name hash

hSelf,                             // arg1: _In_   HANDLE ProcessHandle,

uintptr(unsafe.Pointer(&baseAddr)),   // arg2: _Inout_  PVOID *BaseAddress,

uintptr(unsafe.Pointer(nil)), // arg3: _In_ ULONG_PTR ZeroBits

0x1000, // arg4: _Inout_ PSIZE_T RegionSize,

windows.MEM_COMMIT|windows.MEM_RESERVE, // arg5: _In_ ULONG AllocationType,

windows.PAGE_EXECUTE_READWRITE, // arg6: _In_ ULONG Protect

); err != nil {

panic(err)

}

fmt.Printf(

"allocated memory with NtAllocateVirtualMemory (status: 0x%x)\n",

retcode,

)

 

// ...

}

Tool usage example

Example

Description

sc_inject

Process injection PoC, supporting direct/indirect system calls

process_snapshot

Use indirect system calls to obtain process snapshot

custom_hashfunc

Sample usage of custom encryption/hashing functions

License Agreement

The development and release of this project followMITOpen Source License Agreement.

Project address

Acheron:【GitHub Gateway

Reference materials

https://github.com/klezVirus/SysWhispers3

https://github.com/crummie5/FreshyCalls

https://github.com/thefLink/RecycledGate

https://winternl.com/detecting-manual-syscalls-from-user-mode/

https://www.usenix.org/legacy/events/vee06/full_papers/p154-bhansali.pdf

https://redops.at/en/blog/direct-syscalls-a-journey-from-high-to-low

你可能想看:

d) Adopt identification technologies such as passwords, password technologies, biometric technologies, and combinations of two or more to identify users, and at least one identification technology sho

Article 2 of the Cryptography Law clearly defines the term 'cryptography', which does not include commonly known terms such as 'bank card password', 'login password', as well as facial recognition, fi

It is possible to perform credible verification on the system boot program, system program, important configuration parameters, and application programs of computing devices based on a credible root,

Announcement regarding the addition of 7 units as technical support units for the Ministry of Industry and Information Technology's mobile Internet APP product security vulnerability database

How to decrypt the encrypted data of the mini-program without conducting an audit

EMOTET banking trojan is still active: shellcode release methods, infrastructure updates, and traffic encryption

After studying, we classify the aforementioned AMSI components according to the documents provided by Microsoft:

In today's rapidly developing digital economy, data has become an important engine driving social progress and enterprise development. From being initially regarded as part of intangible assets to now

HTTP data packets & request methods & status code judgment & brute force encryption password & exploiting data packets

How to conduct offensive and defensive exercise risk assessment for AI systems: Red Teaming Handbook

最后修改时间:
admin
上一篇 2025年03月29日 19:12
下一篇 2025年03月29日 19:34

评论已关闭