Package rekall :: Package plugins :: Package addrspaces :: Module mmap_address_space :: Class MmapFileAddressSpace
[frames] | no frames]

Class MmapFileAddressSpace

source code


This is an AS which uses an mmap of a file.

For this AS to be instantiated, we need

1) A valid config.LOCATION (starting with file://)

2) no one else has picked the AS before us

3) base == self (we dont operate on anyone else so we need to be right at the bottom of the AS stack.)

Nested Classes
  __metaclass__
Automatic Plugin Registration through metaclasses. (Inherited from rekall.addrspace.BaseAddressSpace)
  top_level_class
This is the base class of all Address Spaces. (Inherited from rekall.addrspace.BaseAddressSpace)
Instance Methods
 
__init__(self, filename=None, **kwargs)
Base is the AS we will be stacking on top of, opts are options which we may use.
source code
 
read(self, addr, length)
Should be overridden by derived classes.
source code
 
get_mappings(self, start=0, end=18446744073709551616)
Generates a sequence of Run() objects.
source code
 
is_valid_address(self, addr)
Tell us if the address is valid
source code
 
close(self) source code
 
write(self, addr, data)
Write to the address space, if writable.
source code
 
__eq__(self, other) source code
 
ConfigureSession(self, session_obj)
Implement this method if you need to configure the session. (Inherited from rekall.addrspace.BaseAddressSpace)
source code
 
__repr__(self)
repr(x) (Inherited from rekall.addrspace.BaseAddressSpace)
source code
 
__str__(self)
str(x) (Inherited from rekall.addrspace.BaseAddressSpace)
source code
 
__unicode__(self) (Inherited from rekall.addrspace.BaseAddressSpace) source code
 
as_assert(self, assertion, error=None)
Duplicate for the assert command (so that optimizations don't disable them) (Inherited from rekall.addrspace.BaseAddressSpace)
source code
 
describe(self, addr)
Return a string describing an address. (Inherited from rekall.addrspace.BaseAddressSpace)
source code
 
end(self) (Inherited from rekall.addrspace.BaseAddressSpace) source code
 
get_address_ranges(self, start=0, end=4503599627370495)
Generates the runs which fall between start and end. (Inherited from rekall.addrspace.BaseAddressSpace)
source code
 
get_file_address_space(self, filename)
Implement this to return an address space for filename. (Inherited from rekall.addrspace.BaseAddressSpace)
source code
 
get_mapped_offset(self, filename, offset)
Implement this if we can map files into this address space. (Inherited from rekall.addrspace.BaseAddressSpace)
source code
 
merge_base_ranges(self, start=0, end=4503599627370495)
Generates merged address ranges from get_mapping(). (Inherited from rekall.addrspace.BaseAddressSpace)
source code
 
vtop(self, addr)
Return the physical address of this virtual address. (Inherited from rekall.addrspace.BaseAddressSpace)
source code
 
vtop_run(self, addr)
Returns a Run object describing where addr can be read from. (Inherited from rekall.addrspace.BaseAddressSpace)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods
 
ImplementationByClass(self, name) source code
 
ImplementationByName(self, name) source code
 
metadata(cls, name, default=None)
Obtain metadata about this address space. (Inherited from rekall.addrspace.BaseAddressSpace)
source code
Class Variables
  order = 110
  classes = {'AFF4AddressSpace': <class 'rekall.plugins.addrspac... (Inherited from rekall.addrspace.BaseAddressSpace)
  classes_by_name = {'': [<class 'rekall.addrspace.BufferAddress... (Inherited from rekall.addrspace.BaseAddressSpace)
  name = '' (Inherited from rekall.addrspace.BaseAddressSpace)
  plugin_feature = 'BaseAddressSpace' (Inherited from rekall.addrspace.BaseAddressSpace)
  virtualized = False (Inherited from rekall.addrspace.BaseAddressSpace)
  volatile = False (Inherited from rekall.addrspace.BaseAddressSpace)
Properties

Inherited from object: __class__

Method Details

__init__(self, filename=None, **kwargs)
(Constructor)

source code 
Base is the AS we will be stacking on top of, opts are options which
we may use.

Args:
  base: A base address space to stack on top of (i.e. delegate to it for
      satisfying read requests).

  session: An optional session object.

  profile: An optional profile to use for parsing the address space
      (e.g. needed for hibernation, crash etc.)

Overrides: object.__init__
(inherited documentation)

read(self, addr, length)

source code 

Should be overridden by derived classes.

Overrides: addrspace.BaseAddressSpace.read
(inherited documentation)

get_mappings(self, start=0, end=18446744073709551616)

source code 
Generates a sequence of Run() objects.

Each Run object describes a single range transformation from this
address space to another address space at a potentially different
mapped_offset.

Runs are assumed to not overlap and are generated in increasing order.

Args:
  start: The suggested start address we are interested in. This function
      may omit runs that lie entirely below this start address. Note:
      Runs are not adjusted to begin at the start address - it may be
      possible that this method returns a run which starts earlier than
      the specified start address.

Overrides: addrspace.BaseAddressSpace.get_mappings
(inherited documentation)

is_valid_address(self, addr)

source code 

Tell us if the address is valid

Overrides: addrspace.BaseAddressSpace.is_valid_address
(inherited documentation)

close(self)

source code 
Overrides: addrspace.BaseAddressSpace.close

write(self, addr, data)

source code 
Write to the address space, if writable.

The default behavior is to delegate the write to the base address space.
If an address space has no base then this function will throw an
IOError. Address spaces that actually implement writing should override.

Raises:
    IOError if there is no base address space. Subclasses may raise
        under additional circumstances.

Arguments:
    addr: The address to write at, as understood by this AS (i.e.
        a virtual address for virtual address spaces, physical for
        physical).
    buf: The data to write - most commonly a basestring instance.

Returns:
    Number of bytes written.

Overrides: addrspace.BaseAddressSpace.write
(inherited documentation)

__eq__(self, other)
(Equality operator)

source code 
Overrides: addrspace.BaseAddressSpace.__eq__

ImplementationByClass(self, name)
Class Method

source code 
Overrides: addrspace.BaseAddressSpace.ImplementationByClass

ImplementationByName(self, name)
Class Method

source code 
Overrides: addrspace.BaseAddressSpace.ImplementationByName