Format specifications of data input are critical tomodel-based fuzz testing. Present methods cannot describethe format accurately, which leads to high redundancy intesting practices. In order to improve testing efficiency, wepropose a grammar-driven approach to fuzz testing. Firstly,we build a formal model of data format using higher-orderattribute grammars, and construct syntax tree on the basisof data samples. Secondly, all nodes in the syntax tree aretraversed and mutated to generate test cases according tothe attribute rules. Experimental results show that theproposed approach can reduce invalid and redundant testcases, and discover potential vulnerabilities of softwareimplementations effectively.
展开▼