Kayaker
November 18th, 2012, 01:16
Quote:
[Originally Posted by deroko;93690]I've used, and compiled trace.dlls with version for msvc9 (although any of them should be fine). |
Apparently not. Unfortunately pintools only seems to generate a pin.log error log when the Revision number is different from the compiled Tool (like the error Indy got), but not when the compiler version used is different (which is what my problem was).
To explain, I had originally downloaded the Rev. 53271 vc10 version of pintools, since I have vc10 and was envisioning recompiling the examples etc.
Pinlog didn't work, but no error log was produced. I then used the Rev. 53271 vc9 version, which is what pinlog was compiled with, and finally got it working (yay!). I *thought* I had done that originally before I mentioned the problem, but must have screwed that up.
I tried another malware analysis Tool example I found that had been compiled with Rev. 33543 vc8 version of pintools, and this one did give me a pinlog.log error log explaining the problem (mismatching Pin and Tool CHARM-VERSION).
So unfortunately it seems you need the exact Revision *and* compiler version of pintools to run someone elses Tool. If the Revision number is incorrect, you will get an error log. If the compiler version is incorrect, you won't get an error log, which makes it even more confusing.
Maybe someone else can confirm all this, but that's what my evidence points to. Just means you have to recompile a tool from source, but does make it a bit annoying when you want to share your tool with others.
I did do some reversing on the problem before I came to a solution. I used Softice BPLOAD to break on trace.dll being loaded, followed that back to pintools pinvm.dll which calls the Tool (trace.dll) main() function. It quietly crashed in PIN_Init(argc, argv). A loop was being called, trying to match a string. When it wasn't found it seemed to record an unlogged "
could not find match for attribute" error and simply exited. Further details are probably moot at this point.
In any case, thanks for the tool Deroko and the introduction to Pintools. I used it on a upx packed file and it definitely highlights the most used loops. I wonder how many color ranges vs execution counts could be defined before the display got nauseating to look at?
Regards,
Kayaker