PROFESSIONAL LINK BUILDING

The FREE Link Exchange Directory
  HOME    SUBMIT SITE    WEBSITE DIRECTORY    ARTICLE DIRECTORY    HELP    
 

MEMBERS LOGIN
Username:
Password:
Forgot password?

Submit Your Site FREE
List your site Free and start exchanging links in minutes. Our link and article exchange services are free and incredibly effective.

FREE Registration Here



TOP ARTICLES

Car Insurance Quote
Category: Auto Insurance
By: http://www.insurance-quotes-auto.com
Page Rank: 2 / 10
10/15 users found it useful.
View article | Request exchange


Make Money Online
Category: Home Based Business
By: www.professionallinkbuilding..
Page Rank: 2 / 10
10/16 users found it useful.
View article | Request exchange


Bichon Frise Complete Profile
Category: Pets
By: www.professionallinkbuilding..
Page Rank: 2 / 10
9/10 users found it useful.
View article | Request exchange


Discover How to Make Money Online Using Blogger, Adsense and a Bit of Commonsense
Category: Home Based Business
By: money-online-guide.blogspot...
Page Rank: 0 / 10
6/7 users found it useful.
View article | Request exchange


Tips for Starting an eBay Home Business from Scratch
Category: Home Based Business
By: http://moneymakerinfo.blogspot.com
Page Rank: 3 / 10
4/6 users found it useful.
View article | Request exchange


 
RECENT ARTICLES

1: The Importance Of Smoking Stopped Tips
Category: Quit Smoking
Added on: 4/21/2012

2: Obtinerea autorizatiei de traducator
Category: Business
Added on: 4/15/2012

3: Công ty SEO hàng đầu Việt Nam
Category: Accounting
Added on: 4/14/2012

4: SEO service pro
Category: Affiliate Programs
Added on: 4/14/2012

5: Tour du lịch
Category: Accounting
Added on: 3/27/2012

6: Chothuexe24.com dịch vụ cho thuê xe chuyên nghiệp
Category: Business
Added on: 3/13/2012

7: sua may tinh tai nha , sua may tinh ha noi
Category: Website Design
Added on: 3/5/2012

8: SEO SERVICES | SEO SMO SERVICES INDIA | WEB DEVELOPMENT
Category: SEO
Added on: 3/4/2012

9: Woodworking, Furniture and Carpentry
Category: Home Improvement
Added on: 2/25/2012

10: O pewnej umiejętności tłumacza pisemnego
Category: Writing and Speaking
Added on: 2/8/2012

 
MOST POPULAR SITES
Free Auto Insurance Quotes
Auto Insurance Quote
Low Cost Auto Insurance
Add to Favorites   Quick Contact
Article: XSS and web form security




XSS and web form security

Author: Abe

XSS and web form security are very important factors to consider when designing a website.

There are many instances when user input is needed. But allowing just any code to be passed can cause severe problems and lead to even the most annoying 10 year old script kiddie writing “PWND” all over website!

There a are some simple steps which you can take to prevent most of these.
This article will go over some of the fundamental XSS attacks and how to stop them.



Cross-site scripting (XSS) is, in short, a way of injecting code by a malicious web user. The code can be used for anything from displaying a persistent pop-up or crashing the browser, to including remote files to run scripts and steal cookies!


What code do I need to sanitize?



What will this magical code look like?
That’s an easy question to avoid as there are many ways to mess with a website that gives permission to post raw code! Not all XSS attacks will work on all websites or even all broswers. So you may see someone testing with strange looking code before you see some, if any, form of attack.

For this reason, I think it’s best to implement some form of BBCode system.
But more on that later…

A few common XSS codes could include…



Most of these examples will just show an annoying pop-up saying “XSS”, but could be used for more malicious purposes.

If any of the above XSS examples are allowed to be displayed as output from your page, you have could have serious problems!

As mentioned above, there are MANY ways to abuse a website that doesn’t check what your posting or submitting.
It may seem like a good idea to ask for visitors comments or asking for an email address for news subscriptions, but it’s worth checking what content will be displayed when the form is submitted.


How can I prevent XSS attacks?



Any code that can be submitted by a user should be validated or filtered in someway. Steps need to be taken to ensure malicious code can’t be executed on output.

Non-crucial pages like a confirmation page don’t need full validation. But, if a feedback form is allowed to go unchecked it could mean a cookie stealer gets injected and your customers details get stolen!

Generally speaking, it’s best to validate of any forms or inputted data submitted to your web site. Validating the data on input (rather than output) not only helps prevent possible attacks more effectively, but also makes sure only clean code gets entered into the database.

There are other benefits to cleaning up the code before it gets entered into the database. One great advantage is clean output to an administration section.

Let’s take my Free Online Arcade as an example:
If I decided to ask for visitors to submit games to the website, I could just use a simple textbox to ask for the embeddable code to be entered. If the submitted content wasn’t validated in some way an attacker could inject a cookie stealer to hijack the administrators session! Flash code would not even be required if no form of validation is used, so I could just use embed a cookie stealer and a game together.

In an idea world, ever input field would be validated to ensure clean output. But that can be very time consuming.







Denham Coote’s Blog has a great article on Stripping out malicious code for PHP, which is easy to implement and very effective.



Whenever you make a form you should not leave it alone without any form validation. Why? Because there is no guarantee that the input is correct and processing incorrect input values can make your application give unpredictable result.

Form Validation With PHP covers the subject in a little more detail. The article includes full source code and examples.


Closing Notes



To sum it all up… Trust No One!
Try to validate any code that will be submitted to the database or displayed on the website, even if only to remove the script tag.

In my opinion it’s a good idea to try and think like a hacker. Spam test your site before putting any changes in place. Try to execute some annoying javascript. Could you include remote javascript files? Will malformed tags allow injection?

If you can do it, the hackers can generally do worse!




Did you find this article useful? Request to exchange this article

Report this article
Note: Professional Link Buildingclaims no responsibility for the accuracy of information in articles.


Reader Comments


Post Your Comment

Please keep your comments relevant to this article entry: inappropriate or purely promotional comments may be removed. Email addresses are never displayed, but they are required to confirm your comments.
Your Name(required):*


Your email address (required, will not be shown to the public): *


Your Site's URL (optional)


Do you want us to remember your personal information for next time?
Add your Comments: *  



© Copyright 2008, ProfessionalLinkBuilding.com | Privacy Policy | Terms