pwn 0.5.336 → 0.5.338
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/pwn_burp_suite_pro_active_scan +7 -0
- data/lib/pwn/plugins/burp_suite.rb +46 -1
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 478052d4b7f5f4c7015d9e2c0ad2ca2aacdf2afc5d8f6904f92126d3721324fb
|
4
|
+
data.tar.gz: 4298c2969ffc59b38e1633d3c728ccb1c9da8d647be9750f5d77cc6117f8dcc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f85cf2322e788c4681ed6e7f028fcfcc1d833bf88093d3cb651aad367377c3b78f4463642ed31c529ba1ba560ce11d79c89cda54df059b152c6a587ae53ef97
|
7
|
+
data.tar.gz: a51933f762c0f09fbf9e06759d870d5315b6ee1c0b21cf20ec9bc88b9d8f8d6c64473519fe1b31b2d4b266288fa16a9357b386436e9d4feb7cd9493ccae82253
|
@@ -18,6 +18,10 @@ OptionParser.new do |options|
|
|
18
18
|
opts[:headless] = h
|
19
19
|
end
|
20
20
|
|
21
|
+
options.on('-s', '--[no-]spider', '<Optional - Crawl / Spider Target Prior to Scanning (Defaults to false)>') do |s|
|
22
|
+
opts[:spider] = s
|
23
|
+
end
|
24
|
+
|
21
25
|
options.on('-tTARGET', '--target_url=TARGET', '<Required - Target URI to Scan>') do |t|
|
22
26
|
opts[:target_url] = t
|
23
27
|
end
|
@@ -45,6 +49,7 @@ begin
|
|
45
49
|
|
46
50
|
burp_jar_path = opts[:burp_jar_path]
|
47
51
|
headless = opts[:headless]
|
52
|
+
spider = opts[:spider] || false
|
48
53
|
target_url = opts[:target_url].to_s.scrub
|
49
54
|
output_path = opts[:output_path].to_s.scrub
|
50
55
|
|
@@ -96,6 +101,8 @@ begin
|
|
96
101
|
browser.instance_eval(instruction.to_s.scrub.strip.chomp)
|
97
102
|
end
|
98
103
|
|
104
|
+
PWN::Plugins::BurpSuite.spider(burp_obj: burp_obj, target_url: in_scope) if spider
|
105
|
+
|
99
106
|
duration = 9
|
100
107
|
print "Waiting #{duration} seconds prior to kicking off active scan..."
|
101
108
|
sleep duration # Sleep for now so everything loads the way we expect - blech.
|
@@ -168,6 +168,48 @@ module PWN
|
|
168
168
|
raise e
|
169
169
|
end
|
170
170
|
|
171
|
+
# Supported Method Parameters::
|
172
|
+
# json_in_scope = PWN::Plugins::BurpSuite.spider(
|
173
|
+
# burp_obj: 'required - burp_obj returned by #start method',
|
174
|
+
# target_url: 'required - target url to add to crawl / spider'
|
175
|
+
# )
|
176
|
+
|
177
|
+
public_class_method def self.spider(opts = {})
|
178
|
+
burp_obj = opts[:burp_obj]
|
179
|
+
target_url = opts[:target_url]
|
180
|
+
rest_browser = burp_obj[:rest_browser]
|
181
|
+
pwn_burp_api = burp_obj[:pwn_burp_api]
|
182
|
+
|
183
|
+
post_body = { url: target_url }.to_json
|
184
|
+
|
185
|
+
in_scope = rest_browser.post(
|
186
|
+
"http://#{pwn_burp_api}/spider",
|
187
|
+
post_body, content_type: 'application/json; charset=UTF8'
|
188
|
+
)
|
189
|
+
spider_json = JSON.parse(in_scope, symbolize_names: true)
|
190
|
+
spider_id = spider_json[:id]
|
191
|
+
loop do
|
192
|
+
print '.'
|
193
|
+
spider_status_resp = rest_browser.get("http://#{pwn_burp_api}/spider/#{spider_id}")
|
194
|
+
spider_status_json = JSON.parse(spider_status_resp, symbolize_names: true)
|
195
|
+
spider_status = spider_status_json[:status]
|
196
|
+
case spider_status
|
197
|
+
when 'queued', 'running'
|
198
|
+
sleep 3
|
199
|
+
when 'failed', 'finished'
|
200
|
+
break
|
201
|
+
else
|
202
|
+
puts "Unknown spider status detected: #{spider_status}"
|
203
|
+
break
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
spider_json.merge!(spider_status_json)
|
208
|
+
rescue StandardError => e
|
209
|
+
stop(burp_obj: burp_obj) unless burp_obj.nil?
|
210
|
+
raise e
|
211
|
+
end
|
212
|
+
|
171
213
|
# Supported Method Parameters::
|
172
214
|
# PWN::Plugins::BurpSuite.enable_proxy(
|
173
215
|
# burp_obj: 'required - burp_obj returned by #start method'
|
@@ -638,9 +680,12 @@ module PWN
|
|
638
680
|
rescue RestClient::ExceptionWithResponse => e
|
639
681
|
puts " => #{e.response.code}"
|
640
682
|
next
|
641
|
-
rescue RestClient::ServerBrokeConnection
|
683
|
+
rescue RestClient::ServerBrokeConnection
|
642
684
|
puts ' => Server broke connection.'
|
643
685
|
next
|
686
|
+
rescue Errno::ECONNRESET
|
687
|
+
puts ' => Connection reset by peer.'
|
688
|
+
next
|
644
689
|
end
|
645
690
|
|
646
691
|
# Wait for scan completion
|
data/lib/pwn/version.rb
CHANGED