pwn 0.5.551 → 0.5.552
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/.rubocop.yml +1 -1
- data/Gemfile +1 -1
- data/README.md +3 -3
- data/lib/pwn/plugins/burp_suite.rb +66 -9
- data/lib/pwn/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0eb71ac056fca69e9b903f0cfca9c905f1acafa556aad10dfb3da0cd64675b0d
|
|
4
|
+
data.tar.gz: 4416c11597a1ba0ee7c84267be3f47cdf67bb236f2ab89f766155a86b72eaaea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8815c6bb53071f7a6094ced8da45d537b0bf6a454b404325cbb30e446034827fd1fcac537cc90f3dd0213da498793fd46b1d762b593d0b2040d80da09658eb8
|
|
7
|
+
data.tar.gz: efc39f2cf19f17aedf98b7fb7a8784865821e387df44382390b5488e2ae1df1da4fb0b582f86cf3c6914f42b217b0c6f4700c7d092c1c445ba16b491eb452e14
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
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.552]:001 >>> PWN.help
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
|
@@ -52,7 +52,7 @@ $ rvm use ruby-4.0.1@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.552]: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-4.0.1@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.552]: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:
|
|
@@ -90,14 +90,22 @@ module PWN
|
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
default_http_ports = [80, 443]
|
|
93
|
+
offset = 0
|
|
94
|
+
limit = 200
|
|
95
|
+
|
|
93
96
|
loop do
|
|
94
97
|
# TODO: Implement repeater into the loop? This reduces load to LLM but is slooow.
|
|
95
98
|
# Repeater should analyze the reqesut/response pair and suggest
|
|
96
99
|
# modifications to the request to further probe for vulnerabilities _quickly_.
|
|
97
100
|
case type
|
|
98
101
|
when :proxy_history
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
proxy_history = get_proxy_history(
|
|
103
|
+
burp_obj: burp_obj,
|
|
104
|
+
limit: limit,
|
|
105
|
+
offset: offset
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
offset = 0 if proxy_history.empty?
|
|
101
109
|
proxy_history.each do |entry|
|
|
102
110
|
request = entry[:request]
|
|
103
111
|
response = entry[:response]
|
|
@@ -115,6 +123,7 @@ module PWN
|
|
|
115
123
|
|
|
116
124
|
# If sitemap comment and highlight color exists, use that instead of re-analyzing
|
|
117
125
|
sitemap_entry = nil
|
|
126
|
+
sitemap = get_sitemap(burp_obj: burp_obj, uri: uri)
|
|
118
127
|
if sitemap.any?
|
|
119
128
|
sitemap_entry = sitemap.find do |site|
|
|
120
129
|
next unless site.key?(:http_service) && site.key?(:request)
|
|
@@ -152,8 +161,12 @@ module PWN
|
|
|
152
161
|
sleep Random.rand(30..60)
|
|
153
162
|
|
|
154
163
|
when :sitemap
|
|
155
|
-
|
|
156
|
-
|
|
164
|
+
sitemap = get_sitemap(
|
|
165
|
+
burp_obj: burp_obj,
|
|
166
|
+
limit: limit,
|
|
167
|
+
offset: offset
|
|
168
|
+
)
|
|
169
|
+
offset = 0 if sitemap.empty?
|
|
157
170
|
sitemap.each do |entry|
|
|
158
171
|
request = entry[:request]
|
|
159
172
|
response = entry[:response]
|
|
@@ -170,6 +183,7 @@ module PWN
|
|
|
170
183
|
next unless entry.key?(:comment) && entry[:comment].to_s.strip.empty?
|
|
171
184
|
|
|
172
185
|
proxy_history_entry = nil
|
|
186
|
+
proxy_history = get_proxy_history(burp_obj: burp_obj, uri: uri)
|
|
173
187
|
if proxy_history.any?
|
|
174
188
|
proxy_history_entry = proxy_history.find do |proxy_entry|
|
|
175
189
|
next unless proxy_entry.key?(:http_service) && proxy_entry.key?(:request)
|
|
@@ -206,7 +220,12 @@ module PWN
|
|
|
206
220
|
sleep Random.rand(60..90)
|
|
207
221
|
|
|
208
222
|
when :websocket_history
|
|
209
|
-
websocket_history = get_websocket_history(
|
|
223
|
+
websocket_history = get_websocket_history(
|
|
224
|
+
burp_obj: burp_obj,
|
|
225
|
+
limit: limit,
|
|
226
|
+
offset: offset
|
|
227
|
+
)
|
|
228
|
+
offset = 0 if websocket_history.empty?
|
|
210
229
|
websocket_history.each do |entry|
|
|
211
230
|
uri = entry[:url]
|
|
212
231
|
next unless in_scope(burp_obj: burp_obj, uri: uri)
|
|
@@ -236,6 +255,7 @@ module PWN
|
|
|
236
255
|
end
|
|
237
256
|
sleep Random.rand(3..10)
|
|
238
257
|
end
|
|
258
|
+
offset += limit
|
|
239
259
|
end
|
|
240
260
|
rescue Errno::ECONNREFUSED
|
|
241
261
|
puts "BurpSuite:#{type} AI Introspection Thread >>> Terminating API Calls..."
|
|
@@ -592,6 +612,9 @@ module PWN
|
|
|
592
612
|
# Supported Method Parameters::
|
|
593
613
|
# json_proxy_history = PWN::Plugins::BurpSuite.get_proxy_history(
|
|
594
614
|
# burp_obj: 'required - burp_obj returned by #start method',
|
|
615
|
+
# limit: 'optional - number of proxy history entries to return (default: 200)',
|
|
616
|
+
# offset: 'optional - offset for pagination of proxy history entries (default: 0)',
|
|
617
|
+
# uri: 'optional - filter proxy history entries by URI (default: nil)',
|
|
595
618
|
# keyword: 'optional - keyword to filter proxy history entries (default: nil)',
|
|
596
619
|
# return_as: 'optional - :base64 or :har (defaults to :base64)'
|
|
597
620
|
# )
|
|
@@ -600,10 +623,19 @@ module PWN
|
|
|
600
623
|
burp_obj = opts[:burp_obj]
|
|
601
624
|
rest_browser = burp_obj[:rest_browser]
|
|
602
625
|
mitm_rest_api = burp_obj[:mitm_rest_api]
|
|
626
|
+
|
|
627
|
+
limit = opts[:limit] ||= 200
|
|
628
|
+
offset = opts[:offset] ||= 0
|
|
629
|
+
uri = opts[:uri]
|
|
603
630
|
keyword = opts[:keyword]
|
|
604
631
|
return_as = opts[:return_as] ||= :base64
|
|
605
632
|
|
|
606
|
-
|
|
633
|
+
if uri.nil?
|
|
634
|
+
rest_call = "http://#{mitm_rest_api}/proxy/history?limit=#{limit}&offset=#{offset}"
|
|
635
|
+
else
|
|
636
|
+
base64_encoded_uri = Base64.strict_encode64(uri.to_s.scrub.strip.chomp)
|
|
637
|
+
rest_call = "http://#{mitm_rest_api}/proxy/history/#{base64_encoded_uri}?limit=#{limit}&offset=#{offset}"
|
|
638
|
+
end
|
|
607
639
|
|
|
608
640
|
sitemap = rest_browser.get(
|
|
609
641
|
rest_call,
|
|
@@ -810,6 +842,8 @@ module PWN
|
|
|
810
842
|
# Supported Method Parameters::
|
|
811
843
|
# json_web_socket_history = PWN::Plugins::BurpSuite.get_websocket_history(
|
|
812
844
|
# burp_obj: 'required - burp_obj returned by #start method',
|
|
845
|
+
# limit: 'optional - number of websocket history entries to return (default: 200)',
|
|
846
|
+
# offset: 'optional - offset for pagination of websocket history entries (default: 0)',
|
|
813
847
|
# keyword: 'optional - keyword to filter websocket history entries (default: nil)'
|
|
814
848
|
# )
|
|
815
849
|
|
|
@@ -817,9 +851,12 @@ module PWN
|
|
|
817
851
|
burp_obj = opts[:burp_obj]
|
|
818
852
|
rest_browser = burp_obj[:rest_browser]
|
|
819
853
|
mitm_rest_api = burp_obj[:mitm_rest_api]
|
|
854
|
+
|
|
855
|
+
limit = opts[:limit] ||= 200
|
|
856
|
+
offset = opts[:offset] ||= 0
|
|
820
857
|
keyword = opts[:keyword]
|
|
821
858
|
|
|
822
|
-
rest_call = "http://#{mitm_rest_api}/websocket/history"
|
|
859
|
+
rest_call = "http://#{mitm_rest_api}/websocket/history?limit=#{limit}&offset=#{offset}"
|
|
823
860
|
|
|
824
861
|
sitemap = rest_browser.get(
|
|
825
862
|
rest_call,
|
|
@@ -881,6 +918,9 @@ module PWN
|
|
|
881
918
|
# Supported Method Parameters::
|
|
882
919
|
# json_sitemap = PWN::Plugins::BurpSuite.get_sitemap(
|
|
883
920
|
# burp_obj: 'required - burp_obj returned by #start method',
|
|
921
|
+
# limit: 'optional - number of sitemap entries to return (default: 200)',
|
|
922
|
+
# offset: 'optional - offset for pagination of sitemap entries (default: 0)',
|
|
923
|
+
# uri: 'optional - URI to filter sitemap entries (default: nil)',
|
|
884
924
|
# keyword: 'optional - keyword to filter sitemap entries (default: nil)',
|
|
885
925
|
# return_as: 'optional - :base64 or :har (defaults to :base64)'
|
|
886
926
|
# )
|
|
@@ -889,10 +929,19 @@ module PWN
|
|
|
889
929
|
burp_obj = opts[:burp_obj]
|
|
890
930
|
rest_browser = burp_obj[:rest_browser]
|
|
891
931
|
mitm_rest_api = burp_obj[:mitm_rest_api]
|
|
932
|
+
|
|
933
|
+
limit = opts[:limit] ||= 200
|
|
934
|
+
offset = opts[:offset] ||= 0
|
|
935
|
+
uri = opts[:uri]
|
|
892
936
|
keyword = opts[:keyword]
|
|
893
937
|
return_as = opts[:return_as] ||= :base64
|
|
894
938
|
|
|
895
|
-
|
|
939
|
+
if uri.nil?
|
|
940
|
+
rest_call = "http://#{mitm_rest_api}/sitemap?limit=#{limit}&offset=#{offset}"
|
|
941
|
+
else
|
|
942
|
+
base64_encoded_uri = Base64.strict_encode64(uri.to_s.scrub.strip.chomp)
|
|
943
|
+
rest_call = "http://#{mitm_rest_api}/sitemap/#{base64_encoded_uri}?limit=#{limit}&offset=#{offset}"
|
|
944
|
+
end
|
|
896
945
|
|
|
897
946
|
sitemap = rest_browser.get(
|
|
898
947
|
rest_call,
|
|
@@ -1614,7 +1663,7 @@ module PWN
|
|
|
1614
1663
|
target_port = URI.parse(target_url).port.to_i
|
|
1615
1664
|
active_scan_url_arr = []
|
|
1616
1665
|
|
|
1617
|
-
json_sitemap = get_sitemap(burp_obj: burp_obj,
|
|
1666
|
+
json_sitemap = get_sitemap(burp_obj: burp_obj, url: target_url)
|
|
1618
1667
|
json_sitemap.uniq.each do |site|
|
|
1619
1668
|
# Skip if the site does not have a request or http_service
|
|
1620
1669
|
next if site[:request].empty?
|
|
@@ -2061,6 +2110,9 @@ module PWN
|
|
|
2061
2110
|
|
|
2062
2111
|
json_proxy_history = #{self}.get_proxy_history(
|
|
2063
2112
|
burp_obj: 'required - burp_obj returned by #start method',
|
|
2113
|
+
limit: 'optional - integer to limit number of proxy history entries returned (default: 200)',
|
|
2114
|
+
offset: 'optional - integer to offset proxy history results (default: 0)',
|
|
2115
|
+
uri: 'optional - URI to filter proxy history results (default: nil)',
|
|
2064
2116
|
keyword: 'optional - keyword to filter proxy history results (default: nil)',
|
|
2065
2117
|
return_as: 'optional - :base64 or :har (defaults to :base64)'
|
|
2066
2118
|
)
|
|
@@ -2072,6 +2124,8 @@ module PWN
|
|
|
2072
2124
|
|
|
2073
2125
|
json_proxy_history = #{self}.get_websocket_history(
|
|
2074
2126
|
burp_obj: 'required - burp_obj returned by #start method',
|
|
2127
|
+
limit: 'optional - integer to limit number of websocket history entries returned (default: 200)',
|
|
2128
|
+
offset: 'optional - integer to offset websocket history results (default: 0)',
|
|
2075
2129
|
keyword: 'optional - keyword to filter websocket history results (default: nil)'
|
|
2076
2130
|
)
|
|
2077
2131
|
|
|
@@ -2082,6 +2136,9 @@ module PWN
|
|
|
2082
2136
|
|
|
2083
2137
|
json_sitemap = #{self}.get_sitemap(
|
|
2084
2138
|
burp_obj: 'required - burp_obj returned by #start method',
|
|
2139
|
+
limit: 'optional - integer to limit number of sitemap entries returned (default: 200)',
|
|
2140
|
+
offset: 'optional - integer to offset sitemap results (default: 0)',
|
|
2141
|
+
uri: 'optional - URI to filter sitemap results (default: nil)',
|
|
2085
2142
|
keyword: 'optional - keyword to filter sitemap results (default: nil)',
|
|
2086
2143
|
return_as: 'optional - :base64 or :har (defaults to :base64)'
|
|
2087
2144
|
)
|
data/lib/pwn/version.rb
CHANGED
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.552
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 0day Inc.
|
|
@@ -533,14 +533,14 @@ dependencies:
|
|
|
533
533
|
requirements:
|
|
534
534
|
- - '='
|
|
535
535
|
- !ruby/object:Gem::Version
|
|
536
|
-
version: 0.9.
|
|
536
|
+
version: 0.9.2
|
|
537
537
|
type: :runtime
|
|
538
538
|
prerelease: false
|
|
539
539
|
version_requirements: !ruby/object:Gem::Requirement
|
|
540
540
|
requirements:
|
|
541
541
|
- - '='
|
|
542
542
|
- !ruby/object:Gem::Version
|
|
543
|
-
version: 0.9.
|
|
543
|
+
version: 0.9.2
|
|
544
544
|
- !ruby/object:Gem::Dependency
|
|
545
545
|
name: meshtastic
|
|
546
546
|
requirement: !ruby/object:Gem::Requirement
|