pwn 0.5.327 → 0.5.328
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/README.md +3 -3
- data/bin/pwn_burp_suite_pro_active_scan +2 -9
- data/lib/pwn/plugins/burp_suite.rb +11 -23
- data/lib/pwn/plugins/owasp_zap.rb +35 -0
- data/lib/pwn/version.rb +1 -1
- data/third_party/pwn_burp_rest_api.jar +0 -0
- metadata +2 -2
- data/third_party/burpbuddy-3.1.1-SNAPSHOT-all.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61a3e4aadc72123a14b01bdeaf00d0f989920b903d8dd7564b0f845c20dcbc05
|
4
|
+
data.tar.gz: 434ba38914fec8d955e2ba33e6e7fd70df019316700208a262bf99323a719457
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5526a4ffc3f9380f1ec6b94c05812f8cebd3c5c5e36411c0e4a8378afa2039b9152c11f2ab5af179349872334296fa87833cedb914a172617bc12edf8d32ef5f
|
7
|
+
data.tar.gz: d381fc4450897918b52e0af2faf1625ef9af46c483bb4ecc3ee34d854807c0015f0a08d93a91437c36af611bbc477fa0cee220a98bfe05ff4b46326b109b771a
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
|
|
37
37
|
$ ./install.sh
|
38
38
|
$ ./install.sh ruby-gem
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.5.
|
40
|
+
pwn[v0.5.328]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.4.4@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.5.
|
55
|
+
pwn[v0.5.328]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
If you're using a multi-user install of RVM do:
|
@@ -62,7 +62,7 @@ $ rvm use ruby-3.4.4@pwn
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
64
64
|
$ pwn
|
65
|
-
pwn[v0.5.
|
65
|
+
pwn[v0.5.328]:001 >>> PWN.help
|
66
66
|
```
|
67
67
|
|
68
68
|
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
|
@@ -33,10 +33,6 @@ OptionParser.new do |options|
|
|
33
33
|
options.on('-iURL', '---in_scope=URL', '<Optional - URL to add include in scope (Defaults to value of --target_url)>') do |s|
|
34
34
|
opts[:in_scope] = s
|
35
35
|
end
|
36
|
-
|
37
|
-
options.on('-cFILE', '--target-config=FILE', '<Optional - Path to Target Config JSON File>') do |c|
|
38
|
-
opts[:target_config] = c
|
39
|
-
end
|
40
36
|
end.parse!
|
41
37
|
|
42
38
|
if opts.empty?
|
@@ -56,7 +52,6 @@ begin
|
|
56
52
|
raise 'Invalid path to browser instructions. Please check your spelling and try again.' unless File.exist?(navigation_instruct)
|
57
53
|
|
58
54
|
in_scope = opts[:in_scope] ||= target_url
|
59
|
-
target_config = opts[:target_config]
|
60
55
|
|
61
56
|
# ------
|
62
57
|
# Open Burp
|
@@ -64,14 +59,12 @@ begin
|
|
64
59
|
burp_obj = PWN::Plugins::BurpSuite.start(
|
65
60
|
burp_jar_path: burp_jar_path,
|
66
61
|
headless: true,
|
67
|
-
browser_type: :headless
|
68
|
-
target_config: target_config
|
62
|
+
browser_type: :headless
|
69
63
|
)
|
70
64
|
else
|
71
65
|
burp_obj = PWN::Plugins::BurpSuite.start(
|
72
66
|
burp_jar_path: burp_jar_path,
|
73
|
-
browser_type: :chrome
|
74
|
-
target_config: target_config
|
67
|
+
browser_type: :chrome
|
75
68
|
)
|
76
69
|
end
|
77
70
|
|
@@ -44,8 +44,7 @@ module PWN
|
|
44
44
|
# burp_obj = PWN::Plugins::BurpSuite.start(
|
45
45
|
# burp_jar_path: 'options - path of burp suite pro jar file (defaults to /opt/burpsuite/burpsuite_pro.jar)',
|
46
46
|
# headless: 'optional - run burp headless if set to true',
|
47
|
-
# browser_type: 'optional - defaults to :firefox. See PWN::Plugins::TransparentBrowser.help for a list of types'
|
48
|
-
# target_config: 'optional - path to burp suite pro target config JSON file'
|
47
|
+
# browser_type: 'optional - defaults to :firefox. See PWN::Plugins::TransparentBrowser.help for a list of types'
|
49
48
|
# )
|
50
49
|
|
51
50
|
public_class_method def self.start(opts = {})
|
@@ -60,16 +59,9 @@ module PWN
|
|
60
59
|
opts[:browser_type]
|
61
60
|
end
|
62
61
|
|
63
|
-
|
64
|
-
|
65
|
-
if
|
66
|
-
# burp_cmd_string = "java -Xmx4G -Djava.awt.headless=true -classpath #{burp_root}/burpbuddy.jar:#{burp_jar_path} burp.StartBurp"
|
67
|
-
burp_cmd_string = "java -Xmx4G -Djava.awt.headless=true -classpath #{burp_root}/burpbuddy.jar -jar #{burp_jar_path}"
|
68
|
-
else
|
69
|
-
# burp_cmd_string = "java -Xmx4G -classpath #{burp_root}/burpbuddy.jar:#{burp_jar_path} burp.StartBurp"
|
70
|
-
burp_cmd_string = "java -Xmx4G -classpath #{burp_root}/burpbuddy.jar -jar #{burp_jar_path}"
|
71
|
-
end
|
72
|
-
burp_cmd_string = "#{burp_cmd_string} --config-file=#{target_config}" if target_config && File.exist?(target_config)
|
62
|
+
burp_cmd_string = "java -Xmx4G -jar #{burp_jar_path}"
|
63
|
+
burp_cmd_string = "java -Xmx4G -Djava.awt.headless=true -jar #{burp_jar_path}" if opts[:headless]
|
64
|
+
# burp_cmd_string = "#{burp_cmd_string} --user-config-file=#{user_config}" if File.exist?(user_config)
|
73
65
|
|
74
66
|
# Construct burp_obj
|
75
67
|
burp_obj = {}
|
@@ -78,10 +70,11 @@ module PWN
|
|
78
70
|
rest_browser = browser_obj1[:browser]
|
79
71
|
|
80
72
|
# random_mitm_port = PWN::Plugins::Sock.get_random_unused_port
|
81
|
-
|
82
|
-
# random_bb_port = PWN::Plugins::Sock.get_random_unused_port
|
83
|
-
|
84
|
-
burp_obj[:
|
73
|
+
random_mitm_port = 8080
|
74
|
+
# random_bb_port = PWN::Plugins::Sock.get_random_unused_port
|
75
|
+
random_bb_port = 8001
|
76
|
+
burp_obj[:mitm_proxy] = "127.0.0.1:#{random_mitm_port}"
|
77
|
+
burp_obj[:burpbuddy_api] = "127.0.0.1:#{random_bb_port}"
|
85
78
|
burp_obj[:rest_browser] = rest_browser
|
86
79
|
|
87
80
|
# Proxy always listens on localhost...use SSH tunneling if remote access is required
|
@@ -94,7 +87,7 @@ module PWN
|
|
94
87
|
|
95
88
|
# Wait for TCP 8001 to open prior to returning burp_obj
|
96
89
|
loop do
|
97
|
-
s = TCPSocket.new('127.0.0.1',
|
90
|
+
s = TCPSocket.new('127.0.0.1', random_bb_port)
|
98
91
|
s.close
|
99
92
|
break
|
100
93
|
rescue Errno::ECONNREFUSED
|
@@ -401,15 +394,10 @@ module PWN
|
|
401
394
|
|
402
395
|
public_class_method def self.help
|
403
396
|
puts "USAGE:
|
404
|
-
# PLEASE NOTE: IF RUNNING THIS MODULE THE FIRST TIME, YOU HAVE TO MANUALLY LOAD
|
405
|
-
# /opt/burpsuite/burpsuite_pro.jar INTO THE BURP SUITE PRO UI IN ORDER FOR
|
406
|
-
# THIS TO WORK PROPERLY MOVING FORWARD. THIS SHOULD ONLY BE NECESSARY TO
|
407
|
-
# DO ONCE.
|
408
397
|
burp_obj = #{self}.start(
|
409
398
|
burp_jar_path: 'required - path of burp suite pro jar file (defaults to /opt/burpsuite/burpsuite_pro.jar)',
|
410
399
|
headless: 'optional - run headless if set to true',
|
411
|
-
browser_type: 'optional - defaults to :firefox. See PWN::Plugins::TransparentBrowser.help for a list of types'
|
412
|
-
target_config: 'optional - path to burp suite pro target config JSON file'
|
400
|
+
browser_type: 'optional - defaults to :firefox. See PWN::Plugins::TransparentBrowser.help for a list of types'
|
413
401
|
)
|
414
402
|
|
415
403
|
uri_in_scope_bool = #{self}.uri_in_scope(
|
@@ -426,6 +426,41 @@ module PWN
|
|
426
426
|
raise e
|
427
427
|
end
|
428
428
|
|
429
|
+
# Supported Method Parameters::
|
430
|
+
# PWN::Plugins::OwaspZap.import_openapi_spec_file(
|
431
|
+
# zap_obj: 'required - zap_obj returned from #open method',
|
432
|
+
# spec: 'required - path to OpenAPI spec file (e.g. /path/to/openapi.yaml)',
|
433
|
+
# target: 'required - target URL to ovverride the service URL in the OpenAPI spec (e.g. https://fq.dn)',
|
434
|
+
# context_id: 'optional - ID of the ZAP context (Defaults to first context, if any)',
|
435
|
+
# user_id: 'optional - ID of the ZAP user (Defaults to first user, if any)'
|
436
|
+
# )
|
437
|
+
|
438
|
+
public_class_method def self.import_openapi_spec_file(opts = {})
|
439
|
+
zap_obj = opts[:zap_obj]
|
440
|
+
api_key = zap_obj[:api_key].to_s.scrub
|
441
|
+
spec = opts[:spec]
|
442
|
+
target = opts[:target]
|
443
|
+
context_id = opts[:context_id]
|
444
|
+
user_id = opts[:user_id]
|
445
|
+
|
446
|
+
params = {
|
447
|
+
apikey: api_key,
|
448
|
+
file: spec,
|
449
|
+
target: target,
|
450
|
+
contextId: context_id,
|
451
|
+
user_id: user_id
|
452
|
+
}
|
453
|
+
|
454
|
+
zap_rest_call(
|
455
|
+
zap_obj: zap_obj,
|
456
|
+
rest_call: "JSON/break/action/openapi/?zapapiformat=JSON&apikey=#{api_key}",
|
457
|
+
params: params
|
458
|
+
)
|
459
|
+
rescue StandardError, SystemExit, Interrupt => e
|
460
|
+
stop(zap_obj) unless zap_obj.nil?
|
461
|
+
raise e
|
462
|
+
end
|
463
|
+
|
429
464
|
# Supported Method Parameters::
|
430
465
|
# watir_resp = PWN::Plugins::OwaspZap.request(
|
431
466
|
# zap_obj: 'required - zap_obj returned from #open method',
|
data/lib/pwn/version.rb
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.328
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
@@ -2298,8 +2298,8 @@ files:
|
|
2298
2298
|
- spec/lib/pwn_spec.rb
|
2299
2299
|
- spec/spec_helper.rb
|
2300
2300
|
- third_party/.gitkeep
|
2301
|
-
- third_party/burpbuddy-3.1.1-SNAPSHOT-all.jar
|
2302
2301
|
- third_party/http-request-headers-fields-large.txt
|
2302
|
+
- third_party/pwn_burp_rest_api.jar
|
2303
2303
|
- third_party/pwn_rdoc.jsonl
|
2304
2304
|
- third_party/r2-pwn-layout
|
2305
2305
|
- update_pwn.sh
|
Binary file
|