26
Web Security Vulnerabilities ICS Laboratory, AJOU Univ. Hyun Soo Ch.

Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

  • Upload
    doque

  • View
    225

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

Web Security Vulnerabilities

ICS Laboratory, AJOU Univ.

Hyun Soo Ch.

Page 2: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

OWASP Top Ten

(Open Web Application Security Project)OWASP

Top Ten Project

List of 10 Most Critical Web Application Security Risks

https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project

• Injection • Broken Authentication and Session Management• Cross-Site Scripting(XSS)• Insecure Direct Object Reference• Security Misconfiguration• Sensitive Data Exposure • Missing Function Level Access Control• Cross-Site Request Forgery• Using Components with known Vulnerabilities• Unvalidated Redirects and Forwards

Page 3: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

OWASP WebGoat

OWASP

WebGoat

Test bed Web Application for practicing OWASP Top 10 Risks

https://www.owasp.org/index.php/Category:OWASP_WebGoat_Project

Page 4: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

1. Move to Download Directory

Setting up WebGoat

2. Download Tomcat, JDK, WebGoat.war

Download packages

Page 5: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

Setting up WebGoat

5. Move apache-tomcat file to /usr/local/

6. Move to /usr/local/java to extract tar file

4. Make directory for JDK and move JDK tar file to /usr/local/java

Extract Package

3. Check Downloaded file with ‘ls’

Page 6: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

Setting up WebGoat

7. Symbolic Link Setting to use installed java

8. Check if it’s installed properly

9. Export Environmental Variable

Install JDK

Page 7: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

Setting up WebGoat

11. Create a file tomcat641 in /etc/init.d directory

10. Move to ‘/usr/local’ and extract apache-tomcat-6.0.41.tar.gz

Setup Tomcat

- Fill the file contents like right figure ->

12. Then change privilege to 755(rwx rw- rw-)

Page 8: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

Setting up WebGoat

13. Move to ‘apache-tomcat-XX/conf’ and edit ‘tomcat-users.xml’ files

Setup Tomcat

* To Start the service

** To automatically start when reboot

*** To Stop the service

Page 9: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

Setting up WebGoat

Starting WebGoat

14. Copy Downloaded WebGoat.war to tomcat’s webapp directory

15. Start Tomcat

16. Open up Fire Fox(Browser) and get access to WebGoat server!

Page 10: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

Setting up WebGoat

WebGoat Setup CompleteYou can also get to the server outside the VM

Page 11: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

General

General Web Technique – Http Basics

1. Enter your name in the input2. Press ‘Go!’

Page 12: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

Buffer Overflows

Hello World!

12 characters

@$#@!_#

7 more characters

What’s Buffer Overflow?

Page 13: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

Tools You’ll be needing

BURPSUITEWeb application Security Testing Tool

http://portswigger.net/burp/download.html

Portable FirefoxFirefox browser that is portable

http://portableapps.com/apps/internet/firefox_portable

JDKJava virtual machine

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Page 14: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

1. Open up CMD

2. Change Directory to where the burpsuite.jar file is.

3. Then Execute jar file with jdk

Page 15: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

1. Open up CMD

2. Change Directory to where the burpsuite.jar file is.

3. Then Execute jar file with jdk

4. After some “NEXT”s you will see figure like →

Page 16: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

But we’ll be using just Proxy feature

There are lots of features that Burp Suite supports

Page 17: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

With Proxy Toolbar of Portable Firefox and Proxy-Intercept feature of Burp Suite

it’s possible to intercept and edit generated packet

Page 18: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

1. Click Add ICON

2. Click Next

Page 19: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

1. Click Add ICON

2. Click Next

3. Enter Proxy Info

Name For your Proxy Setting

IP address & Port# for Http Proxy

Page 20: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

1. Click Add ICON

2. Click Next

3. Enter Proxy Info

Loopback Address(to myself) Port # that is not in use

4. Then Press OK

Page 21: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

1. Click Add ICON

2. Click Next

3. Enter Proxy Info

4. Then Press OK

Page 22: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

1. Click Add ICON

2. Click Next

3. Enter Proxy Info

4. Then Press OK

5. Edit proxy listener Info

6. Scroll Down &Check “Unhide hidden form fields”

Page 23: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

1. Click Add ICON

2. Click Next

3. Enter Proxy Info

4. Then Press OK

5. Edit proxy listener Info

6. Scroll Down &Check “Unhide hidden form fields”

7. Go back to Firefox

8. Click Apply Button

Page 24: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

Actual Intercepted PacketSubmit form Webpage

Pressing “Go” button, Browser will send msg to server,

which will be intercepted by Burp Suite

Intercepted msg can be edited and can be sent by pressing “Forward” button

Page 25: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

Buffer Overflows

Buffer Overflows

Page 26: Web Security Vulnerabilities - ajou.ac.krics.ajou.ac.kr/~aislab/WebGoat_Dant.pdf · OWASP Top Ten OWASP(Open Web Application Security Project) Top Ten Project List of 10 Most Critical

WebGoat… WebGoat?

For Solution

http://webappsecmovies.sourceforge.net/webgoat/