Research Article

OFFDTAN: A New Approach of Offline Dynamic Taint Analysis for Binaries

Algorithm 1

Source code of test.cpp.
(1)   void myMemcpy(char si, int count)
(2) char dest;
(3) memcpy(dest, si, count); //building program
(4) //vulnerability point
(5)   int main(int argc, char argv)
(6)   HANDLE hOpenFile = (HANDLE)CreateFile(argv, //reading taint
GENERIC_READ, //source file test.txt
FILE_SHARE_READ, NULL,
OPEN_EXISTING, NULL, NULL);
(7)   ……
(8) count = readCount(buf); //reading the count
(9) newBuf = readNewBuf(buf); //reading the string
(10) myMemcpy(newBuf, count);
(11) return 0
(12)