Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | [Full-disclosure] Static Code Analysis - Nuts and Bolts |
|---|---|
| Date: | Fri, 22 Jun 2007 17:53:10 +0200 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi list, due to personal interest I'd like to ask on your opinion regarding best practices for static code analysis. I guess most of us are accustomed to this method. After all - if you want to find a vulnerability that basically means that either luck, fuzzing or statical analysis will have something to do in the process. Now statical analysis of many languages can be quite fun. Take PHP and Python for example. You can mostly read the code like a book and mark down interesting passages to further analyze later on. Grep and a good editor are about all we need. However other languages often tend to become really nasty. Let's say we want to analyze a 2MB C-source split up into several thousand files. "cat * | grep strcpy" will most probably return about a hundred results. I just did a lot of static analysis lately and sometimes it took me more than half an hour to trace back _one_ of the strcpy()-calls and check if the copied bits could be controlled in some way. Of course not every dangerous call takes this long to check (also I might be a little slow), however I think that you all know what I'm talking about here. So after not having slept for about a week I started to search for tools to ease working on my projects. (Yes, I did drop my plans of auditing 2MB C-sources using only vim and grep...) Now this is where I'd like to open up an exchange on best practices and tool-combinations. What program(s) do you use in static code analysis? It doesn't matter if you are a hardcore grep+editor researcher or if you use complex frameworks: Tell me (and also the rest of the list) about it. I took a quick look at flawfinder and rats. However they do nothing that grep couldn't accomplish as well. For browsing the code and finding references to functions or declarations of variables I am currently using redhat's source-navigator. It is by no means perfect and has been unmaintained for a while - however it is still a great help. That is just my two cents. Any remarks/hints/ideas/concepts/nuts would be greatly appreciated by me as well as a lot of other people interested in the matter. (At least I hope so.) So please share your knowledge. Many Greetings Paul -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGe/BlaHrXRd80sY8RCgUSAJ9Y9+LCr4hZ1vs6gOrZHa6O9Wv91wCgypM9 1fxdotQfIdgcpXJg9RAP0xs= =ni/j -----END PGP SIGNATURE----- _______________________________________________ Full-Disclosure - We believe in it. Charter: http://lists.grok.org.uk/full-disclosure-charter.html Hosted and sponsored by Secunia - http://secunia.com/
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Full-disclosure] Month of Random Hashes: DAY TWELVE, Valdis . Kletnieks |
|---|---|
| Next by Date: | [Full-disclosure] XSS hvv.de, DaWickedest |
| Previous by Thread: | [Full-disclosure] [CAID 35450, 35451, 35452, 35453]: CA Products That Embed Ingres Multiple Vulnerabilities, Williams, James K |
| Next by Thread: | Re: [Full-disclosure] Static Code Analysis - Nuts and Bolts, Debasis Mohanty |
| Indexes: | [Date] [Thread] [Top] [All Lists] |