miasm
Reverse engineering framework
|
Public Member Functions | |
def | __init__ (self) |
def | next_fd (self) |
def | clock_gettime (self) |
def | open_ (self, path, flags, follow_link=True) |
def | socket (self, family, type_, protocol) |
def | fstat (self, fd) |
def | stat (self, path) |
def | lstat (self, path) |
def | close (self, fd) |
def | write (self, fd, data) |
def | read (self, fd, count) |
def | getdents (self, fd, count, packing_callback) |
def | ioctl (self, fd, cmd, arg) |
def | mmap (self, addr, len_, prot, flags, fd, off, vmmngr) |
def | brk (self, addr, vmmngr) |
Public Attributes | |
filesystem | |
network | |
brk_current | |
Static Public Attributes | |
platform_arch = None | |
int | user_uid = 1000 |
int | user_euid = 1000 |
int | user_gid = 1000 |
int | user_egid = 1000 |
string | user_name = b"user" |
int | brk_current = 0x74000000 |
int | mmap_current = 0x75000000 |
string | sys_sysname = b"Linux" |
string | sys_nodename = b"user-pc" |
string | sys_release = b"4.13.0-19-generic" |
string | sys_version = b"#22-Ubuntu" |
sys_machine = None | |
string | filesystem_base = "file_sb" |
file_descriptors = None | |
int | process_tid = 1000 |
int | process_pid = 1000 |
ioctl_allowed = None | |
ioctl_disallowed = None | |
int | base_time = 1531900000 |
O_ACCMODE = None | |
O_CLOEXEC = None | |
O_DIRECTORY = None | |
O_LARGEFILE = None | |
O_NONBLOCK = None | |
O_RDONLY = None | |
A LinuxEnvironment regroups information to simulate a Linux-like environment
def miasm.os_dep.linux.environment.LinuxEnvironment.__init__ | ( | self | ) |
def miasm.os_dep.linux.environment.LinuxEnvironment.brk | ( | self, | |
addr, | |||
vmmngr | |||
) |
Stub for 'brk' syscall
def miasm.os_dep.linux.environment.LinuxEnvironment.clock_gettime | ( | self | ) |
def miasm.os_dep.linux.environment.LinuxEnvironment.close | ( | self, | |
fd | |||
) |
Stub for 'close' syscall
def miasm.os_dep.linux.environment.LinuxEnvironment.fstat | ( | self, | |
fd | |||
) |
Get file status through fd
def miasm.os_dep.linux.environment.LinuxEnvironment.getdents | ( | self, | |
fd, | |||
count, | |||
packing_callback | |||
) |
Stub for 'getdents' syscall 'getdents64' must be handled by caller (only the structure layout is modified) @fd: getdents' fd argument @count: getdents' count argument @packing_callback(cur_len, d_ino, d_type, name) -> entry
def miasm.os_dep.linux.environment.LinuxEnvironment.ioctl | ( | self, | |
fd, | |||
cmd, | |||
arg | |||
) |
Stub for 'ioctl' syscall Return the list of element to pack back depending on target ioctl If the ioctl is disallowed, return False
def miasm.os_dep.linux.environment.LinuxEnvironment.lstat | ( | self, | |
path | |||
) |
Get file status through path (not following links)
def miasm.os_dep.linux.environment.LinuxEnvironment.mmap | ( | self, | |
addr, | |||
len_, | |||
prot, | |||
flags, | |||
fd, | |||
off, | |||
vmmngr | |||
) |
Stub for 'mmap' syscall 'mmap2' must be implemented by calling this function with off * 4096
def miasm.os_dep.linux.environment.LinuxEnvironment.next_fd | ( | self | ) |
def miasm.os_dep.linux.environment.LinuxEnvironment.open_ | ( | self, | |
path, | |||
flags, | |||
follow_link = True |
|||
) |
Stub for 'open' syscall
def miasm.os_dep.linux.environment.LinuxEnvironment.read | ( | self, | |
fd, | |||
count | |||
) |
Stub for 'read' syscall
def miasm.os_dep.linux.environment.LinuxEnvironment.socket | ( | self, | |
family, | |||
type_, | |||
protocol | |||
) |
Stub for 'socket' syscall
def miasm.os_dep.linux.environment.LinuxEnvironment.stat | ( | self, | |
path | |||
) |
Get file status through path
def miasm.os_dep.linux.environment.LinuxEnvironment.write | ( | self, | |
fd, | |||
data | |||
) |
Stub for 'write' syscall
|
static |
|
static |
miasm.os_dep.linux.environment.LinuxEnvironment.brk_current |
|
static |
miasm.os_dep.linux.environment.LinuxEnvironment.filesystem |
|
static |
|
static |
|
static |
|
static |
miasm.os_dep.linux.environment.LinuxEnvironment.network |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |