Home | Trees | Indices | Help |
|
---|
|
Interface to a process. Contains threads and modules snapshots.
|
|||
__ThreadsAndModulesIterator Iterator object for Process objects. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
bool |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
Inherited from |
|||
Properties | |||
---|---|---|---|
int |
|
||
str |
|
||
|
|||
|
|||
ProcessHandle |
|
||
bool |
|
||
bool |
|
||
int |
|
||
bool |
|
||
str |
|
||
str |
|
||
win32.SYSTEMTIME |
|
||
win32.SYSTEMTIME |
|
||
long |
|
||
list( win32.ServiceStatusProcessEntry ) |
|
||
tuple(int, int) |
|
||
win32.PEB |
|
||
int |
|
||
int |
|
||
Module |
|
||
int |
|
||
int |
|
||
tuple(int, int) |
|
||
tuple(int, int) |
|
||
str |
|
||
list of tuple(unicode, unicode) |
|
||
dict(str → str) |
|
||
Instrumentation | |||
|
|||
|
|||
|
|||
|
|||
tuple( Thread, int ) |
|
||
Thread |
|
||
|
|||
|
|||
Disassembly | |||
list of tuple( long, int, str, str ) |
|
||
list of tuple( long, int, str, str ) |
|
||
list of tuple( long, int, str, str ) |
|
||
list of tuple( long, int, str, str ) |
|
||
tuple( long, int, str, str ) |
|
||
tuple( long, int, str, str ) |
|
||
Debugging | |||
|
|||
|
|||
dict( str → str ) |
|
||
int |
|
||
int or None |
|
||
int or None |
|
||
int or None |
|
||
int or None |
|
||
int or None |
|
||
int or None |
|
||
bool |
|
||
Memory mapping | |||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
list( win32.MemoryBasicInformation ) |
|
||
Regenerator of win32.MemoryBasicInformation |
|
||
iterator of win32.MemoryBasicInformation |
|
||
dict( int → str ) |
|
||
Regenerator of win32.MemoryBasicInformation |
|
||
iterator of win32.MemoryBasicInformation |
|
||
list( win32.MemoryBasicInformation ) |
|
||
|
|||
Memory allocation | |||
int |
|
||
int |
|
||
win32.MemoryBasicInformation |
|
||
|
|||
Memory read | |||
str |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
str, unicode |
|
||
str |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
str, unicode |
|
||
Memory write | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
Memory search | |||
iterator of tuple( int, int, str ) |
|
||
iterator of int |
|
||
iterator of tuple( int, str ) |
|
||
iterator of tuple( int, int, str ) |
|
||
iterator of tuple( int, str ) |
|
||
iterator of tuple(int, int, str) |
|
||
Processes snapshot | |||
bool |
|
||
int |
|
||
iterator |
|
||
|
|||
|
|||
Deprecated | |||
list of str |
|
||
Threads snapshot | |||
|
|||
|
|||
|
|||
list( Thread ) |
|
||
Thread |
|
||
int |
|
||
list( int ) |
|
||
list of Window |
|
||
bool |
|
||
dictionary-keyiterator |
|
||
dictionary-valueiterator |
|
||
|
|||
Modules snapshot | |||
|
|||
Module |
|
||
Module |
|
||
list( int... ) |
|
||
Module |
|
||
int |
|
||
bool |
|
||
dictionary-keyiterator |
|
||
dictionary-valueiterator |
|
||
|
|||
Labels | |||
str |
|
||
int |
|
||
int |
|
||
str |
|
||
tuple( str or None, str or int or None, int or None ) |
|
||
Symbols | |||
None or tuple( str, int, int ) |
|
||
list of tuple( str, int, int ) |
|
||
iterator of tuple( str, int, int ) |
|
||
|
|||
int or None |
|
||
|
|
|||
Labels | |||
---|---|---|---|
tuple( str or None, str or int or None, int or None ) |
|
|
|||
Deprecated | |||
---|---|---|---|
dict(str → str) |
|
||
Labels | |||
str |
|
||
tuple( str or None, str or int or None, int or None ) |
|
|
|||
__hexa_parameter = re.compile(r'0x
|
|
|||
int |
dwProcessId Global process ID. |
||
str |
fileName Filename of the main module. |
||
ProcessHandle |
hProcess Handle to the process. |
|
|||
Inherited from |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
|
|
Opens a new handle to the process. The new handle is stored in the hProcess property.
Warning: Normally you should call get_handle instead, since it's much "smarter" and tries to reuse handles and merge access rights. |
Closes the handle to the process. Note:
Normally you don't need to call this method. All handles created by
WinAppDbg are automatically closed when the garbage
collector claims them. So unless you've been tinkering with it,
setting hProcess to |
Returns a handle to the process with at least the access rights requested.
Note: If a handle was previously opened and has the required access rights, it's reused. If not, a new handle is opened with the combination of the old and new access rights. |
The same as:
|
See Also: get_thread_count, get_module_count |
See Also: iter_threads, iter_modules |
Waits for the process to finish executing.
|
Terminates the execution of the process.
|
Suspends execution on all threads of the process.
|
Resumes execution on all threads of the process.
|
Tries to determine if the process is being debugged by another process. It may detect other debuggers besides WinAppDbg.
Warning: May return inaccurate results when some anti-debug techniques are used by the target process. Note: To know if a process currently being debugged by a Debug object, call Debug.is_debugee instead. |
|
Warning:
If a process returns |
Private method used when disassembling from process memory. It has no return value because the list is modified in place. On return all raw memory addresses are replaced by labels when possible.
|
Disassemble instructions from a block of binary code.
|
Disassemble instructions from the address space of the process.
|
Disassemble around the given address.
|
Disassemble around the program counter of the given thread.
|
Disassemble the instruction at the given memory address.
|
Disassemble the instruction at the program counter of the given thread.
|
Flush the instruction cache. This is required if the process memory is modified and one or more threads are executing nearby the modified memory region.
|
Triggers the system breakpoint in the process.
|
Determines if the process is running under WOW64.
|
|
|
Determines when has this process started running.
|
Determines when has this process finished running. If the process is still alive, the current time is returned instead.
|
Determines how long has this process been running.
|
Retrieves the list of system services that are currently running in this process.
See Also: System.get_services |
Retrieves the DEP (Data Execution Prevention) policy for this process.
Note: This method is only available in Windows XP SP3 and above, and only for 32 bit processes. It will fail in any other circumstance. See Also: http://msdn.microsoft.com/en-us/library/bb736297(v=vs.85).aspx |
Returns a copy of the PEB. To dereference pointers in it call Process.read_structure.
|
Returns a remote pointer to the PEB.
|
Alias to
|
|
|
|
Retrieves the command line block memory address and size.
|
Retrieves the environment block memory address for the process.
Note: The size is always enough to contain the environment data, but it may not be an exact size. It's best to read the memory and scan for two null wide chars to find the actual size. |
Retrieves the command line with wich the program was started.
|
Retrieves the environment variables with wich the program is running.
|
Retrieves the environment block data with wich the program is running.
Warning: Deprecated since WinAppDbg 1.5. See Also: win32.GuessStringType |
Parse the environment block into a Python dictionary.
Warning: Deprecated since WinAppDbg 1.5. Note: Values of duplicated keys are joined using null characters. |
Retrieves the environment with wich the program is running.
Note:
Duplicated keys are joined using null characters. To avoid this
behavior, call get_environment_variables instead and convert the
results to a dictionary directly, like this:
See Also: win32.GuessStringType |
Search for the given pattern within the process memory.
|
Search for the given byte pattern within the process memory.
|
Search for the given text within the process memory.
|
Search for the given regular expression within the process memory.
|
Search for the given hexadecimal pattern within the process memory. Hex patterns must be in this form: "68 65 6c 6c 6f 20 77 6f 72 6c 64" # "hello world" Spaces are optional. Capitalization of hex digits doesn't matter. This is exactly equivalent to the previous example: "68656C6C6F20776F726C64" # "hello world" Wildcards are allowed, in the form of a "5? 5? c3" # pop register / pop register / ret "b8 ?? ?? ?? ??" # mov eax, immediate value
|
Extract ASCII strings from the process memory.
|
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 character to the memory of the process.
See Also: peek_char |
Writes a single character to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: poke_char |
Reads a signed integer from the memory of the process.
See Also: peek_int |
Writes a signed integer to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: poke_int |
Reads an unsigned integer from the memory of the process.
See Also: peek_uint |
Writes an unsigned integer to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: poke_uint |
Reads a float from the memory of the process.
See Also: peek_float |
Writes a float to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: poke_float |
Reads a double from the memory of the process.
See Also: peek_double |
Writes a double to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: poke_double |
Reads a pointer value from the memory of the process.
See Also: peek_pointer |
Writes a pointer value to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: poke_pointer |
Reads a DWORD from the memory of the process.
See Also: peek_dword |
Writes a DWORD to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: poke_dword |
Reads a QWORD from the memory of the process.
See Also: peek_qword |
Writes a QWORD to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: poke_qword |
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: peek_string |
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 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 |
Reads a signed integer from the memory of the process.
See Also: read_int |
Writes a signed integer to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: write_int |
Reads an unsigned integer from the memory of the process.
See Also: read_uint |
Writes an unsigned integer to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: write_uint |
Reads a float from the memory of the process.
See Also: read_float |
Writes a float to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: write_float |
Reads a double from the memory of the process.
See Also: read_double |
Writes a double to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: write_double |
Reads a DWORD from the memory of the process.
See Also: read_dword |
Writes a DWORD to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: write_dword |
Reads a QWORD from the memory of the process.
See Also: read_qword |
Writes a QWORD to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: write_qword |
Reads a pointer value from the memory of the process.
See Also: read_pointer |
Writes a pointer value to the memory of the process.
Note: Page permissions may be changed temporarily while writing. See Also: write_pointer |
Tries to read an ASCII or Unicode string from the address space of the process.
See Also: read_string |
Tries to guess which values in the given data are valid pointers, and reads some data from them.
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.
|
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 |
Returns a Regenerator that can iterate indefinitely over the memory map to the process address space. Optionally restrict the map to the given address range.
See Also: mquery |
Produces an iterator over the 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 Regenerator that allows you to iterate through the memory contents of a process indefinitely. 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 |
Returns an iterator that allows you to go 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 only iterated once. To be able to iterate indefinitely call the generate_memory_snapshot method instead. 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 (if alive) when taking the snapshot. Execution can be resumed afterwards. Example: # Print the memory contents of a process. process.suspend() try: snapshot = process.take_memory_snapshot() for mbi in snapshot: print HexDump.hexblock(mbi.content, mbi.BaseAddress) finally: process.resume() 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). |
Injects relocatable code into the process memory and executes it.
Warning: Don't forget to free the memory when you're done with it! Otherwise you'll be leaking memory in the target process. See Also: inject_dll |
Injects a DLL into the process memory.
Warnings:
See Also: inject_code |
Injects a new thread to call ExitProcess(). Optionally waits for the injected thread to finish.
Warning:
Setting |
Notify the creation of a new process. This is done automatically by the Debug class, you shouldn't need to call it yourself.
|
|
dwProcessIdGlobal process ID. Use get_pid instead.
|
fileNameFilename of the main module. Use get_filename instead.
|
hProcessHandle to the process. Use get_handle instead.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Dec 20 17:54:54 2013 | http://epydoc.sourceforge.net |