70 likes | 202 Vues
This article discusses the threat of Dynamic Link Library (DLL) Injection and how attackers can replace DLL files with malicious code. It presents Tripwire as a solution for file integrity management, emphasizing the importance of hashing system files and storing these hashes securely. The need for regular hash verification post-system updates is highlighted, as mismatches can indicate the presence of a Trojan horse. Additionally, concepts like Integer Overflow, Race Conditions, and the Time of Check/Time of Use problem are explored with relevant code examples to illustrate these vulnerabilities.
E N D
DLL Injection • Dynamic Link Library • Replace a dll with attack code
Tripwire • File integrity manager • Hash all system file and store these hashes in a secure database. • Hashes need to be recomputed when system is updated. • Check the hash of all system files. If any do not match, you have a trojan horse.
Integer Overflow • Werner & Frank, “What Dick and Jane Don’t Know About Integers”, Information Systems Education Journal, 2008.
Code Fragment 3.3 unsigned char connections = 0; //insert network code // connections++; if(connections < 5) grant_acccess(); else deny_access();
Race Condition • Time of Check/Time of Use Problem • (TOCTOU) • Pointer to my file • Check it • Pointer to password file
Code Fragment 3.11 if(access(argv[1], R_OK) != 0) { printf(“Cannot access file.\n”); exit(1); } file = open(argv[1], O_RDONLY);