Questions tagged [intel-pin]

Pin is a dynamic binary instrumentation framework for the IA-32 and x86-64 instruction-set architectures that enables the creation of dynamic program analysis tools.

"Pin is a dynamic binary instrumentation framework for the IA-32 and x86-64 instruction-set architectures that enables the creation of dynamic program analysis tools."

Pin resources:

237 questions
0
votes
0 answers

Obtaining libc function name (e.g., scanf) with Intel PIN Instrumentation

I'm trying to obtain a routine name for libc functions (e.g., scanf in this case) with the Intel PIN instrumentation. After trying a lot of ways, I am under the belief that this is difficult, but I figured to ask first. For the sake of brevity,…
Jay
  • 373
  • 1
  • 10
0
votes
1 answer

Intel Pin - How to only instrument child process

I have a run.sh script: expr 1 + 1 what I actually want to instrument is expr. Here is My Pin tool's code(I only instrument indirect calls to avoid the output became to large): /* * Copyright (C) 2004-2021 Intel Corporation. *…
lzy XD
  • 1
  • 1
0
votes
0 answers

Why does the pin count only three blocks in trace?

I want to list all traces with the blocks they contain, using intel pin. But, as a result, I have a maximum of three blocks in the trace, although there should be more. Tell me, please, why is that so? Thanks in advance! #include "pin.H" #include…
Artorios
  • 1
  • 1
0
votes
1 answer

Windows cmd.exe detaches from processes after creating them

I'm trying to run some dynamic analysis routines on Windows programs, using things like Intel Pin and DynamoRIO. I am running Windows 11. A problem I am having is when I use cmd.exe to launch an interactive application, control returns immediately…
Lught
  • 134
  • 6
0
votes
0 answers

How do I make Intel-PIN work with Java server

I am currently working on getting the CPU footprint from AcmeAir monolithic application: https://github.com/blueperf/acmeair-monolithic-java I have correctly setup the webapp and database and it can normally function in a docker container. Normally…
0
votes
0 answers

How do I use Intel Pin to instrument child processes in Windows?

I'm trying to learn how to use Intel Pin (Version 3.25) on Windows 11. I am trying to instrument the ETS6 software by the KNX Association. On startup, ETS creates another process by calling CreateProcessW. This child process does all the interesting…
Lught
  • 134
  • 6
0
votes
0 answers

Creating a Trace File in ChampSim

Whenever I execute a trace file that I created using a pin tool, I get this on the terminal Heartbeat CPU 0 instructions: 10000003 cycles: 2500068 heartbeat IPC: 3.99989 cumulative IPC: 3.99989 (Simulation time: 0 hr 0 min 20 sec), followed by…
0
votes
0 answers

How to replace an unsafe function with a safe one in Intel PinTool?

How to develop an unsafe function replacement plugin based on Intel PIN framework? For instance, replace strcpy with strcpy_s. I tried RTN_FindByName(img,"strcpy") to find strcpy and used PIN_UndecorateSymbolName, however, it seemed not work, I…
0
votes
0 answers

Intel Pin: How to detect the error of use-after-free?

The pointer which points to the have-freed memory shouldn't been use again. But how to use the intel pin to detect this event? I tried to check the operator* (resolve reference) and the operator-> with the RtnFindByName API, but unlikely, it doesn't…
M4Ru1
  • 1
  • 5
0
votes
1 answer

Intel Pin: how to replace/skip syscall

I'd like to replace/emulate syscalls in a static binary running on 64bit linux 4.4.0-33, preferably using Intel Pin from the documentation there is…
Revin
  • 95
  • 3
  • 8
0
votes
1 answer

Intel PIN: get backtrace on windows

I'm trying to write a pintool on windows. One thing I want to do is print stack trace after specific instructions. According to the Pin Manual, the PIN_Backtrace is only available on Linux and Mac OS. Is there any equivalent solutions on Windows?
Francium
  • 81
  • 7
0
votes
0 answers

Pintool and itrace

I met a problem when using pintool and itrace, I use pintool to execute a HelloWorld.exe demo program pin -t itrace.dll -- HelloWorld.exe However, the generated "itrace.out" indicate no eips for user code like…
0
votes
0 answers

How to get memory rd/wr trace for a specific function call using PIN tools

I am trying to dump mem rd/wr trace for a specific function call from my application and after researching a bit I came across a solution to do so. But since I am very new to PIN usage, I am not sure how to pass routine names (refer to Routine(RTN…
0
votes
0 answers

how to find a function with RTN_FindByName?

i am struggling On finding a function with prototype mul(float,float) i try to use RTN_FindByName but the output is still empty. VOID Arg1Before(CHAR * name, ADDRINT size) { TraceFile << name << "(" << size << ")" << endl; } VOID…
0
votes
0 answers

Intel Pin gets segmentation fault if target application uses fopen() function?

I'm currently using Intel Pin to trace the memory access of some applications. But I found that if the target application used fopen() function, the Pinatrace tool crashed with segmentation fault. Here is the test code I'm using: int main(){ …