security misconfiguration

17
Security Misconfiguration Secure ASP.NET Configuration, Password Management Jiří Danihelka

Upload: jiri-danihelka

Post on 12-Jan-2017

15 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Security misconfiguration

Security MisconfigurationSecure ASP.NET Configuration, Password Management

Jiří Danihelka

Page 2: Security misconfiguration

Secure ASP.NET Configuration

Page 3: Security misconfiguration

3

OWASP Top 10 Security Risks for ASP.NET

10 most common security threats how to avoid them when creating websites how to perform hacking / penetration testing

Page 4: Security misconfiguration

4

Security Misconfiguration

Recommendations: This topic is very broad and it

is hard to give a general recommendation.

Check your website configuration carefully. Pay attention to settings related to security (e.g. session timeout).

Change default passwords Do not store production

credentials in the repository Use different credentials in

Dev and Live environments

Page 5: Security misconfiguration

5

Clickjacking

Attack description:- transparent iFrame that is controlled by user interaction- the use can unintentionally make requests he did not want to

Page 6: Security misconfiguration

6

Custom Errors

Recommendations: Use custom error pages RemoteOnly setting disables

custom errors on localhost

Page 7: Security misconfiguration

7

Information disclosure

Recommendations:<!-- enableVersionHeader - Remove the ASP.NET version number from the response headers. Added security through obscurity. --><httpRuntime targetFramework="4.5" enableVersionHeader="false" />

<httpProtocol> <customHeaders> <!-- X-Powered-By - Remove the HTTP header for added security and a slight performance increase. --> <clear /> </customHeaders></httpProtocol>

Page 8: Security misconfiguration

8

Leaving Tracing & Debuging Enabled

The trace feature of ASP.NET is one of the most useful tools that you can use to ensure application security by debugging and profiling your Web-based applications.

Unfortunately, it is also one of the most useful tools that a hacker can use to attack your Web-based applications if it is left enabled in a production environment.

Page 9: Security misconfiguration

9

Maximum URL Request Length

Recommendations:<!-- maxRequestLength="4096" - The maximum length of the url request in kilobytes. --><httpRuntime maxRequestLength="4096"/>

Page 10: Security misconfiguration

Password Management

Page 11: Security misconfiguration

How to properly store production passwords?

Page 12: Security misconfiguration

12

Store passwords in code repository? Definitely no!

Not all developers shouldhave access to productionpasswords

Problems with open-source projects

High risk of password leaking (e.g. during a code audit)

Page 13: Security misconfiguration

13

Store passwords in emails? No

Many emails Hard to update passwords Who has the password? Hard to restrict spreading

Page 14: Security misconfiguration

14

Store passwords in Confluence? No

Confluence is for documentation

Documentation is sharedwith other parties thatshould not have accessto passwords

Does not support different levels of access (dev, stage, pre-release, live)

Page 15: Security misconfiguration

15

Store passwords in Connection Strings? No Not all passwords are

connection strings Hard to protect and

retrieve later Sometimes have to

connect to the server

Page 16: Security misconfiguration

Solution: Password Management

Page 17: Security misconfiguration

17

Password Management

Live demo