dnn con baltimore security flaws

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

Upload: joshua-bradley

Post on 11-Feb-2017

105 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Dnn Con Baltimore Security Flaws

@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: Dnn Con Baltimore Security Flaws

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

THANKS TO ALL OF OUR GENEROUS SPONSORS!

Page 3: Dnn Con Baltimore Security Flaws

@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 5: Dnn Con Baltimore Security Flaws

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

Cross Site Scripting

Page 6: Dnn Con Baltimore Security Flaws

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

XSS Continued…

Page 7: Dnn Con Baltimore Security Flaws

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

XSS Continued…

Example 1

Page 8: Dnn Con Baltimore Security Flaws

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

XSS Continued…

Page 9: Dnn Con Baltimore Security Flaws

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

XSS Continued…

Example 2

Page 10: Dnn Con Baltimore Security Flaws

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

XSS Continued…• Html Encode when not needing HTML

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

Page 11: Dnn Con Baltimore Security Flaws

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

SQL Injection

Page 12: Dnn Con Baltimore Security Flaws

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

SQLi Continued…

Example

Page 13: Dnn Con Baltimore Security Flaws

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

SQLi Continued…• Never do string concatenation with SQL.

• Use an ORM or Parameterized Stored Procedure.

Page 14: Dnn Con Baltimore Security Flaws

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

Cross Site Request Forgery

Page 15: Dnn Con Baltimore Security Flaws

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

CSRF Continued…Example

Page 16: Dnn Con Baltimore Security Flaws

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

CSRF Continued…• Use HttpPost

• ValidateAntiForgery• Never Allow Access from any host

Page 17: Dnn Con Baltimore Security Flaws

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

Insecure Direct Object References

Page 18: Dnn Con Baltimore Security Flaws

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

IDOR Continued…Example

Page 19: Dnn Con Baltimore Security Flaws

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

IDOR Continued…• Use built in Folder and File Manager.

• Avoid using user input when selecting file.

Page 20: Dnn Con Baltimore Security Flaws

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

Available on GitHub & Slideshare• https://github.com/JoshuaBradley/DnnVulnerableModulesSuite

• http://www.slideshare.net/JoshuaBradley/dnn-con-baltimore-security-flaws

Page 21: Dnn Con Baltimore Security Flaws

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

Questions

@JRBradley1

Page 22: Dnn Con Baltimore Security Flaws

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

Resources• http://

www.troyhunt.com/2012/12/stored-procedures-and-orms-wont-save.html

• https://www.owasp.org/index.php/Main_Page

• http://www.jwaffinityit.com/Portals/28/Documents/DNN/Analysis%20of%20DotNetNuke%20compliance%20against%20OWASP%20Top%2010.pdf

Page 23: Dnn Con Baltimore Security Flaws

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

Resources•https://msdn.microsoft.com/en-us/library/system.web.security.antixss.antixssencoder(v=vs.110).

aspx• https://

weblog.west-wind.com/posts/2012/Jul/19/NET-HTML-Sanitation-for-rich-HTML-Input

• http://www.computerweekly.com/tip/Cross-site-request-forgery-Lessons-from-a-CSRF-attack-example

Page 25: Dnn Con Baltimore Security Flaws

@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