Slide 16
Slide 16 text
16
Pin and Data Flow Analysis
●
Then, spread the taint by monitoring all instructions which
read (LOAD) or write (STORE) in the tainted area
if (INS_MemoryOperandIsRead(ins, 0) &&
INS_OperandIsReg(ins, 0)){
INS_InsertCall(ins, IPOINT_BEFORE,
(AFUNPTR)ReadMem,
IARG_MEMORYOP_EA, 0,
IARG_UINT32,INS_MemoryReadSize(ins),
IARG_END);
}
if (INS_MemoryOperandIsWritten(ins, 0)){
INS_InsertCall(
ins, IPOINT_BEFORE,(
(AFUNPTR)WriteMem,
IARG_MEMORYOP_EA, 0,
IARG_UINT32,INS_MemoryWriteSize(ins),
IARG_END);
}
mov regA, [regB] mov [regA], regB.