
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

































TaintScope: A Checksum-Aware Directed Fuzzing Tool for Automatic Software Vulnerability Detection
2
data
data Checksum field
Checksum function
1 i n t a , b , w, x , y , z ; 2 a = 1 1 ; 3 b = 5 ; Taint variable a, b with marking t a and t b 4 w = a ∗ 2 ; 5 x = b + 1 ; 6 y = w + 1 ; 7 z = x + y ; At the end of execution taint marking are w-> {ta} x -> {tb} y -> {ta} z -> {ta , tb}
8
Code:
(PC=“path constraints”)
Symbolic execution tree:
1 void decode_image(FILE* fd){ 2 ... 3 int length = get_length(fd); 4 int recomputed_chksum = checksum(fd, length); 5 int chksum_in_file = get_checksum(fd); //line 6 is used to check the integrity of inputs 6 if(chksum_in_file != recomputed_chksum) 7 error(); 8 int Width = get_width(input_file); 9 int Height = get_height(input_file); 10 int size = WidthHeightsizeof(int); //integer overflow 11 int* p = malloc(size); 12 ... 13 for(i=0; i<Height;i++){// read ith row to p 14 read_row(p + Width*i, i, fd); //heap overflow
If the two values mismatch, the code raises an error and exits immediately. (^10)
re-compute a new checksum
Read the attached checksum
compare two values
4.Repair Crashed Samples
16
eax {0x6, 0x7}, ebx {0x8, 0x9} add eax, ebx eax {0x6, 0x7, 0x8, 0x9}, eflags {0x6, 0x7, 0x8, 0x9}
Refinement:
Well-formed inputs can pass the checksum test, but most malformed inputs cannot
Refinement:
Well-formed inputs can pass the checksum test, but most malformed inputs cannot