Testing Security Controls for Logic Based Attacks

A lot of attention is being focused on cryptography and other security controls being manipulated by attackers who are exploiting poor implementations, lack of maintenance and seemingly unforseen omissions in the controls coding. This can lead to a trusted security control being turned into a weapon of choice. I overheard a group of people discussing software controls testing and the various methods being used, commercial code analysis tools, in-house scripts and test packs and also the ingenuity of pen testing. After a while, the conversation turned to the testing of logic based attacks on security controls and it seemed to be agreed there was nothing you could really do to get ahead of these sophisticated attacks.

The thing that makes coding and implementing security controls more difficult than the fairly straightforward sales workflow, business logic or simple messaging protocols and functions is that security controls and protocols are usually software-based implementations of a serious, well-defined mathematical algorithm. A lot of coders out there get into the software game with some inspiring courseware and long nights slaving over an integrated development environment. It’s relatively OK to use some snappy libraries and glue it all together with a bit of java or python for simple coding, like business logic, user interfaces and API workflow.

However, to work with security algorithms, you need skills in serious mathematics, an in-depth understanding of the algorithm and an in-depth knowledge of how to safely implement the controls within the software environment you are creating. Simply grabbing functions from a library and wiring them into your code can lead to disaster and you need to take a scientific approach. I believe we can test security controls adequately to limit or even avoid logic based attacks, but it’s not easy. Simply creating use case based testing will only examine the security controls functions in the known flow of user and system interaction with the control. The full extent of the underlying logic of the control may never be tested if we only used this approach. My point is many are only doing use case based testing.

A security control or protocols algorithm can be formally understood through formal semantics (a way of describing how the algorithm truly works in words and not symbols) to create proofs. The semantic proof of a security control should extend to your implementation surrounding the control. To do this you will need to create a formal view of what you are doing; as I said, it’s not easy, but you are playing with fairly complicated stuff. A problem is that a set of standardised test cases based on the formal proof for each security control and protocol should be produced and released with the code itself. We shouldn’t simply rely on another coder eyeballing changes; although useful, this can be dangerous, leading to concerns like Heartbleed.

Failing to understand the control correctly will lead you to understanding failure. From the broader modelling and proofs, you create test cases to reflect the functions of the control itself within the overall project and go beyond just how the users of the software interact with the control.

Join the CSO newsletter!

Error: Please check your email address.

Tags attackersHeartbleedcryptographyHeartbleed OpenSSL Bug

More about

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Christopher Flynn

Latest Videos

  • 150x50

    CSO Webinar: Will your data protection strategy be enough when disaster strikes?

    Speakers: - Paul O’Connor, Engagement leader - Performance Audit Group, Victorian Auditor-General’s Office (VAGO) - Nigel Phair, Managing Director, Centre for Internet Safety - Joshua Stenhouse, Technical Evangelist, Zerto - Anthony Caruana, CSO MC & Moderator

    Play Video

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

More videos

Blog Posts

Market Place