miasm
Reverse engineering framework
miasm.os_dep.linux.environment.FileSystem Class Reference
Inheritance diagram for miasm.os_dep.linux.environment.FileSystem:
Collaboration diagram for miasm.os_dep.linux.environment.FileSystem:

Public Member Functions

def __init__ (self, base_path, linux_env)
 
def resolve_path (self, path, follow_link=True)
 
def get_path_inode (self, real_path)
 
def exists (self, path)
 
def readlink (self, path)
 
def statfs (self)
 
def getattr_ (self, path, follow_link=True)
 
def open_ (self, path, flags, follow_link=True)
 

Public Attributes

 base_path
 
 linux_env
 
 passthrough
 
 path_to_inode
 

Static Public Attributes

int device_id = 0x1234
 
int blocksize = 0x1000
 
int f_type = 0xef53
 
int nb_total_block = 0x1000
 
int nb_free_block = 0x100
 
int nb_avail_block = nb_free_block
 
int nb_total_fnode = 100
 
int nb_free_fnode = 50
 
int max_filename_len = 256
 
int fragment_size = 0
 
int mount_flags = 0
 

Detailed Description

File system abstraction
Provides standard operations on the filesystem, (a bit like FUSE)

API using FileSystem only used sandbox-side path. FileSystem should be the
only object able to interact with real path, outside the sandbox.

Thus, if `resolve_path` is correctly implemented and used, it should not be
possible to modify files outside the sandboxed path

Constructor & Destructor Documentation

◆ __init__()

def miasm.os_dep.linux.environment.FileSystem.__init__ (   self,
  base_path,
  linux_env 
)

Member Function Documentation

◆ exists()

def miasm.os_dep.linux.environment.FileSystem.exists (   self,
  path 
)
Here is the call graph for this function:

◆ get_path_inode()

def miasm.os_dep.linux.environment.FileSystem.get_path_inode (   self,
  real_path 
)
Here is the caller graph for this function:

◆ getattr_()

def miasm.os_dep.linux.environment.FileSystem.getattr_ (   self,
  path,
  follow_link = True 
)
Here is the call graph for this function:

◆ open_()

def miasm.os_dep.linux.environment.FileSystem.open_ (   self,
  path,
  flags,
  follow_link = True 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readlink()

def miasm.os_dep.linux.environment.FileSystem.readlink (   self,
  path 
)
Here is the call graph for this function:

◆ resolve_path()

def miasm.os_dep.linux.environment.FileSystem.resolve_path (   self,
  path,
  follow_link = True 
)
Resolve @path to the corresponding sandboxed path
Here is the call graph for this function:
Here is the caller graph for this function:

◆ statfs()

def miasm.os_dep.linux.environment.FileSystem.statfs (   self)

Member Data Documentation

◆ base_path

miasm.os_dep.linux.environment.FileSystem.base_path

◆ blocksize

int miasm.os_dep.linux.environment.FileSystem.blocksize = 0x1000
static

◆ device_id

int miasm.os_dep.linux.environment.FileSystem.device_id = 0x1234
static

◆ f_type

int miasm.os_dep.linux.environment.FileSystem.f_type = 0xef53
static

◆ fragment_size

int miasm.os_dep.linux.environment.FileSystem.fragment_size = 0
static

◆ linux_env

miasm.os_dep.linux.environment.FileSystem.linux_env

◆ max_filename_len

int miasm.os_dep.linux.environment.FileSystem.max_filename_len = 256
static

◆ mount_flags

int miasm.os_dep.linux.environment.FileSystem.mount_flags = 0
static

◆ nb_avail_block

int miasm.os_dep.linux.environment.FileSystem.nb_avail_block = nb_free_block
static

◆ nb_free_block

int miasm.os_dep.linux.environment.FileSystem.nb_free_block = 0x100
static

◆ nb_free_fnode

int miasm.os_dep.linux.environment.FileSystem.nb_free_fnode = 50
static

◆ nb_total_block

int miasm.os_dep.linux.environment.FileSystem.nb_total_block = 0x1000
static

◆ nb_total_fnode

int miasm.os_dep.linux.environment.FileSystem.nb_total_fnode = 100
static

◆ passthrough

miasm.os_dep.linux.environment.FileSystem.passthrough

◆ path_to_inode

miasm.os_dep.linux.environment.FileSystem.path_to_inode

The documentation for this class was generated from the following file: