Home > Ask the Security Experts > Information Security Threats Questions & Answers > What is the best way to manually test for buffer overflows?
Ask The Security Expert: Questions & Answers
EMAIL THIS

What is the best way to manually test for buffer overflows?

John Strand, featured expert EXPERT RESPONSE FROM: John Strand, featured expert

Pose a Question
Other Security Categories
Meet all Security Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 01 August 2008
What is the best way to manually test for buffer overflows?

>
There are two ways of reviewing a program for buffer overflows. First, the source code should be analyzed and reviewed before the code is compiled. Numerous tools are available for this task. My favorites are Fortify Software Inc.'s Rough Auditing Tools for Security (RATS) and Cigital Inc.'s ITS4. Both are free to download. It's also possible to use the '/analyze' compiler option with Microsoft Visual C++. All of the above tool checks are not simply restricted to buffer overflows, but they will check for other weaknesses, such as format string vulnerabilities and heap overflows.

The second way to test for buffer overflows is to look at compiled code. For a long time, many security professionals believed that the only way to detect vulnerabilities was to test the source code for the program. This was (and is) just not true. Numerous tools exist that look for vulnerabilities in a compiler's low-level assembly code. They also utilize fuzzing techniques, which test software by inputting massive amounts of random data and seeing if errors occur.

To review the compiled code for patterns in the assembly code, try tools like msfpescan and mfselfscan from the Metasploit project.

For fuzzing, look at tools like SPIKE, BreakingPoint Inc.'s testing tools and MuDynamic Inc.'s analyzer products. Spike is free, while Breaking Point's and Mu's tools are commercial. If application security checking is an extensive part of your job, I would strongly suggest considering a commercial product.

Many of the fuzzing products available take good input and mangle it to attempt an application break. To do this manually, find the inputs to an application and try to put in as many characters as possible. If it crashes, you need to discuss what went wrong by reviewing the application and system logs with the developers. Obviously it's wise to make sure you have permission before attempting this.

Ultimately the issue is much wider than simply checking for buffer overflows. Buffer overflows fall under the responsibility of developers not validating the inputs to their applications. For every data type in an application, there should be a limit to the number and type of characters it can accept. Identify any inputs that accept data that should not be allowed. For example, a field asking for "State" does not need to allow *, $, @, or ^. Regardless of whether a buffer overflow exists, it should be fixed to only allow the standard Aa-zZ character set.


BUFFER OVERFLOW TUTORIAL
  Buffer overflow protection introduction
  How to prevent buffer overflows
  What causes buffer overflows
  Testing for buffer overflows
  Web application vulnerability scanners


BROWSE BY TAG
Information Security Threats,   Application and Platform Security,   Securing Productivity Applications,   Application Attacks (Buffer Overflows, Cross-Site Scripting),   VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Information Security Threats
How to get rid of malware, botnets on a hospital IT network
Should a national cybersecurity strategy include offensive botnets?
How can search results lead to malware?
How to prevent brute force webmail attacks
How to prevent mobile phone spying
What are today's antivirus software trends?
How to detect input validation errors and vulnerabilities
Can secure USB devices prevent man-in-the middle attacks
How to prevent and build protection against online identity theft
Is there a spy on my mobile device?

Securing Productivity Applications
How to detect software tampering
Adobe fixes 29 flaws in Acrobat, Reader
Adobe warns of critical update for Reader, Acrobat 9.1.3
Why should we place data files on a separate partition than the OS?
Adobe updates ColdFusion, JRun, Flex
Serious Adobe Flash flaw being exploited
Adobe acknowledges serious Flash zero-day vulnerability
Adobe issues security advisory for Flash zero-day flaw
When to use the service features of the Metasploit hacking tool
How to manage patches for Adobe

Application Attacks (Buffer Overflows, Cross-Site Scripting)
Adobe warns of critical update for Reader, Acrobat 9.1.3
9 Ways to Improve Application Security After an Incident
Developers Need Help with Security Errors
Buffer overflow tutorial: How to find vulnerabilities, prevent attacks
SQL injection protection: A guide on how to prevent and stop attacks
Experts rebuke programmers who use SQL injection as feature
SANS: Application threats, website flaws pose biggest security threats
Mozilla helps Adobe push out faster patches
SSH key compromise shuts down Apache website
IBM finds sharp spike in malicious content on trusted sites
Application Attacks (Buffer Overflows, Cross-Site Scripting) Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
sheepdip  (SearchSecurity.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Find Security Solutions for Your Business
TechTarget Security Media
Information Security View this month\\'s issue and subscribe today.
Information Security Decisions Apply online for free conference admission.
SearchSecurity.com
HomeNewsMagazineMultimediaWhite PapersLearningAdviceTopicsEventsAbout Us

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts