70 likes | 193 Views
Application Program Security. 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.
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);