You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -11,78 +11,78 @@ The easiest way to start a web application is to use the **Maven-Tomcat7-Plug-in
11
11
12
12
See the following subsections for a short description and the requirements to execute the sample code and launch the web application.
13
13
14
-
###Ch04_OutputEscaping
14
+
##Ch04_OutputEscaping
15
15
Web application using JavaServer Pages (JSP) to show the difference between output escaping via Enterprise Security API (ESAPI) and no output escaping at all. Use an input like *<script>alert('XSS')</script>* to examine the difference.
16
16
17
17
**Requirements:** Apache Tomcat, Webbrowser
18
18
19
-
###Ch04_OutputEscapingJSF
19
+
##Ch04_OutputEscapingJSF
20
20
Web application using JavaServer Faces (JSF) to demonstrate the two different possibilities to show user input in a web page with *#{contact.firstname}* and *<h:outputText value="#{contact.firstname}" />*. Use an input like *<script>alert('XSS')</script>* to examine the difference.
21
21
22
22
**Requirements:** Apache Tomcat, Webbrowser
23
23
24
-
###Ch04_OutputEscapingJSP
24
+
##Ch04_OutputEscapingJSP
25
25
Spring based web application using JavaServer Pages (JSP) to demonstrate the two different possibilities to show user input in a web page with *${contact.firstname}* and *<c:out value="${contact.firstname}" />*. Use an input like *<script>alert('XSS')</script>* to examine the difference.
26
26
27
27
**Requirements:** Apache Tomcat, Webbrowser
28
28
29
-
###Ch05_AccessReferenceMaps
29
+
##Ch05_AccessReferenceMaps
30
30
Web application using JavaServer Faces (JSF) to show the difference between using unprotected and protected Maps (with *IntegerAccessReferenceMaps* and *RandomAccessReferenceMaps*) with user data.
31
31
32
32
**Requirements:** Apache Tomcat, Webbrowser
33
33
34
-
###Ch05_HSTS
34
+
##Ch05_HSTS
35
35
Web application using a Servlet filter to add the *Strict-Transport-Security* header to each response.
36
36
37
37
**Requirements:** Apache Tomcat, Webbrowser
38
38
39
-
###Ch05_SessionFixation
39
+
##Ch05_SessionFixation
40
40
Web application invalidating an existing session and its session id before continuing the login process. This web application requires the included special *context.xml* configuration for Tomcat in order to display the current session id via JavaScript.
41
41
42
42
**Requirements:** Apache Tomcat, Webbrowser
43
43
44
-
###Ch05_SessionHandling
44
+
##Ch05_SessionHandling
45
45
Web application containing a complete *web.xml* configuration showing how to protect cookies and other session data. Contains only a start page which fails trying to show the session cookie in a JavaScript popup.
46
46
47
47
**Requirements:** Apache Tomcat, Webbrowser
48
48
49
-
###Ch06_SQLInjection
49
+
##Ch06_SQLInjection
50
50
Web application using user input to query a in-memory-database. The entered data is used as part of a normal *Statement*, an *escaped Statement*, a *Prepared Statement* and as input for a *Hibernate Query Language*.
51
51
52
52
**Requirements:** Apache Tomcat, Webbrowser
53
53
54
-
###Ch06_XPathInjection
54
+
##Ch06_XPathInjection
55
55
Web application using user input to query a simple XML document. The entered data (name and password) is used as part of a normal *XPath expression* without any escaping and escaped as part of another *XPath expression*. The unescaped version is prune to XPath Injection, which makes it possible to retrieve more data of the XML document as the intended order limit.
56
56
57
57
**Requirements:** Apache Tomcat, Webbrowser
58
58
59
-
###Ch07_CSP
59
+
##Ch07_CSP
60
60
Web application with three input processing servlets. One is unprotected and processes any input without input validation or output escaping and is prone to Cross-Site Scripting. The second servlet adds a minimal *Content-Security-Policy* header to the response and allows to use any source from the same page (URL). This already protects the response page from Cross-Site Scripting in supported browsers. The third form adds a *Content-Security-Policy-Report-Only* header and shows how easy the reported data can be processed.
61
61
62
62
**Requirements:** Apache Tomcat, Webbrowser
63
63
64
-
###Ch07_XSS
64
+
##Ch07_XSS
65
65
Web application to test the three XSS types *stored*, *reflected* and *DOM based*. The input textfield is vulnerable to XSS and can be easily protected by enabling output escaping. Cookie could be protected by removing the special *context.xml* and by setting the corresponding *web.xml* parameter.
66
66
67
67
This web application requires the included special *context.xml* configuration for Tomcat in order to display the current session id via JavaScript.
68
68
69
69
**Requirements:** Apache Tomcat, Webbrowser
70
70
71
-
###Ch07_XSSFilter
71
+
##Ch07_XSSFilter
72
72
Web application showing the differences between a blacklist and an ESAPI based request filtering. Use an input like *<script>alert('XSS')</script>* to see the different output on the output pages.
73
73
74
74
**Requirements:** Apache Tomcat, Webbrowser
75
75
76
-
###Ch07_XSSJSF
76
+
##Ch07_XSSJSF
77
77
JavaServer Faces (JSF) based web application accepting user input in two forms. The first form results into an output page showing the user input in drop down boxes and output text fields with all default attributes active. The second form results into an output page using the same output fields with any additional security related attribute set to the maximum. Use an input like *<script>alert('XSS')</script>* to challenge the JSF XSS protection.
78
78
79
79
**Requirements:** Apache Tomcat, Webbrowser
80
80
81
-
###Ch08_CSRF
81
+
##Ch08_CSRF
82
82
Web application showing Cross-Site Request Forgery (CSRF) with GET and POST requests and how to protect forms with an anti CSRF token. All requests on the **Unprotected Requests** page are successful and reach the backend as a normal request. The **Protected Requests** page contains successful (with token) and unsuccessful (without token) requests; only the valid requests are processed in the backend.
0 commit comments