EgeBalci/amber

Reflective PE packer.

Go

1,443

11 commits

updated Feb 22, 2024

See the code

README


Inroduction

Amber is a position-independent(reflective) PE loader that enables in-memory execution of native PE files(EXE, DLL, SYS...). It enables stealthy in-memory payload deployment that can be used to bypass anti-virus, firewall, IDS, IPS products, and application white-listing mitigations. Reflective payloads generated by Amber can either be staged from a remote server or executed directly in memory much like a generic shellcode. By default, every generated payload is encoded using the new generation SGN encoder. Amber uses CRC32_API and IAT_API for inconspicuously resolving the Windows API function addresses. After the PE file is loaded and executed in memory, the reflective payload is erased for evading memory scanners.

Installation

Pre-compiled binaries can be found under releases.

Building From Source

The only dependency for building the source is the keystone engine, follow these instructions for installing the library. Once libkeystone is installed on the system, simply just go get it ツ

go install github.com/EgeBalci/amber@latest

Docker Install

Docker

docker pull egee/amber
docker run -it egee/amber

Usage

The following table lists switches supported by the amber.

SwitchTypeDescription
-f,--filestringInput PE file.
-o,--outstringOutput binary payload file name.
-eintNumber of times to encode the generated reflective payload
--iatboolUse IAT API resolver block instead of CRC API resolver block
-lintMaximum number of bytes for obfuscation (default 5)
--sysboolPerform raw syscalls. (only x64)
--scrapeboolScrape magic byte and DOS stub from PE.

Example Usage

  • Generate reflective payload.
amber -f test.exe
  • Generate reflective payload with IAT API resolver and encode the final payload 10 times.
amber -e 10 --iat -f test.exe

Docker Usage

docker run -it -v /tmp/:/tmp/ amber -f /tmp/file.exe

Demo

amber
assembly
crypter
packer
payload
pe
shellcode
shellcode-loader
stub

EgeBalci/amber

Reflective PE packer.

Go

1,443

11 commits

updated Feb 22, 2024

See the code

README


Inroduction

Amber is a position-independent(reflective) PE loader that enables in-memory execution of native PE files(EXE, DLL, SYS...). It enables stealthy in-memory payload deployment that can be used to bypass anti-virus, firewall, IDS, IPS products, and application white-listing mitigations. Reflective payloads generated by Amber can either be staged from a remote server or executed directly in memory much like a generic shellcode. By default, every generated payload is encoded using the new generation SGN encoder. Amber uses CRC32_API and IAT_API for inconspicuously resolving the Windows API function addresses. After the PE file is loaded and executed in memory, the reflective payload is erased for evading memory scanners.

Installation

Pre-compiled binaries can be found under releases.

Building From Source

The only dependency for building the source is the keystone engine, follow these instructions for installing the library. Once libkeystone is installed on the system, simply just go get it ツ

go install github.com/EgeBalci/amber@latest

Docker Install

Docker

docker pull egee/amber
docker run -it egee/amber

Usage

The following table lists switches supported by the amber.

SwitchTypeDescription
-f,--filestringInput PE file.
-o,--outstringOutput binary payload file name.
-eintNumber of times to encode the generated reflective payload
--iatboolUse IAT API resolver block instead of CRC API resolver block
-lintMaximum number of bytes for obfuscation (default 5)
--sysboolPerform raw syscalls. (only x64)
--scrapeboolScrape magic byte and DOS stub from PE.

Example Usage

  • Generate reflective payload.
amber -f test.exe
  • Generate reflective payload with IAT API resolver and encode the final payload 10 times.
amber -e 10 --iat -f test.exe

Docker Usage

docker run -it -v /tmp/:/tmp/ amber -f /tmp/file.exe

Demo

amber
assembly
crypter
packer
payload
pe
shellcode
shellcode-loader
stub

Significant stargazers

g0tmi1k

3,562 followers · starred Jun 2018

Asuna

756 followers · starred Mar 2023

Alex

538 followers · starred May 2022

Romain Thomas

752 followers · starred Oct 2017