Electronicdesign 15431 Fuzzy 0

Is Your Security Testing Soft and Fuzzy?

May 15, 2017
The latest spate of ransomware highlights the need for security testing. One technique for doing this is called fuzz testing.

The latest spate of ransomware highlights the need for security testing. One technique for doing this is called fuzz testing, or fuzzing. It is an automated test methodology that uses large amounts of invalid or random data for the input to the application. The application is tested in the usual fashion for errors such as memory leaks and invalid pointers. This approach works best with applications that have structured inputs, such as packets for a protocol or file formats.

Automatically generating test vectors is not a new approach, and has been used in other test environments—including unit testing. The trick is to generate examples that are semi-valid so as to expose corner cases, parsing errors, and errors in general. It can also be used to test security to see if trust boundaries are breached.

There are toolchains available to generate the test cases. Some provide automated input minimization support that is designed to reduce the number of test cases and help isolate a failure. This is useful because a malformed, totally random input may cause a difficult-to-identify bug. A minimization tool will minimize the input stream to the point where the error still occurs, making the task of identifying the problem easier. Delta debugging is an approach that can reduce a test case to a minimal failure-inducing case.

Fuzzing can also be used to detect differential bugs, or bugs detected by comparing results using the same inputs with different application implementations. This might be an incrementally improved application or two different applications that perform the same function, such as an encryption algorithm or a communication protocol stack. Different results using the same input indicate a case that should be investigated.

Google’s OSS-Fuzz program found more than 1,000 bugs in 47 open-source projects.  Of course, this type of testing is not limited to open-source projects, but these do provide easy access to large amounts of code. Top errors included heap buffer overflows, global buffer overflows, and stack overflows. Many of these were caught as part of regression testing of new versions.

Fuzzing is only one part of a testing regimen, but it may not be one that you are already using. While it’s not applicable to all applications, it can be quite useful and automated for many applications.

Sponsored Recommendations

TTI Transportation Resource Center

April 8, 2024
From sensors to vehicle electrification, from design to production, on-board and off-board a TTI Transportation Specialist will help you keep moving into the future. TTI has been...

Cornell Dubilier: Push EV Charging to Higher Productivity and Lower Recharge Times

April 8, 2024
Optimized for high efficiency power inverter/converter level 3 EV charging systems, CDE capacitors offer high capacitance values, low inductance (< 5 nH), high ripple current ...

TTI Hybrid & Electric Vehicles Line Card

April 8, 2024
Components for Infrastructure, Connectivity and On-board Systems TTI stocks the premier electrical components that hybrid and electric vehicle manufacturers and suppliers need...

Bourns: Automotive-Grade Components for the Rough Road Ahead

April 8, 2024
The electronics needed for transportation today is getting increasingly more demanding and sophisticated, requiring not only high quality components but those that interface well...

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!