Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Web-App-Sec
[Top] [All Lists]

Re: Canonicalization

Subject: Re: Canonicalization
Date: Wed, 12 Apr 2006 14:55:34 +0200
Yann wrote:
11 Apr 2006 13:12:29 -0000, susam_pal@yahoo.co.in <susam_pal@yahoo.co.in>:
I found the following paragraph in owasp.org. Can someone please elaborate on 
this?

Parameters must be converted to the simplest form before they are validated,
otherwise, malicious input can be masked and it can slip past filters. The 
process of
simplifying these encodings is called "canonicalization."

There is a (very short) article on Wikipedia, to begin with: http://en.wikipedia.org/wiki/Canonicalization

There is an example, not directly related to security.

Yann
--

Here is an example of why canonicalization is important in a security context:


The rule is "Only execute files under the cgi directory (C:\inetpub\wwwroot\cgi-bin)"

The rule is enforced by checking that the path starts with "C:\inetpub\wwwroot\cgi-bin\", and if it does, the file is executed.

Should I execute the following file?

C:\inetpub\wwwroot\cgi-bin\..\..\..\Windows\System32\cmd.exe

?

Clearly not. The fault is failure to canonicalize the filename to a unique (simplest) representation, namely: C:\Windows\System32\cmd.exe, before doing the path check.

Another example might be to convert Unicode-encoded strings to the simplest form possible. Since Unicode allows for an infinite number of ways of representing the same character, you should always reduce the string to the simplest possible form before doing any comparisons.

Hope this helps.

Regards,

Rogan

-------------------------------------------------------------------------
This List Sponsored by: SPI Dynamics

ALERT: "How A Hacker Launches A Web Application Attack!" Step-by-Step - SPI Dynamics White Paper
Learn how to defend against Web Application Attacks with real-world examples of recent hacking methods such as: SQL Injection, Cross Site Scripting and Parameter Manipulation


https://download.spidynamics.com/1/ad/web.asp?Campaign_ID=701300000003gRl
--------------------------------------------------------------------------

<Prev in Thread] Current Thread [Next in Thread>