Digital Bond

For Secure & Robust ICS

  • Home
  • Consulting
  • S4x18
    • S4x18 Call For Presentations
    • S4x18 Sponsor Packages
  • Dale Peterson
  • Hire Dale To Speak
  • Contact Us

Why do binary analysis when you have source?

July 8, 2008 by Dale G Peterson 2 Comments

We’re often asked why we would do binary analysis on software that we already have the source code to, and Rob Graham over at Errata’s blog had a great post on this a few days ago about that very topic. As Graham says the key difference between coders and hackers (or security researchers playing the part) is the concrete versus the abstract. Analyzing the binary itself allows us to have a much more complete understanding of what the program is actually doing without all the assumptions getting in the way.

In looking at the binary an auditor has to, on some level, forget what they know about what the program is supposed to do and focus on the specifics of the section that they are analyzing. Each memory read and write has to be examined for what it is, and not for what it is supposed to be, which in all honestly can be quite tedious but it’s the only way to find a lot of vulnerabilities. Not to say that if everyone was doing all their coding in assembly that we’d have less security problems, but an eye towards the underlying actions that happen at the basic level during the development process would.

But there is also a place for source code analysis. When looking for certain types of problems, like logic and implementation correctness that type of analysis will be very fruitful and can be found much easier than slogging through assembly. Auditing a section of code using complex mathematics an auditor could work his way up from the additions/subtractions in the binary to understand the function and spot the problem, but it’s a lot more likely that he would notice a typo and an incorrect variable being used and probably spend a lot less time find it. Doing this level of analysis also gives us insight into how vulnerabilities may have been created in the first place, allowing for recommendations of changes in coding practices and “big picture” security issues to prevent more like it from occurring. Both binary and source analysis have their place in an audit and combined give real understanding of programs security from top to bottom.

Filed Under: Uncategorized Tagged With: binary analysis

Comments

  1. jrrushi says

    July 8, 2008 at 09:20

    —–BEGIN PGP SIGNED MESSAGE—–
    Hash: SHA1

    Daniel,

    During my PhD research I came across a paper which I think could be useful to the community. It is written by researchers of the University of Wiskonsin and GrammaTech Inc, and is titled “WYSINWYX: What You See Is Not What You eXecute”.

    What you and Robert Graham of Errata Security write about this topic is quite rational. Even assuming that what programmers intend with high level source code they write, there still could be mismatches between such code and what is actually executed by the CPU.

    The paper is located at the following link:

    http://www.cs.wisc.edu/wpis/papers/wysinwyx05.pdf

    —–BEGIN PGP SIGNATURE—–
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQFIc2l03JhHvEZ9fsERAtkBAJ4gzjHrv/LjEC+Nq9rz/6xMVuupGACgxt7K
    YhsbnmITHW1Wyi/80YhfPqE=
    =mech
    —–END PGP SIGNATURE—–

  2. bruce.s.rosenthal says

    July 11, 2008 at 22:16

    There is also research that was conducted at Dept. of Computer Science, Illinois Univ., Urbana-Champagne that proposed executing binaries in a simulated processor that extended the ISA (instruction set architecture) to trace the prorogation of “tainted” inputs through system memory (registers, stack, heap). This allowed identification of tainted pointers and alarms/logs the taintedness as it moves through memory.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Subscribe to the S4 Events YouTube Channel

S4x18 Stats: 447 people from 25 countries
Thanks to all Attendees, Speakers & Sponsors

Follow S4 Events on Facebook

Tools & Talks

DNS Squatting and You

DNS Squatting and You

February 24, 2016 By Reid W 3 Comments

Basecamp for Serial Converters

Basecamp for Serial Converters

October 30, 2015 By Reid W 3 Comments

escar Asia

escar Asia

September 9, 2015 By Dale Peterson 1 Comment

Unsolicited Response Podcast: Cyber Insurance

Unsolicited Response Podcast: Cyber Insurance

August 27, 2015 By Dale Peterson 3 Comments

S4 Events Newsletter

Subscribe to our newsletter on leading / bleeding edge ICS cyber security information and S4 Events.

* indicates required
Email Format

Dale's Tweets

About Us

Digital Bond was founded in 1998 and performed our first control system security assessment in the year 2000. Over the last sixteen years we have helped many asset owners and vendors improve the security and reliability of their ICS, and our S4 events are an opportunity for technical experts and thought leaders to connect and move the ICS community forward.

Recent Comments

  • Engineer on Five Draft ISA99 / IEC-62443 Standards
  • Chris on Koyo/Automation Direct Vulnerabilities
  • Brandon Workentin on The ICS Security Stories We Tell And Love
  • Joe Weiss on Insanely Crowded ICS Anomaly Detection Market
  • Stuart Bailey on Unsolicited Response Podcast Is Back … With John Matherly of Shodan

Search….

Follow @digitalbond

Copyright © 2018 Digital Bond. - All Rights Reserved ·