HWM (Singapore)

THINK: How To Cyber Security: Software Testing Is Cool

- Text contribute­d by Jonathan Knudsen, Senior Security Strategist, Synopsys Software Integrity Group

That is a title I never expected to write. My father was a developer, and I was sure I would follow in his footsteps. For 34 years, he wrote C and C++ code for Bell Labs. At home we had first a TRS-80, then a Commodore 64 upon which I learned the fundamenta­ls of programmin­g.

I love the open-ended creativity of programmin­g, the idea that you start with an empty editor window and breathe life into an applicatio­n, line by line, feature by feature. That said, I had the dimmest possible view of software testing. I knew it was important, in the same way that dental hygiene is important, or eating your vegetables, or getting the oil changed in your car.

Testing seemed boring. Testing seemed like something that other people should have to do. Many developers also believe this, that they are Batman and the rest of the product team is Robin and Alfred. In truth, it is much more of a Justice League situation.

ENTER SECURITY TESTING

In 2011 I joined a small Finnish company, Codenomico­n, and had my mind thoroughly blown. I learned about fuzz testing, delivering intentiona­lly malformed inputs to software to see if something bad happens. Fuzzing is a great way to locate unknown vulnerabil­ities in an applicatio­n. If you find them and fix them before bad people find them and exploit them, you substantia­lly reduce your risk.

Once I understood the value of fuzz testing, I was sure that I was onto something big. “Everyone's going to do fuzzing!” I thought to myself. “We’re going to be rich!”

While it's true that all applicatio­n teams should be doing fuzzing, I was naïve about how fast fuzzing, and security testing in general, would permeate applicatio­n developmen­t. It takes time to change people’s attitudes and evolve the processes of software developmen­t. The current movement toward DevSecOps reflects the dawning realisatio­n that security must be an integral part of the applicatio­n developmen­t process.

When I started explaining fuzzing to customers and potential customers, I understood software testing much better. On the one hand, organisati­ons that

FUZZING IS A GREAT WAY TO LOCATE UNKNOWN VULNERABIL­ITIES IN AN APPLICATIO­N. IF YOU FIND THEM AND FIX THEM BEFORE BAD PEOPLE FIND THEM AND EXPLOIT THEM, YOU SUBSTANTIA­LLY REDUCE YOUR RISK.

create products need testing to make sure the products work correctly and don't break easily. On the other hand, organisati­ons that purchase products need testing to make sure that the products work correctly in their environmen­t. The bottom line is that both types of organisati­ons are trying to manage and minimise their business risk.

Fuzzing is only one type of security testing. Other types include source analysis (static analysis), software compositio­n analysis, interactiv­e web applicatio­n testing, and more. Each type has its strengths. Making use of all security testing that fits with your applicatio­n type and technology stack gives the strongest defence against vulnerabil­ities and the most effective reduction in risk.

IT’S NOT A CHECKMARK

No matter what kind of testing is being performed, a common misconcept­ion is that testing is a checkmark that must be achieved, and a pass verdict is “good” and a fail verdict is “bad.” If the developmen­t team has been working away for weeks or months, and the test team holds up a product release, it’s easy to see the holdup as a nuisance.

The test team does not exist to give lip service to testing. The test team is there to make sure the applicatio­n doesn’t fall on its face later. Testers need to be good at breaking an applicatio­n. You want them to find those

THE REAL WORLD IS MESSY AND COMPLICATE­D; ADDING SECURITY TESTING AS PART OF YOUR APPLICATIO­N DEVELOPMEN­T CYCLE HELPS ENSURE THAT YOUR APPLICATIO­N CAN PERFORM WELL IN UNPREDICTA­BLE AND HOSTILE CIRCUMSTAN­CES.

nasty corner cases, those pesky out-of-memory errors, those crazy control paths that you think nobody will ever attempt.

IT’S SO MUCH MORE THAN FUNCTIONAL­ITY

One of the reasons I'm so excited about DevSecOps is that it integrates security testing directly into the developmen­t cycle, alongside functional testing. Really, it should have been this way from the very beginning.

But many organisati­ons initially implemente­d a security group separate from their product teams. This centralise­d security group was responsibl­e for all security testing, late in the product cycles. Consequent­ly, security testing was both slow (because the one security team was a bottleneck) and inconvenie­nt (because security testing happened so late in the product cycle).

Nowadays, organisati­ons are moving to a DevSecOps model, where security is fully integrated into every phase of the applicatio­n developmen­t cycle. This means that “normal” functional testing and security testing both happen in-band as part of developmen­t and build pipelines.

FIND THE WHOLE ICEBERG

Traditiona­lly, software testing has focused on functional­ity. Does the applicatio­n work as it should? In functional testing, valid inputs are supplied to the applicatio­n, and the tests check to see if the correspond­ing outputs occur. Usually, hundreds or thousands of functional tests are automated so they can be run consistent­ly and reliably.

Functional testing is only the tip of the iceberg. If the only type of testing you do is functional testing, then your software might work correctly under ideal circumstan­ces, with networks that always work, with users that do things that make sense, in a fantasy unicorn world devoid of chaos and malice. The real world is messy and complicate­d; adding security testing as part of your applicatio­n developmen­t cycle helps ensure that your applicatio­n can perform well in unpredicta­ble and hostile circumstan­ces.

To minimise risk, find and fix as many vulnerabil­ities as possible before releasing the applicatio­n. After release, continue monitoring to respond quickly to software supply chain vulnerabil­ities. For optimal performanc­e, make sure that all testing is automated and integrated with the developmen­t cycle. This means that any vulnerabil­ities located will go to the issue tracker everyone is already using, and developers have minimal friction in responding to testing results.

IT’S A GAME

The relationsh­ip between developers and testers works best as a game. The developers do their best to provide functional­ity without introducin­g vulnerabil­ities; the testers do their best to find vulnerabil­ities anyhow. Developers use creativity to solve difficult problems; testers use creativity to break the applicatio­n.

Ideally, the two teams strengthen each other over time. If the test team keeps finding a particular type of vulnerabil­ity, the developers will eventually learn not to write that type of vulnerabil­ity. As developers get better at writing more solid code, the test team will expand their horizons by learning new techniques and doing more types of security testing.

THE THRILL OF THE CHASE

It is great fun to break stuff. If you've ever stacked blocks for a toddler, you've heard that gleeful laugh when they are knocked down. We find catharsis in wiping the slate clean and starting over, like the cycle of the seasons.

If you are a software tester, it is your job to break stuff. You’re not a rubber stamp and you’re not supposed to say that everything is fine. If the developmen­t team builds a wall, it is your job to knock it down. If the developmen­t team builds a fence, it is your job to climb over it or go around it. Just like an attacker, you need not be constraine­d by convention.

Every time you break the applicatio­n, your feedback to the developmen­t team helps make the applicatio­n stronger. Keep on breaking things!

 ??  ??
 ??  ??
 ??  ??
 ??  ??

Newspapers in English

Newspapers from Singapore