Archive for the ‘Web Application Security’ Category

Top 10 Website Vulnerabilities

Tuesday, June 15th, 2010

What is vulnerability?

Vulnerability is a hole or a weakness in the application, which can be a design flaw or an implementation bug that allows an attacker to cause harm to the stakeholders of an application. Stakeholders include the application owner, application users, and other entities that rely on the application. The term “vulnerability” is often used very loosely.

Intruders are just as aware of the critical information that can be accessed through an application as the webmaster.  In many cases, their entrance and overall success is attributed to numerous factors.  Those conscious of the roaming threats typically monitor network perimeters with firewalls and intrusion detection systems.  However, these components actually encourage exploits as they are required to keep ports 80 and 443 open to support SSL and protect online transactions.  To an intruder, these ports are open doors that enable website attacks in a number of different ways.  Most network firewalls are configured to secure only the internal perimeter, leaving the company open to a wide range of attacks.  And while both intrusion prevention and detection systems are somewhat more effective, they don’t perform complete analysis of a packet’s contents.  Without an additional layer of security, a knowledgeable intruder can penetrate a web application with relative ease.

An organization dedicated to improving the security of web-based applications, the OWASP (Open Web Application Security Project) recently composed a list of 10 of the most common vulnerabilities in today’s applications.  The potential threats are associated with the following:

Cross site scripting:

XSS flaws occur whenever an application takes user supplied data and sends it to a web browser without first validating or encoding that content. XSS allows attackers to execute script in the victim’s browser which can hijack user sessions, deface web sites, possibly introduce worms, etc.

Server-side scripting errors

Injection flaws, particularly SQL injection, are common in web applications. Injection occurs when user-supplied data is sent to an interpreter as part of a command or query. The attacker’s hostile data tricks the interpreter into executing unintended commands or changing data.

The execution of malicious code

Code vulnerable to remote file inclusion (RFI) allows attackers to include hostile code and data, resulting in devastating attacks, such as total server compromise. Malicious file execution attacks affect PHP, XML and any framework which accepts filenames or files from users.

Insecure direct object reference

A direct object reference occurs when a developer exposes a reference to an internal implementation object, such as a file, directory, database record, or key, as a URL or form parameter. Attackers can manipulate those references to access other objects without authorization.

Cross site request forgery

A CSRF attack forces a logged-on victim’s browser to send a pre-authenticated request to a vulnerable web application, which then forces the victim’s browser to perform a hostile action to the benefit of the attacker. CSRF can be as powerful as the web application that it attacks.

Improper error handling and data leakage

Applications can unintentionally leak information about their configuration, internal workings, or violate privacy through a variety of application problems. Attackers use this weakness to steal sensitive data or conduct more serious attacks.

Penetration of authentication and session management

Account credentials and session tokens are often not properly protected. Attackers compromise passwords, keys, or authentication tokens to assume other users’ identities.

Vulnerable cryptographic storage

Web applications rarely use cryptographic functions properly to protect data and credentials. Attackers use weakly protected data to conduct identity theft and other crimes, such as credit card fraud.

Insecure web communications

Applications frequently fail to encrypt network traffic when it is necessary to protect sensitive communications.

Failure to restrict writes permissions and URL access.

Frequently, an application only protects sensitive functionality by preventing the display of links or URLs to unauthorized users. Attackers can use this weakness to access and perform unauthorized operations by accessing those URLs directly.

From the above list, its quite evident that simply securing your web server is not enough (though its a necessity) to ensure that your site is secure from malicious intrusion. The underlying code and applications for your website needs to be tested for common web vulnerabilities and ensured that the security loopholes are patched and secured against intrusion attempts.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

XSS (Cross Site Scripting) Attacks. How can I prevent XSS attacks on my website?

Monday, June 22nd, 2009

Many websites today are reeling under persistent XSS (cross site scripting) attacks where vulnerable code is being attached to their webpages which block their sites on Google and other search engines and prevent users from browsing their websites. Users not using updated browsers download the malicious code on their PCs or are being redirected to the websites of the malicious code, where their sessions are being captured or sensitive data like usernames/passwords are being used by hackers to gain priveleged information which could cause damage to the users and the website owners alike.

Many website owners feel that this is a problem with the webhost or that their PCs are virus infected and the files which they are uploading on their webserver is virus infected and that is causing this problem. But this is simply not the case! XSS attacks are generated on a runtime basis due to insecure code on your website or web application which is being used by hackers to attach their own code into your website through insecure feedback forms, user registration/login forms and even search fields.

Here are some collection of links to online videos and resources which should enable you to gain a better understanding of XSS and how to block prevent XSS attacks on your website:

Video 1: A brief video primer on SQL Injection works.


Video 2: Persistent Cross Site Scripting


Video 3: Don Ankney of Microsoft talks about the continuing challenges around eradicating Cross Site Scripting from the Earth.



Foiling Cross-Site Attacks: An interesting read on XSS and cross-site request forgeries(CSRF).

XSS Tools:

Springenwerk Security Scanner: Springenwerk is an open source Cross Site Scripting (XSS) security scanner, written in Python.
HTML Purifier: HTML Purifier is a standards-compliant HTML filter library written in PHP. It has pulgins for popular CMS and PHP Frameworks like Drupal, Joomla and Codeigniter.
N-Stalker Free Edition: N-Stalker Web Application Security Scanner provides a restricted set of free Web Security Assessment checks to enhance the overall security of your web server infrastructure.
As XSS security is an evolving area and new products, techniques are being introduced to prevent its abuse, your comments and additional resources on this post are welcome to make this a valuable resource for other users.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...