Top Banner
Secure Development: Automatic Identification and Mitigation of Application Vulnerabilities JIM LIU CHIEF GEEK, LUCENT SKY
24

Secure development automatic identification and mitigation of application vulnerabilities

May 06, 2015

Download

Technology

peihsin1980

Lucent Sky AVM
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Secure development   automatic identification and mitigation of application vulnerabilities

Secure Development: Automatic Identification and Mitigation of Application Vulnerabilities

JIM LIU

CHIEF GEEK, LUCENT SKY

Page 2: Secure development   automatic identification and mitigation of application vulnerabilities

• What’re application vulnerabilities and why they’re bad

• How to identify vulnerabilities

• How to mitigate vulnerabilities + shameless self plug

Page 3: Secure development   automatic identification and mitigation of application vulnerabilities

What’re application vulnerabilities

• Application vulnerabilities are bugs in source code that allow hackers to bypass security features such as authentication or firewall

Page 4: Secure development   automatic identification and mitigation of application vulnerabilities

Application Security Feels Like an Uphill Battle

of web applications vulnerable to data theft

average vulnerabilitiesper application

70%

480

Page 5: Secure development   automatic identification and mitigation of application vulnerabilities

They’re expensive problems, and also are expensive to fix

Page 6: Secure development   automatic identification and mitigation of application vulnerabilities

What’s wrong with this code?

<% String eid = request.getParameter("eid"); %>

Employee ID: <%= eid %>

Page 7: Secure development   automatic identification and mitigation of application vulnerabilities

What about this one?

String userName = ctx.getAuthenticatedUserName();

String itemName = request.getParameter("itemName");

String query = "SELECT * FROM items WHERE owner = '"

+ userName + "' AND itemname = '"

+ itemName + "'";

List items = sess.createSQLQuery(query).list();

Page 8: Secure development   automatic identification and mitigation of application vulnerabilities

The most common vulnerabilities: cross-site scripting

• Allow the execution of arbitrary JavaScript on website visitors browsers

• Almost every popular website has been hit with XSS in the past

http://youtu.be/LhbUTEccdPs

Page 9: Secure development   automatic identification and mitigation of application vulnerabilities

The most common vulnerabilities: SQL injection

• Allow the execution of arbitrary SQL queries and system commands on the database server

• Over 80% of e-commerce sites in Taiwan currentlyhave SQL injections

http://youtu.be/f5qSs85eGVI

Page 10: Secure development   automatic identification and mitigation of application vulnerabilities

• What’re application vulnerabilities and why they’re bad

• How to identify vulnerabilities

• How to mitigate vulnerabilities + shameless self plug

Page 11: Secure development   automatic identification and mitigation of application vulnerabilities

Beer time!

• What did you do to identify vulnerabilities in your applications?

• What steps were taken to prevent vulnerable applications from being published?

Page 12: Secure development   automatic identification and mitigation of application vulnerabilities

Three different kinds of static code analysis tools

Page 13: Secure development   automatic identification and mitigation of application vulnerabilities

Dynamic or static testing?

Page 14: Secure development   automatic identification and mitigation of application vulnerabilities

SAST is accurate, but what does it really do?

Page 15: Secure development   automatic identification and mitigation of application vulnerabilities

• What’re application vulnerabilities and why they’re bad

• How to identify vulnerabilities

• How to mitigate vulnerabilities + shameless self plug

Page 16: Secure development   automatic identification and mitigation of application vulnerabilities

What do you do with vulnerabilities?

<% String eid = request.getParameter("eid"); %>

Employee ID: <%= eid %>

Page 17: Secure development   automatic identification and mitigation of application vulnerabilities

What do you do with vulnerabilities?

<% String eid = request.getParameter("eid"); %>

Employee ID: <%= ESAPI.encoder().encodeForHTMLAttribute(eid) %>

Page 18: Secure development   automatic identification and mitigation of application vulnerabilities

What about this one?

String userName = ctx.getAuthenticatedUserName();

String itemName = request.getParameter("itemName");

String query = "SELECT * FROM items WHERE owner = '"

+ userName + "' AND itemname = '"

+ itemName + "'";

List items = sess.createSQLQuery(query).list();

Page 19: Secure development   automatic identification and mitigation of application vulnerabilities

What about this one?

String userName = ctx.getAuthenticatedUserName();

String itemName = request.getParameter("itemName");

String query = "SELECT * FROM items WHERE owner = '"

+ userName + "' AND itemname = '"

+ ESAPI.encoder().encodeForSQL(itemName)

+ "'";

List items = sess.createSQLQuery(query).list();

Page 20: Secure development   automatic identification and mitigation of application vulnerabilities
Page 21: Secure development   automatic identification and mitigation of application vulnerabilities

AVM: it’s like autocorrect for your code

Page 22: Secure development   automatic identification and mitigation of application vulnerabilities

It’ll work Eclipse/NetBeans soon… :x

Page 23: Secure development   automatic identification and mitigation of application vulnerabilities

See AVM in action

http://youtu.be/0ZOfenswXmo

Page 24: Secure development   automatic identification and mitigation of application vulnerabilities

Thank you.

JIM LIU

CHIEF GEEK, LUCENT SKY

[email protected]