DNNcon 2016: Are There Security Flaws in Your DNN Modules?

27
@DNNCon Don’t forget to include #DNNCon in your tweets! Are There Security Flaws in Your Modules? Joshua Bradley / Web Developer Engage Software @JRBradley1

Transcript of DNNcon 2016: Are There Security Flaws in Your DNN Modules?

Page 1: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Are There Security Flaws in Your Modules?Joshua Bradley / Web Developer

Engage Software@JRBradley1

Page 2: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

THANKS TO ALL OF OUR GENEROUS SPONSORS!

Page 3: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Agenda• Introduction• Cross Site Scripting• SQL Injection• Cross Site Request Forgery• Insecure Direct Object References• Q & A

Page 4: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

GoalFor Developers-To think about possible security vulnerabilities while developing your modules.

For Everyone -Be able to recognize potential vulnerabilities when testing websites.

Page 5: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Introduction

Page 6: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Cross Site Scripting

Page 7: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Reflective XSS

Page 8: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Reflective XSS

Example

Page 9: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Stored XSS

Page 10: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Stored XSS

Example

Page 11: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

XSS Summary• Html Encode when not needing HTML

• Use Anti XSS library when needing to accept HTML from user input.

Page 12: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

SQL Injection

Page 13: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

SQLi

Example

Page 14: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

SQLi Summary• Never do string concatenation with SQL.

• Use an ORM or Parameterized Stored Procedure.

Page 15: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Cross Site Request Forgery

Page 16: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

CSRFExample

Page 17: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

CSRF Summary• Use HttpPost

• ValidateAntiForgery• Never Allow Access from any host

Page 18: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Insecure Direct Object References

Page 19: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

IDORExample

Page 20: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

IDOR Summary• Use built in Folder and File Manager.

• Avoid using user input when selecting file.

Page 21: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Available on GitHub & Slideshare

•http://www.engagesoftware.com/blog/post/5052

Page 22: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Questions

@JRBradley1

Page 23: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Resources•https://www.owasp.org/index.php/OWASP_Top_Ten_Cheat_Sheet

• http://www.dnnsoftware.com/

wiki/analysis-of-dotnetnuke-compliance-

against-owasp-top-10-2013

Page 26: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Resources• http://

resources.infosecinstitute.com/dumping-a-database-using-sql-

injection/• https://www.sql-programmers.com/

sql-injection.aspx• https://msdn.microsoft.com/en-us/

library/bb386929.aspx• https://msdn.microsoft.com/en-us/

library/cc716760.aspx

Page 27: DNNcon 2016: Are There Security Flaws in Your DNN Modules?

@DNNConDon’t forget to include #DNNCon in your tweets!

Resources• http://www.troyhunt.com/

2013/07/everything-you-wanted-to-know-about-

sql.html• https://github.com/

malcomvetter/WidgetSender