dradis-zap 3.18.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,36 @@
1
+ # ZAP add-on for Dradis
2
+
3
+ [![Build Status](https://secure.travis-ci.org/dradis/dradis-zap.png?branch=master)](http://travis-ci.org/dradis/dradis-zap) [![Code Climate](https://codeclimate.com/github/dradis/dradis-zap.png)](https://codeclimate.com/github/dradis/dradis-zap.png)
4
+
5
+
6
+ The ZAP add-on enables users to upload ZAP Proxy [i] report XML files.
7
+
8
+ The add-on requires [Dradis CE](https://dradisframework.org/) > 3.0, or [Dradis Pro](https://dradisframework.com/pro/).
9
+
10
+ [i]
11
+ https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project
12
+
13
+
14
+ ## Console use
15
+
16
+ $ bundle exec thor dradis:plugins:zap:upload /path/to/ZAP_report.xml
17
+
18
+
19
+ ## More information
20
+
21
+ See the Dradis Framework's [README.md](https://github.com/dradis/dradisframework/blob/master/README.md)
22
+
23
+
24
+ ## Contributing
25
+
26
+ See the Dradis Framework's [CONTRIBUTING.md](https://github.com/dradis/dradisframework/blob/master/CONTRIBUTING.md)
27
+
28
+
29
+ ## License
30
+
31
+ Dradis Framework and all its components are released under [GNU General Public License version 2.0](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.
32
+
33
+
34
+ ## Feature requests and bugs
35
+
36
+ Please use the [Dradis Framework issue tracker](https://github.com/dradis/dradis-ce/issues) for add-on improvements and bug reports.
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,35 @@
1
+ $:.push File.expand_path('../lib', __FILE__)
2
+ require 'dradis/plugins/zap/version'
3
+ version = Dradis::Plugins::Zap::VERSION::STRING
4
+
5
+
6
+ # Describe your gem and declare its dependencies:
7
+ Gem::Specification.new do |spec|
8
+ spec.platform = Gem::Platform::RUBY
9
+ spec.name = 'dradis-zap'
10
+ spec.version = version
11
+ spec.summary = 'ZAP add-on for the Dradis Framework.'
12
+ spec.description = 'This add-on allows you to upload and parse output produced from the Zed Attack Proxy (ZAP) into Dradis.'
13
+
14
+ spec.license = 'GPL-2'
15
+
16
+ spec.authors = ['Daniel Martin']
17
+ spec.email = ['etd@nomejortu.com']
18
+ spec.homepage = 'http://dradisframework.org'
19
+
20
+ spec.files = `git ls-files`.split($\)
21
+ spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
22
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
23
+
24
+ # By not including Rails as a dependency, we can use the gem with different
25
+ # versions of Rails (a sure recipe for disaster, I'm sure), which is needed
26
+ # until we bump Dradis Pro to 4.1.
27
+ # s.add_dependency 'rails', '~> 4.1.1'
28
+ spec.add_dependency 'dradis-plugins', '~> 3.6'
29
+ spec.add_dependency 'nokogiri', '~> 1.3'
30
+
31
+ spec.add_development_dependency 'bundler', '~> 1.6'
32
+ spec.add_development_dependency 'rake', '~> 10.0'
33
+ spec.add_development_dependency 'rspec-rails'
34
+ spec.add_development_dependency 'combustion', '~> 0.5.2'
35
+ end
@@ -0,0 +1,7 @@
1
+ # hook to the framework base clases
2
+ require 'dradis-plugins'
3
+
4
+ # load this add-on's engine
5
+ require 'dradis/plugins/zap'
6
+
7
+ # load supporting ZAP classes
@@ -0,0 +1,11 @@
1
+ module Dradis
2
+ module Plugins
3
+ module Zap
4
+ end
5
+ end
6
+ end
7
+
8
+ require 'dradis/plugins/zap/engine'
9
+ require 'dradis/plugins/zap/field_processor'
10
+ require 'dradis/plugins/zap/importer'
11
+ require 'dradis/plugins/zap/version'
@@ -0,0 +1,9 @@
1
+ module Dradis::Plugins::Zap
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace Dradis::Plugins::Zap
4
+
5
+ include ::Dradis::Plugins::Base
6
+ description 'Processes ZAP XML format'
7
+ provides :upload
8
+ end
9
+ end
@@ -0,0 +1,25 @@
1
+ module Dradis::Plugins::Zap
2
+ # This simple field processor tries to locate the fields as nested XML tags
3
+ # under the root element.
4
+ class FieldProcessor < Dradis::Plugins::Upload::FieldProcessor
5
+
6
+ # No need to implement anything here
7
+ # def post_initialize(args={})
8
+ # end
9
+
10
+ def value(args={})
11
+ field = args[:field]
12
+
13
+ # fields in the template are of the form <foo>.<field>, where <foo>
14
+ # is common across all fields for a given template (and meaningless).
15
+ _, name = field.split('.')
16
+
17
+ if tag = @data.at_xpath(name)
18
+ tag.text().gsub(/<p>/, '').gsub(/<\/p>/, "\n\n")
19
+ else
20
+ 'n/a'
21
+ end
22
+ end
23
+ end
24
+
25
+ end
@@ -0,0 +1,19 @@
1
+ module Dradis
2
+ module Plugins
3
+ module Zap
4
+ # Returns the version of the currently loaded ZAP as a <tt>Gem::Version</tt>
5
+ def self.gem_version
6
+ Gem::Version.new VERSION::STRING
7
+ end
8
+
9
+ module VERSION
10
+ MAJOR = 3
11
+ MINOR = 18
12
+ TINY = 0
13
+ PRE = nil
14
+
15
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,61 @@
1
+ module Dradis::Plugins::Zap
2
+ class Importer < Dradis::Plugins::Upload::Importer
3
+
4
+ # The framework will call this function if the user selects this plugin from
5
+ # the dropdown list and uploads a file.
6
+ # @returns true if the operation was successful, false otherwise
7
+ def import(params={})
8
+ file_content = File.read( params.fetch(:file) )
9
+
10
+ logger.info{'Parsing ZAP output file...'}
11
+ @doc = Nokogiri::XML( file_content )
12
+ logger.info{'Done.'}
13
+
14
+ if @doc.xpath('/OWASPZAPReport/site').empty?
15
+ error = "No scan results were detected in the uploaded file (/OWASPZAPReport/site). Ensure you uploaded an ZAP XML report."
16
+ logger.fatal{ error }
17
+ content_service.create_note text: error
18
+ return false
19
+ end
20
+
21
+ @doc.xpath('/OWASPZAPReport/site').each do |xml_site|
22
+ process_site(xml_site)
23
+ end
24
+
25
+ return true
26
+ end # /import
27
+
28
+
29
+ private
30
+ attr_accessor :site_node
31
+
32
+ def process_site(xml_site)
33
+
34
+ host = xml_site[:host]
35
+ name = xml_site[:name]
36
+
37
+ self.site_node = content_service.create_node(label: host, type: :host)
38
+ logger.info{ "\tSite name: #{name}" }
39
+
40
+ xml_site.xpath('./alerts/alertitem').each do |xml_alert_item|
41
+ process_alert_item(xml_alert_item)
42
+ end
43
+ end
44
+
45
+ def process_alert_item(xml_alert_item)
46
+ plugin_id = xml_alert_item.at_xpath('./pluginid').text()
47
+ logger.info{ "\t\t => Creating new issue (plugin_id: #{plugin_id})" }
48
+
49
+ issue_text = template_service.process_template(template: 'issue', data: xml_alert_item)
50
+ issue = content_service.create_issue(text: issue_text, id: plugin_id)
51
+
52
+
53
+ xml_alert_item.xpath('./instances/instance').each do |xml_instance|
54
+ logger.info{ "\t\t => Creating new evidence" }
55
+
56
+ evidence_content = template_service.process_template(template: 'evidence', data: xml_instance)
57
+ content_service.create_evidence(issue: issue, node: site_node, content: evidence_content)
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,13 @@
1
+ require_relative 'gem_version'
2
+
3
+ module Dradis
4
+ module Plugins
5
+ module Zap
6
+ # Returns the version of the currently loaded ZAP as a
7
+ # <tt>Gem::Version</tt>.
8
+ def self.version
9
+ gem_version
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,20 @@
1
+ class ZapTasks < Thor
2
+ include Rails.application.config.dradis.thor_helper_module
3
+
4
+ namespace "dradis:plugins:zap"
5
+
6
+ desc "upload FILE", "upload ZAP XML results"
7
+ def upload(file_path)
8
+ require 'config/environment'
9
+
10
+ unless File.exists?(file_path)
11
+ $stderr.puts "** the file [#{file_path}] does not exist"
12
+ exit -1
13
+ end
14
+
15
+ detect_and_set_project_scope
16
+
17
+ importer = Dradis::Plugins::Zap::Importer.new(task_options)
18
+ importer.import(file: file_path)
19
+ end
20
+ end
@@ -0,0 +1,844 @@
1
+ <?xml version="1.0"?>
2
+ <OWASPZAPReport version="2.4.3" generated="Fri, 29 Jan 2016 12:17:58">
3
+ <site name="http://localhost:8080" host="localhost" port="8080" ssl="false">
4
+ <alerts>
5
+ <alertitem>
6
+ <pluginid>10016</pluginid>
7
+ <alert>Web Browser XSS Protection Not Enabled</alert>
8
+ <riskcode>1</riskcode>
9
+ <confidence>2</confidence>
10
+ <riskdesc>Low (Medium)</riskdesc>
11
+ <desc>&lt;p&gt;Web Browser XSS Protection is not enabled, or is disabled by the configuration of the 'X-XSS-Protection' HTTP response header on the web server&lt;/p&gt;</desc>
12
+ <instances>
13
+ <instance>
14
+ <uri>http://localhost:8080/bodgeit</uri>
15
+ </instance>
16
+ <instance>
17
+ <uri>http://localhost:8080/robots.txt</uri>
18
+ </instance>
19
+ <instance>
20
+ <uri>http://localhost:8080/sitemap.xml</uri>
21
+ </instance>
22
+ <instance>
23
+ <uri>http://localhost:8080/bodgeit/</uri>
24
+ </instance>
25
+ <instance>
26
+ <uri>http://localhost:8080/bodgeit/home.jsp</uri>
27
+ </instance>
28
+ <instance>
29
+ <uri>http://localhost:8080/bodgeit/about.jsp</uri>
30
+ </instance>
31
+ <instance>
32
+ <uri>http://localhost:8080/bodgeit/login.jsp</uri>
33
+ </instance>
34
+ <instance>
35
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
36
+ </instance>
37
+ <instance>
38
+ <uri>http://localhost:8080/bodgeit/search.jsp</uri>
39
+ </instance>
40
+ <instance>
41
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=6</uri>
42
+ </instance>
43
+ <instance>
44
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=5</uri>
45
+ </instance>
46
+ <instance>
47
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=3</uri>
48
+ </instance>
49
+ <instance>
50
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=2</uri>
51
+ </instance>
52
+ <instance>
53
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=7</uri>
54
+ </instance>
55
+ <instance>
56
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=4</uri>
57
+ </instance>
58
+ <instance>
59
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=1</uri>
60
+ </instance>
61
+ <instance>
62
+ <uri>http://localhost:8080/bodgeit/product.jsp?prodid=21</uri>
63
+ </instance>
64
+ <instance>
65
+ <uri>http://localhost:8080/bodgeit/contact.jsp</uri>
66
+ </instance>
67
+ <instance>
68
+ <uri>http://localhost:8080/bodgeit/product.jsp?prodid=7</uri>
69
+ </instance>
70
+ <instance>
71
+ <uri>http://localhost:8080/bodgeit/product.jsp?prodid=14</uri>
72
+ </instance>
73
+ </instances>
74
+ <count>58</count>
75
+ <solution>&lt;p&gt;Ensure that the web browser's XSS filter is enabled, by setting the X-XSS-Protection HTTP response header to '1'.&lt;/p&gt;</solution>
76
+ <otherinfo>&lt;p&gt;The X-XSS-Protection HTTP response header allows the web server to enable or disable the web browser's XSS protection mechanism. The following values would attempt to enable it: &lt;/p&gt;&lt;p&gt;X-XSS-Protection: 1; mode=block&lt;/p&gt;&lt;p&gt;X-XSS-Protection: 1; report=http://www.example.com/xss&lt;/p&gt;&lt;p&gt;The following values would disable it:&lt;/p&gt;&lt;p&gt;X-XSS-Protection: 0&lt;/p&gt;&lt;p&gt;The X-XSS-Protection HTTP response header is currently supported on Internet Explorer, Chrome and Safari (WebKit).&lt;/p&gt;&lt;p&gt;Note that this alert is only raised if the response body could potentially contain an XSS payload (with a text-based content type, with a non-zero length).&lt;/p&gt;</otherinfo>
77
+ <reference>&lt;p&gt;https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet&lt;/p&gt;&lt;p&gt;https://blog.veracode.com/2014/03/guidelines-for-setting-security-headers/&lt;/p&gt;</reference>
78
+ <cweid>933</cweid>
79
+ <wascid>14</wascid>
80
+ </alertitem>
81
+ <alertitem>
82
+ <pluginid>10021</pluginid>
83
+ <alert>X-Content-Type-Options Header Missing</alert>
84
+ <riskcode>1</riskcode>
85
+ <confidence>2</confidence>
86
+ <riskdesc>Low (Medium)</riskdesc>
87
+ <desc>&lt;p&gt;The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.&lt;/p&gt;</desc>
88
+ <instances>
89
+ <instance>
90
+ <uri>http://localhost:8080/bodgeit</uri>
91
+ </instance>
92
+ <instance>
93
+ <uri>http://localhost:8080/robots.txt</uri>
94
+ </instance>
95
+ <instance>
96
+ <uri>http://localhost:8080/sitemap.xml</uri>
97
+ </instance>
98
+ <instance>
99
+ <uri>http://localhost:8080/bodgeit/</uri>
100
+ </instance>
101
+ <instance>
102
+ <uri>http://localhost:8080/bodgeit/home.jsp</uri>
103
+ </instance>
104
+ <instance>
105
+ <uri>http://localhost:8080/bodgeit/about.jsp</uri>
106
+ </instance>
107
+ <instance>
108
+ <uri>http://localhost:8080/bodgeit/login.jsp</uri>
109
+ </instance>
110
+ <instance>
111
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
112
+ </instance>
113
+ <instance>
114
+ <uri>http://localhost:8080/bodgeit/search.jsp</uri>
115
+ </instance>
116
+ <instance>
117
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=6</uri>
118
+ </instance>
119
+ <instance>
120
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=5</uri>
121
+ </instance>
122
+ <instance>
123
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=3</uri>
124
+ </instance>
125
+ <instance>
126
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=2</uri>
127
+ </instance>
128
+ <instance>
129
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=7</uri>
130
+ </instance>
131
+ <instance>
132
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=4</uri>
133
+ </instance>
134
+ <instance>
135
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=1</uri>
136
+ </instance>
137
+ <instance>
138
+ <uri>http://localhost:8080/bodgeit/product.jsp?prodid=21</uri>
139
+ </instance>
140
+ <instance>
141
+ <uri>http://localhost:8080/bodgeit/contact.jsp</uri>
142
+ </instance>
143
+ <instance>
144
+ <uri>http://localhost:8080/bodgeit/product.jsp?prodid=7</uri>
145
+ </instance>
146
+ <instance>
147
+ <uri>http://localhost:8080/bodgeit/product.jsp?prodid=14</uri>
148
+ </instance>
149
+ </instances>
150
+ <count>58</count>
151
+ <solution>&lt;p&gt;Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.&lt;/p&gt;&lt;p&gt;If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.&lt;/p&gt;</solution>
152
+ <otherinfo>&lt;p&gt;This issue still applies to error type pages (401, 403, 500, etc) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.&lt;/p&gt;&lt;p&gt;At "High" threshold this scanner will not alert on client or server error responses.&lt;/p&gt;</otherinfo>
153
+ <reference>&lt;p&gt;http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx&lt;/p&gt;&lt;p&gt;https://www.owasp.org/index.php/List_of_useful_HTTP_headers&lt;/p&gt;</reference>
154
+ <wascid>15</wascid>
155
+ </alertitem>
156
+ <alertitem>
157
+ <pluginid>10020</pluginid>
158
+ <alert>X-Frame-Options Header Not Set</alert>
159
+ <riskcode>2</riskcode>
160
+ <confidence>2</confidence>
161
+ <riskdesc>Medium (Medium)</riskdesc>
162
+ <desc>&lt;p&gt;X-Frame-Options header is not included in the HTTP response to protect against 'ClickJacking' attacks.&lt;/p&gt;</desc>
163
+ <instances>
164
+ <instance>
165
+ <uri>http://localhost:8080/bodgeit</uri>
166
+ </instance>
167
+ <instance>
168
+ <uri>http://localhost:8080/robots.txt</uri>
169
+ </instance>
170
+ <instance>
171
+ <uri>http://localhost:8080/sitemap.xml</uri>
172
+ </instance>
173
+ <instance>
174
+ <uri>http://localhost:8080/bodgeit/</uri>
175
+ </instance>
176
+ <instance>
177
+ <uri>http://localhost:8080/bodgeit/home.jsp</uri>
178
+ </instance>
179
+ <instance>
180
+ <uri>http://localhost:8080/bodgeit/about.jsp</uri>
181
+ </instance>
182
+ <instance>
183
+ <uri>http://localhost:8080/bodgeit/login.jsp</uri>
184
+ </instance>
185
+ <instance>
186
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
187
+ </instance>
188
+ <instance>
189
+ <uri>http://localhost:8080/bodgeit/search.jsp</uri>
190
+ </instance>
191
+ <instance>
192
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=6</uri>
193
+ </instance>
194
+ <instance>
195
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=5</uri>
196
+ </instance>
197
+ <instance>
198
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=3</uri>
199
+ </instance>
200
+ <instance>
201
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=2</uri>
202
+ </instance>
203
+ <instance>
204
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=7</uri>
205
+ </instance>
206
+ <instance>
207
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=4</uri>
208
+ </instance>
209
+ <instance>
210
+ <uri>http://localhost:8080/bodgeit/product.jsp?typeid=1</uri>
211
+ </instance>
212
+ <instance>
213
+ <uri>http://localhost:8080/bodgeit/product.jsp?prodid=21</uri>
214
+ </instance>
215
+ <instance>
216
+ <uri>http://localhost:8080/bodgeit/contact.jsp</uri>
217
+ </instance>
218
+ <instance>
219
+ <uri>http://localhost:8080/bodgeit/product.jsp?prodid=7</uri>
220
+ </instance>
221
+ <instance>
222
+ <uri>http://localhost:8080/bodgeit/product.jsp?prodid=14</uri>
223
+ </instance>
224
+ </instances>
225
+ <count>58</count>
226
+ <solution>&lt;p&gt;Most modern Web browsers support the X-Frame-Options HTTP header. Ensure it's set on all web pages returned by your site (if you expect the page to be framed only by pages on your server (e.g. it's part of a FRAMESET) then you'll want to use SAMEORIGIN, otherwise if you never expect the page to be framed, you should use DENY. ALLOW-FROM allows specific websites to frame the web page in supported web browsers).&lt;/p&gt;</solution>
227
+ <otherinfo>&lt;p&gt;At "High" threshold this scanner will not alert on client or server error responses.&lt;/p&gt;</otherinfo>
228
+ <reference>&lt;p&gt;http://blogs.msdn.com/b/ieinternals/archive/2010/03/30/combating-clickjacking-with-x-frame-options.aspx&lt;/p&gt;</reference>
229
+ </alertitem>
230
+ <alertitem>
231
+ <pluginid>10012</pluginid>
232
+ <alert>Password Autocomplete in browser</alert>
233
+ <riskcode>1</riskcode>
234
+ <confidence>2</confidence>
235
+ <riskdesc>Low (Medium)</riskdesc>
236
+ <desc>&lt;p&gt;AUTOCOMPLETE attribute is not disabled in HTML FORM/INPUT element containing password type input. Passwords may be stored in browsers and retrieved.&lt;/p&gt;</desc>
237
+ <instances>
238
+ <instance>
239
+ <uri>http://localhost:8080/bodgeit/login.jsp</uri>
240
+ <param>input</param>
241
+ <evidence>&lt;input id="password" name="password" type="password"&gt;</evidence>
242
+ </instance>
243
+ <instance>
244
+ <uri>http://localhost:8080/bodgeit/register.jsp</uri>
245
+ <param>input</param>
246
+ <evidence>&lt;input id="password1" name="password1" type="password"&gt;</evidence>
247
+ </instance>
248
+ </instances>
249
+ <count>2</count>
250
+ <solution>&lt;p&gt;Turn off AUTOCOMPLETE attribute in form or individual input elements containing password by using AUTOCOMPLETE='OFF'&lt;/p&gt;</solution>
251
+ <reference>&lt;p&gt;http://msdn.microsoft.com/library/default.asp?url=/workshop/author/forms/autocomplete_ovr.asp&lt;/p&gt;</reference>
252
+ <cweid>525</cweid>
253
+ </alertitem>
254
+ <alertitem>
255
+ <pluginid>10010</pluginid>
256
+ <alert>Cookie set without HttpOnly flag</alert>
257
+ <riskcode>1</riskcode>
258
+ <confidence>2</confidence>
259
+ <riskdesc>Low (Medium)</riskdesc>
260
+ <desc>&lt;p&gt;A cookie has been set without the HttpOnly flag, which means that the cookie can be accessed by JavaScript. If a malicious script can be run on this page then the cookie will be accessible and can be transmitted to another site. If this is a session cookie then session hijacking may be possible.&lt;/p&gt;</desc>
261
+ <instances>
262
+ <instance>
263
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
264
+ <param>b_id=2</param>
265
+ <evidence>b_id=2</evidence>
266
+ </instance>
267
+ <instance>
268
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
269
+ <param>b_id=3</param>
270
+ <evidence>b_id=3</evidence>
271
+ </instance>
272
+ <instance>
273
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
274
+ <param>b_id=4</param>
275
+ <evidence>b_id=4</evidence>
276
+ </instance>
277
+ <instance>
278
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
279
+ <param>b_id=5</param>
280
+ <evidence>b_id=5</evidence>
281
+ </instance>
282
+ <instance>
283
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
284
+ <param>b_id=6</param>
285
+ <evidence>b_id=6</evidence>
286
+ </instance>
287
+ <instance>
288
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
289
+ <param>b_id=7</param>
290
+ <evidence>b_id=7</evidence>
291
+ </instance>
292
+ <instance>
293
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
294
+ <param>b_id=8</param>
295
+ <evidence>b_id=8</evidence>
296
+ </instance>
297
+ <instance>
298
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
299
+ <param>b_id=9</param>
300
+ <evidence>b_id=9</evidence>
301
+ </instance>
302
+ <instance>
303
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
304
+ <param>b_id=10</param>
305
+ <evidence>b_id=10</evidence>
306
+ </instance>
307
+ <instance>
308
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
309
+ <param>b_id=11</param>
310
+ <evidence>b_id=11</evidence>
311
+ </instance>
312
+ <instance>
313
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
314
+ <param>b_id=13</param>
315
+ <evidence>b_id=13</evidence>
316
+ </instance>
317
+ <instance>
318
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
319
+ <param>b_id=15</param>
320
+ <evidence>b_id=15</evidence>
321
+ </instance>
322
+ <instance>
323
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
324
+ <param>b_id=17</param>
325
+ <evidence>b_id=17</evidence>
326
+ </instance>
327
+ <instance>
328
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
329
+ <param>b_id=18</param>
330
+ <evidence>b_id=18</evidence>
331
+ </instance>
332
+ <instance>
333
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
334
+ <param>b_id=19</param>
335
+ <evidence>b_id=19</evidence>
336
+ </instance>
337
+ <instance>
338
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
339
+ <param>b_id=20</param>
340
+ <evidence>b_id=20</evidence>
341
+ </instance>
342
+ <instance>
343
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
344
+ <param>b_id=21</param>
345
+ <evidence>b_id=21</evidence>
346
+ </instance>
347
+ <instance>
348
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
349
+ <param>b_id=22</param>
350
+ <evidence>b_id=22</evidence>
351
+ </instance>
352
+ <instance>
353
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
354
+ <param>b_id=23</param>
355
+ <evidence>b_id=23</evidence>
356
+ </instance>
357
+ <instance>
358
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
359
+ <param>b_id=25</param>
360
+ <evidence>b_id=25</evidence>
361
+ </instance>
362
+ </instances>
363
+ <count>50</count>
364
+ <solution>&lt;p&gt;Ensure that the HttpOnly flag is set for all cookies.&lt;/p&gt;</solution>
365
+ <reference>&lt;p&gt;www.owasp.org/index.php/HttpOnly&lt;/p&gt;</reference>
366
+ <wascid>13</wascid>
367
+ </alertitem>
368
+ <alertitem>
369
+ <pluginid>90022</pluginid>
370
+ <alert>Application Error Disclosure</alert>
371
+ <riskcode>2</riskcode>
372
+ <confidence>2</confidence>
373
+ <riskdesc>Medium (Medium)</riskdesc>
374
+ <desc>&lt;p&gt;This page contains an error/warning message that may disclose sensitive information like the location of the file that produced the unhandled exception. This information can be used to launch further attacks against the web application. The alert could be a false positive if the error message is found inside a documentation page.&lt;/p&gt;</desc>
375
+ <instances>
376
+ <instance>
377
+ <uri>http://localhost:8080/bodgeit/advanced.jsp</uri>
378
+ <param>N/A</param>
379
+ <evidence>HTTP 500 Internal server error</evidence>
380
+ </instance>
381
+ </instances>
382
+ <count>1</count>
383
+ <solution>&lt;p&gt;Review the source code of this page. Implement custom error pages. Consider implementing a mechanism to provide a unique error reference/identifier to the client (browser) while logging the details on the server side and not exposing them to the user.&lt;/p&gt;</solution>
384
+ <reference>&lt;p&gt;&lt;/p&gt;</reference>
385
+ <cweid>200</cweid>
386
+ <wascid>13</wascid>
387
+ </alertitem>
388
+ <alertitem>
389
+ <pluginid>40012</pluginid>
390
+ <alert>Cross Site Scripting (Reflected)</alert>
391
+ <riskcode>3</riskcode>
392
+ <confidence>2</confidence>
393
+ <riskdesc>High (Medium)</riskdesc>
394
+ <desc>&lt;p&gt;Cross-site Scripting (XSS) is an attack technique that involves echoing attacker-supplied code into a user's browser instance. A browser instance can be a standard web browser client, or a browser object embedded in a software product such as the browser within WinAmp, an RSS reader, or an email client. The code itself is usually written in HTML/JavaScript, but may also extend to VBScript, ActiveX, Java, Flash, or any other browser-supported technology.&lt;/p&gt;&lt;p&gt;When an attacker gets a user's browser to execute his/her code, the code will run within the security context (or zone) of the hosting web site. With this level of privilege, the code has the ability to read, modify and transmit any sensitive data accessible by the browser. A Cross-site Scripted user could have his/her account hijacked (cookie theft), their browser redirected to another location, or possibly shown fraudulent content delivered by the web site they are visiting. Cross-site Scripting attacks essentially compromise the trust relationship between a user and the web site. Applications utilizing browser object instances which load content from the file system may execute code under the local machine zone allowing for system compromise.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;There are three types of Cross-site Scripting attacks: non-persistent, persistent and DOM-based.&lt;/p&gt;&lt;p&gt;Non-persistent attacks and DOM-based attacks require a user to either visit a specially crafted link laced with malicious code, or visit a malicious web page containing a web form, which when posted to the vulnerable site, will mount the attack. Using a malicious form will oftentimes take place when the vulnerable resource only accepts HTTP POST requests. In such a case, the form can be submitted automatically, without the victim's knowledge (e.g. by using JavaScript). Upon clicking on the malicious link or submitting the malicious form, the XSS payload will get echoed back and will get interpreted by the user's browser and execute. Another technique to send almost arbitrary requests (GET and POST) is by using an embedded client, such as Adobe Flash.&lt;/p&gt;&lt;p&gt;Persistent attacks occur when the malicious code is submitted to a web site where it's stored for a period of time. Examples of an attacker's favorite targets often include message board posts, web mail messages, and web chat software. The unsuspecting user is not required to interact with any additional site/link (e.g. an attacker site or a malicious link sent via email), just simply view the web page containing the code.&lt;/p&gt;</desc>
395
+ <instances>
396
+ <instance>
397
+ <uri>http://localhost:8080/bodgeit/search.jsp?q=%3C%2Ffont%3E%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E%3Cfont%3E</uri>
398
+ <param>q</param>
399
+ <attack>&lt;/font&gt;&lt;script&gt;alert(1);&lt;/script&gt;&lt;font&gt;</attack>
400
+ <evidence>&lt;/font&gt;&lt;script&gt;alert(1);&lt;/script&gt;&lt;font&gt;</evidence>
401
+ </instance>
402
+ </instances>
403
+ <count>1</count>
404
+ <solution>&lt;p&gt;Phase: Architecture and Design&lt;/p&gt;&lt;p&gt;Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.&lt;/p&gt;&lt;p&gt;Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Phases: Implementation; Architecture and Design&lt;/p&gt;&lt;p&gt;Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies.&lt;/p&gt;&lt;p&gt;For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters.&lt;/p&gt;&lt;p&gt;Consult the XSS Prevention Cheat Sheet for more details on the types of encoding and escaping that are needed.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Phase: Architecture and Design&lt;/p&gt;&lt;p&gt;For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Phase: Implementation&lt;/p&gt;&lt;p&gt;For every web page that is generated, use and specify a character encoding such as ISO-8859-1 or UTF-8. When an encoding is not specified, the web browser may choose a different encoding by guessing which encoding is actually being used by the web page. This can cause the web browser to treat certain sequences as special, opening up the client to subtle XSS attacks. See CWE-116 for more mitigations related to encoding/escaping.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;To help mitigate XSS attacks against the user's session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user's session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XMLHTTPRequest and other powerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which the HttpOnly flag is set.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a whitelist of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. Do not rely exclusively on looking for malicious or malformed inputs (i.e., do not rely on a blacklist). However, blacklists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if you are expecting colors such as "red" or "blue."&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Ensure that you perform input validation at well-defined interfaces within the application. This will help protect the application even if a component is reused or moved elsewhere.&lt;/p&gt;</solution>
405
+ <reference>&lt;p&gt;http://projects.webappsec.org/Cross-Site-Scripting&lt;/p&gt;&lt;p&gt;http://cwe.mitre.org/data/definitions/79.html&lt;/p&gt;</reference>
406
+ <cweid>79</cweid>
407
+ <wascid>8</wascid>
408
+ </alertitem>
409
+ <alertitem>
410
+ <pluginid>40018</pluginid>
411
+ <alert>SQL Injection</alert>
412
+ <riskcode>3</riskcode>
413
+ <confidence>2</confidence>
414
+ <riskdesc>High (Medium)</riskdesc>
415
+ <desc>&lt;p&gt;SQL injection may be possible.&lt;/p&gt;</desc>
416
+ <instances>
417
+ <instance>
418
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
419
+ <param>productid</param>
420
+ <attack>5-2</attack>
421
+ </instance>
422
+ </instances>
423
+ <count>1</count>
424
+ <solution>&lt;p&gt;Do not trust client side input, even if there is client side validation in place. &lt;/p&gt;&lt;p&gt;In general, type check all data on the server side.&lt;/p&gt;&lt;p&gt;If the application uses JDBC, use PreparedStatement or CallableStatement, with parameters passed by '?'&lt;/p&gt;&lt;p&gt;If the application uses ASP, use ADO Command Objects with strong type checking and parameterized queries.&lt;/p&gt;&lt;p&gt;If database Stored Procedures can be used, use them.&lt;/p&gt;&lt;p&gt;Do *not* concatenate strings into queries in the stored procedure, or use 'exec', 'exec immediate', or equivalent functionality!&lt;/p&gt;&lt;p&gt;Do not create dynamic SQL queries using simple string concatenation.&lt;/p&gt;&lt;p&gt;Escape all data received from the client.&lt;/p&gt;&lt;p&gt;Apply a 'whitelist' of allowed characters, or a 'blacklist' of disallowed characters in user input.&lt;/p&gt;&lt;p&gt;Apply the principle of least privilege by using the least privileged database user possible.&lt;/p&gt;&lt;p&gt;In particular, avoid using the 'sa' or 'db-owner' database users. This does not eliminate SQL injection, but minimizes its impact.&lt;/p&gt;&lt;p&gt;Grant the minimum database access that is necessary for the application.&lt;/p&gt;</solution>
425
+ <otherinfo>&lt;p&gt;The original page results were successfully replicated using the expression [5-2] as the parameter value&lt;/p&gt;&lt;p&gt;The parameter value being modified was NOT stripped from the HTML output for the purposes of the comparison&lt;/p&gt;</otherinfo>
426
+ <reference>&lt;p&gt;https://www.owasp.org/index.php/Top_10_2010-A1&lt;/p&gt;&lt;p&gt;https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet&lt;/p&gt;</reference>
427
+ <cweid>89</cweid>
428
+ <wascid>19</wascid>
429
+ </alertitem>
430
+ <alertitem>
431
+ <pluginid>30001</pluginid>
432
+ <alert>Buffer Overflow</alert>
433
+ <riskcode>2</riskcode>
434
+ <confidence>2</confidence>
435
+ <riskdesc>Medium (Medium)</riskdesc>
436
+ <desc>&lt;p&gt;Buffer overflow errors are characterized by the overwriting of memory spaces of the background web process, which should have never been modified intentionally or unintentionally. Overwriting values of the IP (Instruction Pointer), BP (Base Pointer) and other registers causes exceptions, segmentation faults, and other process errors to occur. Usually these errors end execution of the application in an unexpected way. &lt;/p&gt;</desc>
437
+ <instances>
438
+ <instance>
439
+ <uri>http://localhost:8080/bodgeit/advanced.jsp</uri>
440
+ <param>product</param>
441
+ <attack>POST http://localhost:8080/bodgeit/advanced.jsp HTTP/1.1
442
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
443
+ Pragma: no-cache
444
+ Cache-Control: no-cache
445
+ Content-Type: application/x-www-form-urlencoded
446
+ Content-Length: 2143
447
+ Referer: http://localhost:8080/bodgeit/advanced.jsp
448
+ Host: localhost:8080
449
+
450
+ </attack>
451
+ </instance>
452
+ <instance>
453
+ <uri>http://localhost:8080/bodgeit/advanced.jsp</uri>
454
+ <param>price</param>
455
+ <attack>POST http://localhost:8080/bodgeit/advanced.jsp HTTP/1.1
456
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
457
+ Pragma: no-cache
458
+ Cache-Control: no-cache
459
+ Content-Type: application/x-www-form-urlencoded
460
+ Content-Length: 2143
461
+ Referer: http://localhost:8080/bodgeit/advanced.jsp
462
+ Host: localhost:8080
463
+
464
+ </attack>
465
+ </instance>
466
+ <instance>
467
+ <uri>http://localhost:8080/bodgeit/advanced.jsp</uri>
468
+ <param>description</param>
469
+ <attack>POST http://localhost:8080/bodgeit/advanced.jsp HTTP/1.1
470
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
471
+ Pragma: no-cache
472
+ Cache-Control: no-cache
473
+ Content-Type: application/x-www-form-urlencoded
474
+ Content-Length: 2143
475
+ Referer: http://localhost:8080/bodgeit/advanced.jsp
476
+ Host: localhost:8080
477
+
478
+ </attack>
479
+ </instance>
480
+ <instance>
481
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
482
+ <param>quantity</param>
483
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
484
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
485
+ Pragma: no-cache
486
+ Cache-Control: no-cache
487
+ Content-Type: application/x-www-form-urlencoded
488
+ Content-Length: 2131
489
+ Referer: http://localhost:8080/bodgeit/product.jsp?prodid=3
490
+ Host: localhost:8080
491
+
492
+ </attack>
493
+ </instance>
494
+ <instance>
495
+ <uri>http://localhost:8080/bodgeit/advanced.jsp</uri>
496
+ <param>type</param>
497
+ <attack>POST http://localhost:8080/bodgeit/advanced.jsp HTTP/1.1
498
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
499
+ Pragma: no-cache
500
+ Cache-Control: no-cache
501
+ Content-Type: application/x-www-form-urlencoded
502
+ Content-Length: 2143
503
+ Referer: http://localhost:8080/bodgeit/advanced.jsp
504
+ Host: localhost:8080
505
+
506
+ </attack>
507
+ </instance>
508
+ <instance>
509
+ <uri>http://localhost:8080/bodgeit/advanced.jsp</uri>
510
+ <param>q</param>
511
+ <attack>POST http://localhost:8080/bodgeit/advanced.jsp HTTP/1.1
512
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
513
+ Pragma: no-cache
514
+ Cache-Control: no-cache
515
+ Content-Type: application/x-www-form-urlencoded
516
+ Content-Length: 2102
517
+ Referer: http://localhost:8080/bodgeit/advanced.jsp
518
+ Host: localhost:8080
519
+
520
+ </attack>
521
+ </instance>
522
+ <instance>
523
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
524
+ <param>quantity_7</param>
525
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
526
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
527
+ Pragma: no-cache
528
+ Cache-Control: no-cache
529
+ Content-Type: application/x-www-form-urlencoded
530
+ Content-Length: 2132
531
+ Referer: http://localhost:8080/bodgeit/basket.jsp
532
+ Host: localhost:8080
533
+
534
+ </attack>
535
+ </instance>
536
+ <instance>
537
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
538
+ <param>quantity_21</param>
539
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
540
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
541
+ Pragma: no-cache
542
+ Cache-Control: no-cache
543
+ Content-Type: application/x-www-form-urlencoded
544
+ Content-Length: 2133
545
+ Referer: http://localhost:8080/bodgeit/basket.jsp
546
+ Host: localhost:8080
547
+
548
+ </attack>
549
+ </instance>
550
+ <instance>
551
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
552
+ <param>quantity_14</param>
553
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
554
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
555
+ Pragma: no-cache
556
+ Cache-Control: no-cache
557
+ Content-Type: application/x-www-form-urlencoded
558
+ Content-Length: 2133
559
+ Referer: http://localhost:8080/bodgeit/basket.jsp
560
+ Host: localhost:8080
561
+
562
+ </attack>
563
+ </instance>
564
+ <instance>
565
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
566
+ <param>quantity_28</param>
567
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
568
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
569
+ Pragma: no-cache
570
+ Cache-Control: no-cache
571
+ Content-Type: application/x-www-form-urlencoded
572
+ Content-Length: 2133
573
+ Referer: http://localhost:8080/bodgeit/basket.jsp
574
+ Host: localhost:8080
575
+
576
+ </attack>
577
+ </instance>
578
+ <instance>
579
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
580
+ <param>quantity_22</param>
581
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
582
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
583
+ Pragma: no-cache
584
+ Cache-Control: no-cache
585
+ Content-Type: application/x-www-form-urlencoded
586
+ Content-Length: 2133
587
+ Referer: http://localhost:8080/bodgeit/basket.jsp
588
+ Host: localhost:8080
589
+
590
+ </attack>
591
+ </instance>
592
+ <instance>
593
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
594
+ <param>quantity_23</param>
595
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
596
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
597
+ Pragma: no-cache
598
+ Cache-Control: no-cache
599
+ Content-Type: application/x-www-form-urlencoded
600
+ Content-Length: 2133
601
+ Referer: http://localhost:8080/bodgeit/basket.jsp
602
+ Host: localhost:8080
603
+
604
+ </attack>
605
+ </instance>
606
+ <instance>
607
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
608
+ <param>quantity_30</param>
609
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
610
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
611
+ Pragma: no-cache
612
+ Cache-Control: no-cache
613
+ Content-Type: application/x-www-form-urlencoded
614
+ Content-Length: 2133
615
+ Referer: http://localhost:8080/bodgeit/basket.jsp
616
+ Host: localhost:8080
617
+
618
+ </attack>
619
+ </instance>
620
+ <instance>
621
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
622
+ <param>quantity_1</param>
623
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
624
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
625
+ Pragma: no-cache
626
+ Cache-Control: no-cache
627
+ Content-Type: application/x-www-form-urlencoded
628
+ Content-Length: 2146
629
+ Referer: http://localhost:8080/bodgeit/basket.jsp
630
+ Host: localhost:8080
631
+
632
+ </attack>
633
+ </instance>
634
+ <instance>
635
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
636
+ <param>quantity_19</param>
637
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
638
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
639
+ Pragma: no-cache
640
+ Cache-Control: no-cache
641
+ Content-Type: application/x-www-form-urlencoded
642
+ Content-Length: 2146
643
+ Referer: http://localhost:8080/bodgeit/basket.jsp
644
+ Host: localhost:8080
645
+
646
+ </attack>
647
+ </instance>
648
+ <instance>
649
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
650
+ <param>quantity_25</param>
651
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
652
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
653
+ Pragma: no-cache
654
+ Cache-Control: no-cache
655
+ Content-Type: application/x-www-form-urlencoded
656
+ Content-Length: 2146
657
+ Referer: http://localhost:8080/bodgeit/basket.jsp
658
+ Host: localhost:8080
659
+
660
+ </attack>
661
+ </instance>
662
+ <instance>
663
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
664
+ <param>quantity_9</param>
665
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
666
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
667
+ Pragma: no-cache
668
+ Cache-Control: no-cache
669
+ Content-Type: application/x-www-form-urlencoded
670
+ Content-Length: 2146
671
+ Referer: http://localhost:8080/bodgeit/basket.jsp
672
+ Host: localhost:8080
673
+
674
+ </attack>
675
+ </instance>
676
+ <instance>
677
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
678
+ <param>quantity_2</param>
679
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
680
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
681
+ Pragma: no-cache
682
+ Cache-Control: no-cache
683
+ Content-Type: application/x-www-form-urlencoded
684
+ Content-Length: 2146
685
+ Referer: http://localhost:8080/bodgeit/basket.jsp
686
+ Host: localhost:8080
687
+
688
+ </attack>
689
+ </instance>
690
+ <instance>
691
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
692
+ <param>quantity_18</param>
693
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
694
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
695
+ Pragma: no-cache
696
+ Cache-Control: no-cache
697
+ Content-Type: application/x-www-form-urlencoded
698
+ Content-Length: 2133
699
+ Referer: http://localhost:8080/bodgeit/basket.jsp
700
+ Host: localhost:8080
701
+
702
+ </attack>
703
+ </instance>
704
+ <instance>
705
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
706
+ <param>quantity_10</param>
707
+ <attack>POST http://localhost:8080/bodgeit/basket.jsp HTTP/1.1
708
+ User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
709
+ Pragma: no-cache
710
+ Cache-Control: no-cache
711
+ Content-Type: application/x-www-form-urlencoded
712
+ Content-Length: 2146
713
+ Referer: http://localhost:8080/bodgeit/basket.jsp
714
+ Host: localhost:8080
715
+
716
+ </attack>
717
+ </instance>
718
+ </instances>
719
+ <count>33</count>
720
+ <solution>&lt;p&gt;Rewrite the background program using proper return length checking. This will require a recompile of the background executable.&lt;/p&gt;</solution>
721
+ <otherinfo>&lt;p&gt;Potential Buffer Overflow. The script closed the connection and threw a 500 Internal Server Error&lt;/p&gt;</otherinfo>
722
+ <reference>&lt;p&gt;https://www.owasp.org/index.php/Buffer_overflow_attack&lt;/p&gt;</reference>
723
+ <cweid>120</cweid>
724
+ <wascid>7</wascid>
725
+ </alertitem>
726
+ <alertitem>
727
+ <pluginid>30002</pluginid>
728
+ <alert>Format String Error</alert>
729
+ <riskcode>2</riskcode>
730
+ <confidence>2</confidence>
731
+ <riskdesc>Medium (Medium)</riskdesc>
732
+ <desc>&lt;p&gt;A Format String error occurs when the submitted data of an input string is evaluated as a command by the application. &lt;/p&gt;</desc>
733
+ <instances>
734
+ <instance>
735
+ <uri>http://localhost:8080/bodgeit/advanced.jsp</uri>
736
+ <param>product</param>
737
+ <attack>ZAP</attack>
738
+ </instance>
739
+ <instance>
740
+ <uri>http://localhost:8080/bodgeit/advanced.jsp</uri>
741
+ <param>price</param>
742
+ <attack>ZAP</attack>
743
+ </instance>
744
+ <instance>
745
+ <uri>http://localhost:8080/bodgeit/advanced.jsp</uri>
746
+ <param>description</param>
747
+ <attack>ZAP</attack>
748
+ </instance>
749
+ <instance>
750
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
751
+ <param>quantity</param>
752
+ <attack>ZAP</attack>
753
+ </instance>
754
+ <instance>
755
+ <uri>http://localhost:8080/bodgeit/advanced.jsp</uri>
756
+ <param>type</param>
757
+ <attack>ZAP</attack>
758
+ </instance>
759
+ <instance>
760
+ <uri>http://localhost:8080/bodgeit/advanced.jsp</uri>
761
+ <param>q</param>
762
+ <attack>ZAP</attack>
763
+ </instance>
764
+ <instance>
765
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
766
+ <param>quantity_7</param>
767
+ <attack>ZAP</attack>
768
+ </instance>
769
+ <instance>
770
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
771
+ <param>quantity_21</param>
772
+ <attack>ZAP</attack>
773
+ </instance>
774
+ <instance>
775
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
776
+ <param>quantity_14</param>
777
+ <attack>ZAP</attack>
778
+ </instance>
779
+ <instance>
780
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
781
+ <param>quantity_28</param>
782
+ <attack>ZAP</attack>
783
+ </instance>
784
+ <instance>
785
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
786
+ <param>quantity_22</param>
787
+ <attack>ZAP</attack>
788
+ </instance>
789
+ <instance>
790
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
791
+ <param>quantity_30</param>
792
+ <attack>ZAP</attack>
793
+ </instance>
794
+ <instance>
795
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
796
+ <param>quantity_23</param>
797
+ <attack>ZAP</attack>
798
+ </instance>
799
+ <instance>
800
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
801
+ <param>quantity_1</param>
802
+ <attack>ZAP</attack>
803
+ </instance>
804
+ <instance>
805
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
806
+ <param>quantity_19</param>
807
+ <attack>ZAP</attack>
808
+ </instance>
809
+ <instance>
810
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
811
+ <param>quantity_25</param>
812
+ <attack>ZAP</attack>
813
+ </instance>
814
+ <instance>
815
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
816
+ <param>quantity_9</param>
817
+ <attack>ZAP</attack>
818
+ </instance>
819
+ <instance>
820
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
821
+ <param>quantity_18</param>
822
+ <attack>ZAP</attack>
823
+ </instance>
824
+ <instance>
825
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
826
+ <param>quantity_2</param>
827
+ <attack>ZAP</attack>
828
+ </instance>
829
+ <instance>
830
+ <uri>http://localhost:8080/bodgeit/basket.jsp</uri>
831
+ <param>quantity_10</param>
832
+ <attack>ZAP</attack>
833
+ </instance>
834
+ </instances>
835
+ <count>33</count>
836
+ <solution>&lt;p&gt;Rewrite the background program using proper deletion of bad character strings. This will require a recompile of the background executable.&lt;/p&gt;</solution>
837
+ <otherinfo>&lt;p&gt;Potential Format String Error. The script closed the connection on a /%s&lt;/p&gt;</otherinfo>
838
+ <reference>&lt;p&gt;https://www.owasp.org/index.php/Format_string_attack&lt;/p&gt;</reference>
839
+ <cweid>134</cweid>
840
+ <wascid>6</wascid>
841
+ </alertitem>
842
+ </alerts>
843
+ </site>
844
+ </OWASPZAPReport>