types

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addr

type Addr uint64

func (Addr) MarshalJSON

func (a Addr) MarshalJSON() ([]byte, error)

func (Addr) MarshalText added in v0.0.8

func (a Addr) MarshalText() ([]byte, error)

func (Addr) String

func (a Addr) String() string

func (*Addr) UnmarshalJSON

func (a *Addr) UnmarshalJSON(b []byte) error

func (*Addr) UnmarshalText added in v0.0.8

func (a *Addr) UnmarshalText(b []byte) error

type BinaryRegexp

type BinaryRegexp struct {
	// contains filtered or unexported fields
}

func MustCompile

func MustCompile(expr string) *BinaryRegexp

func (*BinaryRegexp) FindBytesMatchStartingAt

func (b *BinaryRegexp) FindBytesMatchStartingAt(bytes []byte, startAt int) (*binexp.Match, error)

func (*BinaryRegexp) FindNextMatch

func (b *BinaryRegexp) FindNextMatch(m *binexp.Match) (*binexp.Match, error)

func (*BinaryRegexp) FindNextOverlappingMatch

func (b *BinaryRegexp) FindNextOverlappingMatch(m *binexp.Match) (*binexp.Match, error)

func (*BinaryRegexp) String

func (b *BinaryRegexp) String() string

type EntropyQualityIndex

type EntropyQualityIndex float64

type Fingerprint

type Fingerprint map[GadgetId][]Addr

func FingerprintFromGadgets

func FingerprintFromGadgets(gadgetInstances []*GadgetInstance) (Fingerprint, error)

func (Fingerprint) CompareTo

func (f1 Fingerprint) CompareTo(f2 Fingerprint, includeSurvived bool) FingerprintComparison

type FingerprintComparison

type FingerprintComparison struct {
	Survived            int                            `json:"survived"`
	Moved               int                            `json:"moved"`
	Dead                int                            `json:"dead"`
	GadgetsByOffset     map[Offset]int                 `json:"gadgetCountsByOffset"`
	GadgetDisplacements map[Addr]map[GadgetId][]Offset `json:"gadgetDisplacements"`
	NewGadgets          map[GadgetId][]Addr            `json:"newGadgets"`
}

type Gadget

type Gadget []*Instruction

func (Gadget) Bytes

func (g Gadget) Bytes() []byte

func (Gadget) InstructionString

func (g Gadget) InstructionString() string

func (Gadget) Len

func (g Gadget) Len() int

type GadgetDecoderFunc

type GadgetDecoderFunc func([]byte) (Gadget, error)

type GadgetId

type GadgetId string

type GadgetInstance

type GadgetInstance struct {
	Address Addr   `json:"address"`
	Gadget  Gadget `json:"gadget"`
}

func (*GadgetInstance) String

func (gi *GadgetInstance) String() string

type GadgetInstances

type GadgetInstances []*GadgetInstance

func (GadgetInstances) SortAlphabetically

func (gis GadgetInstances) SortAlphabetically()

func (GadgetInstances) SortByAddress

func (gis GadgetInstances) SortByAddress()

func (GadgetInstances) SortByLength

func (gis GadgetInstances) SortByLength()

func (GadgetInstances) String

func (gis GadgetInstances) String() string

type GadgetSpec

type GadgetSpec struct {
	Opcode *BinaryRegexp
	Size   int
	Align  Addr
}

Specifies the termination conditions for a gadget A gadget is typically <Some instruction set> + <some termination condition> A termination is a control-flow change

type Instruction

type Instruction struct {
	Octets Octets `json:"octets"`
	DisAsm string `json:"disasm"`
}

func (*Instruction) String

func (i *Instruction) String() string

type InstructionDecoderFunc

type InstructionDecoderFunc func([]byte) (*Instruction, error)

type InstructionInstance added in v0.0.8

type InstructionInstance struct {
	Address Addr   `json:"address"`
	Octets  Octets `json:"octets"`
	DisAsm  string `json:"disasm"`
}

func MakeInstructionInstance added in v0.0.8

func MakeInstructionInstance(instruction *Instruction, address Addr) *InstructionInstance

type Library

type Library struct {
	Path            string `json:"path"`
	PolyverseTained bool   `json:"polyverseTainted"`
}

type Octets

type Octets []byte

func (Octets) MarshalJSON

func (o Octets) MarshalJSON() ([]byte, error)

func (Octets) String

func (o Octets) String() string

func (*Octets) UnmarshalJSON

func (o *Octets) UnmarshalJSON(b []byte) error

type Offset

type Offset int64

func (Offset) MarshalJSON

func (o Offset) MarshalJSON() ([]byte, error)

func (Offset) MarshalText

func (o Offset) MarshalText() ([]byte, error)

func (Offset) String

func (o Offset) String() string

func (*Offset) UnmarshalJSON

func (o *Offset) UnmarshalJSON(b []byte) error

func (*Offset) UnmarshalText

func (o *Offset) UnmarshalText(b []byte) error

type Process

type Process struct {
	Info      *process.ProcessInfo `json:"info"`
	Libraries []Library            `json:"libraries"`
}

type RegionsResult added in v0.0.10

type RegionsResult struct {
	Span    *memaccess.MemoryRegion  `json:"span"`
	Size    uint                     `json:"size"`
	Regions []memaccess.MemoryRegion `json:"regions"`
}

Jump to

Keyboard shortcuts

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