- Examines Source Code and Look for Security Weaknesses - Flawfinder

Flawfinder searches through C/C++ source code looking for potential security flaws and produces a report describing the potential flaws found in source code, ranking them by likely severity.

Flawfinder works by using a built-in database of C/C++ functions with well-known problems, such as buffer overflow risks (e.g., strcpy(), strcat(), gets(), sprintf(), and the scanf() family), format string problems ([v][f]printf(), [v]snprintf(), and syslog()), race conditions (such as access(), chown(), chgrp(), chmod(), tmpfile(), tmpnam(), tempnam(), and mktemp()), potential shell metacharacter dangers (most of the exec() family, system(), popen()), and poor random number acquisition (such as random()). The good thing is that you don't have to create this database - it comes with the tool.

Flawfinder then takes the source code text, and matches the source code text against those names, while ignoring text inside comments and strings (except for flawfinder directives). Flawfinder also knows about gettext (a common library for internationalized programs), and will treat constant strings passed through gettext as though they were constant strings; this reduces the number of false hits in internationalized programs.

Flawfinder can also generate differential reports by pointing it to a patch (diff) file describing the code changes. This way it can be used to determine if the potential flaws found in code have increased or decreased after a commit to a source code management system like CVS or Subversion.

Continue Reading...


source:http://linuxpoison.blogspot.com/2012/02/135781677512397.html