Web Application Security (Part 2)
Web Application Security (Part 2)
(Part 2)
Bezpečnosť IT infraštruktúry
– visit http://localhost:8080/WebGoat
– login with user name “guest” and password “guest”
Setup – OWASP Zed Attack Proxy 2.4.3
• https://github.com/zaproxy/zaproxy/wiki/Downloads
– download and run installer
• Windows versions require Java 7 to run
– run the proxy (start ZAP 2.4.3 from start menu)
• change default port 8080 (used by WebGoat) to 8888
– Ctrl+Alt+O > Local Proxy > Port
• we obtain the proxy running on localhost:8888
• alternatives are:
– OWASP WebScarab Project or OWASP WebScarab NG
• both are obsolete
Setup – Burp Suite Free Edition
• https://portswigger.net/burp/download.html
– download free edition burpsuite_free_v1.6.32.jar
– from command line execute:
java -jar burpsuite_free_v1.6.32.jar
or double-click the jar file
– Proxy > Options > Edit > Bind to port: 8888 > OK
– check Running checkbox
• run either ZAP or Burp Suite Free
– depending on which one is better suited for
selected task
– following examples will use ZAP
Configure IE for proxy
• check the option:
Tools > Internet Options > Connections > LAN
settings > Use proxy server
• uncheck the option:
Bypass proxy server for local addresses
• in the following fields enter:
Address: localhost Port: 8888
• in advanced settings verify that exceptions
field is empty
Form authentication over HTTP
• login again and intercept submission of login form
• POST request:
POST http://localhost:8080/WebGoat/j_spring_security_check HTTP/1.1
Proxy-Connection: keep-alive
Content-Length: 29
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: http://localhost:8080
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Referer: http://localhost:8080/WebGoat/login.mvc
Accept-Language: sk,en-US;q=0.8,en;q=0.6,cs;q=0.4
Cookie: JSESSIONID=C45C8FB63949D3D4D4FA8D99644D2930
Host: localhost:8080
username=guest&password=guest
• response:
HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
WWW-Authenticate: Basic realm="WebGoat Application"