| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
MemoryOperations
Encapsulates the capabilities to manipulate the memory of a process.
|
|||
| bool |
|
||
|
|||
|
|||
|
Inherited from |
|||
| Instrumentation | |||
|---|---|---|---|
| int |
|
||
| int |
|
||
| win32.MemoryBasicInformation |
|
||
|
|||
| generator of win32.MemoryBasicInformation |
|
||
| list( win32.MemoryBasicInformation ) |
|
||
|
|||
| Memory mapping | |||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| bool |
|
||
| list( win32.MemoryBasicInformation ) |
|
||
| dict( int → str ) |
|
||
| Memory read | |||
| str |
|
||
| int |
|
||
| int |
|
||
| int |
|
||
| int |
|
||
| str, unicode |
|
||
| str |
|
||
| int |
|
||
| int |
|
||
| int |
|
||
| str, unicode |
|
||
| Memory write | |||
|
|||
|
|||
|
|||
|
|||
| int |
|
||
| int |
|
||
| int |
|
||
| int |
|
||
|
|||
|
Inherited from |
|||
|
|||
Reads from the memory of the process.
See Also: peek |
Writes to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: poke |
Reads a single unsigned integer from the memory of the process.
See Also: peek |
Writes a single unsigned integer to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: poke_uint |
Reads a single pointer value from the memory of the process.
See Also: peek_pointer |
Writes a single pointer value to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: poke_pointer |
Reads a single character to the memory of the process.
See Also: write_char |
Writes a single character to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: write_char |
Reads a ctypes structure from the memory of the process.
See Also: read |
Reads an ASCII or Unicode string from the address space of the process.
See Also: read |
Reads the memory of the process.
See Also: read |
Writes to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: write |
Reads a single unsigned integer from the memory of the process.
See Also: read_uint |
Writes a single unsigned integer to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: write_uint |
Reads a single pointer value from the memory of the process.
See Also: read_pointer |
Writes a single pointer value to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: write_pointer |
Reads a single character from the memory of the process.
See Also: read_char |
Writes a single character to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: write_char |
Tries to read an ASCII or Unicode string from the address space of the process.
See Also: peek |
Allocates memory into the address space of the process.
See Also: free |
Set memory protection in the address space of the process.
|
Query memory information from the address space of the process. Returns a win32.MemoryBasicInformation object.
|
Frees memory from the address space of the process.
See Also: malloc |
Determines if an address is a valid code or data pointer. That is, the address must be valid and must point to code or data in the target process.
|
Determines if an address is a valid user mode address.
|
Determines if an address belongs to a free page.
Note:
Returns always |
Determines if an address belongs to a reserved page.
Note:
Returns always |
Determines if an address belongs to a commited page.
Note:
Returns always |
Determines if an address belongs to a guard page.
Note:
Returns always |
Determines if an address belongs to a commited and readable page. The page may or may not have additional permissions.
Note:
Returns always |
Determines if an address belongs to a commited and writeable page. The page may or may not have additional permissions.
Note:
Returns always |
Determines if an address belongs to a commited, copy-on-write page. The page may or may not have additional permissions.
Note:
Returns always |
Determines if an address belongs to a commited and executable page. The page may or may not have additional permissions.
Note:
Returns always |
Determines if an address belongs to a commited, writeable and executable page. The page may or may not have additional permissions. Looking for writeable and executable pages is important when exploiting a software vulnerability.
Note:
Returns always |
Determines if the given memory area is a valid code or data buffer.
Note:
Returns always See Also: mquery |
Determines if the given memory area is readable.
Note:
Returns always See Also: mquery |
Determines if the given memory area is writeable.
Note:
Returns always See Also: mquery |
Determines if the given memory area is marked as copy-on-write.
Note:
Returns always See Also: mquery |
Determines if the given memory area is executable.
Note:
Returns always See Also: mquery |
Determines if the given memory area is writeable and executable. Looking for writeable and executable pages is important when exploiting a software vulnerability.
Note:
Returns always See Also: mquery |
Produces a memory map to the process address space. Optionally restrict the map to the given address range.
See Also: mquery |
Retrieves the filenames for memory mapped files in the debugee.
|
Returns a generator that allows you to iterate through the memory contents of a process. It's basically the same as the take_memory_snapshot method, but it takes the snapshot of each memory region as it goes, as opposed to taking the whole snapshot at once. This allows you to work with very large snapshots without a significant performance penalty. Example:
# Print the memory contents of a process.
process.suspend()
try:
snapshot = process.generate_memory_snapshot()
for mbi in snapshot:
print HexDump.hexblock(mbi.content, mbi.BaseAddress)
finally:
process.resume()
The downside of this is the process must remain suspended while iterating the snapshot, otherwise strange things may happen. The snapshot can be iterated more than once. Each time it's iterated the memory contents of the process will be fetched again. You can also iterate the memory of a dead process, just as long as the last open handle to it hasn't been closed.
See Also: take_memory_snapshot |
Takes a snapshot of the memory contents of the process. It's best if the process is suspended when taking the snapshot. Execution can be resumed afterwards. You can also iterate the memory of a dead process, just as long as the last open handle to it hasn't been closed.
Warning: If the target process has a very big memory footprint, the resulting snapshot will be equally big. This may result in a severe performance penalty. See Also: generate_memory_snapshot |
Attempts to restore the memory state as it was when the given snapshot was taken.
Warning: Currently only the memory contents, state and protect bits are restored. Under some circumstances this method may fail (for example if memory was freed and then reused by a mapped file). |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Jul 20 14:32:15 2010 | http://epydoc.sourceforge.net |