16
WEBSITE VULNERABILITIES Ngan Seok Chern MCP | CEH | MVP ASP / ASP.NET [email protected] http://blog.scnetstudio.com

Web Vulnerabilities_NGAN Seok Chern

Embed Size (px)

Citation preview

Page 1: Web Vulnerabilities_NGAN Seok Chern

WEBSITE VULNERABILITIES

Ngan Seok ChernMCP | CEH | MVP –ASP / [email protected]://blog.scnetstudio.com

Page 2: Web Vulnerabilities_NGAN Seok Chern

Agenda

Web application setup

Why attack

Type of attack & countermeasure

Page 3: Web Vulnerabilities_NGAN Seok Chern

Web Application Setup

Page 4: Web Vulnerabilities_NGAN Seok Chern

Why Attack ?

Defacing Website

Sealing credit card information

exploting server-side scripting

exploiting buffer overflow

and etc

Page 5: Web Vulnerabilities_NGAN Seok Chern

Step

1. Scanning

2. Gather Information

3. Testing

4. Plan

5. Launch

Page 6: Web Vulnerabilities_NGAN Seok Chern

Type of Attack

Cross-site Scripting / XSS Flaws

SQL Injection

Buffer Overflow

Directory Traversal

Error message interception attack

Web.config

and etc

Page 7: Web Vulnerabilities_NGAN Seok Chern

Cross-site Scripting / XSS Flaws

Typically found in web applications which allowcode injection by malicious users into the webpages viewed by other users.

JavaScript is commonly used.

During an attack "everything looks fine" to theend-user.

<script> </script>

Countermeasure : Validate all your sources.

Filtering script output.

Page 8: Web Vulnerabilities_NGAN Seok Chern

SQL Injection

SQL to manipulate database’s data Execute from address bar, queries /

searches. SELECT fieldlist FROM table

WHERE field = '$EMAIL'; SELECT fieldlist FROM table

WHERE field = 'anything' OR'x'='x';

Countermeasure: Check user input. Validate and sanitize user input that

passed to database.

Page 9: Web Vulnerabilities_NGAN Seok Chern

Buffer Overflow

Where a process stores data in a bufferoutside the memory the programmer setaside for it.

Countermeasure:

Validate input length.

Check and pay extra care on loop function whichcarry data.

Page 10: Web Vulnerabilities_NGAN Seok Chern

Directory Traversal

Attacker able to browse directoriesand files.

Expose the directory structure ofapplication and often the underlyingweb server and operating system.

Eg. “../Images/logo.gif”

Countermeasure: Define access right to the protected area

Apply checks/hot fixes

Update web server with patches in timelymanner

Page 11: Web Vulnerabilities_NGAN Seok Chern

Error Message Attack

Based on error message that show.

Example:

Your password is incorrect.

Connecting to the database on ……. With …..is notunsuccessful.

Countermeasure:

Modify and display common error message.

Page 12: Web Vulnerabilities_NGAN Seok Chern

Web.config

Connection String Information

Example: Data Source=190.190.200.100,1433;Network

Library=DBMSSOCN;InitialCatalog=myDataBase;UserID=myUsername;Password=myPassword;

Countermeasure: Encrypt your web.config. aspnet_regiis.exe -pef "connectionStrings

Name" "C:\Inetpub\wwwroot\MySite" –prov"DataProtectionConfigurationProvider”

Page 13: Web Vulnerabilities_NGAN Seok Chern

Web.config (Original)

Page 14: Web Vulnerabilities_NGAN Seok Chern

Web.config (Encrypted)

Page 15: Web Vulnerabilities_NGAN Seok Chern

Summary

Programmer played important roles.

Patches your server.

Page 16: Web Vulnerabilities_NGAN Seok Chern

Thank youQ&A