buby 1.5.2-java → 1.6.0-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2175d306bf70e2a9c589d487352f097a77abf0ce
4
+ data.tar.gz: 701b8c4f4402196bd2c9bd6cc0057ec4bb1a08ac
5
+ SHA512:
6
+ metadata.gz: 6a6a102290b2bba7da077b818c18fb64c28cb36c076a003e00f0646a7b4435f40dd07d025824cdf4b1f977934f918b4e806d7652e4cf28e5a37ca3e60a064eaf
7
+ data.tar.gz: 44a5c95aea901646359d800348c339015e59729f8cd51b918687abddd7c06bdb5ada4381701f5aa80d68d1664dce73b9110fa2e3db6c109339e4272c6f34cd18
@@ -1,33 +1,36 @@
1
- buby
1
+ = buby
2
2
  by Eric Monti, Timur Duehr
3
3
  http://tduehr.github.com/buby
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- Buby is a mashup of JRuby with the popular commercial web security testing tool Burp Suite from PortSwigger. Burp is driven from and tied to JRuby with a Java extension using the BurpExtender API. This extension aims to add Ruby scriptability to Burp Suite with an interface comparable to the Burp's pure Java extension interface.
7
+ Buby is a mashup of JRuby with the popular commercial web security testing tool Burp Suite from PortSwigger. Burp is driven from and tied to JRuby with a Java extension using the BurpExtender API or a JRuby BurpExtender implementation using the new embedded JRuby support. This extension aims to add Ruby scriptability to Burp Suite with an interface comparable to the Burp's pure Java extension interface. This extension works best with Burp Suite Professional. The Free version may also be used but does not contain many of the features that make Burp Suite and Buby shine.
8
8
 
9
9
  == FEATURES/PROBLEMS:
10
10
 
11
- * Intercept and log proxied requests and responses via Burp into Ruby and
12
- perform arbitrary processing on them.
11
+ * Intercept and log proxied requests and responses via Burp into Ruby and perform arbitrary processing on them.
13
12
 
14
13
  * Modify requests and responses in-line using Ruby scripts.
15
14
 
16
- * Pass requests and other information from JRuby to various sub-interfaces in
17
- Burp
15
+ * Pass requests and other information from JRuby to various sub-interfaces in Burp
18
16
 
19
- * Use the Burp framework for active and passive scanning using arbitrary
20
- requests and responses.
17
+ * Use the Burp framework for active and passive scanning using arbitrary requests and responses.
21
18
 
22
19
  * Use the Burp framework for making arbitrary HTTP requests
23
20
 
24
-
25
- Buby is implemented using an abstract Ruby event handler and interface class. The Buby Ruby class is back-ended with a minimal BurpExtender class implemented in Java. The java code is required to conform to nuances in the Burp extension interface and while it's in the pure Java runtime, it acts as 'glue' where deemed appropriate, but otherwise tries to stay out of the way.
21
+ Buby is implemented using an abstract Ruby event handler and interface class. The Buby Ruby class is back-ended with a minimal BurpExtender class implemented in Java or JRuby depending on how it's launched. The java code is required to conform to nuances in the Burp extension interface and while it's in the pure Java runtime, it acts as 'glue' where deemed appropriate, but otherwise tries to stay out of the way.
26
22
 
27
23
  The java BurpExtender included with Buby is an implementation of IBurpExtender which is the interface API supplied by PortSwigger for writing extensions to Burp Suite. It mostly acts as a method proxy between Ruby and Java, doing very little except event handler proxying between the java and ruby runtimes with run-time type conversion as needed.
28
24
 
29
25
  == Caveat
30
26
 
27
+ Note: 1.6 fixes a bug were some of the newer wrapper methods return the native
28
+ Java arrays. This haas been corrected to return the appropriate
29
+ HttpRequestResponseList or ScanIssuesList object. Most code in use
30
+ should not be affected by this. In 2.0 these methods will return the
31
+ correct Java/JRuby arrays. These were originally created to make nice
32
+ Ruby Array-like objects but are no longer needed.
33
+
31
34
  Burp's extension interfaces have changed significantly in 1.5.01. I don't yet know how compatible this will be with Burp versions 1.5.0 and lower going forward. If you want compatibility with Burp Suite versions 1.5.0 and earlier stick with Buby version 1.3.3 or prior.
32
35
 
33
36
  I will keep the API provided by earlier Buby versions and mark methods deprecated as required. Hopefully, I'll be able to keep them around for a while so old buby scripts will continue to work for a while.
@@ -40,33 +43,32 @@ Methods removed/deprecated in 1.5.01 interfaces:
40
43
  * IBurpExtenderCallbacks.registerMenuItem (deprecated, use IBurpExtenderCalbacks.registerContextMenuFactory instead)
41
44
  * IMenuItemHandler (deprecated, use IContextMenuFactory instead)
42
45
 
43
- The deprecated getPatameters and getHeaders methods will, for now, call the equivalent methods on IBurpExtenderCallbacks. At some point soon they'll forward the calls to the correct interface before being removed entirely in favor of the new interfaces.
46
+ The deprecated getParameters and getHeaders methods will, for now, call the equivalent methods on IBurpExtenderCallbacks. At some point soon they'll forward the calls to the correct interface before being removed entirely in favor of the new interfaces.
44
47
 
45
- In 2.0 bin/buby to use a bash script as the primary starting point for the current script - which will be renamed to bin/buby.rb
48
+ In 2.0 bin/buby to use a bash script as the primary starting point for the current script - which will be renamed to bin/buby.rb. I may also just leave it as it is; the new Ruby extension stuff is quite nice.
46
49
 
47
50
  ... And one more thing. The next version of buby will require JRuby 1.7.0+. It won't use 1.9 syntax for a little while. So, extensions that require 1.8 will still work for now. Just don't forget to add the `--1.8` switch to JRuby when starting buby.
48
51
 
52
+ Now that MRI 2.0 is out and 2.1 is around the corner, 1.9 mode support is semi-deprecated pending 2.0/2.1 support in jruby.
53
+
49
54
  == REQUIREMENTS:
50
55
 
51
56
  * JRuby - http://jruby.org
52
57
  Burp is Java based and the extension is developed specifically around JRuby.
53
58
  The C version of ruby will not work.
54
59
 
55
- * Burp (pro or free version): Buby is useless without a copy of Burp.
56
- Buby has been tested successfully with Burp 1.2.x.
57
-
60
+ * Burp (pro or free version): Buby is useless without a copy of Burp.
58
61
 
59
62
  == BUILD/INSTALL:
60
63
 
61
64
  === Gem
62
- You should be able to get up and running with just the gem and a copy of Burp.
63
- I've packaged up a pre-built buby.jar file containing the required classes
64
- minus ofcourse, Burp itself.
65
+ You should be able to get up and running with just the gem and a copy of Burp.
66
+ I've packaged up a pre-built buby.jar file containing the required classes minus, of course, Burp itself.
65
67
 
66
68
  (sudo)? jruby -S gem install buby --source=http://gemcutter.org
67
69
 
68
- * IMPORTANT: The buby gem doesn't include a copy of Burp! See manual step #5
69
- below. For best results, you'll still want to make your burp.jar available
70
+ * IMPORTANT: The buby gem doesn't include a copy of Burp! See manual step #5
71
+ below. For best results, you'll still want to make your burp.jar available
70
72
  in the ruby runtime library path.
71
73
 
72
74
 
@@ -90,33 +92,33 @@ Install the development dependencies:
90
92
  jruby -S gem build buby.gemspec
91
93
  jruby -S gem install --local buby-*.gem
92
94
 
93
- ==== Step 5.
95
+ ==== Step 5.
94
96
 
95
97
  The last part is a bit tricky. Burp Suite itself is obviously not included
96
- with buby. You'll want to somehow put your 'burp.jar' in a place where it
97
- is visible in the JRuby RUBY-LIB paths. There are a few other ways of pulling
98
- in Burp during runtime, but this method probably involves the least amount of
98
+ with buby. You'll want to somehow put your 'burp.jar' in a place where it
99
+ is visible in the JRuby RUBY-LIB paths. There are a few other ways of pulling
100
+ in Burp during runtime, but this method probably involves the least amount of
99
101
  hassle in the long run.
100
102
 
101
- JRuby usually gives you a 'java' lib directory for this kind of thing. Here's
103
+ JRuby usually gives you a 'java' lib directory for this kind of thing. Here's
102
104
  a quick way to see jruby's runtime lib-path:
103
-
105
+
104
106
  jruby -e 'puts $:'
105
107
 
106
- There is usually a '.../jruby/lib/1.8/java' directory reference in there,
108
+ There is usually a '.../jruby/lib/1.8/java' directory reference in there,
107
109
  though the actual directory may need to be created.
108
110
 
109
111
  Here's how I do it. I have my jruby installation under my home directory.
110
- Your configuration details can be substituted below.
112
+ Your configuration details can be substituted below.
111
113
 
112
114
  ln -s ~/tools/burp.jar ~/jruby-1.7.1/lib/ruby/1.9/java/burp.jar
113
115
 
114
- Now everything should be ready to go. Try at least the first few parts of the
115
- test below to confirm everything is set up.
116
+ Now everything should be ready to go. Try at least the first few parts of the
117
+ test below to confirm everything is set up.
116
118
 
117
119
  == TEST AND USAGE EXAMPLE:
118
120
 
119
- The gem includes a command-line executable called 'buby'. You can use this to
121
+ The gem includes a command-line executable called 'buby'. You can use this to
120
122
  test your Buby set-up and try out a few features.
121
123
 
122
124
  $ buby -h
@@ -136,7 +138,7 @@ test your Buby set-up and try out a few features.
136
138
  [:got_extender, #<Java::Default::BurpExtender:0x80 ...>]
137
139
  Global $burp is set to #<Buby:0x78de07 @burp_callbacks=#<#<Class:...>
138
140
  [:got_callbacks, #<#<Class:01x38ba04>:0x90 ...>]
139
- irb(main):001:0>
141
+ irb(main):001:0>
140
142
 
141
143
 
142
144
  Once Burp is running, click on the alerts tab.
@@ -163,9 +165,9 @@ Which should produce a new alert:
163
165
  2:47:00 PM suite hello Burp!
164
166
 
165
167
 
166
- Next, try making an HTTP request through the proxy. We'll use Net:HTTP right
167
- in IRB for illustration purposes. However, you can just as easily perform this
168
- test through a browser configured to use Burp as its proxy.
168
+ Next, try making an HTTP request through the proxy. We'll use Net:HTTP right
169
+ in IRB for illustration purposes. However, you can just as easily perform this
170
+ test through a browser configured to use Burp as its proxy.
169
171
 
170
172
  require 'net/http'
171
173
  p = Net::HTTP::Proxy("localhost", 8080).start("www.example.com")
@@ -177,7 +179,7 @@ passes your request back to your HTTP client/browser.
177
179
 
178
180
  It will look something like the following in IRB:
179
181
 
180
- >> p.get("/")
182
+ >> p.get("/")
181
183
  [:got_proxy_request,
182
184
  [:msg_ref, 1],
183
185
  [:is_req, true],
@@ -192,9 +194,9 @@ It will look something like the following in IRB:
192
194
  [:message, "GET / HTTP/1.1\r\nAccept:..."],
193
195
  [:action, 0]]
194
196
 
195
- You may also see the response right away depending on your intercept settings
196
- in Burp. Back the in Burp proxy's intercept window, turn off interception if
197
- it hasn't already been disabled. Now you should definitely see the response
197
+ You may also see the response right away depending on your intercept settings
198
+ in Burp. Back the in Burp proxy's intercept window, turn off interception if
199
+ it hasn't already been disabled. Now you should definitely see the response
198
200
  in IRB as it passes back through the Burp proxy.
199
201
 
200
202
  [:got_proxy_response,
@@ -215,16 +217,16 @@ in IRB as it passes back through the Burp proxy.
215
217
 
216
218
  Note also, the Net::HTTP request should have returned the same result as shown in the proxy.
217
219
 
218
- Now, lets try something mildly interesting with the proxy. This contrived example will implement a proxy request manipulator to do HTTP request verb tampering on every GET request that goes through the proxy.
220
+ Now, lets try something mildly interesting with the proxy. This contrived example will implement a proxy request manipulator to do HTTP request verb tampering on every GET request that goes through the proxy.
219
221
 
220
- # Note: I'm using 'instance_eval' here only to stay with the flow of the
221
- # existing IRB session. Normally, you'd probably want to implement this as
222
+ # Note: I'm using 'instance_eval' here only to stay with the flow of the
223
+ # existing IRB session. Normally, you'd probably want to implement this as
222
224
  # an override in your Buby-derived class.
223
225
 
224
226
  $burp.instance_eval do
225
227
 
226
228
  def evt_proxy_message(*param)
227
- msg_ref, is_req, rhost, rport, is_https, http_meth, url, resourceType,
229
+ msg_ref, is_req, rhost, rport, is_https, http_meth, url, resourceType,
228
230
  status, req_content_type, message, action = param
229
231
 
230
232
  if is_req and http_meth=="GET"
@@ -272,23 +274,26 @@ And, assuming 'www.example.com' checks for valid request verbs, you should see s
272
274
 
273
275
 
274
276
  == CREDIT:
275
- * Burp and Burp Suite are trademarks of PortSwigger(ltd)
276
- Copyright 2012 PortSwigger Ltd. All rights reserved.
277
+ Burp and Burp Suite are trademarks of PortSwigger(ltd)
278
+ Copyright 2013 PortSwigger Ltd. All rights reserved.
277
279
  See http://portswigger.net for license terms.
278
280
 
279
- * This ruby library and the accompanying BurpExtender.java implementation was written by Timur Duehr @ Matasano Security. The original version of this library and BurpExtender.java implementation was written my Eric Monti @ Matasano Security. Matasano Security claims no professional or legal affiliation with PortSwigger LTD.
280
-
281
- However, the authors would like to express their personal and professional
282
- respect and admiration to Burp's authors and appreciation to PortSwigger for
283
- the availability of the IBurpExtender extension API.
281
+ This JRuby library and the accompanying Java and JRuby BurpExtender
282
+ implementations were written by Timur Duehr @ Matasano Security. The original
283
+ version of this library and BurpExtender.java implementation was written my Eric
284
+ Monti @ Matasano Security. Matasano Security claims no professional or legal
285
+ affiliation with PortSwigger LTD.
284
286
 
285
- The availability of this interface goes a long way to helping make Burp Suite
286
- a truly first-class application.
287
+ However, the authors would like to express their personal and professional
288
+ respect and admiration to Burp's authors and appreciation to PortSwigger for the
289
+ availability of the IBurpExtender extension API and its continued improvement.
290
+ The availability of this interface goes a long way to helping make Burp Suite
291
+ a truly first-class application.
287
292
 
288
293
  == LICENSE:
289
294
 
290
295
  * Burp and Burp Suite are trademarks of PortSwigger Ltd.
291
- Copyright 2012 PortSwigger Ltd. All rights reserved.
296
+ Copyright 2013 PortSwigger Ltd. All rights reserved.
292
297
  See http://portswigger.net for license terms.
293
298
 
294
299
  * The Buby Ruby library and its accompanying BurpExtender implementation are
@@ -297,11 +302,11 @@ And, assuming 'www.example.com' checks for valid request verbs, you should see s
297
302
  (The MIT License)
298
303
 
299
304
  Copyright (C) 2009 Eric Monti, Matasano Security
300
- Copyright (C) 2010-2012 Timur Duehr, Matasano Security
305
+ Copyright (C) 2010-2013 Timur Duehr, Matasano Security
301
306
 
302
307
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
303
308
 
304
309
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
305
310
 
306
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
311
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
307
312
 
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 1
3
- :minor: 5
4
- :patch: 2
5
- :build:
3
+ :minor: 6
4
+ :patch: 0
5
+ :build:
@@ -2,15 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: buby 1.6.0 java lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
8
  s.name = "buby"
8
- s.version = "1.5.2"
9
+ s.version = "1.6.0"
9
10
  s.platform = "java"
10
11
 
11
12
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
13
  s.authors = ["Eric Monti, tduehr"]
13
- s.date = "2013-04-29"
14
+ s.date = "2013-11-07"
14
15
  s.description = "Buby is a mashup of JRuby with the popular commercial web security testing tool Burp Suite from PortSwigger. Burp is driven from and tied to JRuby with a Java extension using the BurpExtender API. This extension aims to add Ruby scriptability to Burp Suite with an interface comparable to the Burp's pure Java extension interface."
15
16
  s.email = "td@matasano.com"
16
17
  s.executables = ["buby"]
@@ -135,12 +136,12 @@ Gem::Specification.new do |s|
135
136
  s.homepage = "http://tduehr.github.com/buby"
136
137
  s.rdoc_options = ["--main", "README.rdoc"]
137
138
  s.require_paths = ["lib"]
138
- s.rubygems_version = "1.8.24"
139
+ s.rubygems_version = "2.1.9"
139
140
  s.summary = "Buby is a mashup of JRuby with the popular commercial web security testing tool Burp Suite from PortSwigger"
140
141
  s.test_files = ["test/buby_test.rb"]
141
142
 
142
143
  if s.respond_to? :specification_version then
143
- s.specification_version = 3
144
+ s.specification_version = 4
144
145
 
145
146
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
146
147
  s.add_development_dependency(%q<rake-compiler>, ["~> 0.8.1"])
@@ -109,6 +109,22 @@ public interface IBurpExtenderCallbacks
109
109
  */
110
110
  OutputStream getStderr();
111
111
 
112
+ /**
113
+ * This method prints a line of output to the current extension's standard
114
+ * output stream.
115
+ *
116
+ * @param output The message to print.
117
+ */
118
+ void printOutput(String output);
119
+
120
+ /**
121
+ * This method prints a line of output to the current extension's standard
122
+ * error stream.
123
+ *
124
+ * @param error The message to print.
125
+ */
126
+ void printError(String error);
127
+
112
128
  /**
113
129
  * This method is used to register a listener which will be notified of
114
130
  * changes to the extension's state. <b>Note:</b> Any extensions that start
@@ -121,6 +137,23 @@ public interface IBurpExtenderCallbacks
121
137
  */
122
138
  void registerExtensionStateListener(IExtensionStateListener listener);
123
139
 
140
+ /**
141
+ * This method is used to retrieve the extension state listeners that are
142
+ * registered by the extension.
143
+ *
144
+ * @return A list of extension state listeners that are currently registered
145
+ * by this extension.
146
+ */
147
+ List<IExtensionStateListener> getExtensionStateListeners();
148
+
149
+ /**
150
+ * This method is used to remove an extension state listener that has been
151
+ * registered by the extension.
152
+ *
153
+ * @param listener The extension state listener to be removed.
154
+ */
155
+ void removeExtensionStateListener(IExtensionStateListener listener);
156
+
124
157
  /**
125
158
  * This method is used to register a listener which will be notified of
126
159
  * requests and responses made by any Burp tool. Extensions can perform
@@ -132,6 +165,23 @@ public interface IBurpExtenderCallbacks
132
165
  */
133
166
  void registerHttpListener(IHttpListener listener);
134
167
 
168
+ /**
169
+ * This method is used to retrieve the HTTP listeners that are registered by
170
+ * the extension.
171
+ *
172
+ * @return A list of HTTP listeners that are currently registered by this
173
+ * extension.
174
+ */
175
+ List<IHttpListener> getHttpListeners();
176
+
177
+ /**
178
+ * This method is used to remove an HTTP listener that has been registered
179
+ * by the extension.
180
+ *
181
+ * @param listener The HTTP listener to be removed.
182
+ */
183
+ void removeHttpListener(IHttpListener listener);
184
+
135
185
  /**
136
186
  * This method is used to register a listener which will be notified of
137
187
  * requests and responses being processed by the Proxy tool. Extensions can
@@ -143,6 +193,23 @@ public interface IBurpExtenderCallbacks
143
193
  */
144
194
  void registerProxyListener(IProxyListener listener);
145
195
 
196
+ /**
197
+ * This method is used to retrieve the Proxy listeners that are registered
198
+ * by the extension.
199
+ *
200
+ * @return A list of Proxy listeners that are currently registered by this
201
+ * extension.
202
+ */
203
+ List<IProxyListener> getProxyListeners();
204
+
205
+ /**
206
+ * This method is used to remove a Proxy listener that has been registered
207
+ * by the extension.
208
+ *
209
+ * @param listener The Proxy listener to be removed.
210
+ */
211
+ void removeProxyListener(IProxyListener listener);
212
+
146
213
  /**
147
214
  * This method is used to register a listener which will be notified of new
148
215
  * issues that are reported by the Scanner tool. Extensions can perform
@@ -154,6 +221,23 @@ public interface IBurpExtenderCallbacks
154
221
  */
155
222
  void registerScannerListener(IScannerListener listener);
156
223
 
224
+ /**
225
+ * This method is used to retrieve the Scanner listeners that are registered
226
+ * by the extension.
227
+ *
228
+ * @return A list of Scanner listeners that are currently registered by this
229
+ * extension.
230
+ */
231
+ List<IScannerListener> getScannerListeners();
232
+
233
+ /**
234
+ * This method is used to remove a Scanner listener that has been registered
235
+ * by the extension.
236
+ *
237
+ * @param listener The Scanner listener to be removed.
238
+ */
239
+ void removeScannerListener(IScannerListener listener);
240
+
157
241
  /**
158
242
  * This method is used to register a listener which will be notified of
159
243
  * changes to Burp's suite-wide target scope.
@@ -163,6 +247,23 @@ public interface IBurpExtenderCallbacks
163
247
  */
164
248
  void registerScopeChangeListener(IScopeChangeListener listener);
165
249
 
250
+ /**
251
+ * This method is used to retrieve the scope change listeners that are
252
+ * registered by the extension.
253
+ *
254
+ * @return A list of scope change listeners that are currently registered by
255
+ * this extension.
256
+ */
257
+ List<IScopeChangeListener> getScopeChangeListeners();
258
+
259
+ /**
260
+ * This method is used to remove a scope change listener that has been
261
+ * registered by the extension.
262
+ *
263
+ * @param listener The scope change listener to be removed.
264
+ */
265
+ void removeScopeChangeListener(IScopeChangeListener listener);
266
+
166
267
  /**
167
268
  * This method is used to register a factory for custom context menu items.
168
269
  * When the user invokes a context menu anywhere within Burp, the factory
@@ -174,6 +275,23 @@ public interface IBurpExtenderCallbacks
174
275
  */
175
276
  void registerContextMenuFactory(IContextMenuFactory factory);
176
277
 
278
+ /**
279
+ * This method is used to retrieve the context menu factories that are
280
+ * registered by the extension.
281
+ *
282
+ * @return A list of context menu factories that are currently registered by
283
+ * this extension.
284
+ */
285
+ List<IContextMenuFactory> getContextMenuFactories();
286
+
287
+ /**
288
+ * This method is used to remove a context menu factory that has been
289
+ * registered by the extension.
290
+ *
291
+ * @param factory The context menu factory to be removed.
292
+ */
293
+ void removeContextMenuFactory(IContextMenuFactory factory);
294
+
177
295
  /**
178
296
  * This method is used to register a factory for custom message editor tabs.
179
297
  * For each message editor that already exists, or is subsequently created,
@@ -186,6 +304,23 @@ public interface IBurpExtenderCallbacks
186
304
  */
187
305
  void registerMessageEditorTabFactory(IMessageEditorTabFactory factory);
188
306
 
307
+ /**
308
+ * This method is used to retrieve the message editor tab factories that are
309
+ * registered by the extension.
310
+ *
311
+ * @return A list of message editor tab factories that are currently
312
+ * registered by this extension.
313
+ */
314
+ List<IMessageEditorTabFactory> getMessageEditorTabFactories();
315
+
316
+ /**
317
+ * This method is used to remove a message editor tab factory that has been
318
+ * registered by the extension.
319
+ *
320
+ * @param factory The message editor tab factory to be removed.
321
+ */
322
+ void removeMessageEditorTabFactory(IMessageEditorTabFactory factory);
323
+
189
324
  /**
190
325
  * This method is used to register a provider of Scanner insertion points.
191
326
  * For each base request that is actively scanned, Burp will ask the
@@ -198,6 +333,24 @@ public interface IBurpExtenderCallbacks
198
333
  void registerScannerInsertionPointProvider(
199
334
  IScannerInsertionPointProvider provider);
200
335
 
336
+ /**
337
+ * This method is used to retrieve the Scanner insertion point providers
338
+ * that are registered by the extension.
339
+ *
340
+ * @return A list of Scanner insertion point providers that are currently
341
+ * registered by this extension.
342
+ */
343
+ List<IScannerInsertionPointProvider> getScannerInsertionPointProviders();
344
+
345
+ /**
346
+ * This method is used to remove a Scanner insertion point provider that has
347
+ * been registered by the extension.
348
+ *
349
+ * @param provider The Scanner insertion point provider to be removed.
350
+ */
351
+ void removeScannerInsertionPointProvider(
352
+ IScannerInsertionPointProvider provider);
353
+
201
354
  /**
202
355
  * This method is used to register a custom Scanner check. When performing
203
356
  * scanning, Burp will ask the check to perform active or passive scanning
@@ -208,6 +361,23 @@ public interface IBurpExtenderCallbacks
208
361
  */
209
362
  void registerScannerCheck(IScannerCheck check);
210
363
 
364
+ /**
365
+ * This method is used to retrieve the Scanner checks that are registered by
366
+ * the extension.
367
+ *
368
+ * @return A list of Scanner checks that are currently registered by this
369
+ * extension.
370
+ */
371
+ List<IScannerCheck> getScannerChecks();
372
+
373
+ /**
374
+ * This method is used to remove a Scanner check that has been registered by
375
+ * the extension.
376
+ *
377
+ * @param check The Scanner check to be removed.
378
+ */
379
+ void removeScannerCheck(IScannerCheck check);
380
+
211
381
  /**
212
382
  * This method is used to register a factory for Intruder payloads. Each
213
383
  * registered factory will be available within the Intruder UI for the user
@@ -222,6 +392,25 @@ public interface IBurpExtenderCallbacks
222
392
  void registerIntruderPayloadGeneratorFactory(
223
393
  IIntruderPayloadGeneratorFactory factory);
224
394
 
395
+ /**
396
+ * This method is used to retrieve the Intruder payload generator factories
397
+ * that are registered by the extension.
398
+ *
399
+ * @return A list of Intruder payload generator factories that are currently
400
+ * registered by this extension.
401
+ */
402
+ List<IIntruderPayloadGeneratorFactory>
403
+ getIntruderPayloadGeneratorFactories();
404
+
405
+ /**
406
+ * This method is used to remove an Intruder payload generator factory that
407
+ * has been registered by the extension.
408
+ *
409
+ * @param factory The Intruder payload generator factory to be removed.
410
+ */
411
+ void removeIntruderPayloadGeneratorFactory(
412
+ IIntruderPayloadGeneratorFactory factory);
413
+
225
414
  /**
226
415
  * This method is used to register a custom Intruder payload processor. Each
227
416
  * registered processor will be available within the Intruder UI for the
@@ -232,6 +421,23 @@ public interface IBurpExtenderCallbacks
232
421
  */
233
422
  void registerIntruderPayloadProcessor(IIntruderPayloadProcessor processor);
234
423
 
424
+ /**
425
+ * This method is used to retrieve the Intruder payload processors that are
426
+ * registered by the extension.
427
+ *
428
+ * @return A list of Intruder payload processors that are currently
429
+ * registered by this extension.
430
+ */
431
+ List<IIntruderPayloadProcessor> getIntruderPayloadProcessors();
432
+
433
+ /**
434
+ * This method is used to remove an Intruder payload processor that has been
435
+ * registered by the extension.
436
+ *
437
+ * @param processor The Intruder payload processor to be removed.
438
+ */
439
+ void removeIntruderPayloadProcessor(IIntruderPayloadProcessor processor);
440
+
235
441
  /**
236
442
  * This method is used to register a custom session handling action. Each
237
443
  * registered action will be available within the session handling rule UI
@@ -243,6 +449,23 @@ public interface IBurpExtenderCallbacks
243
449
  */
244
450
  void registerSessionHandlingAction(ISessionHandlingAction action);
245
451
 
452
+ /**
453
+ * This method is used to retrieve the session handling actions that are
454
+ * registered by the extension.
455
+ *
456
+ * @return A list of session handling actions that are currently registered
457
+ * by this extension.
458
+ */
459
+ List<ISessionHandlingAction> getSessionHandlingActions();
460
+
461
+ /**
462
+ * This method is used to remove a session handling action that has been
463
+ * registered by the extension.
464
+ *
465
+ * @param action The extension session handling action to be removed.
466
+ */
467
+ void removeSessionHandlingAction(ISessionHandlingAction action);
468
+
246
469
  /**
247
470
  * This method is used to unload the extension from Burp Suite.
248
471
  */
@@ -392,6 +615,13 @@ public interface IBurpExtenderCallbacks
392
615
  byte[] request,
393
616
  List<int[]> payloadPositionOffsets);
394
617
 
618
+ /**
619
+ * This method can be used to send data to the Comparer tool.
620
+ *
621
+ * @param data The data to be sent to Comparer.
622
+ */
623
+ void sendToComparer(byte[] data);
624
+
395
625
  /**
396
626
  * This method can be used to send a seed URL to the Burp Spider tool. If
397
627
  * the URL is not within the current Spider scope, the user will be asked if
@@ -559,6 +789,20 @@ public interface IBurpExtenderCallbacks
559
789
  */
560
790
  IScanIssue[] getScanIssues(String urlPrefix);
561
791
 
792
+ /**
793
+ * This method is used to generate a report for the specified Scanner
794
+ * issues. The report format can be specified. For all other reporting
795
+ * options, the default settings that appear in the reporting UI wizard are
796
+ * used.
797
+ *
798
+ * @param format The format to be used in the report. Accepted values are
799
+ * HTML and XML.
800
+ * @param issues The Scanner issues to be reported.
801
+ * @param file The file to which the report will be saved.
802
+ */
803
+ void generateScanReport(String format, IScanIssue[] issues,
804
+ java.io.File file);
805
+
562
806
  /**
563
807
  * This method is used to retrieve the contents of Burp's session handling
564
808
  * cookie jar. Extensions that provide an
@@ -703,13 +947,15 @@ public interface IBurpExtenderCallbacks
703
947
  * @param requestMarkers A list of index pairs representing the offsets of
704
948
  * markers to be applied to the request message. Each item in the list must
705
949
  * be an int[2] array containing the start and end offsets for the marker.
706
- * This parameter is optional and may be <code>null</code> if no request
707
- * markers are required.
950
+ * The markers in the list should be in sequence and not overlapping. This
951
+ * parameter is optional and may be <code>null</code> if no request markers
952
+ * are required.
708
953
  * @param responseMarkers A list of index pairs representing the offsets of
709
954
  * markers to be applied to the response message. Each item in the list must
710
955
  * be an int[2] array containing the start and end offsets for the marker.
711
- * This parameter is optional and may be <code>null</code> if no response
712
- * markers are required.
956
+ * The markers in the list should be in sequence and not overlapping. This
957
+ * parameter is optional and may be <code>null</code> if no response markers
958
+ * are required.
713
959
  * @return An object that implements the
714
960
  * <code>IHttpRequestResponseWithMarkers</code> interface.
715
961
  */