Package rekall :: Package plugins :: Package windows :: Module crashinfo :: Class Raw2Dump
[frames] | no frames]

Class Raw2Dump

source code


Convert the physical address space to a crash dump.

The Windows debugger (Windbg) works only with memory dumps stored
in the proprietary 'crashdump' file format. This file format
contains the following features:

1) Physical memory ranges are stored in a sparse way - there is a
   'Runs' table which specifies the mapping between the physical
   offset and the file offset of each page. This allows the format
   to omit unmapped regions (unlike raw format which must pad them
   with zero to maintain alignment).

2) The crash dump header contains metadata about the
   image. Specifically, the header contain a copy of the Kernel
   Debugger Data Block (AKA the KDBG). This data is used to
   bootstrap the windows debugger by providing critical initial
   hints to the debugger.

Since the KDBG block is created at system boot and never used
(until the crash dump is written) it is trivial for malware to
overwrite it - making it really hard for responders since windbg
will not be able to read the file. In later versions of windows,
the kdbg is also obfuscated (See the function "nt!KdCopyDataBlock"
which decrypts it.).

Rekall itself does not use the KDBG block any more, although older
memory forensic tools still do use it. Rekall instead relies on
accurate debugging symbols to locate critical kernel data
structures, reducing the level of trust we place on the image
itself (so Rekall is more resilient to manipulation).

In order to ensure that the windows debugger is able to read the
produced crash dump, we recreate the kernel debugger block from
the symbol information we already have.

NOTE: The crashdump file format can be deduced by:

dis 'nt!IoFillDumpHeader'

This is the reference for this plugin.

Nested Classes
  __metaclass__
Automatic Plugin Registration through metaclasses. (Inherited from rekall.plugin.Command)
  top_level_class
A command can be run from the rekall command line. (Inherited from rekall.plugin.Command)
Instance Methods
 
column_types(self)
Returns instances for each column definition.
source code
 
__init__(self, *args, **kwargs)
A mixin for plugins which require a valid kernel address space.
source code
 
RebuildKDBG(self, out_fd)
Modify the destination image to rebuild the KDBG.
source code
 
collect(self)
Collect data that will be passed to renderer.table_row.
source code
 
__iter__(self)
Make plugins that define collect iterable, as convenience. (Inherited from rekall.plugin.Command)
source code
 
__repr__(self)
repr(x) (Inherited from rekall.plugin.Command)
source code
 
__str__(self)
Render into a string using the text renderer. (Inherited from rekall.plugin.Command)
source code
 
collect_as_dicts(self) (Inherited from rekall.plugin.TypedProfileCommand) source code
 
get_column(self, name) (Inherited from rekall.plugin.TypedProfileCommand) source code
 
get_column_type(self, name) (Inherited from rekall.plugin.TypedProfileCommand) source code
 
get_plugin(self, name, **kwargs)
Returns an instance of the named plugin. (Inherited from rekall.plugin.Command)
source code
 
getkeys(self) (Inherited from rekall.plugin.TypedProfileCommand) source code
 
reflect(self, member) (Inherited from rekall.plugin.TypedProfileCommand) source code
 
render(self, renderer, **options) (Inherited from rekall.plugin.TypedProfileCommand) source code

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

Class Methods
 
GetActiveClasses(cls, session)
Return only the active commands based on config. (Inherited from rekall.plugin.Command)
source code
 
GetPrototype(cls, session)
Return an instance of this plugin with suitable default arguments. (Inherited from rekall.plugin.Command)
source code
 
ImplementationByClass(self, name) source code
 
ImplementationByName(self, name) source code
 
args(cls, metadata) (Inherited from rekall.plugin.PhysicalASMixin) source code
 
is_active(cls, session)
Checks we are active. (Inherited from rekall.plugin.ProfileCommand)
source code
Class Variables
  table_header = [{'name': 'Message'}]
hash(x)
  table_options = {'suppress_headers': True}
  PHYSICAL_AS_REQUIRED = True (Inherited from rekall.plugin.PhysicalASMixin)
  PROFILE_REQUIRED = True (Inherited from rekall.plugin.ProfileCommand)
  ROW_OPTIONS = set(['annotation', 'depth', 'hex_width', 'highli... (Inherited from rekall.plugin.TypedProfileCommand)
  classes = {'AFF4Acquire': <class 'rekall.plugins.tools.aff4acq... (Inherited from rekall.plugin.Command)
  classes_by_name = {None: [<class 'rekall.plugins.tools.ipython... (Inherited from rekall.plugin.Command)
  error_status = None
hash(x) (Inherited from rekall.plugin.Command)
  interactive = False (Inherited from rekall.plugin.Command)
  mode = 'mode_windows_memory'
hash(x) (Inherited from rekall.plugins.windows.common.AbstractWindowsCommandPlugin)
  plugin_args = None
hash(x) (Inherited from rekall.plugin.ArgsParserMixin)
  plugin_feature = 'Command' (Inherited from rekall.plugin.Command)
  producer = False (Inherited from rekall.plugin.Command)
Properties
  name (Inherited from rekall.plugin.Command)

Inherited from object: __class__

Method Details

column_types(self)

source code 

Returns instances for each column definition.

The actual objects that are returned when the plugin runs are often determined at run time because they depend on the profile loaded.

This method is used in order to introspect the types of each column without actually running the plugin. A plugin must provide an instance for each column without running any code. This allows interospectors to learn about the output format before running the actual plugin.

Note that this method should almost always be overloaded. We try to do our best here but it is not ideal. Ultimately all plugins will override this method and just declare a column_types() method.

Overrides: plugin.TypedProfileCommand.column_types
(inherited documentation)

__init__(self, *args, **kwargs)
(Constructor)

source code 
A mixin for plugins which require a valid kernel address space.

Args:
  dtb: A potential dtb to be used.

Overrides: object.__init__
(inherited documentation)

collect(self)

source code 

Collect data that will be passed to renderer.table_row.

Overrides: plugin.TypedProfileCommand.collect
(inherited documentation)

ImplementationByClass(self, name)
Class Method

source code 
Overrides: plugin.Command.ImplementationByClass

ImplementationByName(self, name)
Class Method

source code 
Overrides: plugin.Command.ImplementationByName