Documentation ¶
Index ¶
- Constants
- func NewUsercorn(exe string, config *models.Config) (models.Usercorn, error)
- type Unicorn
- func (u *Unicorn) Arch() *models.Arch
- func (u *Unicorn) Assemble(asm string, addr uint64) ([]byte, error)
- func (u *Unicorn) Bits() uint
- func (u *Unicorn) ByteOrder() binary.ByteOrder
- func (u *Unicorn) Disas(addr, size uint64) (string, error)
- func (u *Unicorn) Mappings() []*models.Mmap
- func (u *Unicorn) MemMap(addr, size uint64) error
- func (u *Unicorn) MemMapProt(addr, size uint64, prot int) error
- func (u *Unicorn) MemProtect(addr, size uint64, prot int) error
- func (u *Unicorn) MemReserve(addr, size uint64, force bool) (*models.Mmap, error)
- func (u *Unicorn) MemUnmap(addr, size uint64) error
- func (u *Unicorn) Mmap(addr, size uint64) (*models.Mmap, error)
- func (u *Unicorn) MmapWrite(addr uint64, p []byte) (uint64, error)
- func (u *Unicorn) OS() string
- func (u *Unicorn) PackAddr(buf []byte, n uint64) ([]byte, error)
- func (u *Unicorn) Pop() (uint64, error)
- func (u *Unicorn) PopBytes(p []byte) error
- func (u *Unicorn) Push(n uint64) (uint64, error)
- func (u *Unicorn) PushBytes(p []byte) (uint64, error)
- func (u *Unicorn) ReadRegs(regs []int) ([]uint64, error)
- func (u *Unicorn) RegDump() ([]models.RegVal, error)
- func (u *Unicorn) UnpackAddr(buf []byte) uint64
- type Usercorn
- func (u *Usercorn) Base() uint64
- func (u *Usercorn) BinEntry() uint64
- func (u *Usercorn) Brk(addr uint64) (uint64, error)
- func (u *Usercorn) Config() *models.Config
- func (u *Usercorn) Entry() uint64
- func (u *Usercorn) Exe() string
- func (u *Usercorn) Exit(err error)
- func (u *Usercorn) Gate() *models.Gate
- func (u *Usercorn) InterpBase() uint64
- func (u *Usercorn) Loader() models.Loader
- func (u *Usercorn) Mem() memio.MemIO
- func (u *Usercorn) PrefixPath(path string, force bool) string
- func (u *Usercorn) Printf(f string, args ...interface{})
- func (u *Usercorn) Println(s interface{})
- func (u *Usercorn) RegisterAddr(f *os.File, addr, size uint64, off int64)
- func (u *Usercorn) Run(args []string, env []string) error
- func (u *Usercorn) RunShellcode(addr uint64, code []byte, setRegs map[int]uint64, regsClobbered []int) error
- func (u *Usercorn) RunShellcodeMapped(mmap *models.Mmap, code []byte, setRegs map[int]uint64, regsClobbered []int) error
- func (u *Usercorn) SetEntry(entry uint64)
- func (u *Usercorn) SetExit(exit uint64)
- func (u *Usercorn) Start(pc, end uint64) error
- func (u *Usercorn) StrucAt(addr uint64) *models.StrucStream
- func (u *Usercorn) Symbolicate(addr uint64, includeFile bool) (string, error)
- func (u *Usercorn) Syscall(num int, name string, getArgs func(n int) ([]uint64, error)) (uint64, error)
- func (u *Usercorn) Trampoline(fun func() error) error
Constants ¶
View Source
const ( BASE = 0x100000 UC_MEM_ALIGN = 0x1000 STACK_BASE = 0x60000000 STACK_SIZE = 0x800000 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Usercorn ¶
type Usercorn struct { *Unicorn sync.Mutex StackBase uint64 // contains filtered or unexported fields }
func NewUsercornRaw ¶
func (*Usercorn) InterpBase ¶
func (*Usercorn) RegisterAddr ¶
func (*Usercorn) RunShellcode ¶
func (u *Usercorn) RunShellcode(addr uint64, code []byte, setRegs map[int]uint64, regsClobbered []int) error
maps and runs shellcode at addr if regsClobbered is nil, setRegs will be saved/restored if addr is 0, we'll pick one for you if addr is already mapped, we will return an error so non-PIE is your problem will trampoline if unicorn is already running
func (*Usercorn) RunShellcodeMapped ¶
func (u *Usercorn) RunShellcodeMapped(mmap *models.Mmap, code []byte, setRegs map[int]uint64, regsClobbered []int) error
like RunShellcode but you're expected to map memory yourself
func (*Usercorn) Symbolicate ¶
func (*Usercorn) Trampoline ¶
Click to show internal directories.
Click to hide internal directories.