Top 10 Signs You Have an Insecure Web App - Michael Sutton's Blog -
Top 10 Signs You Have an Insecure Web App
I often surf the web and see blatant design errors that make me shake my head. Without even investigating the security of a site, I know without a doubt that the site will be chock full of vulnerabilities. How can I be so sure? I see programming mistakes that illustrate an utter lack of concern for security. They are ugly mistakes that are far too prevalent. If you have any of the issues mentioned below in your own web application, it's time to sit down with your developers and have a chat. If these mistakes are being made, dig deeper. You may not like what you see, but its better that you uncover the problems than leave them to be discovered by someone else. For each of the signs listed below, take a look at the included examples for public evidence of just how wide spread the problem is.

 

1.       Exposed Usage statistics

Everyone wants to know who's visiting their web site and there is no shortage of applications available to help you to figure it out. While commercial log analyzers exist, open source alternatives tend to be the most popular, even on commercial web sites because there are plenty to choose from that offer more than adequate functionality. What I don't understand is why site administrators fail to lock these applications down. First off, popular tools such as AWStats and Webalizer have had no shortage of serious security vulnerabilities. Why advertise that you're using a potentially vulnerable application? More importantly, the people that have been using your web application and what they've been doing during their time there, is confidential information. Why share it with the world? 

Examples

 

2.       Copies of backup files

This is a mistake that I often make myself while working on a personal website. I make the mistake because I don't have a QA or development environment for a site that I use for posting pictures of my last vacation for family members. I certainly hope that's not the case for your commercial web site. Developers often rename old copies of web pages when uploading a new version. This way, if something goes wrong, they can easily switch back to the old version. This is generally done by appending an extension to the file name such as ‘.old' or ‘.bak'. The problem occurs when the developer forgets to remove the old copy of the page. Web servers don't recognize a ‘.old' or ‘.bak' file extension. If an attacker is savvy enough to request every known page on your website with one of these extensions and you've forgotten to remove backed up content, your web server will gladly offer to download a copy of your source code. 

Examples

 

3.       Your site shows up on a 'Wall of Shame'

We're seeing so many examples of web sites with common vulnerabilities such as cross site scripting vulnerabilities, even the hackers are getting tired of it. "Wall of shame" web sites have begun to emerge whereby participants post vulnerable web sites as they come across them. While the approach is not without controversy, I wonder if public embarrassment is the only tool that will cause companies to take web application security seriously. Significant vendors such as Dell, HP, MySpace, Photobucket, F5, and Acunetix have all made the sla.ckers.org wall of shame. 

Example

 

4.       Browseable directories

If you can't lock down your web server, is there much hope for your web application? While directories are occasionally made browseable by design, it is typically a sign of poor server administration. 

Examples

 

5.       Login credentials passed over clear text

Passing login credentials in clear text is a neon sign in the middle of Times Square. It says - "I know nothing about security".

 

6.       Outdated SSL certificates 

How can you trust a web site that isn't willing to pay a few hundred dollars to keep its SSL certificate current? If you don't plan to keep a current certificate, it's better not to use SSL at all. When your client gets a warning message from his web browser letting him know that there's a problem with the connection, he may just put his credit card away for good.

 

7.       Vulnerable third party applications

Don't get me wrong, I'm a big fan of code reuse. Why re-invent the wheel when there are perfectly good open source wheels all around you? That said, never consider any third party code to be trusted. It should be subjected to the same security controls as the rest of your code before being included in your project. Even then, it is vital that you have a process in place to constantly be monitoring for known vulnerabilities which may emerge in a library that you chose to include in your application. At a minimum, regularly monitor the free vulnerability aggregation sites listed below to identify problems in shared code. 

Examples

 

8.       Verbose error messages

Verbose error messages are useful for developers but they're a red flags for users. You don't need to be a security expert to know that a nasty error message suggests a potentially vulnerable web application. SQL injection is one of the most prevalent and damaging vulnerabilities plaguing web applications today and error messages are a homing device that can lead you right to them. Don't be fooled though, turning off the error messages doesn't eliminate the vulnerability; it just makes them a bit harder to find. 

Examples

 

9.       Developer comments in source code 

Comments are a handy way to mark sections of your source code that still require some work. They're especially useful when you have a team of programmers working on the same piece of code. Just make sure that you clear up any outstanding issues and remove the comments before the code goes into production. Google has provided us with a handy little tool known as Google Code Search which now makes it trivial to look for interesting developer comments hidden within vast libraries of code. Be sure that your comments don't serve as a blueprint to point out holes in your application. 

Examples

 

10.   You've been defaced!

If you show up in the Zone-H Defacement Archive, you shouldn't be wasting your time reading this blog...you've got work to do.

Examples

- michael


Posted 11-01-2006 12:40 AM by erik.peterson

Comments

DeadOnArrival wrote re: Top 10 Signs You Have an Insecure Web App
on 11-01-2006 6:48 AM

Great post. Hopefully people will start taking this seriously soon.

erik.peterson wrote re: Top 10 Signs You Have an Insecure Web App
on 11-02-2006 1:29 AM

Thanks DeadOnArrival. Much appreciated.

- michael

Anndy wrote re: Top 10 Signs You Have an Insecure Web App
on 11-02-2006 4:42 PM

Hi, It is really good post.

I appreciate your work.

virgix wrote re: Top 10 Signs You Have an Insecure Web App
on 11-02-2006 5:41 PM

Very, very interesting.... I will change some of my habits!

;-)

Aarjav wrote re: Top 10 Signs You Have an Insecure Web App
on 11-06-2006 7:52 PM

Good article. Just reddited

http://programming.reddit.com/goto?id=prn5

simon wrote re: Top 10 Signs You Have an Insecure Web App
on 11-07-2006 8:16 AM

I just love that the top hit in section 8 is msdn, amusing. Nice article as well.

Des Traynor wrote re: Top 10 Signs You Have an Insecure Web App
on 11-07-2006 9:46 AM

Excellent post, really good stuff.

Rick wrote re: Top 10 Signs You Have an Insecure Web App
on 11-07-2006 9:58 AM

I was interested to see the name Acunetix in #3 on your list. I recently had an attack on a client site by someone using software that Acunetix make that is intended to be used to test for vulnerabilities, in this case the person hammered the site's email forms attempting to get it to fall over and reveal the passwd dir. Fortunately they didn't succeed, but they did manage to create a mail queue of over 20,000 emails which blocked my clients email flow for a few hours!

After that I decided it was high-time to add some extra security checks on those email forms ;)

DMcK wrote re: Top 10 Signs You Have an Insecure Web App
on 11-07-2006 10:19 AM

I know its common sense, but do you have any links to back up #5?

Nitin wrote re: Top 10 Signs You Have an Insecure Web App
on 11-07-2006 11:20 AM

This is a wonderful insight for all web developers to consider. You really have opened some sleepy eyes!!

Andrew wrote re: Top 10 Signs You Have an Insecure Web App
on 11-07-2006 11:30 AM

Excellent article. Everything is mostly common sense, but its easy to overlook. I forgot about some backups which contained a password, so thanks.

Joe FitzGerald wrote re: Top 10 Signs You Have an Insecure Web App
on 11-07-2006 1:22 PM

I'd strongly recommend changing your #6 comment...  Outdated certs still encrypt data.  Clearly companies that care anything about their customers should keep their certificates up to date, but using an outdated cert is still a heck of a lot better for the customer than not using SSL at all.  Your suggestion might make more sense to keep the customer "happy" (by being uninformed) but it certainly isn't in their best interest!

Very good post though, a lot of these points are often overlooked.

Stephen wrote re: Top 10 Signs You Have an Insecure Web App
on 11-07-2006 7:35 PM

This is the second article of yours that I have read that cleverly points out common security flaws while inadvertently helping malevolent people find those flaws.  Are you sure you're not doing more harm than good?

Ritesh wrote re: Top 10 Signs You Have an Insecure Web App
on 11-08-2006 1:32 AM

great , imean absolute gem of an article . will traceback to it.

Peter Hickman wrote re: Top 10 Signs You Have an Insecure Web App
on 11-08-2006 6:48 AM

How about "You don't review your logs"?

Nothing good comes from a bad practice.

ZeroKnock wrote re: Top 10 Signs You Have an Insecure Web App
on 11-23-2006 7:32 AM

You can check the article WebCoding Mal Practises on:

http://zeroknock.metaeye.org/articles/WebMP.pdf

Muhammad Raheel wrote re: Top 10 Signs You Have an Insecure Web App
on 12-02-2006 12:19 AM

Nice artices, i think this document will work as a QA Engineer for Developer. :)