Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intel pin: Instrumentate running process

I created a simple pin tool that dumps any win32 CreateFileW calls. It works fine, but when i try to attach it to an already running process, the process simply terminates. Tried with several applications (notepad, wordpad, internet explorer), same result. This is the command i use:

.\pin -pid 8804 -t dumpfile.dll

I got a tip to try and turn off multi-threading like this:

.\pin -mt 0 -pid 8804 -t dumpfile.dll

but it did not help. Also tried with another, out of the box pintool, didn't work either, so the problem is not in my pintool. Any ideas?

Thanks in advance!

like image 200
Donpedro Avatar asked Dec 13 '12 19:12

Donpedro


People also ask

What is Pin Intel?

Pin is a dynamic binary instrumentation framework for the IA-32, x86-64 and MIC instruction-set architectures that enables the creation of dynamic program analysis tools. Some tools built with Pin are Intel® VTune™ Amplifier, Intel® Inspector, Intel® Advisor and Intel® Software Development Emulator (Intel® SDE).


1 Answers

Okay, today i had some time on my hands to research this problem again. Tested with a console application launched from cmd, and before shutting down, it actually dumped an error message, the .dll (the pin tool) was not found...

So when running pin you actually have to specify the full path to your pin tool, or the path relative to the instrumentated binary's location.

like image 142
Donpedro Avatar answered Oct 15 '22 16:10

Donpedro