Documentation
¶
Index ¶
- func Xor(data []byte, key []byte) ([]byte, error)
- func XorDynamic(data []byte, key []byte) ([]byte, error)
- func XorDynamicKeyGen() ([]byte, error)
- func XorDynamicKeyGenForPayload(data []byte, badChars []byte) ([]byte, error)
- func XorDynamicWithBadChars(data []byte, key []byte, badChars []byte) ([]byte, error)
- func XorKeyGen() ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func XorDynamic ¶
XorDynamic encodes an amd64 payload using the Metasploit x64/xor_dynamic scheme. 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 ¶
XorDynamicKeyGen returns a random key suitable for the XOR dynamic encoder.
func XorDynamicKeyGenForPayload ¶ added in v1.7.6
XorDynamicKeyGenForPayload returns a payload-aware key whose encoded bytes avoid badChars. Empty badChars use the xor_dynamic defaults.
func XorDynamicWithBadChars ¶ added in v1.7.6
XorDynamicWithBadChars encodes an amd64 payload while excluding badChars from the complete output. Empty badChars use the xor_dynamic defaults.
Types ¶
This section is empty.