Software Tools: Pays to be paranoid

Driver safety begins with code security, according to Steve Howard from Rogue Wave
Mark these words: at the beginning of next year, journalists will say that the top overall automotive story for 2015 was cyber security. Each month, there’s a new vulnerability, report, patch update or demonstration of just how insecure our connected cars are.
From in-vehicle infotainment system hacks to penetration through wireless vehicle services, the number of potential attack vectors grows with every new vehicle model, with drivers caught in the web. Yet the investment into improving cyber security at a fundamental level – the software itself – pales in comparison.
It’s not hard to figure out the reasons why. According to a Ponemon Institute survey of cross-tier automotive developers, 50 per cent of the respondents answered that they were either unsure or disagree with this statement: “Automotive software development teams have the skills necessary to combat software security threats.”
That’s a staggering number, considering that these same teams are delivering systems that monitor, control and protect all aspects of our vehicles. Further answers highlight the disconnect between the potential risks and the chosen investments, with over 50 per cent of developers not convinced that their company makes secure software development a priority or convinced that they have the enabling technologies to support it.
“You can develop that most advanced vehicle that has all of the latest safety features and high tech gadgets in it, but if it can be bricked by remote exploits, you are going to have wary consumers who may choose the next brand of vehicle because they put more emphasis on security,” said Ken Westin, senior security analyst for Tripwire.
At this point, it’s clear that everyone from the manufacturer to the driver wants secure software but can’t define a roadmap to success. The answer lies in targeting the one point in the entire development process that has the single biggest impact on all aspects of code and the above survey results have already revealed the answer: the developer.
Security manual
The cornerstone of embedded development is software, and software is where most errors are introduced. Not only has the volume of delivered automotive code increased, the complexity and variety of architectures, platforms and protocols have increased too. This pushes the number of permutations of state, behaviour, interactions and outputs well beyond a development team’s capabilities to test effectively.
The most crucial step towards better automotive security is to transform development teams such that they understand vulnerabilities and, more importantly, know how to build an efficient test framework to detect vulnerabilities. Developer education is key here; a relatively small investment in training and processes is the difference between a team that hides from the realities of cyber security risk and one that’s smart enough to choose the right techniques and tools to combat risk – many of which have already proven to be successful in other industries.
A simple test is to ask developers if they know how to restrict memory reads and writes to specific locations, thereby preventing improper access to data. While the answer may be simple, it’s the first step towards understanding that protection, and not performance, is the key to security.
Put developers in the driver’s seat
Educating developers and bringing new tools up to speed may take more time than some suppliers have, so it’s worthwhile to investigate two familiar test techniques up front and adapt them to automotive security. First, automotive teams have been using coding and safety standards, such as Misra and ISO 26262, for some time now but some organisations are starting to see how security standards can help in the same way. Adopting common, community-driven security standards such as OWasp and CWE takes advantage of expert security guidelines to educate development teams quickly on secure coding principles and provides a ready-to-use measure of the actual security of their code. If these standards prove insufficient, creating in-house, application-specific standards also creates a consistent, measurable guideline for application security testing.
It’s safe to say that some developers would baulk at new standards, especially without the education that goes with them, so the second familiar test technique solves three problems at the same time; efficiency, adoption and training.
Automated testing is something that automotive developers have used for years, proving to be an effective way to offload common, complex and often cumbersome work onto a controllable framework. Adapting existing automated test tools to include security verification adds little to no burden on the developer, in terms of execution, but provides useful education around good secure coding practices when a test fails. It’s this unique win-win environment that makes automated testing so valuable – and acceptable – to developers.
Agile
Bringing the benefits of automated testing into the modern development world of continuous integration and agile methodologies has proven to be effective for many organisations, allowing them to deliver more robust features at a faster pace. These strategies put the burden of common or complex development tasks onto tools that perform in the context of frequent check-ins and builds.
When switching from traditional testing methods to continuous integration, it’s critical to adopt tools that can keep up with development velocity and pare down vulnerability rates. The good thing is that some tools have changed the way they work to fit into incremental builds without requiring large investments in new technologies or training.
Testing by analysis, familiar to many in the automotive industry, is a good example. The technique has been around for years but it’s only now where algorithm design and hardware performance are at the point where analysis tools can perform all the checks they’re known for, security included, against incremental builds in a small amount of time.
Conclusion
Above education and technology, the most important point to remember when it comes to security is it pays to be paranoid. Working on the assumption that inputs into the system can’t be trusted and that there are far more types of target environments than anyone could possibly test for, serves to motivate more rigour in security testing and more drive to make testing efficient. And that’s the next step in automotive cyber security, after the software developer has evolved to be a secure software developer – fitting in as many comprehensive tests as possible so it’s less a question of whether the car is secure and more a question of: “What can we do next?”
Steve Howard is software quality and security consultant at Rogue Wave
