Documentation ¶
Index ¶
- Constants
- func BinaryMagic(buf []byte) (int, error)
- func BinaryMagicFile(filename string) (int, error)
- func Binject(sourceBytes []byte, shellcodeBytes []byte, config *BinjectConfig) ([]byte, error)
- func BinjectFile(sourceFile string, destFile string, shellcodeFile string, ...) error
- func ElfBinject(sourceBytes []byte, shellcodeBytes []byte, config *BinjectConfig) ([]byte, error)
- func MachoBinject(sourceBytes []byte, shellcodeBytes []byte, config *BinjectConfig) ([]byte, error)
- func NoteToLoad(elfFile *elf.File, userShellCode []byte, fsize int64) ([]byte, error)
- func PeBinject(sourceBytes []byte, shellcodeBytes []byte, config *BinjectConfig) ([]byte, error)
- func RandomString(len int) string
- type BinjectConfig
- type Cave
Constants ¶
const ( PtNoteInject int = iota SilvioInject = iota )
Injection Methods
const ( // ERROR - constant for an error ERROR = iota // ELF - constant for ELF binary format ELF = iota // MACHO - constant for Mach-O binary format MACHO = iota // FAT - constant for FAT/Mach-O binary format FAT = iota // PE - constant for PE binary format PE = iota // MIN_CAVE_SIZE - the smallest a code cave can be MIN_CAVE_SIZE = 94 )
Variables ¶
This section is empty.
Functions ¶
func BinaryMagic ¶
BinaryMagic - Identifies the Binary Format of a file by looking at its magic number
func BinaryMagicFile ¶
BinaryMagicFile - Identifies the Binary Format of a file by looking at its magic number
func Binject ¶
func Binject(sourceBytes []byte, shellcodeBytes []byte, config *BinjectConfig) ([]byte, error)
Binject - Inject shellcode into a byte array
func BinjectFile ¶
func BinjectFile(sourceFile string, destFile string, shellcodeFile string, config *BinjectConfig) error
BinjectFile - Inject shellcode into a binary file
func ElfBinject ¶
func ElfBinject(sourceBytes []byte, shellcodeBytes []byte, config *BinjectConfig) ([]byte, error)
ElfBinject - Inject shellcode into an ELF binary
func MachoBinject ¶
func MachoBinject(sourceBytes []byte, shellcodeBytes []byte, config *BinjectConfig) ([]byte, error)
MachoBinject - Inject shellcode into an Mach-O binary
func NoteToLoad ¶
NoteToLoad - PT_NOTE to PT_LOAD infection method *********************************** ***********************************
func PeBinject ¶
func PeBinject(sourceBytes []byte, shellcodeBytes []byte, config *BinjectConfig) ([]byte, error)
PeBinject - Inject shellcode into an PE binary
func RandomString ¶
RandomString - generates random string of given length
Types ¶
type BinjectConfig ¶
BinjectConfig - Configuration Settings for the Binject modules