Three OWASP Projects

36
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP Foundation OWASP http://www.owasp.org OWASP Asia Pacific Conference 2008 Three OWASP Projects Michael Eddington Leviathan Security Group [email protected]

description

Three OWASP Projects. Michael Eddington Leviathan Security Group [email protected]. Contents. OWASP Encoding Project (Reform) OWASP .NET Web Service Validation Are You a Human. Project 1. OWASP Encoding Project (Reform). Cross-site Scripting, The problem…. - PowerPoint PPT Presentation

Transcript of Three OWASP Projects

Page 1: Three OWASP Projects

Copyright © The OWASP FoundationPermission is granted to copy, distribute and/or modify this document under the terms of the OWASP License.

The OWASP Foundation

OWASP

http://www.owasp.org

OWASP Asia Pacific Conference 2008

Three OWASP Projects

Michael EddingtonLeviathan Security [email protected]

Page 2: Three OWASP Projects

OWASP

Contents

OWASP Encoding Project (Reform)

OWASP .NET Web Service Validation

Are You a Human

Page 3: Three OWASP Projects

OWASP

OWASP ENCODING PROJECT (REFORM)

Project 1

Page 4: Three OWASP Projects

OWASP

Cross-site Scripting, The problem…

Limited encoding support in frameworksWhat about Javascript and VBScript?Only: & < > “

No 100% encoding solutionProduction qualityLow to no patchesForward looking Internationalization support

Page 5: Three OWASP Projects

OWASP

The solution…Reform!

Best of bread output encoding library Stable for 4 years No security impacting bugs…EVER! Conservative Prevents all known XSS attacks All major languages Used extensively by internationalized sites

Extended Chinese character support

Page 6: Three OWASP Projects

OWASP

Design goals

Easy to use Conservative “Future Proof” No licensing restrictions All major platforms supported Internationalization support

Page 7: Three OWASP Projects

OWASP

How did we do?

In production use for 4 years Zero security impacting bugs to date All relevant cross-site scripting bugs to

date preventedStandardNewBrowser bug based

Basis for Microsoft’s AntiXss

Page 8: Three OWASP Projects

OWASP

Languages

ASP ASP.NET (1.1, 2.0, 3.x) Java JavaScript Perl PHP Python Ruby

Page 9: Three OWASP Projects

OWASP

How it works…

White list basedABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789Space [ ]Comma [,]Period [.]

Page 10: Three OWASP Projects

OWASP

Cross-site scripting Attacks

Standard XSS injection attacksHTML injectionHTML attribute injection Javascript injectionEtc.

Unicode XSS attacks

Browser bugs or related libraries

Page 11: Three OWASP Projects

OWASP

Unicode

Specifications include optional behaviors Specs not always 100% clear Libraries built off different versions of

specs Libraries work differently

Page 12: Three OWASP Projects

OWASP

Typical Unicode XSS Attack

0x00script0x00

1

0x00sc

ript0

x

00

3

ASP.NET

Unicode v2

2

?script?

Unicode v1

Browser

<script>

4

Page 13: Three OWASP Projects

OWASP

Typical Unicode XSS Attack…Reformed

0x00script0x00

1

&#123;scrip

t&#1

24;

4

ASP.NET

Unicode v2

2

?script?

Unicode v1

Browser

?script?5

Reform3

Page 14: Three OWASP Projects

OWASP

Reform, the pros and cons

Pros Stable code base Low patch rate (1 in 4

years) Conservative

approach Mitigates all known

issues

Cons Performance impact Larger page size

Page 15: Three OWASP Projects

OWASP

Reform API

HtmlEncode(value, [default])

JsString(value, [default])

VbsString(value, [default])

Page 16: Three OWASP Projects

OWASP

HtmlEncode(value, [default])

Value Mary had a little lamb <evil> Tom & Jerry “A famous quote”

한국 원본의 보기

Return Mary had a little lamb &#60;evil&#62; Tom &#38; Jerry &#34;A famous

quote&#34; &#54620;&#44397;

&#50896;&#48376;&#51032; &#48372;&#44592;

Page 17: Three OWASP Projects

OWASP

JsString(value, [default])

Value Mary had a little lamb <evil> Tom & Jerry “A famous quote” 한국 원본의 보기

Return 'Mary had a little

lamb' '\x3Cevil\x3E' 'Tom \x26 Jerry' '\x22A famous quote\

x22' '\uD55C\uAD6D \

uC6D0\uBCF8\uC758 \uBCF4\uAE30'

Page 18: Three OWASP Projects

OWASP

VbsString(value, [default])

Value Mary had a little

lamb <evil> Tom & Jerry “A famous quote” 한국 원본의 보기

Return "Mary had a little lamb" chrw(60)&"evil"&chrw(62) "Tom "&chrw(38)&" Jerry" chrw(34)&"A famous

quote"&c chrw(54620)&chrw(44397)&"

"&chrw(50896)&chrw(48376)&chrw(51032)&" "&chrw(48372)&chrw(44592)hrw(34)

Page 19: Three OWASP Projects

OWASP

.NET Web Controls

Page 20: Three OWASP Projects

OWASP

Questions? Michael Eddington

([email protected])

OWASP Encoding Project (http://www.owasp.org/index.php/Category:OWASP_Encoding_Project)

Page 21: Three OWASP Projects

OWASP

OWASP .NET WEB SERVICE VALIDATION

Project 2

Page 22: Three OWASP Projects

OWASP

The problem…

WSDL Schema validation Additional web method validation

Page 23: Three OWASP Projects

OWASP

Canoodle

Provides WSDL schema validation Schematron like assertions Simple to use

Page 24: Three OWASP Projects

OWASP

Process flow

Request MessageRequest Message

SOAP FaultResponse Message

SOAP FaultResponse Message

WebMethod Invocation

WebMethod Invocation

Web Service

Response Message

Web Service

Response Message

Canoodle

Validation

Canoodle

Validation

Failure

Success

Page 25: Three OWASP Projects

OWASP

Partial Schematron support Schema validation based on xpath

queries Assert support via Attributes

[Assert(“//x > 10”, “x greater than 10”)][Assert(“//y < 100”, “y less than 100”)]

Page 26: Three OWASP Projects

OWASP

Usage Example

[WebMethod][Validation][Assert("//t:x > 10", "x greater then 10")][Assert("//t:y < 100", "y less then 100")]public void CreatePoint(int x, int y){

// ...}

1

2

Page 27: Three OWASP Projects

OWASP

Performance Impact

Two request XML parsesValidatingNon-validating

Compiled xpath queries cached

Page 28: Three OWASP Projects

OWASP

Questions? Michael Eddington

([email protected])

.NET Web Service Validation (http://www.owasp.org/index.php/.NET_Web_Service_Validation)

Page 29: Three OWASP Projects

OWASP

ARE YOU A HUMANProject 3

Page 30: Three OWASP Projects

OWASP

Are you a human…?

Page 31: Three OWASP Projects

OWASP

Captcha Examples

Page 32: Three OWASP Projects

OWASP

How to break via computer

Page 33: Three OWASP Projects

OWASP

How to break…other

Page 34: Three OWASP Projects

OWASP

What about…phones?

Page 35: Three OWASP Projects

OWASP

Are you a human?

http://areyouahuman.org Service based, no upgrades needed Multiple Captcha types

VisualAudioSMSEtc.

Page 36: Three OWASP Projects

OWASP

Questions??? Michael Eddington

([email protected])

OWASP Encoding Project (http://www.owasp.org/index.php/Category:OWASP_Encoding_Project)

.NET Web Service Validation (http://www.owasp.org/index.php/.NET_Web_Service_Validation)

Are you a human? (http://areyouahuman.org)