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. |

| Subject: | Re: Data sanitization approaches in Java |
|---|---|
| Date: | Mon, 17 Jan 2005 11:38:11 +0000 |
Hi Ben,
Stephen
On 16 Jan 2005, at 14:11, Jeff Williams wrote:
Ben,
I did a presentation at last year's OWASP AppSec conference on this subject. There's a link to the presentations on the conference page (http://www.owasp.org/conferences/appsec2004nyc.html).
Essentially, the approaches range from completely external (deep packet inspection/web app firewall), to web server plugin (modsecurity) to J2EE filter, to a common validation library, to just doing it everywhere in your code. There are advantages and disadvantages to all of them, although I find the J2EE filter approach to be the most flexible.
Also, I noticed that you use the word "sanitization" -- did you mean actually modifying the input data? This is a little tricky in J2EE, although possible. If that's what you're after, let me know.
Oh, and URL encoding is really not a very good idea. Many interpreters just decode URL encoding automatically. HTML entity encoded data (< > ") is generally not interpreted. There's not an HtmlEntityEncoder built into J2EE, so you'll have to roll your own. I could post one if there's interest.
--Jeff
Jeff Williams, CEO Aspect Security, Inc. http://www.aspectsecurity.com
----- Original Message ----- From: "Benjamin Livshits" <livshits@cs.stanford.edu>
To: <webappsec@securityfocus.com>
Sent: Friday, January 14, 2005 4:20 PM
Subject: Data sanitization approaches in Java
I was wondering about data sanitization strategies commonly used in
today's Web applications, especially those written using J2EE. I am
aware of libraries that would simplify the sanitization process for you,
however, I haven't really seen many applications that use anything more
sophisticated than URL-encoding the user-supplied string data.
Are there some common sanitization strategies that people actually use in their code on a regular basis?
Thanks in advance, -Ben
---------------------------------------------------------------------- CONFIDENTIALITY: This e-mail and any files transmitted with it are confidential and intended solely for the use of the recipient(s) only. Any review, retransmission, dissemination or other use of, or taking any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you have received this e-mail in error please notify the sender immediately and destroy the material whether stored on a computer or otherwise. ---------------------------------------------------------------------- DISCLAIMER: Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of Corsaire Limited, unless otherwise specifically stated. ----------------------------------------------------------------------
| Previous by Date: | Re: Proposal to anti-phishing, Rogan Dawes |
|---|---|
| Next by Date: | RE: (not really a) Proposal to anti-phishing, Evans, Arian |
| Previous by Thread: | Re: Data sanitization approaches in Java, Jeff Williams |
| Next by Thread: | Re: Proposal to anti-phishing, Florian Weimer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |