hasherezade / tiny_tracer

A Pin Tool for tracing API calls etc
1.25k stars 138 forks source link

Installation Issue #12

Closed ImanHosseini closed 2 years ago

ImanHosseini commented 2 years ago

When I use the right-click context menu, I get "You'll need a new app to open this kind of file .exe", and when I run it from cmd I get:

PIN is trying to run the app:
"D:\ProjectsHell\IntelPIN\pin-3.20\pin.exe"
The system cannot execute the specified program.
Disable Kernel Mode Debugger before running the PIN tool!

I've checked that pin tool works (it can run say, icount) and that kernel mode debugger is disabled by bcdedit.

hasherezade commented 2 years ago

Please read and follow closely the instructions: https://github.com/hasherezade/tiny_tracer/wiki/Installation I see your Pin is in the directory "D:\ProjectsHell\IntelPIN\pin-3.20\" and it should be in "C:\pin".

ImanHosseini commented 2 years ago

But I have patched up the bat file with the directory as you said.

hasherezade commented 2 years ago

There are also paths to be patched in the .reg files: https://github.com/hasherezade/tiny_tracer/blob/master/install32_64/add_menu.reg

ImanHosseini commented 2 years ago

I have fixed those too. (and I am even trying to directly run it from cmd, 'run_me.bat "/path/to/t.exe" exe' but I get the kernel debugging error)

ImanHosseini commented 2 years ago

I tried moving stuff to C:\ just in case it is a weird drive issue, but nope:

C:\pin\source\tools\tiny_tracer\install32_64>run_me.bat kdb_check.exe exe
PIN is trying to run the app:
"kdb_check.exe"
The system cannot execute the specified program.
Disable Kernel Mode Debugger before running the PIN tool!

btw, after I press :

[process exited with code 9020]

FWIW I build using VS 2022 Preview, on a Win 11 machine.

hasherezade commented 2 years ago

Can you run the kdb_check.exe from commandline as standalone, and show me the output?

ImanHosseini commented 2 years ago

Ok this is bad :(

C:\pin\source\tools\tiny_tracer\install32_64>.\kdb_check.exe
The system cannot execute the specified program.
ImanHosseini commented 2 years ago

I tried running it with WinDBG and got the issue:

kdb_check.exe
Operation did not complete BLAH BLAH contains virus BLAH

Windows defender is messing with it! I'm gonna exclude the directory in Defender and try again.

hasherezade commented 2 years ago

ok, so just the file is restricted from running... so there is a false positive on this, probably because it checks for the debugger...

ImanHosseini commented 2 years ago

Yay! It works now, thank you so much. [Really awesome tool!]

hasherezade commented 2 years ago

great, I am happy that it works fine now!