miasm
Reverse engineering framework
|
Classes | |
class | AuxVec |
class | FileDescriptor |
class | FileDescriptorCharDevice |
class | FileDescriptorDirectory |
class | FileDescriptorRegularFile |
class | FileDescriptorSocket |
class | FileDescriptorSTDERR |
class | FileDescriptorSTDIN |
class | FileDescriptorSTDOUT |
class | FileSystem |
class | LinuxEnvironment |
class | LinuxEnvironment_arml |
class | LinuxEnvironment_x86_32 |
class | LinuxEnvironment_x86_64 |
class | Networking |
Functions | |
def | prepare_loader_x86_64 (jitter, argv, envp, auxv, linux_env, hlt_address=0x13371acc) |
def | prepare_loader_arml (jitter, argv, envp, auxv, linux_env, hlt_address=0x13371acc) |
Variables | |
REGEXP_T = type(re.compile('')) | |
StatInfo | |
StatFSInfo | |
log = logging.getLogger("environment") | |
console_handler = logging.StreamHandler() | |
def miasm.os_dep.linux.environment.prepare_loader_arml | ( | jitter, | |
argv, | |||
envp, | |||
auxv, | |||
linux_env, | |||
hlt_address = 0x13371acc |
|||
) |
Fill the environment with enough information to run a linux loader @jitter: Jitter instance @argv: list of strings @envp: dict of environment variables names to their values @auxv: AuxVec instance @hlt_address (default to 0x13371acc): stopping address Example of use: >>> jitter = machine.jitter() >>> jitter.init_stack() >>> linux_env = LinuxEnvironment_arml() >>> argv = ["/bin/ls", "-lah"] >>> envp = {"PATH": "/usr/local/bin", "USER": linux_env.user_name} >>> auxv = AuxVec(elf_base_addr, entry_point, linux_env) >>> prepare_loader_arml(jitter, argv, envp, auxv, linux_env) # One may want to enable syscall handling here # The program can now run from the loader >>> jitter.init_run(ld_entry_point) >>> jitter.continue_run()
def miasm.os_dep.linux.environment.prepare_loader_x86_64 | ( | jitter, | |
argv, | |||
envp, | |||
auxv, | |||
linux_env, | |||
hlt_address = 0x13371acc |
|||
) |
Fill the environment with enough information to run a linux loader @jitter: Jitter instance @argv: list of strings @envp: dict of environment variables names to their values @auxv: AuxVec instance @hlt_address (default to 0x13371acc): stopping address Example of use: >>> jitter = machine.jitter() >>> jitter.init_stack() >>> linux_env = LinuxEnvironment_x86_64() >>> argv = ["/bin/ls", "-lah"] >>> envp = {"PATH": "/usr/local/bin", "USER": linux_env.user_name} >>> auxv = AuxVec(elf_base_addr, entry_point, linux_env) >>> prepare_loader_x86_64(jitter, argv, envp, auxv, linux_env) # One may want to enable syscall handling here # The program can now run from the loader >>> jitter.init_run(ld_entry_point) >>> jitter.continue_run()
miasm.os_dep.linux.environment.console_handler = logging.StreamHandler() |
miasm.os_dep.linux.environment.log = logging.getLogger("environment") |
miasm.os_dep.linux.environment.REGEXP_T = type(re.compile('')) |
miasm.os_dep.linux.environment.StatFSInfo |