Sign Doug's SOTR Petition!

Sign Doug's petition to his boss and help send him to Scotch on the Rocks in 2012!
Recent Entries
Contact Doug!
Learn About Doug!
View Doug Boude's online resume
updated 11/18/2009

View Doug Boude's profile on LinkedIn
Link to me!

Follow Doug Boude on Twitter
Follow me!

Be Doug's friend on Facebook
Befriend me!
(I promise not to follow you home)
OO Lexicon
Chat with Doug!
NO MORE CAREER
POLITICIANS!
Get Out Of Our House: Replacing congress with TRUE citizens!
You may also be interested in...
Web Hosting
best web hosting - top web hosting sites, thetop10bestwebhosting.com

Czech your Page Rank!
Check Page Rank of any web site pages instantly:
This free page rank checking tool is powered by Page Rank Checker service
Surf's Up!
Visit Egosurf.org and massage YOUR web ego!
My Score: 9,001
Doug's Books

Read (and recommend)

  • Men are from Mars, Women are from Venus
  • The Wisdom of Crowds: Why the Many Are Smarter Than the Few and How Collective Wisdom Shapes Business, Economies, Societies and Nations
  • Blink: The Power of Thinking Without Thinking
  • Head First Design Patterns
  • Transact-SQL Programming
  • What's So Amazing About Grace?
  • Just So Stories (Rudyard Kipling collection)

Reading

  • Prayer: Does it Make Any Difference?
  • Data Mining (Practical Machine Learning Tools and Techniques)
<< May, 2009 >>
SMTWTFS
12
3456789
10111213141516
17181920212223
24252627282930
31
Search Blog

Recent Comments
Re: Basic Ajax Select List Filter in PHP (by opineemia at 2/02 8:47 PM)
Re: PHP vs COLDFUSION (by dougboude at 1/24 9:47 AM)
Re: PHP vs COLDFUSION (by WhatTheHeck at 1/23 7:03 PM)
Re: Recursive Functions in ColdFusion (by Marty McGee at 1/22 1:01 PM)
Re: SQL Forward Engineering with Visio 2003 Professional (by Rama at 1/10 11:05 AM)
Re: PHP Export to Excel Snippet (by rasha at 1/10 1:55 AM)
Re: Fredrick "French" Fry (by Picky eater at 1/09 2:21 PM)
Re: Disappearing IE Popup Window During Save/Open Dialog (by Vivekanand at 1/06 12:51 AM)
Re: Just What IS a 'Service Layer', Anyway? (by Ashishkumar Haldar at 1/05 7:49 AM)
Re: Viewing Option Text (in IE7) that's Wider than the Select List (by ranjit sachin at 12/20 6:22 AM)
Re: Recursive Functions in ColdFusion (by Jason at 12/15 12:13 PM)
Re: Viewing Option Text (in IE7) that's Wider than the Select List (by kt at 12/08 3:47 AM)
Re: PayPal IPN Coldfusion CFC (by Guest at 11/28 6:11 PM)
Re: SQL Forward Engineering with Visio 2003 Professional (by freddy villamil at 11/09 2:49 PM)
Re: Finally Found a Use for CFTHREAD (by criclebrava at 11/09 1:23 PM)
Re: Finally Found a Use for CFTHREAD (by assisisowsfub at 11/07 10:37 PM)
Re: IRRITATING CF QUERY ERROR AND SOLUTION (by dougboude at 10/10 10:48 AM)
Re: Using Google as your CF Mail Server (by hlharkins at 10/09 10:24 AM)
Re: IRRITATING CF QUERY ERROR AND SOLUTION (by Peter Boughton at 10/07 3:15 PM)
Re: My Thoughts on the Current Presidential Contenders (by dougboude at 9/23 12:21 PM)
Categories
Archives
Photo Albums
Funnies (5)
Family (3)
RSS

Powered by
BlogCFM v1.11

29 June 2006
CFUNITED - Top 10 Security Threats
Adam Lehman works for the State Department, and knows very well the intricacies of hardening a ColdFusion application. In this enlightening and informative session. he walked us all through the top 10 most common security holes found in applications in general, and then expounded upon ways to address these holes for CF applications. Let's count them down together.

Number 10. Insecure Configuration Management. An app can be anally secure, but if you don't remember to actually secure the interface used to manage that security, it's all for nought. Some things to remember for this one are:
  • Do not deploy CF Admin or sample applications to your production environment.
  • Do not deploy RDS to a production environment. RDS is strictly for development, and should have no place in production whatsoever.

Number 9. Denial of Service Attacks. Bots and scripts designed to do nothing more than pound your application with a barrage of legitimate http requests, doing so at such a rate as to consume all available resources on the server. For this one, there really isn't a lot that can be done from an application architecture point of view. It can help if you limit your need to access databases and how much data is stored in session. Ultimately, however, your best bet lies in ensuring that all server patches and service paks are kept up to date, as well as networking hardware designed to sense and deal with DNS(denial of service) attacks.

Number 8. Insecure Storage. The need to access application-centric, sensitive data exists. Information such as datasource names, usernames, passwords, social security or credit card numbers are all types of information that need to be protected. The main tip provided to help address this area of compromise was to either encrypt or hash the information before storing it, if possible. If not, then tuck it away into a most obscure location, preferably not in the path of the webroot.

Number 7. Improper Error Handling
. Error handling is in place to help the developer by showing him or her as much information as possible about the unplanned situation that just took place. When an application doesn't intercept and intelligently redirect errors, information that provides clues as to the database structure, application structure, and server can be revealed to would-be hackers. The answer is to implement an application-wide error handling mechanism that diverts detailed info to email or a log while showing the end user something more generic. This error handling code should preferably in a central location such as application.cfm/cfc. In addition, you  can and perhaps should disable robust error handling and debugging in the CF Administrator.

Number 6. Injection Flaws. Here's one we don't often (if ever) hear about typically. This requires a bit more sophistication on the part of the hacker. What happens is that the hacker hijacks a variable, or finds some other way, to inject malicious script code into your application. Most times this code's target isn't your application at all, but some other underlying system such as the database or the server itself. Some things that can be done to make it more challenging for the hacker:
  • Setup sandboxes in order to limit access to such CF system tags as CF_Execute and CF_Registry.
  • Limit the database access of the user that drives your CF data sources to only what is needed.

Number 5. Buffer Overflow.
Not typically a concern of web apps. For this one, like 9, make sure to keep patches up to date.

Number 4. Cross Site Scripting Flaws (aka, XSS). unlike injection flaws (number 6), XSS injects code that targets other users of the system. This is done in two manners: stored, and reflected. Stored XSS will do things such as write javascript functions to the template, where it will execute whenever that template is requested, performing some action on the client side. Reflected XSS utilizes such things as email to reflect the attack to users on other systems. Here are some things you may want to consider:
  • CF Admin has a "magic checkbox" to enable protection for all scopes. This will perform system regex checks against variable values flowing through CF to ensure no malicious code is present.
  • Within your application.cfc, the line "this.ScriptProtected" enables protection on an application level as well.

Number 3. Broken Authentication and Session Management. Well, not really broken, just weak. Here are some tips for strengthening these items:
Enforce more complex password rules, such as requiring special characters, etc.
Limit failed login attempts. When a user exceeds the count, lock them out for a period of time.
  • Store passwords as a hash rather than human text.
  • Perform the actual authentication process via https/ssl
  • Transmit session IDs via https/ssl
  • Do not put session IDs into the url
  • Use J2EE sessions

Number 2. Broken Access Control. Basically, the code you use to "lock down" certain areas of your application that require a person be authenticated for access. The recommendation here is that, rather than scatter "login checking" throughout the app, move it to a central place that runs on every request, such as application.cfc.

And Number 1: Unvalidated Input.
DO validate submitted data! You can never have too much validation in place. You may use client side javascript to perform validation, but never rely on it as your primary validation. Consider the following:
  • Build in server side validation to ensure that submitted data is of the expected types
  • use cfqueryparam to ensure that values submitted to queries are of the correct types
  • put as much of your functionality into CFCs as possible, as the inherent use of CFARGUMENT will be yet another level of validation.
  • Learn about and USE the CF function IsValid(). Do it. Do it.



Posted by dougboude at 6:45 PM | PRINT THIS POST! |Link | 0 comments
Subscription Options

You are not logged in, so your subscription status for this entry is unknown. You can login or register here.

No comments found.

Name:   Required
Email:   Required your email address will not be publicly displayed.

Want to receive notifications when new comments are added? Login/Register for an account.

Time to take the Turing Test!!!

Thirteen plus Eight equals
Type in the answer to the question you see above:

Your comment:

Sorry, no HTML allowed!