Miasm2
 All Classes Namespaces Files Functions Variables Typedefs Properties Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
miasm2.analysis.sandbox.Sandbox_Linux_x86_64 Class Reference
+ Inheritance diagram for miasm2.analysis.sandbox.Sandbox_Linux_x86_64:
+ Collaboration diagram for miasm2.analysis.sandbox.Sandbox_Linux_x86_64:

Public Member Functions

def __init__
 
def run
 
def parser
 
def update_parser
 
def update_parser
 

Static Public Member Functions

def code_sentinelle
 

Public Attributes

 fname
 
 options
 
 dbg
 
 gdb
 
 cmd
 
 machine
 
 jitter
 
 libs
 
 elf
 
 entry_point
 

Static Public Attributes

int STACK_SIZE = 0x10000
 
int STACK_BASE = 0x130000
 

Properties

 classes = property(lambda x:x.__class__._classes_())
 

Detailed Description

Definition at line 428 of file sandbox.py.

Constructor & Destructor Documentation

def miasm2.analysis.sandbox.Sandbox_Linux_x86_64.__init__ (   self,
  args,
  kwargs 
)

Definition at line 430 of file sandbox.py.

431  def __init__(self, *args, **kwargs):
432  Sandbox.__init__(self, *args, **kwargs)
433 
434  # reserve stack for local reg
435  for i in xrange(0x4):
436  self.jitter.push_uint64_t(0)
437 
438  # Pre-stack return address
439  self.jitter.push_uint64_t(0x1337beef)
440 
441  # Set the runtime guard
442  self.jitter.add_breakpoint(0x1337beef, self.__class__.code_sentinelle)
443 

Member Function Documentation

def miasm2.analysis.sandbox.Sandbox.code_sentinelle (   jitter)
staticinherited

Definition at line 16 of file sandbox.py.

16 
17  def code_sentinelle(jitter):
18  jitter.run = False
19  return False
def miasm2.analysis.sandbox.Sandbox.parser (   cls,
  args,
  kwargs 
)
inherited
Return instance of instance parser with expecting options.
Extra parameters are passed to parser initialisation.

Definition at line 65 of file sandbox.py.

65 
66  def parser(cls, *args, **kwargs):
67  """
68  Return instance of instance parser with expecting options.
69  Extra parameters are passed to parser initialisation.
70  """
71 
72  parser = ArgumentParser(*args, **kwargs)
73  parser.add_argument('-a', "--address",
74  help="Force entry point address", default=None)
75  parser.add_argument('-x', "--dumpall", action="store_true",
76  help="Load base dll")
77  parser.add_argument('-b', "--dumpblocs", action="store_true",
78  help="Log disasm blocks")
79  parser.add_argument('-z', "--singlestep", action="store_true",
80  help="Log single step")
81  parser.add_argument('-d', "--debugging", action="store_true",
82  help="Debug shell")
83  parser.add_argument('-g', "--gdbserver", type=int,
84  help="Listen on port @port")
85  parser.add_argument("-j", "--jitter",
86  help="Jitter engine. Possible values are: tcc (default), llvm, python",
87  default="tcc")
88  parser.add_argument('-q', "--quiet-function-calls", action="store_true",
89  help="Don't log function calls")
90 
91  for base_cls in cls._classes_():
92  base_cls.update_parser(parser)
93  return parser

+ Here is the caller graph for this function:

def miasm2.analysis.sandbox.Sandbox_Linux_x86_64.run (   self,
  addr = None 
)
If addr is not set, use entrypoint

Definition at line 444 of file sandbox.py.

445  def run(self, addr = None):
446  """
447  If addr is not set, use entrypoint
448  """
449  if addr is None and self.options.address is None:
450  addr = self.entry_point
451  super(Sandbox_Linux_x86_64, self).run(addr)
452 
def miasm2.analysis.sandbox.OS.update_parser (   cls,
  parser 
)
inherited

Definition at line 132 of file sandbox.py.

133  def update_parser(cls, parser):
134  pass
135 
def miasm2.analysis.sandbox.Arch_x86.update_parser (   cls,
  parser 
)
inherited

Definition at line 287 of file sandbox.py.

288  def update_parser(cls, parser):
289  parser.add_argument('-s', "--usesegm", action="store_true",
290  help="Use segments")
291 

Member Data Documentation

miasm2.analysis.sandbox.Sandbox.cmd
inherited

Definition at line 115 of file sandbox.py.

miasm2.analysis.sandbox.Sandbox.dbg
inherited

Definition at line 104 of file sandbox.py.

miasm2.analysis.sandbox.OS_Linux.elf
inherited

Definition at line 233 of file sandbox.py.

miasm2.analysis.sandbox.OS_Linux.entry_point
inherited

Definition at line 236 of file sandbox.py.

miasm2.analysis.sandbox.Sandbox.fname
inherited

Definition at line 43 of file sandbox.py.

miasm2.analysis.sandbox.Sandbox.gdb
inherited

Definition at line 111 of file sandbox.py.

miasm2.analysis.sandbox.Arch.jitter
inherited

Definition at line 145 of file sandbox.py.

miasm2.analysis.sandbox.OS_Linux.libs
inherited

Definition at line 230 of file sandbox.py.

miasm2.analysis.sandbox.Arch.machine
inherited

Definition at line 144 of file sandbox.py.

miasm2.analysis.sandbox.Sandbox.options
inherited

Definition at line 44 of file sandbox.py.

int miasm2.analysis.sandbox.Arch_x86.STACK_BASE = 0x130000
staticinherited

Definition at line 269 of file sandbox.py.

int miasm2.analysis.sandbox.Arch_x86.STACK_SIZE = 0x10000
staticinherited

Definition at line 268 of file sandbox.py.

Property Documentation

miasm2.analysis.sandbox.Sandbox.classes = property(lambda x:x.__class__._classes_())
staticinherited

Definition at line 32 of file sandbox.py.


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