Questions tagged [pydbg]

PyDbg is a python module to debug win32 executable. It is fully scriptable as python code. It is able to load/attach to processes running in windows.

PyDbg is a python module to debug win32 executable. It is fully scriptable as python code. It is able to load/attach to processes running in windows. It is able to decode binary instructions by using Pydasm. It allows you to define function hooks on a function entry and exit. You can set software and hardware breakpoints. It also allows you to set memory breakpoints. You can read and write process memory, given the address to read/write. And most importantly, it is free and open source!!

20 questions
2
votes
3 answers

Parse PDB Symbol and Resolve Address

Using a python based disassembler + debugger I've found below instructions(example). Now I want to parse Microsoft provided public symbols to find exact functions its calling. I want to know what are the available options/ modules to do the same.…
Dev.K.
  • 2,428
  • 5
  • 35
  • 49
2
votes
0 answers

PyDBG process restore doesn't work

I'm using python 2.5(x86) in Windows7 x64. I wrote the code following this book. http://nostarch.com/ghpython.htm But it doesn't work in my environment. PDBG_ERR> -- IGNORING ERROR -- PDBG_ERR> process_restore: [87] WriteProcessMemory I suppose the…
fx-kirin
  • 1,906
  • 1
  • 20
  • 33
2
votes
4 answers

pydbg can't import pydasm - Python 2.7

Here is a snippets from my python shell, i can't understand what is wrong there, if somebody has any suggestion i would be glad to hear. >>> import pydbg Traceback (most recent call last): File "", line 1, in File…
Hanan
  • 1,169
  • 3
  • 23
  • 40
1
vote
0 answers

Pydbg dump memory from VirtualAlloc

I am using the following code taken from: http://securityxploded.com/automation-reversing-scripting.php#Pydbg # Author: Amit Malik import sys import pefile import struct from pydbg import * from pydbg.defines import * def…
1
vote
1 answer

Pydbg response xml, how to log it like xdebug?

I have a noob question regarding DBGp and debugging a python script. I am trying to make the debugging session logged in a file, with the xml response for every command I send to server. (xdebug does that trivially and it's what I am trying to…
Niloct
  • 9,491
  • 3
  • 44
  • 57
1
vote
1 answer

pydbg thread refuses to print log information

I am running the Sulley fuzzing tool, which uses pydbg to debug the target process. The pydbg threads are spawned in the process_monitor.py module of the Sulley environment. My problem is that when a test case (malformed packet) causes the process…
1
vote
2 answers

Using Debugger how to get child process's PID from Parent

I want to know, using windbg or any other debugger how can i get the PID of child process created by parent process. Example : Debugger attached to arbitrary running "Process A". When debugger is attached to process A(Parent), Process A creates…
Dev.K.
  • 2,428
  • 5
  • 35
  • 49
1
vote
1 answer

hook file creation in python

I'm working on a program, where in some part of it, it needs to listen to the OP for when files are created/saved, so I can work on said file. I know the basic concept of hooking, but I don't know exactly how to implement it in this specific use(I…
1
vote
1 answer

I want to see the dlls that are hooked to any process using python. Is it possible by pdb?

I want to see the dlls that are hooked to any process using python. Is it possible by pdb? Is there any way to attach to a process or open a process from python debugger and view the dlls hooked?
Shyam
  • 31
  • 2
1
vote
1 answer

PyDBG process snapshots not working

I'm following Gray Hat Python book and have copied their code for the process snapshots using PyDBG. When I run the script I get no errors and expected output however my program is not actually reverting to the snapshot. When I go in debug it seems…
user1415944
  • 55
  • 1
  • 9
1
vote
2 answers

PyDBG Python 2.7 error: "TypeError: 'module' object is not callable"

I am trying to use PyDBG with Python 2.7. I believe it is installed correctly. import pydbg dbg = pydbg() Produces error when run: Traceback (most recent call last): File "[path removed..]\pydbg.py", line 1, in import pydbg File "[path…
user1415944
  • 55
  • 1
  • 9
1
vote
1 answer

PyThread_acquire_lock - issues with Acquiring a Key

I am writing multi-threaded python application. The main thread create a Thread pool of 5 Worker Threads. The main thread also create a Monitor Thread. Total: 6 threads + 1 Main Thread = 7 All Threads talk with a MySQL server (mysqldb ->…
0
votes
2 answers

Inside a pydbg exit_hook (callback) how can I convert a stack value to a matching Python type?

This is possibly more of a ctypes question than a pydbg question, but I still don't understand why the results are inconsistent in the way they are. I have an exit_hook set on LoadLibraryA using pydbg and its utils.hook_container class like…
0xC0000022L
  • 20,597
  • 9
  • 86
  • 152
0
votes
0 answers

pydbg - failed setting breakpoint at

I want to hook calc.exe and get its api calling information, but I get the error that Failed setting breakpoint at 01012d6c (the type of error is pydbg.pdx.pdx)when I add hook. I search so much information but failed to solve. Could anyone tell me…
0
votes
1 answer

Python winappdbg getting process name from event object

I'm developing a debugging automation system using https://github.com/MarioVilas/winappdbg. I would like to retrieve process name from event object. Here is my code: def EventHandler(event): print 'Inside event handler' # I want to print the…
Dev.K.
  • 2,428
  • 5
  • 35
  • 49
1
2