├── BrokenApp.py ├── Burp Session Handling.pdf ├── BurpSessionHandling.burp-projectopts.json ├── Dockerfile ├── LICENSE ├── README.md ├── ServerSideSession.py ├── static └── style.css └── templates ├── CSRFForm.html ├── CSRFShow.html ├── ProbForm.html ├── ProbShow.html ├── Workflow-Step1.html ├── Workflow-Step2.html ├── Workflow-Step3.html ├── Workflow-Step4.html ├── app.html ├── home.html ├── login.html ├── message.html └── notes.html /BrokenApp.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, request, render_template, redirect, url_for, session, flash 2 | from sys import argv 3 | from random import choice, random 4 | import string 5 | from uuid import uuid4 6 | uuid = uuid4 7 | from ServerSideSession import VolatileServerSideSessionInterface 8 | 9 | app = Flask(__name__) 10 | app.session_interface = VolatileServerSideSessionInterface() 11 | 12 | users = { 13 | 'user': 'pass' 14 | } 15 | 16 | articles = [ 17 | (1, 'A'), 18 | (2, 'B'), 19 | (3, 'C') 20 | ] 21 | max_notes = 3 22 | 23 | def isLoginSession(): 24 | return 'user' in session 25 | 26 | def newCSRFToken(): 27 | session['csrftoken'] = "".join([choice(string.ascii_letters) for i in range(32)]) 28 | 29 | def CSRFValidation(): 30 | try: 31 | sessionToken = session['csrftoken'] 32 | newCSRFToken() 33 | return sessionToken == request.form['csrftoken'] 34 | except: 35 | return False 36 | 37 | @app.route('/') 38 | def home(): 39 | return render_template("home.html") 40 | 41 | @app.route('/login', methods=['POST', 'GET']) 42 | def login(): 43 | if isLoginSession(): 44 | return redirect(url_for('home')) 45 | 46 | if request.method == 'GET': 47 | return render_template("login.html") 48 | elif request.method == 'POST': 49 | username = request.form['user'] 50 | try: 51 | password = users[username] 52 | except KeyError: 53 | return render_template("login.html", message="User " + username + " unknown!") 54 | 55 | if password == request.form['pass']: 56 | session['user'] = username 57 | newCSRFToken() 58 | if 'redirectto' in request.form: 59 | return redirect(url_for(request.form['redirectto'])) 60 | else: 61 | return render_template("login.html", message="Login failed!") 62 | 63 | @app.route('/logout') 64 | def logout(): 65 | session.clear() 66 | return render_template("login.html", message="Succesfully logged out.") 67 | 68 | @app.route('/CSRFProtected', methods=['POST', 'GET']) 69 | def CSRFProtection(): 70 | if not isLoginSession(): 71 | return redirect(url_for('login', redirectto='CSRFProtection')) 72 | 73 | if request.method == 'GET': 74 | return render_template("CSRFForm.html") 75 | elif request.method == 'POST': 76 | if not CSRFValidation(): 77 | return render_template("message.html", message="CSRF validation failed!") 78 | else: 79 | return render_template("CSRFShow.html") 80 | 81 | @app.route('/ProbabilisticLogout', methods=['POST', 'GET']) 82 | def ProbabilisticLogout(): 83 | if not isLoginSession(): 84 | return redirect(url_for('login', redirectto='ProbabilisticLogout')) 85 | 86 | if request.method == 'GET': 87 | return render_template("ProbForm.html", fields=list(string.ascii_lowercase)) 88 | elif request.method == 'POST': 89 | if random() < 0.2: 90 | return logout() 91 | else: 92 | if CSRFValidation(): 93 | return render_template("ProbShow.html", fields=list(string.ascii_lowercase)) 94 | else: 95 | return render_template("message.html", message="CSRF validation failed!") 96 | 97 | @app.route('/Workflow/', methods=['POST', 'GET']) 98 | def Workflow(step): 99 | if not isLoginSession(): 100 | return redirect(url_for('login', redirectto='ProbabilisticLogout')) 101 | 102 | if 'step' not in session: 103 | session['step'] = 1 104 | if session['step'] < step: 105 | return render_template("message.html", message="Workflow request doesn't matches workflow state!") 106 | if session['step'] != step: 107 | session['step'] = step 108 | 109 | if request.method == 'GET': 110 | return render_template("Workflow-Step{}.html".format(step), articles=articles) 111 | elif request.method == 'POST': 112 | if not CSRFValidation(): 113 | return render_template("message.html", message="CSRF validation failed!") 114 | 115 | if step < 4: 116 | for param in request.form: 117 | session['wf_' + param] = request.form[param] 118 | session['step'] += 1 119 | return redirect(url_for('Workflow', step=session['step'])) 120 | else: 121 | session['step'] = 1 122 | return render_template("message.html", message="Thanks for your order! It will be delivered soon!") 123 | 124 | @app.route('/Notes', methods=['POST', 'GET']) 125 | def Notes(): 126 | if not isLoginSession(): 127 | return redirect(url_for('login', redirectto='Notes')) 128 | 129 | if 'notes' not in session: 130 | session['notes'] = dict() 131 | 132 | if request.method == 'GET': 133 | pass 134 | if request.method == 'POST': 135 | if request.form['action'] == 'add': 136 | if len(session['notes']) >= max_notes: 137 | flash("No more notes allowed!") 138 | else: 139 | note = { 'subject': request.form['subject'], 'content': request.form['content'] } 140 | session['notes'][str(uuid())] = note 141 | flash("Note was added") 142 | if request.form['action'] == 'delete': 143 | nid = request.form['id'] 144 | if nid in session['notes']: 145 | subject = session['notes'][nid]['subject'] 146 | del session['notes'][nid] 147 | flash("Note '%s' deleted" % (subject)) 148 | else: 149 | flash("Note with id '%s' doesn\'t exists" % nid) 150 | 151 | return render_template("notes.html", notes=session['notes']) 152 | 153 | if __name__ == '__main__': 154 | try: 155 | listen_addr = argv[1] 156 | except IndexError: 157 | listen_addr = '127.0.0.1' 158 | app.run(host=listen_addr, port=8001, debug=False) 159 | -------------------------------------------------------------------------------- /Burp Session Handling.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaspatzke/NastyWebHackme/b5c91d175f85b106d186f405f101d3e861e0964f/Burp Session Handling.pdf -------------------------------------------------------------------------------- /BurpSessionHandling.burp-projectopts.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_options":{ 3 | "connections":{ 4 | "hostname_resolution":[], 5 | "out_of_scope_requests":{ 6 | "drop_all_out_of_scope":false, 7 | "exclude":[ 8 | { 9 | "enabled":true, 10 | "file":"logout", 11 | "protocol":"any" 12 | }, 13 | { 14 | "enabled":true, 15 | "file":"logoff", 16 | "protocol":"any" 17 | }, 18 | { 19 | "enabled":true, 20 | "file":"exit", 21 | "protocol":"any" 22 | }, 23 | { 24 | "enabled":true, 25 | "file":"signout", 26 | "protocol":"any" 27 | } 28 | ], 29 | "include":[], 30 | "scope_option":"suite" 31 | }, 32 | "platform_authentication":{ 33 | "credentials":[], 34 | "do_platform_authentication":true, 35 | "prompt_on_authentication_failure":false, 36 | "use_user_options":true 37 | }, 38 | "socks_proxy":{ 39 | "dns_over_socks":false, 40 | "host":"", 41 | "password":"", 42 | "port":0, 43 | "use_proxy":false, 44 | "use_user_options":true, 45 | "username":"" 46 | }, 47 | "timeouts":{ 48 | "domain_name_resolution_timeout":300000, 49 | "failed_domain_name_resolution_timeout":60000, 50 | "normal_timeout":120000, 51 | "open_ended_response_timeout":10000 52 | }, 53 | "upstream_proxy":{ 54 | "servers":[], 55 | "use_user_options":true 56 | } 57 | }, 58 | "http":{ 59 | "redirections":{ 60 | "understand_3xx_status_code":true, 61 | "understand_any_status_code_with_location_header":false, 62 | "understand_javascript_driven":false, 63 | "understand_meta_refresh_tag":true, 64 | "understand_refresh_header":true 65 | }, 66 | "status_100_responses":{ 67 | "remove_100_continue_responses":false, 68 | "understand_100_continue_responses":true 69 | }, 70 | "streaming_responses":{ 71 | "store":true, 72 | "strip_chunked_encoding_metadata":true, 73 | "urls":[] 74 | } 75 | }, 76 | "misc":{ 77 | "collaborator_server":{ 78 | "location":"", 79 | "poll_over_unencrypted_http":false, 80 | "polling_location":"", 81 | "type":"default" 82 | }, 83 | "scheduled_tasks":{ 84 | "tasks":[] 85 | } 86 | }, 87 | "sessions":{ 88 | "cookie_jar":{ 89 | "monitor_extender":false, 90 | "monitor_intruder":false, 91 | "monitor_proxy":true, 92 | "monitor_repeater":true, 93 | "monitor_scanner":false, 94 | "monitor_sequencer":false, 95 | "monitor_spider":true 96 | }, 97 | "macros":{ 98 | "macros":[ 99 | { 100 | "description":"Get CSRF Token", 101 | "items":[ 102 | { 103 | "custom_parameters":[], 104 | "method":"GET", 105 | "request":"GET /CSRFProtected HTTP/1.1\r\nHost: localhost:8001\r\nUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nReferer: http://localhost:8001/\r\nCookie: vsessid=fa7c0f67-5b6c-44e0-bdd9-19a77e2b116b\r\nConnection: close\r\n\r\n", 106 | "request_parameters":[], 107 | "response":"HTTP/1.0 200 OK\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 511\r\nServer: Werkzeug/0.11.10 Python/3.4.3\r\nDate: Sun, 24 Jul 2016 22:04:59 GMT\r\n\r\n\n\n\nNasty Pentestable Web App\n\n\n\n
\n Home \n \n Logged in as user. Logout\n \n
\n
\n \n
\n Input: \n \n \n
\n\n
\n\n", 108 | "status_code":200, 109 | "url":"http://localhost:8001/CSRFProtected" 110 | } 111 | ], 112 | "serial_number":781821271129990144 113 | }, 114 | { 115 | "description":"Start Page", 116 | "items":[ 117 | { 118 | "cookies_received":"vsessid", 119 | "custom_parameters":[], 120 | "method":"GET", 121 | "request":"GET / HTTP/1.1\r\nHost: localhost:8001\r\nUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nConnection: close\r\n\r\n", 122 | "request_parameters":[], 123 | "response":"HTTP/1.0 200 OK\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 474\r\nSet-Cookie: vsessid=fa7c0f67-5b6c-44e0-bdd9-19a77e2b116b; Path=/\r\nServer: Werkzeug/0.11.10 Python/3.4.3\r\nDate: Sun, 24 Jul 2016 22:04:47 GMT\r\n\r\n\n\n\nNasty Pentestable Web App\n\n\n\n
\n Home \n \n Not logged in. Login\n \n
\n
\n \nCSRF Protection
\nProbabilistic Logout
\nWorkflow
\nNotes\n\n
\n\n", 124 | "status_code":200, 125 | "url":"http://localhost:8001/" 126 | } 127 | ], 128 | "serial_number":7187822661316259840 129 | }, 130 | { 131 | "description":"Login as 'user'", 132 | "items":[ 133 | { 134 | "custom_parameters":[], 135 | "method":"POST", 136 | "request":"POST /login HTTP/1.1\r\nHost: localhost:8001\r\nUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nReferer: http://localhost:8001/login\r\nCookie: vsessid=fa7c0f67-5b6c-44e0-bdd9-19a77e2b116b\r\nConnection: close\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 35\r\n\r\nuser=user&pass=pass&redirectto=home", 137 | "request_parameters":[ 138 | { 139 | "name":"user", 140 | "original_value":"user", 141 | "parameter_handling":"preset_value", 142 | "preset_value":"user", 143 | "type":"body_url_encoded" 144 | }, 145 | { 146 | "name":"pass", 147 | "original_value":"pass", 148 | "parameter_handling":"preset_value", 149 | "preset_value":"pass", 150 | "type":"body_url_encoded" 151 | }, 152 | { 153 | "name":"redirectto", 154 | "original_value":"home", 155 | "parameter_handling":"preset_value", 156 | "preset_value":"home", 157 | "type":"body_url_encoded" 158 | } 159 | ], 160 | "response":"HTTP/1.0 302 FOUND\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 209\r\nLocation: http://localhost:8001/\r\nServer: Werkzeug/0.11.10 Python/3.4.3\r\nDate: Sun, 24 Jul 2016 22:04:55 GMT\r\n\r\n\nRedirecting...\n

Redirecting...

\n

You should be redirected automatically to target URL: /. If not click the link.", 161 | "status_code":302, 162 | "url":"http://localhost:8001/login" 163 | } 164 | ], 165 | "serial_number":6219624229355620352 166 | }, 167 | { 168 | "description":"Workflow until Step 2 POST", 169 | "items":[ 170 | { 171 | "custom_parameters":[], 172 | "method":"GET", 173 | "request":"GET /Workflow/1 HTTP/1.1\r\nHost: localhost:8001\r\nUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nReferer: http://localhost:8001/\r\nCookie: vsessid=fa7c0f67-5b6c-44e0-bdd9-19a77e2b116b\r\nConnection: close\r\n\r\n", 174 | "request_parameters":[], 175 | "response":"HTTP/1.0 200 OK\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 691\r\nServer: Werkzeug/0.11.10 Python/3.4.3\r\nDate: Sun, 24 Jul 2016 22:26:54 GMT\r\n\r\n\n\n\nNasty Pentestable Web App\n\n\n\n

\n Home \n \n Logged in as user. Logout\n \n
\n
\n \nSelect article:\n
\n \n \n \n
\n\n
\n\n", 176 | "status_code":200, 177 | "url":"http://localhost:8001/Workflow/1" 178 | }, 179 | { 180 | "custom_parameters":[], 181 | "method":"POST", 182 | "request":"POST /Workflow/1 HTTP/1.1\r\nHost: localhost:8001\r\nUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nReferer: http://localhost:8001/Workflow/1\r\nCookie: vsessid=fa7c0f67-5b6c-44e0-bdd9-19a77e2b116b\r\nConnection: close\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 51\r\n\r\nchoice=1&csrftoken=JAvYLSOTafScCWjFwxDVPzmrmRIfeqXY", 183 | "request_parameters":[ 184 | { 185 | "name":"choice", 186 | "original_value":"1", 187 | "parameter_handling":"preset_value", 188 | "preset_value":"1", 189 | "type":"body_url_encoded" 190 | }, 191 | { 192 | "name":"csrftoken", 193 | "original_value":"JAvYLSOTafScCWjFwxDVPzmrmRIfeqXY", 194 | "parameter_handling":"derive_from_prior_response", 195 | "preset_value":"JAvYLSOTafScCWjFwxDVPzmrmRIfeqXY", 196 | "type":"body_url_encoded" 197 | } 198 | ], 199 | "response":"HTTP/1.0 302 FOUND\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 229\r\nLocation: http://localhost:8001/Workflow/2\r\nServer: Werkzeug/0.11.10 Python/3.4.3\r\nDate: Sun, 24 Jul 2016 22:26:56 GMT\r\n\r\n\nRedirecting...\n

Redirecting...

\n

You should be redirected automatically to target URL: /Workflow/2. If not click the link.", 200 | "status_code":302, 201 | "url":"http://localhost:8001/Workflow/1" 202 | }, 203 | { 204 | "custom_parameters":[], 205 | "method":"GET", 206 | "request":"GET /Workflow/2 HTTP/1.1\r\nHost: localhost:8001\r\nUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nReferer: http://localhost:8001/Workflow/1\r\nCookie: vsessid=fa7c0f67-5b6c-44e0-bdd9-19a77e2b116b\r\nConnection: close\r\n\r\n", 207 | "request_parameters":[], 208 | "response":"HTTP/1.0 200 OK\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 765\r\nServer: Werkzeug/0.11.10 Python/3.4.3\r\nDate: Sun, 24 Jul 2016 22:26:56 GMT\r\n\r\n\n\n\nNasty Pentestable Web App\n\n\n\n

\n Home \n \n Logged in as user. Logout\n \n
\n
\n \n

Deliver to

\n
\n \n \n \n \n
Name
Street
Zip/City
\n \n \n
\n\n
\n\n", 209 | "status_code":200, 210 | "url":"http://localhost:8001/Workflow/2" 211 | } 212 | ], 213 | "serial_number":5226154035585686528 214 | }, 215 | { 216 | "description":"After POST to Workflow/2 until Summary Page (Workflow/3)", 217 | "items":[ 218 | { 219 | "custom_parameters":[], 220 | "method":"GET", 221 | "request":"GET /Workflow/3 HTTP/1.1\r\nHost: localhost:8001\r\nUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nReferer: http://localhost:8001/Workflow/2\r\nCookie: vsessid=fa7c0f67-5b6c-44e0-bdd9-19a77e2b116b\r\nConnection: close\r\n\r\n", 222 | "request_parameters":[], 223 | "response":"HTTP/1.0 200 OK\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 764\r\nServer: Werkzeug/0.11.10 Python/3.4.3\r\nDate: Sun, 24 Jul 2016 22:28:36 GMT\r\n\r\n\n\n\nNasty Pentestable Web App\n\n\n\n
\n Home \n \n Logged in as user. Logout\n \n
\n
\n \n

Payment

\n
\n \n \n \n \n \n
IBAN
BIC
Bank
Account Owner
\n \n \n
\n\n
\n\n", 224 | "status_code":200, 225 | "url":"http://localhost:8001/Workflow/3" 226 | }, 227 | { 228 | "custom_parameters":[], 229 | "method":"POST", 230 | "request":"POST /Workflow/3 HTTP/1.1\r\nHost: localhost:8001\r\nUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nReferer: http://localhost:8001/Workflow/3\r\nCookie: vsessid=fa7c0f67-5b6c-44e0-bdd9-19a77e2b116b\r\nConnection: close\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 78\r\n\r\niban=xxx&bic=xxx&bank=xxx&owner=xxx&csrftoken=eGVaGmWaKjIGQFZAYoRspUdlyRwUISEm", 231 | "request_parameters":[ 232 | { 233 | "name":"iban", 234 | "original_value":"xxx", 235 | "parameter_handling":"preset_value", 236 | "preset_value":"xxx", 237 | "type":"body_url_encoded" 238 | }, 239 | { 240 | "name":"bic", 241 | "original_value":"xxx", 242 | "parameter_handling":"preset_value", 243 | "preset_value":"xxx", 244 | "type":"body_url_encoded" 245 | }, 246 | { 247 | "name":"bank", 248 | "original_value":"xxx", 249 | "parameter_handling":"preset_value", 250 | "preset_value":"xxx", 251 | "type":"body_url_encoded" 252 | }, 253 | { 254 | "name":"owner", 255 | "original_value":"xxx", 256 | "parameter_handling":"preset_value", 257 | "preset_value":"xxx", 258 | "type":"body_url_encoded" 259 | }, 260 | { 261 | "name":"csrftoken", 262 | "original_value":"eGVaGmWaKjIGQFZAYoRspUdlyRwUISEm", 263 | "parameter_handling":"derive_from_prior_response", 264 | "preset_value":"eGVaGmWaKjIGQFZAYoRspUdlyRwUISEm", 265 | "type":"body_url_encoded" 266 | } 267 | ], 268 | "response":"HTTP/1.0 302 FOUND\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 229\r\nLocation: http://localhost:8001/Workflow/4\r\nServer: Werkzeug/0.11.10 Python/3.4.3\r\nDate: Sun, 24 Jul 2016 22:28:43 GMT\r\n\r\n\nRedirecting...\n

Redirecting...

\n

You should be redirected automatically to target URL: /Workflow/4. If not click the link.", 269 | "status_code":302, 270 | "url":"http://localhost:8001/Workflow/3" 271 | }, 272 | { 273 | "custom_parameters":[], 274 | "method":"GET", 275 | "request":"GET /Workflow/4 HTTP/1.1\r\nHost: localhost:8001\r\nUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nReferer: http://localhost:8001/Workflow/3\r\nCookie: vsessid=fa7c0f67-5b6c-44e0-bdd9-19a77e2b116b\r\nConnection: close\r\n\r\n", 276 | "request_parameters":[], 277 | "response":"HTTP/1.0 200 OK\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 736\r\nServer: Werkzeug/0.11.10 Python/3.4.3\r\nDate: Sun, 24 Jul 2016 22:28:43 GMT\r\n\r\n\n\n\nNasty Pentestable Web App\n\n\n\n

\n Home \n \n Logged in as user. Logout\n \n
\n
\n \n

Check and Confirm

\n
\n \n \n \n \n
Selected Article
Deliver toxxx xxx, xxx xxx, xxx xxx
Payment DetailsIBAN: xxx, BIC: xxx, xxx, xxx
\n \n \n
\n\n
\n\n", 278 | "status_code":200, 279 | "url":"http://localhost:8001/Workflow/4" 280 | } 281 | ], 282 | "serial_number":4673555325579019264 283 | }, 284 | { 285 | "description":"Delete note", 286 | "items":[ 287 | { 288 | "custom_parameters":[], 289 | "method":"GET", 290 | "request":"GET /Notes HTTP/1.1\r\nHost: localhost:8001\r\nUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nReferer: http://localhost:8001/\r\nCookie: vsessid=fa7c0f67-5b6c-44e0-bdd9-19a77e2b116b\r\nConnection: close\r\n\r\n", 291 | "request_parameters":[], 292 | "response":"HTTP/1.0 200 OK\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 1883\r\nServer: Werkzeug/0.11.10 Python/3.4.3\r\nDate: Sun, 24 Jul 2016 22:40:22 GMT\r\n\r\n\n\n\nNasty Pentestable Web App\n\n\n\n
\n Home \n \n Logged in as user. Logout\n \n
\n
\n \n

Notes

\n\n \n\n\n

Add Note

\n
\n \n \n

Subject:

\n Text:
\n \n
\n\n

Your Notes

\n \n \n

a

\n
xxx
\n
\n \n \n \n \n
\n \n \n

bar

\n
zzz
\n
\n \n \n \n \n
\n \n \n

foo

\n
yyy
\n
\n \n \n \n \n
\n \n\n
\n\n", 293 | "status_code":200, 294 | "url":"http://localhost:8001/Notes" 295 | }, 296 | { 297 | "custom_parameters":[], 298 | "method":"POST", 299 | "request":"POST /Notes HTTP/1.1\r\nHost: localhost:8001\r\nUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\nReferer: http://localhost:8001/Notes\r\nCookie: vsessid=fa7c0f67-5b6c-44e0-bdd9-19a77e2b116b\r\nConnection: close\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 96\r\n\r\ncsrftoken=tfBsSRYdQGiVoLuhbUjBIEGFmGrXTnHZ&action=delete&id=b5c7d78a-cc63-4008-bad6-83c9b4e40e52", 300 | "request_parameters":[ 301 | { 302 | "name":"csrftoken", 303 | "original_value":"tfBsSRYdQGiVoLuhbUjBIEGFmGrXTnHZ", 304 | "parameter_handling":"derive_from_prior_response", 305 | "preset_value":"tfBsSRYdQGiVoLuhbUjBIEGFmGrXTnHZ", 306 | "type":"body_url_encoded" 307 | }, 308 | { 309 | "name":"action", 310 | "original_value":"delete", 311 | "parameter_handling":"preset_value", 312 | "preset_value":"delete", 313 | "type":"body_url_encoded" 314 | }, 315 | { 316 | "name":"id", 317 | "original_value":"b5c7d78a-cc63-4008-bad6-83c9b4e40e52", 318 | "parameter_handling":"derive_from_prior_response", 319 | "preset_value":"b5c7d78a-cc63-4008-bad6-83c9b4e40e52", 320 | "type":"body_url_encoded" 321 | } 322 | ], 323 | "response":"HTTP/1.0 200 OK\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 1577\r\nServer: Werkzeug/0.11.10 Python/3.4.3\r\nDate: Sun, 24 Jul 2016 22:40:24 GMT\r\n\r\n\n\n\nNasty Pentestable Web App\n\n\n\n
\n Home \n \n Logged in as user. Logout\n \n
\n
\n \n

Notes

\n\n \n \n \n\n\n

Add Note

\n
\n \n \n

Subject:

\n Text:
\n \n
\n\n

Your Notes

\n \n \n

bar

\n
zzz
\n
\n \n \n \n \n
\n \n \n

foo

\n
yyy
\n
\n \n \n \n \n
\n \n\n
\n\n", 324 | "status_code":200, 325 | "url":"http://localhost:8001/Notes" 326 | } 327 | ], 328 | "serial_number":5931749639741692928 329 | } 330 | ] 331 | }, 332 | "session_handling_rules":{ 333 | "rules":[ 334 | { 335 | "actions":[ 336 | { 337 | "enabled":true, 338 | "match_cookies":"all_except", 339 | "type":"use_cookies" 340 | } 341 | ], 342 | "description":"Use cookies from Burp's cookie jar", 343 | "enabled":true, 344 | "exclude_from_scope":[], 345 | "include_in_scope":[], 346 | "named_params":[], 347 | "restrict_scope_to_named_params":false, 348 | "tools_scope":[ 349 | "Spider", 350 | "Scanner", 351 | "Repeater" 352 | ], 353 | "url_scope":"all" 354 | }, 355 | { 356 | "actions":[ 357 | { 358 | "action":"run_macro", 359 | "case_sensitive":true, 360 | "enabled":true, 361 | "inspect_http_headers":false, 362 | "inspect_redirection_url":false, 363 | "inspect_response_body":true, 364 | "look_for":"Not logged in", 365 | "macro_serial_number":7187822661316259840, 366 | "match_indicates":"invalid", 367 | "match_type":"literal", 368 | "perform_action_if_invalid":true, 369 | "prompt_action":{ 370 | "match_cookies":"all_except" 371 | }, 372 | "request_count":10, 373 | "run_macro_action":{ 374 | "invoke_extension_action":false, 375 | "macro_serial_number":6219624229355620352, 376 | "match_cookies":"all_except", 377 | "match_params":"all_except", 378 | "tolerate_url_mismatch":false, 379 | "update_with_cookies":true, 380 | "update_with_params":false 381 | }, 382 | "stop_if_valid":false, 383 | "type":"validate_session", 384 | "validate_every_num_requests":false, 385 | "validation_action":"run_macro" 386 | } 387 | ], 388 | "description":"Keep Login Session", 389 | "enabled":true, 390 | "exclude_from_scope":[], 391 | "include_in_scope":[], 392 | "named_params":[], 393 | "restrict_scope_to_named_params":false, 394 | "tools_scope":[ 395 | "Target", 396 | "Spider", 397 | "Scanner", 398 | "Intruder", 399 | "Repeater", 400 | "Sequencer" 401 | ], 402 | "url_scope":"suite" 403 | }, 404 | { 405 | "actions":[ 406 | { 407 | "enabled":true, 408 | "invoke_extension_action":false, 409 | "macro_serial_number":5931749639741692928, 410 | "match_cookies":"all_except", 411 | "match_params":"all_except", 412 | "tolerate_url_mismatch":false, 413 | "type":"run_macro", 414 | "update_with_cookies":true, 415 | "update_with_params":false 416 | } 417 | ], 418 | "description":"Delete Note", 419 | "enabled":true, 420 | "exclude_from_scope":[], 421 | "include_in_scope":[ 422 | { 423 | "enabled":true, 424 | "file":"^/Notes.*", 425 | "host":"^localhost$", 426 | "port":"^8001$", 427 | "protocol":"http" 428 | } 429 | ], 430 | "named_params":[ 431 | "content", 432 | "subject" 433 | ], 434 | "restrict_scope_to_named_params":true, 435 | "tools_scope":[ 436 | "Target", 437 | "Spider", 438 | "Scanner", 439 | "Intruder", 440 | "Repeater", 441 | "Sequencer" 442 | ], 443 | "url_scope":"custom" 444 | }, 445 | { 446 | "actions":[ 447 | { 448 | "enabled":true, 449 | "invoke_extension_action":false, 450 | "macro_serial_number":781821271129990144, 451 | "match_cookies":"all_except", 452 | "match_params":"specified", 453 | "specified_params":[ 454 | "csrftoken" 455 | ], 456 | "tolerate_url_mismatch":true, 457 | "type":"run_macro", 458 | "update_with_cookies":true, 459 | "update_with_params":true 460 | } 461 | ], 462 | "description":"Set CSRF Token", 463 | "enabled":true, 464 | "exclude_from_scope":[], 465 | "include_in_scope":[], 466 | "named_params":[ 467 | "csrftoken" 468 | ], 469 | "restrict_scope_to_named_params":true, 470 | "tools_scope":[ 471 | "Target", 472 | "Spider", 473 | "Scanner", 474 | "Intruder", 475 | "Repeater", 476 | "Sequencer" 477 | ], 478 | "url_scope":"suite" 479 | }, 480 | { 481 | "actions":[ 482 | { 483 | "enabled":true, 484 | "invoke_extension_action":false, 485 | "macro_serial_number":5226154035585686528, 486 | "match_cookies":"all_except", 487 | "match_params":"specified", 488 | "specified_params":[ 489 | "csrftoken" 490 | ], 491 | "tolerate_url_mismatch":false, 492 | "type":"run_macro", 493 | "update_with_cookies":true, 494 | "update_with_params":true 495 | }, 496 | { 497 | "enabled":true, 498 | "macro_serial_number":4673555325579019264, 499 | "match_params":"all_except", 500 | "pass_back":"final_response", 501 | "type":"run_post_request_macro", 502 | "update_with_params":true 503 | } 504 | ], 505 | "description":"Workflow, Step 2", 506 | "enabled":true, 507 | "exclude_from_scope":[], 508 | "include_in_scope":[ 509 | { 510 | "enabled":true, 511 | "file":"^/Workflow/2.*", 512 | "host":"^localhost$", 513 | "port":"^8001$", 514 | "protocol":"http" 515 | } 516 | ], 517 | "named_params":[ 518 | "name1" 519 | ], 520 | "restrict_scope_to_named_params":true, 521 | "tools_scope":[ 522 | "Target", 523 | "Spider", 524 | "Scanner", 525 | "Intruder", 526 | "Repeater", 527 | "Sequencer" 528 | ], 529 | "url_scope":"custom" 530 | } 531 | ] 532 | } 533 | }, 534 | "ssl":{ 535 | "client_certificates":{ 536 | "certificates":[], 537 | "use_user_options":true 538 | }, 539 | "negotiation":{ 540 | "allow_unsafe_renegotiation":false, 541 | "automatically_select_compatible_ssl_parameters_on_failure":true, 542 | "enabled_ciphers":[], 543 | "enabled_protocols":[], 544 | "use_platform_default_protocols_and_ciphers":true 545 | } 546 | } 547 | }, 548 | "proxy":{ 549 | "http_history_display_filter":{ 550 | "by_annotation":{ 551 | "show_only_commented_items":false, 552 | "show_only_highlighted_items":false 553 | }, 554 | "by_file_extension":{ 555 | "hide_items":[ 556 | "js", 557 | "gif", 558 | "jpg", 559 | "png", 560 | "css" 561 | ], 562 | "hide_specific":false, 563 | "show_items":[ 564 | "asp", 565 | "aspx", 566 | "jsp", 567 | "php" 568 | ], 569 | "show_only_specific":false 570 | }, 571 | "by_listener":{ 572 | "port":"" 573 | }, 574 | "by_mime_type":{ 575 | "show_css":false, 576 | "show_flash":true, 577 | "show_html":true, 578 | "show_images":false, 579 | "show_other_binary":false, 580 | "show_other_text":true, 581 | "show_script":true, 582 | "show_xml":true 583 | }, 584 | "by_request_type":{ 585 | "hide_items_without_responses":false, 586 | "show_only_in_scope_items":false, 587 | "show_only_parameterized_requests":false 588 | }, 589 | "by_search":{ 590 | "case_sensitive":false, 591 | "negative_search":false, 592 | "regex":false, 593 | "term":"" 594 | }, 595 | "by_status_code":{ 596 | "show_2xx":true, 597 | "show_3xx":true, 598 | "show_4xx":true, 599 | "show_5xx":true 600 | } 601 | }, 602 | "intercept_client_requests":{ 603 | "automatically_fix_missing_or_superfluous_new_lines_at_end_of_request":false, 604 | "automatically_update_content_length_header_when_the_request_is_edited":true, 605 | "do_intercept":true, 606 | "rules":[ 607 | { 608 | "boolean_operator":"and", 609 | "enabled":true, 610 | "match_condition":"(^gif$|^jpg$|^png$|^css$|^js$|^ico$)", 611 | "match_relationship":"does_not_match", 612 | "match_type":"file_extension" 613 | }, 614 | { 615 | "boolean_operator":"or", 616 | "enabled":false, 617 | "match_relationship":"contains_parameters", 618 | "match_type":"request" 619 | }, 620 | { 621 | "boolean_operator":"or", 622 | "enabled":false, 623 | "match_condition":"(get|post)", 624 | "match_relationship":"does_not_match", 625 | "match_type":"http_method" 626 | }, 627 | { 628 | "boolean_operator":"and", 629 | "enabled":false, 630 | "match_relationship":"is_in_target_scope", 631 | "match_type":"url" 632 | } 633 | ] 634 | }, 635 | "intercept_server_responses":{ 636 | "automatically_update_content_length_header_when_the_response_is_edited":true, 637 | "do_intercept":false, 638 | "rules":[ 639 | { 640 | "boolean_operator":"or", 641 | "enabled":true, 642 | "match_condition":"text", 643 | "match_relationship":"matches", 644 | "match_type":"content_type_header" 645 | }, 646 | { 647 | "boolean_operator":"or", 648 | "enabled":false, 649 | "match_relationship":"was_modified", 650 | "match_type":"request" 651 | }, 652 | { 653 | "boolean_operator":"or", 654 | "enabled":false, 655 | "match_relationship":"was_intercepted", 656 | "match_type":"request" 657 | }, 658 | { 659 | "boolean_operator":"and", 660 | "enabled":false, 661 | "match_condition":"^304$", 662 | "match_relationship":"does_not_match", 663 | "match_type":"status_code" 664 | }, 665 | { 666 | "boolean_operator":"and", 667 | "enabled":false, 668 | "match_relationship":"is_in_target_scope", 669 | "match_type":"url" 670 | } 671 | ] 672 | }, 673 | "intercept_web_sockets_messages":{ 674 | "client_to_server_messages":true, 675 | "server_to_client_messages":true 676 | }, 677 | "match_replace_rules":[ 678 | { 679 | "comment":"Emulate IE", 680 | "enabled":false, 681 | "is_simple_match":false, 682 | "rule_type":"request_header", 683 | "string_match":"^User-Agent.*$", 684 | "string_replace":"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" 685 | }, 686 | { 687 | "comment":"Emulate iOS", 688 | "enabled":false, 689 | "is_simple_match":false, 690 | "rule_type":"request_header", 691 | "string_match":"^User-Agent.*$", 692 | "string_replace":"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3" 693 | }, 694 | { 695 | "comment":"Emulate Android", 696 | "enabled":false, 697 | "is_simple_match":false, 698 | "rule_type":"request_header", 699 | "string_match":"^User-Agent.*$", 700 | "string_replace":"User-Agent: Mozilla/5.0 (Linux; U; Android 2.2; en-us; Droid Build/FRG22D) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1" 701 | }, 702 | { 703 | "comment":"Require non-cached response", 704 | "enabled":false, 705 | "is_simple_match":false, 706 | "rule_type":"request_header", 707 | "string_match":"^If-Modified-Since.*$" 708 | }, 709 | { 710 | "comment":"Require non-cached response", 711 | "enabled":false, 712 | "is_simple_match":false, 713 | "rule_type":"request_header", 714 | "string_match":"^If-None-Match.*$" 715 | }, 716 | { 717 | "comment":"Hide Referer header", 718 | "enabled":false, 719 | "is_simple_match":false, 720 | "rule_type":"request_header", 721 | "string_match":"^Referer.*$" 722 | }, 723 | { 724 | "comment":"Require non-compressed responses", 725 | "enabled":false, 726 | "is_simple_match":false, 727 | "rule_type":"request_header", 728 | "string_match":"^Accept-Encoding.*$" 729 | }, 730 | { 731 | "comment":"Ignore cookies", 732 | "enabled":false, 733 | "is_simple_match":false, 734 | "rule_type":"response_header", 735 | "string_match":"^Set-Cookie.*$" 736 | }, 737 | { 738 | "comment":"Rewrite Host header", 739 | "enabled":false, 740 | "is_simple_match":false, 741 | "rule_type":"request_header", 742 | "string_match":"^Host: foo.example.org$", 743 | "string_replace":"Host: bar.example.org" 744 | }, 745 | { 746 | "comment":"Add spoofed CORS origin", 747 | "enabled":false, 748 | "is_simple_match":false, 749 | "rule_type":"request_header", 750 | "string_replace":"Origin: foo.example.org" 751 | }, 752 | { 753 | "comment":"Remove HSTS headers", 754 | "enabled":false, 755 | "is_simple_match":false, 756 | "rule_type":"response_header", 757 | "string_match":"^Strict\\-Transport\\-Security.*$" 758 | }, 759 | { 760 | "comment":"Disable browser XSS protection", 761 | "enabled":false, 762 | "is_simple_match":false, 763 | "rule_type":"response_header", 764 | "string_replace":"X-XSS-Protection: 0" 765 | } 766 | ], 767 | "miscellaneous":{ 768 | "allow_requests_to_web_interface_using_fully_qualified_dns_hostnames":false, 769 | "disable_logging_to_history_and_site_map":false, 770 | "disable_web_interface":false, 771 | "set_connection_close_header_on_requests":true, 772 | "set_connection_close_header_on_responses":false, 773 | "strip_proxy_headers_in_incoming_requests":true, 774 | "suppress_burp_error_messages_in_browser":false, 775 | "unpack_gzip_deflate_in_requests":false, 776 | "unpack_gzip_deflate_in_responses":true, 777 | "use_http_10_in_requests_to_server":false, 778 | "use_http_10_in_responses_to_client":false 779 | }, 780 | "request_listeners":[ 781 | { 782 | "certificate_mode":"per_host", 783 | "listen_mode":"loopback_only", 784 | "listener_port":8080, 785 | "running":true 786 | } 787 | ], 788 | "response_modification":{ 789 | "convert_https_links_to_http":false, 790 | "enable_disabled_form_fields":false, 791 | "highlight_unhidden_fields":false, 792 | "remove_all_javascript":false, 793 | "remove_input_field_length_limits":false, 794 | "remove_javascript_form_validation":false, 795 | "remove_object_tags":false, 796 | "remove_secure_flag_from_cookies":false, 797 | "unhide_hidden_form_fields":false 798 | }, 799 | "ssl_pass_through":{ 800 | "automatically_add_entries_on_client_ssl_negotiation_failure":false, 801 | "rules":[] 802 | }, 803 | "web_sockets_history_display_filter":{ 804 | "by_annotation":{ 805 | "show_only_commented_items":false, 806 | "show_only_highlighted_items":false 807 | }, 808 | "by_listener":{ 809 | "listener_port":"" 810 | }, 811 | "by_request_type":{ 812 | "hide_incoming_messages":false, 813 | "hide_outgoing_messages":false, 814 | "show_only_in_scope_items":false 815 | }, 816 | "by_search":{ 817 | "case_sensitive":false, 818 | "negative_search":false, 819 | "regex":false, 820 | "term":"" 821 | } 822 | } 823 | }, 824 | "repeater":{ 825 | "follow_redirections":"never", 826 | "process_cookies_in_redirections":false, 827 | "unpack_gzip_deflate":true, 828 | "update_content_length":true 829 | }, 830 | "scanner":{ 831 | "active_scanning_areas":{ 832 | "csrf":true, 833 | "external_interaction":true, 834 | "file_path_traversal":true, 835 | "header_manipulation":true, 836 | "http_header_injection":true, 837 | "input_retrieval_reflected":false, 838 | "input_retrieval_stored":false, 839 | "ldap_injection":true, 840 | "open_redirection":true, 841 | "os_command_injection":{ 842 | "blind_checks":true, 843 | "enabled":true, 844 | "informed_checks":true 845 | }, 846 | "reflected_dom_issues":true, 847 | "reflected_xss":true, 848 | "server_level_issues":true, 849 | "server_side_code_injection":true, 850 | "server_side_template_injection":true, 851 | "sql_injection":{ 852 | "boolean_condition_checks":true, 853 | "enabled":true, 854 | "error_based_checks":true, 855 | "mssql_checks":true, 856 | "mysql_checks":true, 857 | "oracle_checks":true, 858 | "time_delay_checks":true 859 | }, 860 | "stored_dom_issues":true, 861 | "stored_xss":true, 862 | "xml_soap_injection":true 863 | }, 864 | "active_scanning_engine":{ 865 | "do_throttle":false, 866 | "follow_redirects":true, 867 | "number_of_retries_on_failure":3, 868 | "number_of_threads":10, 869 | "pause_before_retry_on_failure":2000, 870 | "throttle_interval":500, 871 | "throttle_random":false 872 | }, 873 | "active_scanning_optimization":{ 874 | "intelligent_attack_selection":true, 875 | "scan_accuracy":"normal", 876 | "scan_speed":"normal" 877 | }, 878 | "attack_insertion_points":{ 879 | "change_body_to_cookie":false, 880 | "change_body_to_url":false, 881 | "change_cookie_to_body":false, 882 | "change_cookie_to_url":false, 883 | "change_url_to_body":false, 884 | "change_url_to_cookie":false, 885 | "insert_amf_params":false, 886 | "insert_body_params":true, 887 | "insert_cookies":true, 888 | "insert_entire_body":true, 889 | "insert_http_headers":true, 890 | "insert_param_names":true, 891 | "insert_url_params":true, 892 | "insert_url_path_filename":true, 893 | "insert_url_path_folders":false, 894 | "max_insertion_points":50, 895 | "skip_all_tests_for_parameters":[], 896 | "skip_server_side_injection_for_parameters":[ 897 | { 898 | "enabled":true, 899 | "expression":"aspsessionid.*", 900 | "item":"name", 901 | "match_type":"matches_regex", 902 | "parameter":"cookie" 903 | }, 904 | { 905 | "enabled":true, 906 | "expression":"asp.net_sessionid", 907 | "item":"name", 908 | "match_type":"is", 909 | "parameter":"cookie" 910 | }, 911 | { 912 | "enabled":true, 913 | "expression":"__eventtarget", 914 | "item":"name", 915 | "match_type":"is", 916 | "parameter":"body_parameter" 917 | }, 918 | { 919 | "enabled":true, 920 | "expression":"__eventargument", 921 | "item":"name", 922 | "match_type":"is", 923 | "parameter":"body_parameter" 924 | }, 925 | { 926 | "enabled":true, 927 | "expression":"__viewstate", 928 | "item":"name", 929 | "match_type":"is", 930 | "parameter":"body_parameter" 931 | }, 932 | { 933 | "enabled":true, 934 | "expression":"__eventvalidation", 935 | "item":"name", 936 | "match_type":"is", 937 | "parameter":"body_parameter" 938 | }, 939 | { 940 | "enabled":true, 941 | "expression":"jsessionid", 942 | "item":"name", 943 | "match_type":"is", 944 | "parameter":"any_parameter" 945 | }, 946 | { 947 | "enabled":true, 948 | "expression":"cfid", 949 | "item":"name", 950 | "match_type":"is", 951 | "parameter":"cookie" 952 | }, 953 | { 954 | "enabled":true, 955 | "expression":"cftoken", 956 | "item":"name", 957 | "match_type":"is", 958 | "parameter":"cookie" 959 | }, 960 | { 961 | "enabled":true, 962 | "expression":"PHPSESSID", 963 | "item":"name", 964 | "match_type":"is", 965 | "parameter":"cookie" 966 | }, 967 | { 968 | "enabled":true, 969 | "expression":"session_id", 970 | "item":"name", 971 | "match_type":"is", 972 | "parameter":"cookie" 973 | } 974 | ], 975 | "use_nested_insertion_points":true 976 | }, 977 | "live_active_scanning":{ 978 | "exclude":[ 979 | { 980 | "enabled":true, 981 | "file":"logout", 982 | "protocol":"any" 983 | }, 984 | { 985 | "enabled":true, 986 | "file":"logoff", 987 | "protocol":"any" 988 | }, 989 | { 990 | "enabled":true, 991 | "file":"exit", 992 | "protocol":"any" 993 | }, 994 | { 995 | "enabled":true, 996 | "file":"signout", 997 | "protocol":"any" 998 | } 999 | ], 1000 | "include":[], 1001 | "scope_option":"nothing" 1002 | }, 1003 | "live_passive_scanning":{ 1004 | "exclude":[ 1005 | { 1006 | "enabled":true, 1007 | "file":"logout", 1008 | "protocol":"any" 1009 | }, 1010 | { 1011 | "enabled":true, 1012 | "file":"logoff", 1013 | "protocol":"any" 1014 | }, 1015 | { 1016 | "enabled":true, 1017 | "file":"exit", 1018 | "protocol":"any" 1019 | }, 1020 | { 1021 | "enabled":true, 1022 | "file":"signout", 1023 | "protocol":"any" 1024 | } 1025 | ], 1026 | "include":[], 1027 | "scope_option":"everything" 1028 | }, 1029 | "passive_scanning_areas":{ 1030 | "asp_net_viewstate":true, 1031 | "caching":true, 1032 | "cookies":true, 1033 | "forms":true, 1034 | "frameable_responses":true, 1035 | "headers":true, 1036 | "information_disclosure":true, 1037 | "links":true, 1038 | "mime_type":true, 1039 | "parameters":true, 1040 | "server_level_issues":true 1041 | }, 1042 | "scan_queue":{ 1043 | "hide_finished_items":false 1044 | }, 1045 | "static_code_analysis":{ 1046 | "max_time_per_item":120, 1047 | "mode":"active_only" 1048 | } 1049 | }, 1050 | "sequencer":{ 1051 | "live_capture":{ 1052 | "ignore_abnormal_length_tokens":true, 1053 | "max_length_deviation":5, 1054 | "num_threads":5, 1055 | "throttle":0 1056 | }, 1057 | "token_analysis":{ 1058 | "compression":true, 1059 | "correlation":true, 1060 | "count":true, 1061 | "fips_long_run":true, 1062 | "fips_monobit":true, 1063 | "fips_poker":true, 1064 | "fips_runs":true, 1065 | "spectral":true, 1066 | "transitions":true 1067 | }, 1068 | "token_handling":{ 1069 | "base_64_decode_before_analyzing":false, 1070 | "pad_short_tokens_at":"start", 1071 | "pad_with":"0" 1072 | } 1073 | }, 1074 | "spider":{ 1075 | "application_login":{ 1076 | "mode":"prompt", 1077 | "password":"", 1078 | "username":"" 1079 | }, 1080 | "crawler":{ 1081 | "check_robots_text":true, 1082 | "detect_custom_not_found_responses":true, 1083 | "ignore_links_to_non_text_content":true, 1084 | "make_non_parameterized_request_to_dynamic_pages":true, 1085 | "max_link_depth":5, 1086 | "max_parameterized_requests_per_url":50, 1087 | "request_root_of_all_directories":true 1088 | }, 1089 | "engine":{ 1090 | "add_random_variation_to_throttle":false, 1091 | "number_of_retries_on_failure":3, 1092 | "number_of_threads":10, 1093 | "pause_before_retry_on_failure":2000, 1094 | "throttle_between_requests":false, 1095 | "throttle_interval":0 1096 | }, 1097 | "form_submission":{ 1098 | "default_auto_fill_value":"555-555-0199@example.com", 1099 | "individuate_forms_by":"action_url_method_and_fields", 1100 | "iterate_all_values_of_submit_fields":true, 1101 | "max_submissions_per_form":10, 1102 | "mode":"automatic", 1103 | "param_auto_fill_rules":[ 1104 | { 1105 | "enabled":true, 1106 | "field_name":"mail", 1107 | "field_value":"winter@example.com", 1108 | "match_type":"regex" 1109 | }, 1110 | { 1111 | "enabled":true, 1112 | "field_name":"first", 1113 | "field_value":"Peter", 1114 | "match_type":"regex" 1115 | }, 1116 | { 1117 | "enabled":true, 1118 | "field_name":"last", 1119 | "field_value":"Winter", 1120 | "match_type":"regex" 1121 | }, 1122 | { 1123 | "enabled":true, 1124 | "field_name":"surname", 1125 | "field_value":"Winter", 1126 | "match_type":"regex" 1127 | }, 1128 | { 1129 | "enabled":true, 1130 | "field_name":"name", 1131 | "field_value":"Peter Winter", 1132 | "match_type":"regex" 1133 | }, 1134 | { 1135 | "enabled":true, 1136 | "field_name":"comp", 1137 | "field_value":"Winter Consulting", 1138 | "match_type":"regex" 1139 | }, 1140 | { 1141 | "enabled":true, 1142 | "field_name":"addr", 1143 | "field_value":"1 Main Street", 1144 | "match_type":"regex" 1145 | }, 1146 | { 1147 | "enabled":true, 1148 | "field_name":"city", 1149 | "field_value":"Winterville", 1150 | "match_type":"regex" 1151 | }, 1152 | { 1153 | "enabled":true, 1154 | "field_name":"state", 1155 | "field_value":"WI", 1156 | "match_type":"regex" 1157 | }, 1158 | { 1159 | "enabled":true, 1160 | "field_name":"zip", 1161 | "field_value":"36310", 1162 | "match_type":"regex" 1163 | }, 1164 | { 1165 | "enabled":true, 1166 | "field_name":"post", 1167 | "field_value":"SW1A 1AA", 1168 | "match_type":"regex" 1169 | }, 1170 | { 1171 | "enabled":true, 1172 | "field_name":"area", 1173 | "field_value":"555", 1174 | "match_type":"regex" 1175 | }, 1176 | { 1177 | "enabled":true, 1178 | "field_name":"phone", 1179 | "field_value":"555-555-0199", 1180 | "match_type":"regex" 1181 | }, 1182 | { 1183 | "enabled":true, 1184 | "field_name":"tel", 1185 | "field_value":"555-555-0199", 1186 | "match_type":"regex" 1187 | }, 1188 | { 1189 | "enabled":true, 1190 | "field_name":"ssn", 1191 | "field_value":"123 45 6789", 1192 | "match_type":"regex" 1193 | }, 1194 | { 1195 | "enabled":true, 1196 | "field_name":"social", 1197 | "field_value":"123 45 6789", 1198 | "match_type":"regex" 1199 | }, 1200 | { 1201 | "enabled":true, 1202 | "field_name":"age", 1203 | "field_value":"30", 1204 | "match_type":"regex" 1205 | }, 1206 | { 1207 | "enabled":true, 1208 | "field_name":"day", 1209 | "field_value":"01", 1210 | "match_type":"regex" 1211 | }, 1212 | { 1213 | "enabled":true, 1214 | "field_name":"month", 1215 | "field_value":"01", 1216 | "match_type":"regex" 1217 | }, 1218 | { 1219 | "enabled":true, 1220 | "field_name":"year", 1221 | "field_value":"1980", 1222 | "match_type":"regex" 1223 | }, 1224 | { 1225 | "enabled":true, 1226 | "field_name":"passport", 1227 | "field_value":"0123456789", 1228 | "match_type":"regex" 1229 | } 1230 | ], 1231 | "set_unmatched_fields":true 1232 | }, 1233 | "passive_spidering":{ 1234 | "link_depth_to_associate_with_proxy_requests":0, 1235 | "passively_spider_as_you_browse":true 1236 | }, 1237 | "request_headers":{ 1238 | "custom_headers":[ 1239 | "Accept: */*", 1240 | "Accept-Language: en", 1241 | "User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)", 1242 | "Connection: close" 1243 | ], 1244 | "use_http_11":true, 1245 | "use_referer":true 1246 | }, 1247 | "scope":{ 1248 | "exclude":[ 1249 | { 1250 | "enabled":true, 1251 | "file":"logout", 1252 | "protocol":"any" 1253 | }, 1254 | { 1255 | "enabled":true, 1256 | "file":"logoff", 1257 | "protocol":"any" 1258 | }, 1259 | { 1260 | "enabled":true, 1261 | "file":"exit", 1262 | "protocol":"any" 1263 | }, 1264 | { 1265 | "enabled":true, 1266 | "file":"signout", 1267 | "protocol":"any" 1268 | } 1269 | ], 1270 | "include":[], 1271 | "scope_option":"suite" 1272 | } 1273 | }, 1274 | "target":{ 1275 | "filter":{ 1276 | "by_annotation":{ 1277 | "show_only_commented_items":false, 1278 | "show_only_highlighted_items":false 1279 | }, 1280 | "by_file_extension":{ 1281 | "hide_items":[ 1282 | "js", 1283 | "gif", 1284 | "jpg", 1285 | "png", 1286 | "css" 1287 | ], 1288 | "hide_specific":false, 1289 | "show_items":[ 1290 | "asp", 1291 | "aspx", 1292 | "jsp", 1293 | "php" 1294 | ], 1295 | "show_only_specific":false 1296 | }, 1297 | "by_folders":{ 1298 | "hide_empty_folders":true 1299 | }, 1300 | "by_mime_type":{ 1301 | "show_css":false, 1302 | "show_flash":true, 1303 | "show_html":true, 1304 | "show_images":false, 1305 | "show_other_binary":false, 1306 | "show_other_text":true, 1307 | "show_script":true, 1308 | "show_xml":true 1309 | }, 1310 | "by_request_type":{ 1311 | "hide_not_found_items":true, 1312 | "show_only_in_scope_items":false, 1313 | "show_only_parameterized_requests":false, 1314 | "show_only_requested_items":false 1315 | }, 1316 | "by_search":{ 1317 | "case_sensitive":false, 1318 | "negative_search":false, 1319 | "regex":false, 1320 | "term":"" 1321 | }, 1322 | "by_status_code":{ 1323 | "show_2xx":true, 1324 | "show_3xx":true, 1325 | "show_4xx":false, 1326 | "show_5xx":true 1327 | } 1328 | }, 1329 | "scope":{ 1330 | "exclude":[ 1331 | { 1332 | "enabled":false, 1333 | "file":"logout", 1334 | "protocol":"any" 1335 | }, 1336 | { 1337 | "enabled":true, 1338 | "file":"logoff", 1339 | "protocol":"any" 1340 | }, 1341 | { 1342 | "enabled":true, 1343 | "file":"exit", 1344 | "protocol":"any" 1345 | }, 1346 | { 1347 | "enabled":true, 1348 | "file":"signout", 1349 | "protocol":"any" 1350 | } 1351 | ], 1352 | "include":[ 1353 | { 1354 | "enabled":true, 1355 | "host":"^localhost$", 1356 | "protocol":"http" 1357 | } 1358 | ] 1359 | } 1360 | } 1361 | } -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.6 2 | RUN pip install flask 3 | COPY . /webapp 4 | EXPOSE 8001 5 | WORKDIR /webapp 6 | ENTRYPOINT python BrokenApp.py 0.0.0.0 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Docker 2 | 3 | The easiest way to run the application is to use Docker. Run the following 4 | command line to build the container: 5 | 6 | ``` 7 | docker build -t nastywebhackme . 8 | ``` 9 | 10 | Run the app then with: 11 | ``` 12 | docker run -p 8001:8001 -d nastywebhackme 13 | ``` 14 | 15 | ## Install 16 | 17 | 1. Install Python 3.4 + virtualenv 18 | 2. (optional) `virtualenv -p python3 pyenv` 19 | 3. (optional) `. pyenv/bin/activate` 20 | 4. `pip3 install flask` 21 | 22 | ## Run 23 | 24 | 1. (if in virtualenv) `. pyenv/bin/activate` 25 | 2. `python3 BrokenApp.py` 26 | 3. Open [http://localhost:8001](http://localhost:8001) in your browser 27 | 28 | Credentials: user/pass 29 | 30 | ## Burp 31 | 32 | The file *BurpSessionHandling.burp-projectopts.json* can be loaded as project 33 | options file and contains session handling rules to solve the challenges 34 | from the slides in Burp Session Handling.pdf. 35 | 36 | -------------------------------------------------------------------------------- /ServerSideSession.py: -------------------------------------------------------------------------------- 1 | from flask.sessions import SessionInterface, SessionMixin 2 | from uuid import uuid4 3 | uuid = uuid4 4 | 5 | # !!! WARNING !!! 6 | # This session management implementation intentionally contains vulnerabilities. 7 | # DON'T USE IT! 8 | 9 | class VolatileServerSideSessionInterface(SessionInterface): 10 | cookie_name = "vsessid" 11 | sessions = dict() 12 | 13 | def open_session(self, app, request): 14 | sid = request.cookies.get(self.cookie_name) 15 | if not sid: 16 | sid = str(uuid()) 17 | 18 | if sid not in self.sessions: 19 | self.sessions[sid] = VolatileServerSideSession(sid) 20 | 21 | return self.sessions[sid] 22 | 23 | def save_session(self, app, session, response): 24 | if not session.sid: 25 | response.delete_cookie(self.cookie_name) 26 | elif session.new: 27 | response.set_cookie(self.cookie_name, session.sid) 28 | session.new = False 29 | 30 | class VolatileServerSideSession(dict, SessionMixin): 31 | def __init__(self, sid): 32 | self.sid = sid 33 | self.new = True 34 | -------------------------------------------------------------------------------- /static/style.css: -------------------------------------------------------------------------------- 1 | .header { 2 | background-color: #CCCCCC; 3 | padding: 5px; 4 | } 5 | -------------------------------------------------------------------------------- /templates/CSRFForm.html: -------------------------------------------------------------------------------- 1 | {% extends "app.html" %} 2 | {% block content %} 3 |
4 | Input: 5 | 6 | 7 |
8 | {% endblock %} 9 | 10 | 11 | -------------------------------------------------------------------------------- /templates/CSRFShow.html: -------------------------------------------------------------------------------- 1 | {% extends "app.html" %} 2 | {% block content %} 3 | Got this: {{ request.form["input"] | safe }}
4 | Back to form 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /templates/ProbForm.html: -------------------------------------------------------------------------------- 1 | {% extends "app.html" %} 2 | {% block content %} 3 | Please submit form:
4 |
5 | 6 | {% for field in fields %} 7 | 8 | {% endfor %} 9 |
Field {{ field | upper }}
10 | 11 | 12 |
13 | {% endblock %} 14 | 15 | -------------------------------------------------------------------------------- /templates/ProbShow.html: -------------------------------------------------------------------------------- 1 | {% extends "app.html" %} 2 | {% block content %} 3 | Got this:
4 | 5 | {% for field in fields %} 6 | {% if field == "q" %} 7 | 8 | {% else %} 9 | 10 | {% endif %} 11 | {% endfor %} 12 |
Field {{ field | upper }}:{{ request.form[field] | safe }}
Field {{ field | upper }}:{{ request.form[field] }}
13 | Back to form 14 | {% endblock %} 15 | 16 | 17 | -------------------------------------------------------------------------------- /templates/Workflow-Step1.html: -------------------------------------------------------------------------------- 1 | {% extends "app.html" %} 2 | {% block content %} 3 | Select article: 4 |
5 | 10 | 11 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /templates/Workflow-Step2.html: -------------------------------------------------------------------------------- 1 | {% extends "app.html" %} 2 | {% block content %} 3 |

Deliver to

4 |
5 | 6 | 7 | 8 | 9 |
Name
Street
Zip/City
10 | 11 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /templates/Workflow-Step3.html: -------------------------------------------------------------------------------- 1 | {% extends "app.html" %} 2 | {% block content %} 3 |

Payment

4 |
5 | 6 | 7 | 8 | 9 | 10 |
IBAN
BIC
Bank
Account Owner
11 | 12 | 13 |
14 | {% endblock %} 15 | 16 | -------------------------------------------------------------------------------- /templates/Workflow-Step4.html: -------------------------------------------------------------------------------- 1 | {% extends "app.html" %} 2 | {% block content %} 3 |

Check and Confirm

4 |
5 | 6 | 7 | 8 | 9 |
Selected Article{{ articles[session['wf_choice']] }}
Deliver to{{ session['wf_name1'] }} {{ session['wf_name2'] }}, {{ session['wf_street'] | safe }} {{ session['wf_num'] }}, {{ session['wf_zip'] }} {{ session['wf_city'] }}
Payment DetailsIBAN: {{ session['wf_iban'] }}, BIC: {{ session['wf_bic'] }}, {{ session['wf_bank'] }}, {{ session['wf_owner'] }}
10 | 11 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /templates/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Nasty Pentestable Web App 5 | 6 | 7 | 8 |
9 | Home 10 | {% if session['user'] %} 11 | Logged in as {{ session['user'] }}. Logout 12 | {% else %} 13 | Not logged in. Login 14 | {% endif %} 15 |
16 |
17 | {% block content %}{% endblock %} 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends "app.html" %} 2 | {% block content %} 3 | CSRF Protection
4 | Probabilistic Logout
5 | Workflow
6 | Notes 7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /templates/login.html: -------------------------------------------------------------------------------- 1 | {% extends "app.html" %} 2 | {% block content %} 3 |

Login

4 |
{{ message }}

5 |
6 | Username:
7 | Password:
8 | 9 | 10 |
11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /templates/message.html: -------------------------------------------------------------------------------- 1 | {% extends "app.html" %} 2 | {% block content %} 3 | {{ message }} 4 | {% endblock %} 5 | -------------------------------------------------------------------------------- /templates/notes.html: -------------------------------------------------------------------------------- 1 | {% extends "app.html" %} 2 | {% block content %} 3 |

Notes

4 | {% with messages = get_flashed_messages() %} 5 | {% if messages %} 6 | 11 | {% endif %} 12 | {% endwith %} 13 | 14 |

Add Note

15 |
16 | 17 | 18 |

Subject:

19 | Text:
20 | 21 |
22 | 23 |

Your Notes

24 | {% for noteid in notes %} 25 | {% set note = notes[noteid] %} 26 |

{{ note['subject'] }}

27 |
{{ note['content'] | safe }}
28 |
29 | 30 | 31 | 32 | 33 |
34 | {% else %} 35 |

No notes!

36 | {% endfor %} 37 | {% endblock %} 38 | --------------------------------------------------------------------------------