Home > Ask the Security Experts > Application Security Questions & Answers > Can Snort stop application-layer attacks?
Ask The Security Expert: Questions & Answers
EMAIL THIS

Can Snort stop application-layer attacks?

Michael Cobb EXPERT RESPONSE FROM: Michael Cobb

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: 31 July 2007
Can Snort address application-level attacks (SQL injection and cross-site scripting)? Can it be set up to stop these attacks, or can it only detect them?

>
EXPERT RESPONSE
SQL injection and cross-site scripting (XSS) attacks are the most common application-layer attacks on the Internet. Both attacks succeed when user input is not correctly filtered or validated to ensure that it is within the application's expected bounds. A network-based intrusion detection (IDS) tool such as Snort can be set up to detect certain types of SQL injection and XSS attacks as they occur. Snort actually has a default rule set that contains signatures for detecting these intrusions. However, they can be easily bypassed by an attacker, mainly by converting the malicious input string into its hex-encoded value.

You can take advantage of Perl's compatible regular expressions (pcre), which are supported by Snort, to write your own concise signatures that cover your particular Web application. Various Snort signatures are also available on the Internet for both SQL injection and XSS protection. Visit Network Intelligence for some good examples. Depending upon how your Web site is structured, signature-based detection can lead to a high number of false positives. For that reason, you may have to tune these signatures to your own requirements. Unfortunately, since most SQL statements are created dynamically by a Web application, each one may be different. This diversity makes it difficult to implement effective signatures. Although Snort can be deployed as a full-blown network intrusion prevention system, with real-time alerting capabilities, it can't stop a sophisticated SQL injection or XSS attack. So even though Snort can add an important layer of defense for your application, it doesn't fix the underlying problem of poorly written applications.

A more efficient and effective technique is to try to eliminate SQL injection and XSS holes in-house. Firstly, implement a secure software development lifecycle methodology for your Web applications. Better programming practices such as code reviews, input validation and SQL parameter binding will all make your applications more robust. On larger projects, you may want to use automatic source code scanning tools.

Next, ensure that your Web server and your database server have been hardened. Never use root access when connecting to the database. It's important to ensure that users do not have privileged access to tables and views. Certainly deny them access to special system utilities and system-stored procedures.

Finally, before launching a Web application, carry out a penetration test to assess whether your methodologies have been implemented correctly. Depending on your budget and the value of your data, you may want to augment your defenses with a database extrusion-prevention (DBEP) product. Often referred to as database firewalls, they function more like a network behavior anomaly detection (NBAD) system than a simple firewall or IDS, preventing unauthorized access based on user roles and detecting abnormal user activity.

More information:

  • Check out SearchSecurity.com's Snort Intrusion Detection and Prevention Guide.
  • Ed Skoudis explains how the cross-site scripting threat has evolved.


  • Sound Off! -   Be the first to post a message to Sound Off!


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


    RELATED CONTENT
    Application Security
    How to test the security of personal details submitted to a website
    Is security improved when the number of Internet gateways is reduced?
    Are Internet cafe users' email credentials at risk?
    Which operating system can best secure an FTP site?
    Will firewall technology have to adapt to applications that use port 80?
    How secure is a mobile phone platform that has an open source framework?
    What ports should be opened and closed when IPsec filters are implemented?
    How secure is online banking today?
    Should enterprises use open source productivity suites?
    Are encrypted Microsoft Word files less safe in Internet transit than PDF files?

    Application Attacks (Buffer Overflows, Cross-Site Scripting)
    Yahoo, McAfee to warn users of dangerous websites
    Botnets and ethics
    SQL injection attack infects hundreds of thousands of websites
    HP customers vulnerable to software update tool flaw
    New hacking technique exploits common NULL programming error
    What are the dangers of cross-site request forgery attacks (CSRF)?
    Stopping malware in its tracks
    Shrewd attackers bypass old security defenses with Web attacks
    What software development best practices can prevent input validation attacks?
    What is the most secure way for application developers to manage cookies?
    Application Attacks (Buffer Overflows, Cross-Site Scripting) Research

    Network Intrusion Detection (IDS)
    RSA 2008: Sourcefire founder Roesch previews Snort 3
    Screencast: Opening up the Network Security Toolkit
    Can a firewall alone effectively block port-scanning activity?
    Should an intrusion detection system (IDS) be written using Java?
    What security risks do enterprise honeypots pose?
    What are the benefits of 'in-the-cloud' network security services?
    Screencast: Snort -- Tactics for basic network analysis
    Juniper UAC to deliver Shavlik patch management technology
    What kinds of network packet data can be extracted from Snort IDS?
    Can Snort be configured with a FreeBSD router?
    Network Intrusion Detection (IDS) Research

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    cache poisoning  (SearchSecurity.com)
    cyberterrorism  (SearchSecurity.com)
    dictionary attack  (SearchSecurity.com)
    directory harvest attack  (SearchSecurity.com)
    distributed denial-of-service attack  (SearchSecurity.com)
    JavaScript hijacking  (SearchSecurity.com)
    ping of death  (SearchSecurity.com)
    script kiddy  (SearchSecurity.com)
    stack smashing  (SearchSecurity.com)
    SYN flooding  (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

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

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

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




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