just4meeting 2012 - how to protect your web applications

36
How to protect your web applications Magno Logan [email protected] OWASP Paraíba Chapter Leader

Upload: magno-logan

Post on 01-Dec-2014

74 views

Category:

Technology


0 download

DESCRIPTION

Just4Meeting 2012 - How to protect your web applications Julho de 2012 em Cascais, Portugal. http://www.just4meeting.com/

TRANSCRIPT

Page 1: Just4Meeting 2012 -  How to protect your web applications

How to protect your web applications

Magno Logan

[email protected]

OWASP Paraíba Chapter Leader

Page 2: Just4Meeting 2012 -  How to protect your web applications

About Me

Who am I?

• Ex-developer

• Security Analyst

• Chapter Leader

• Investments

• Martial Arts

Page 3: Just4Meeting 2012 -  How to protect your web applications

Paraíba?!

I’m here!

• Caipirinha • Soccer • Samba • Girls

We have it all!

Page 4: Just4Meeting 2012 -  How to protect your web applications

I live where you take vacations, sorry! =)

Page 5: Just4Meeting 2012 -  How to protect your web applications

Agenda

• They are everywhere!

• Testing, testing, testing…

• Guides, tools and much more

• The insecure software lifecycle

• How to solve these problems (maybe?)

Page 6: Just4Meeting 2012 -  How to protect your web applications

They are everywhere!

Page 7: Just4Meeting 2012 -  How to protect your web applications

They are everywhere!

And they have bugs everywhere!

• The cost of a data breach averages $5.5 million or $194 per customer record*

• Companies that take security seriously can reduce the cost per customer by up to 62%

* From a 2011 study by the Ponemon Institute

Page 8: Just4Meeting 2012 -  How to protect your web applications

What are we doing wrong?

• Secure application development is a top priority

• But web applications are still the number one

source of data breaches

• We need to change the mindset of software development

*From a 2011 Forrester Research study: Application Security: 2011 & Beyond

Page 9: Just4Meeting 2012 -  How to protect your web applications

What are we doing wrong?

• We’re in 2012 and SQL Injection is still the biggest issue!

• The first public issue dates from 1998

• SQL Injections can lead to shell access now!

Page 10: Just4Meeting 2012 -  How to protect your web applications
Page 11: Just4Meeting 2012 -  How to protect your web applications

Why these still happens?

Excuses to the problems:

• Security is not important! Money is!

• There is no time!

• Developer’s fault! They are the scape goat of security!

Page 12: Just4Meeting 2012 -  How to protect your web applications

Back to the basics

CIA Triad

Page 13: Just4Meeting 2012 -  How to protect your web applications

Now what?

So, how to protect our apps?! 1. Threat Modeling

2. Security Testing

3. Code Review

4. SDL

Page 14: Just4Meeting 2012 -  How to protect your web applications

Threat Modeling

Page 15: Just4Meeting 2012 -  How to protect your web applications

Threat Modeling

• Structured approach to identify and measure risks

• It defines the security requisites

• Allows the design to address the security issues

• Helps the security testing and code reviews

Page 16: Just4Meeting 2012 -  How to protect your web applications

Threat Modeling Process

1. Identify your assets

2. Create an architectural view

3. Decompose the software

4. Identify, document and classify the threats to your app

Page 17: Just4Meeting 2012 -  How to protect your web applications

(Security) Design Patterns

• Use them! There a lot out there!

• Don’t reinvent the wheel!

• Exception Handling

• Input Validation

• Protected Logging

Page 18: Just4Meeting 2012 -  How to protect your web applications

Development Phase

• Use a guide to implement your security, like the OWASP Developer’s Guide

• Use unit test cases focused on security

• Present security training to developers

• Perform penetration testing and code reviews

Page 19: Just4Meeting 2012 -  How to protect your web applications

OWASP Top 10 2010

Testing, testing, testing…

Page 20: Just4Meeting 2012 -  How to protect your web applications

2011 CWE/SANS Top 25

And more testing…

Page 21: Just4Meeting 2012 -  How to protect your web applications

So what do they do?

• Protect you from common mistakes

• Avoid you from getting hacked by automated tools/scanners and script kiddies

By the way, if you work with AppSec and you never heard of these two docs…

Page 22: Just4Meeting 2012 -  How to protect your web applications

You need to find another job!

Page 23: Just4Meeting 2012 -  How to protect your web applications

How to apply them?

Many FREE resources!

Not just OWASP stuff…

Page 24: Just4Meeting 2012 -  How to protect your web applications

Code reviews

Ok, now what?!

OWASP Code Review Guide

• Code review takes a deeper look into your app

• Things that automated scanners won’t find

• You’ll see the common mistakes devs make

Page 25: Just4Meeting 2012 -  How to protect your web applications

SDL

We fixed the problems. How to stop them?

• Implement a SDL process

• Train your developers about app security

• They don’t need to be experts, at least know how it works and how to protect their apps

Page 26: Just4Meeting 2012 -  How to protect your web applications

Free Docs

Yay! More free stuff…

• OWASP ASVS – verify your security

• OWASP OpenSAMM – create a security program

• OWASP Developer’s Guide – tips to devs

Page 27: Just4Meeting 2012 -  How to protect your web applications

Not yet…

It’s not that simple…

• If we have all that, why aren’t our apps secure?

• Why even the big companies don’t follow the basic rules? Hello Linkedin!

Page 28: Just4Meeting 2012 -  How to protect your web applications

Security Myths

We know, we know…

• Security costs money. Yeah, but so does development, support, operations, etc.

• Security costs money. But it will save you a lot more!

Why most companies still don’t see the value of security until they get hacked?

Page 29: Just4Meeting 2012 -  How to protect your web applications

If it compiles, ship it!

Like Dinis Cruz said at AppSec Latam 2011:

Unless you’ve been hacked before…

If it compiles,

Ship it!

That’s the motto in most dev companies

Page 30: Just4Meeting 2012 -  How to protect your web applications

ISLC

The real picture (Developer’s view)

• They don’t like the security teams

• They already work on a tight schedule

• Security will increase their programming time

Page 31: Just4Meeting 2012 -  How to protect your web applications

The ideal world

How it should be…

• Dev and infosec should work together

• Security practices and implementations should be included in the schedule time

• It will increase the apps protection and decrease the amount of bugs and work

Page 32: Just4Meeting 2012 -  How to protect your web applications

Conclusions

In a nutshell… • Security is not a plugin, it’s a process.

• Test everything, every time they change.

• Allocate time for security testing within your

project

• Never assume security controls are effective

Page 33: Just4Meeting 2012 -  How to protect your web applications

OWASP Floripa Day

Conferences

15 e 16 de Setembro

https://www.owasp.org/index.php/OWASP_Floripa_Day_2012

Page 34: Just4Meeting 2012 -  How to protect your web applications

AppSec Brazil 2012

Conferences

OWASP AppSec Brazil 2012

In November in João Pessoa!

Page 35: Just4Meeting 2012 -  How to protect your web applications

Questions?

@magnologan

@owasppb