arm64

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Xor

func Xor(data []byte, key []byte) ([]byte, error)

Xor encodes an arm64 payload using a basic XOR scheme and a small aarch64 decoder stub (prepended) which allocates a RW buffer, decodes into it, marks it RX, then jumps to the decoded payload. This avoids in-place writes (W^X-friendly loaders may map the initial shellcode RX).

func XorDynamic

func XorDynamic(data []byte, key []byte) ([]byte, error)

XorDynamic encodes an arm64 payload using a dynamic XOR scheme with:

stub + key + keyTerm + encodedPayload + payloadTerm

If key includes a trailing key terminator + payload terminator (3 bytes) that satisfy the encoder constraints, those are used verbatim.

Note: For large/high-entropy payloads, a 2-byte payload terminator may not exist. In that case, this implementation falls back to a 4-byte payload terminator.

func XorDynamicKeyGen

func XorDynamicKeyGen() ([]byte, error)

XorDynamicKeyGen returns a random key suitable for the XOR dynamic encoder.

func XorKeyGen

func XorKeyGen() ([]byte, error)

XorKeyGen returns a random key suitable for the XOR encoder.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL