pwn 0.4.512 → 0.4.515

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +17 -11
  3. data/Gemfile +10 -9
  4. data/README.md +2 -2
  5. data/bin/pwn_android_war_dialer +2 -1
  6. data/bin/pwn_fuzz_net_app_proto +4 -1
  7. data/bin/pwn_phone +124 -0
  8. data/bin/pwn_sast +7 -2
  9. data/lib/pwn/plugins/baresip.rb +632 -0
  10. data/lib/pwn/plugins/serial.rb +1 -1
  11. data/lib/pwn/plugins/sock.rb +32 -0
  12. data/lib/pwn/plugins/thread_pool.rb +19 -5
  13. data/lib/pwn/plugins.rb +1 -0
  14. data/lib/pwn/reports/phone.rb +294 -0
  15. data/lib/pwn/reports/sast.rb +4 -4
  16. data/lib/pwn/reports.rb +1 -0
  17. data/lib/pwn/sast/amqp_connect_as_guest.rb +7 -5
  18. data/lib/pwn/sast/apache_file_system_util_api.rb +7 -5
  19. data/lib/pwn/sast/aws.rb +7 -5
  20. data/lib/pwn/sast/banned_function_calls_c.rb +7 -5
  21. data/lib/pwn/sast/base64.rb +7 -5
  22. data/lib/pwn/sast/beef_hook.rb +7 -5
  23. data/lib/pwn/sast/cmd_execution_java.rb +7 -5
  24. data/lib/pwn/sast/cmd_execution_python.rb +7 -5
  25. data/lib/pwn/sast/cmd_execution_ruby.rb +7 -5
  26. data/lib/pwn/sast/cmd_execution_scala.rb +7 -5
  27. data/lib/pwn/sast/csrf.rb +7 -5
  28. data/lib/pwn/sast/deserial_java.rb +7 -5
  29. data/lib/pwn/sast/emoticon.rb +7 -5
  30. data/lib/pwn/sast/eval.rb +7 -5
  31. data/lib/pwn/sast/factory.rb +7 -5
  32. data/lib/pwn/sast/http_authorization_header.rb +7 -5
  33. data/lib/pwn/sast/inner_html.rb +7 -5
  34. data/lib/pwn/sast/keystore.rb +7 -5
  35. data/lib/pwn/sast/location_hash.rb +7 -5
  36. data/lib/pwn/sast/log4j.rb +7 -5
  37. data/lib/pwn/sast/logger.rb +7 -5
  38. data/lib/pwn/sast/outer_html.rb +7 -5
  39. data/lib/pwn/sast/password.rb +7 -5
  40. data/lib/pwn/sast/pom_version.rb +12 -8
  41. data/lib/pwn/sast/port.rb +7 -5
  42. data/lib/pwn/sast/private_key.rb +7 -5
  43. data/lib/pwn/sast/redirect.rb +7 -5
  44. data/lib/pwn/sast/redos.rb +7 -5
  45. data/lib/pwn/sast/shell.rb +7 -5
  46. data/lib/pwn/sast/signature.rb +7 -5
  47. data/lib/pwn/sast/sql.rb +7 -5
  48. data/lib/pwn/sast/ssl.rb +7 -5
  49. data/lib/pwn/sast/sudo.rb +7 -5
  50. data/lib/pwn/sast/task_tag.rb +7 -5
  51. data/lib/pwn/sast/throw_errors.rb +7 -5
  52. data/lib/pwn/sast/token.rb +7 -5
  53. data/lib/pwn/sast/version.rb +7 -5
  54. data/lib/pwn/sast/window_location_hash.rb +7 -5
  55. data/lib/pwn/version.rb +1 -1
  56. data/spec/lib/pwn/reports/phone_spec.rb +15 -0
  57. data/spec/lib/pwn/sast/amqp_connect_as_guest_spec.rb +3 -3
  58. data/spec/lib/pwn/sast/apache_file_system_util_api_spec.rb +3 -3
  59. data/spec/lib/pwn/sast/aws_spec.rb +3 -3
  60. data/spec/lib/pwn/sast/banned_function_calls_c_spec.rb +3 -3
  61. data/spec/lib/pwn/sast/base64_spec.rb +3 -3
  62. data/spec/lib/pwn/sast/beef_hook_spec.rb +3 -3
  63. data/spec/lib/pwn/sast/cmd_execution_java_spec.rb +3 -3
  64. data/spec/lib/pwn/sast/cmd_execution_python_spec.rb +3 -3
  65. data/spec/lib/pwn/sast/cmd_execution_ruby_spec.rb +3 -3
  66. data/spec/lib/pwn/sast/cmd_execution_scala_spec.rb +3 -3
  67. data/spec/lib/pwn/sast/csrf_spec.rb +3 -3
  68. data/spec/lib/pwn/sast/deserial_java_spec.rb +3 -3
  69. data/spec/lib/pwn/sast/emoticon_spec.rb +3 -3
  70. data/spec/lib/pwn/sast/eval_spec.rb +3 -3
  71. data/spec/lib/pwn/sast/factory_spec.rb +3 -3
  72. data/spec/lib/pwn/sast/http_authorization_header_spec.rb +3 -3
  73. data/spec/lib/pwn/sast/inner_html_spec.rb +3 -3
  74. data/spec/lib/pwn/sast/keystore_spec.rb +3 -3
  75. data/spec/lib/pwn/sast/location_hash_spec.rb +3 -3
  76. data/spec/lib/pwn/sast/log4j_spec.rb +3 -3
  77. data/spec/lib/pwn/sast/logger_spec.rb +3 -3
  78. data/spec/lib/pwn/sast/password_spec.rb +3 -3
  79. data/spec/lib/pwn/sast/pom_version_spec.rb +3 -3
  80. data/spec/lib/pwn/sast/port_spec.rb +3 -3
  81. data/spec/lib/pwn/sast/private_key_spec.rb +3 -3
  82. data/spec/lib/pwn/sast/redirect_spec.rb +3 -3
  83. data/spec/lib/pwn/sast/redos_spec.rb +3 -3
  84. data/spec/lib/pwn/sast/shell_spec.rb +3 -3
  85. data/spec/lib/pwn/sast/signature_spec.rb +3 -3
  86. data/spec/lib/pwn/sast/sql_spec.rb +3 -3
  87. data/spec/lib/pwn/sast/ssl_spec.rb +3 -3
  88. data/spec/lib/pwn/sast/sudo_spec.rb +3 -3
  89. data/spec/lib/pwn/sast/task_tag_spec.rb +3 -3
  90. data/spec/lib/pwn/sast/throw_errors_spec.rb +3 -3
  91. data/spec/lib/pwn/sast/token_spec.rb +3 -3
  92. data/spec/lib/pwn/sast/version_spec.rb +3 -3
  93. data/spec/lib/pwn/sast/window_location_hash_spec.rb +3 -3
  94. metadata +40 -21
@@ -7,7 +7,8 @@ module PWN
7
7
  # Supported Method Parameters::
8
8
  # PWN::Plugins::ThreadPool.fill(
9
9
  # enumerable_array: 'required array for proper thread pool assignment',
10
- # :max_threads: 'optional number of threads in the thread pool (defaults to 9)',
10
+ # max_threads: 'optional number of threads in the thread pool (defaults to 9)',
11
+ # seconds_between_thread_exec: 'optional - time to sleep between thread execution (defaults to 0)'
11
12
  # &block
12
13
  # )
13
14
  #
@@ -19,19 +20,32 @@ module PWN
19
20
 
20
21
  public_class_method def self.fill(opts = {})
21
22
  enumerable_array = opts[:enumerable_array]
22
- opts[:max_threads].nil? ? max_threads = 9 : max_threads = opts[:max_threads].to_i
23
+ max_threads = opts[:max_threads].to_i
24
+ max_threads = 9 if max_threads.zero?
25
+ # seconds_between_thread_exec = opts[:seconds_between_thread_exec].to_i
23
26
 
24
27
  puts "Initiating Thread Pool of #{max_threads} Worker Threads...."
25
28
  queue = SizedQueue.new(max_threads)
26
29
  threads = Array.new(max_threads) do
27
30
  Thread.new do
28
- until (this_thread = queue.pop) == :END
31
+ until (this_thread = queue.pop) == :POOL_EXHAUSTED
29
32
  yield this_thread
30
33
  end
31
34
  end
32
35
  end
33
- enumerable_array.uniq.sort.each { |this_thread| queue << this_thread }
34
- max_threads.times { queue << :END }
36
+
37
+ enumerable_array.uniq.sort.each do |this_thread|
38
+ queue << this_thread
39
+ end
40
+
41
+ max_threads.times do
42
+ queue << :POOL_EXHAUSTED
43
+ end
44
+
45
+ # threads.each do |thread|
46
+ # sleep seconds_between_thread_exec if seconds_between_thread_exec.positive?
47
+ # thread.join
48
+ # end
35
49
  threads.each(&:join)
36
50
  rescue Interrupt
37
51
  puts "\nGoodbye."
data/lib/pwn/plugins.rb CHANGED
@@ -8,6 +8,7 @@ module PWN
8
8
  autoload :Android, 'pwn/plugins/android'
9
9
  autoload :AnsibleVault, 'pwn/plugins/ansible_vault'
10
10
  autoload :AuthenticationHelper, 'pwn/plugins/authentication_helper'
11
+ autoload :BareSIP, 'pwn/plugins/baresip'
11
12
  autoload :BasicAuth, 'pwn/plugins/basic_auth'
12
13
  autoload :BeEF, 'pwn/plugins/beef'
13
14
  autoload :BurpSuite, 'pwn/plugins/burp_suite'
@@ -0,0 +1,294 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'json'
4
+
5
+ module PWN
6
+ module Reports
7
+ # This plugin generates the War Dialing results produced by pwn_phone.
8
+ module Phone
9
+ # Supported Method Parameters::
10
+ # PWN::Reports::Phone.generate(
11
+ # dir_path: dir_path,
12
+ # results_hash: results_hash
13
+ # )
14
+
15
+ public_class_method def self.generate(opts = {})
16
+ dir_path = opts[:dir_path].to_s if File.directory?(opts[:dir_path].to_s)
17
+ raise "PWN Error: Invalid Directory #{dir_path}" if dir_path.nil?
18
+
19
+ results_hash = opts[:results_hash]
20
+
21
+ File.write(
22
+ "#{dir_path}/pwn_phone.json",
23
+ JSON.pretty_generate(results_hash)
24
+ )
25
+
26
+ html_report = %q{<!DOCTYPE HTML>
27
+ <html>
28
+ <head>
29
+ <!-- favicon.ico from https://0dayinc.com -->
30
+ <link rel="icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABIXAAASFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIkAAACJAgAAiSYAAIlbAACJcAAAiX0AAIlmAACJLQAAiQQAAIkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIkAAACJAAAAiS0AAIluAACJdwAAiXgAAIl+AACJeAAAiXQAAIk5AACJAQAAiQAAAAAAAAAAAAAAAAAAAAAAAACJAAAAiRgAAIlvAACJbQAAiXcAAIl7AACJcwAAiXEAAIl1AACJZwAAiR4AAIkAAACJAAAAAAAAAAAAAACJAAAAiQAAAIlEAACJfAAAiXIAAIlyAACJewAAiX4AAIl5AACJdQAAiXcAAIlIAACJAAAAiQAAAAAAAAAAAAAAiQAAAIkJAACJWQAAiXUAAIl9AACJdAAAiYYAAImLAACJdAAAiXkAAImNAACJfQAAiQwAAIkAAAAAAAAAAAAAAIkAAACJFQAAiWsAAIl2AACJfAAAiYIAAImCAACJfwAAiXYAAIl5AACJiQAAiYYAAIkWAACJAAAAAAAAAAAAAACJAAAAiSAAAIl2AACJeQAAiXkAAIl1AACJfwAAiYEAAIl8AACJbwAAiXoAAImBAACJFgAAiQAAAAAAAAAAAAAAiQAAAIkpAACJeAAAiXMAAIl3AACJeQAAiXUAAImAAACJfwAAiWYAAIl4AACJfwAAiR4AAIkAAAAAAAAAAAAAAIkAAACJKAAAiXkAAIlyAACJdQAAiXQAAIluAACJfAAAiXwAAIl3AACJewAAiXwAAIkvAACJAAAAAAAAAAAAAACJAAAAiSMAAIl4AACJdgAAiXsAAIl1AACJcQAAiXcAAIl6AACJeQAAiXoAAIl0AACJKQAAiQAAAAAAAAAAAAAAiQAAAIkXAACJaAAAiXgAAIl3AACJfAAAiXkAAIl3AACJZwAAiXcAAIl0AACJagAAiSgAAIkAAAAAAAAAAAAAAIkAAACJDgAAiV4AAIl5AACJbwAAiW4AAIl9AACJewAAiXcAAIl6AACJfQAAiW8AAIkWAACJAAAAAAAAAAAAAACJAAAAiQ0AAIllAACJewAAiXYAAIl4AACJdQAAiXUAAIl4AACJbQAAiXkAAIlNAACJAwAAiQAAAAAAAAAAAAAAiQAAAIkCAACJPQAAiXMAAIl2AACJeAAAiWgAAIlsAACJfQAAiXsAAIlwAACJGQAAiQAAAIkAAAAAAAAAAAAAAAAAAACJAAAAiQcAAIk4AACJXAAAiXoAAIl7AACJfAAAiYAAAIlsAACJJwAAiQMAAIkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIkAAACJAQAAiSsAAIluAACJewAAiXwAAIluAACJKgAAiQAAAIkAAAAAAAAAAAAAAAAA8A8AAPAHAADgBwAA4AcAAMADAADAAwAAwAMAAMADAADAAwAAwAMAAMADAADAAwAAwAMAAMAHAADgBwAA8B8AAA==" type="image/x-icon" />
31
+ <style>
32
+ body {
33
+ font-family: Verdana, Geneva, sans-serif;
34
+ font-size: 11px;
35
+ background-color: #FFFFFF;
36
+ color: #084B8A !important;
37
+ }
38
+
39
+ a:link {
40
+ color: #0174DF;
41
+ text-decoration: none;
42
+ }
43
+
44
+ a:visited {
45
+ color: #B40404;
46
+ text-decoration: none;
47
+ }
48
+
49
+ a:hover {
50
+ color: #01A9DB;
51
+ text-decoration: underline;
52
+ }
53
+
54
+ a:active {
55
+ color: #610B5E;
56
+ text-decoration: underline;
57
+ }
58
+
59
+ table {
60
+ width: 100%;
61
+ border-spacing:0px;
62
+ }
63
+
64
+ table.squish {
65
+ table-layout: fixed;
66
+ }
67
+
68
+ td {
69
+ vertical-align: top;
70
+ word-wrap: break-word !important;
71
+ }
72
+
73
+ .highlighted {
74
+ background-color: #F2F5A9 !important;
75
+ }
76
+ </style>
77
+
78
+ <!-- jQuery, DataTables, & FancyApps -->
79
+ <script type="text/javascript" src="//code.jquery.com/jquery-3.6.0.min.js"></script>
80
+
81
+ <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/v/dt/dt-1.11.4/b-2.2.2/b-colvis-2.2.2/b-html5-2.2.2/b-print-2.2.2/cr-1.5.5/fc-4.0.1/fh-3.2.1/kt-2.6.4/r-2.2.9/rg-1.1.4/rr-1.2.8/sc-2.0.5/sp-1.4.0/sl-1.3.4/datatables.min.css"/>
82
+
83
+ <script type="text/javascript" src="//cdn.datatables.net/v/dt/dt-1.11.4/b-2.2.2/b-colvis-2.2.2/b-html5-2.2.2/b-print-2.2.2/cr-1.5.5/fc-4.0.1/fh-3.2.1/kt-2.6.4/r-2.2.9/rg-1.1.4/rr-1.2.8/sc-2.0.5/sp-1.4.0/sl-1.3.4/datatables.min.js"></script>
84
+
85
+ <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.css" type="text/css" />
86
+
87
+ <script type="text/javascript" src="//cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.umd.js"></script>
88
+ </head>
89
+
90
+ <body id="pwn_body">
91
+
92
+ <h1 style="display:inline">
93
+ <a href="https://github.com/0dayinc/pwn/tree/master">~ pwn phone</a>
94
+ </h1><br /><br />
95
+ <h2 id="report_name"></h2><br />
96
+
97
+ <div><button type="button" id="button">Rows Selected</button></div><br />
98
+ <div>
99
+ <b>Toggle Column(s):</b>&nbsp;
100
+ <a class="toggle-vis" data-column="1" href="#">Call Started</a>&nbsp;|&nbsp;
101
+ <a class="toggle-vis" data-column="2" href="#">Source #</a>&nbsp;|&nbsp;
102
+ <a class="toggle-vis" data-column="3" href="#">Source # Rules</a>&nbsp;|&nbsp;
103
+ <a class="toggle-vis" data-column="4" href="#">Target #</a>&nbsp;|&nbsp;
104
+ <a class="toggle-vis" data-column="5" href="#">Seconds Recorded</a>&nbsp;|&nbsp;
105
+ <a class="toggle-vis" data-column="6" href="#">Call Stopped</a>
106
+ <a class="toggle-vis" data-column="7" href="#">Reason</a>
107
+ <a class="toggle-vis" data-column="8" href="#">Recording</a>&nbsp;|&nbsp;
108
+ <a class="toggle-vis" data-column="9" href="#">Spectrogram</a>&nbsp;|&nbsp;
109
+ <a class="toggle-vis" data-column="10" href="#">Waveform</a>
110
+ </div>
111
+ <br /><br />
112
+
113
+ <div>
114
+ <table id="pwn_phone_results" class="display" cellspacing="0">
115
+ <thead>
116
+ <tr>
117
+ <th>#</th>
118
+ <th>Call Started</th>
119
+ <th>Source #</th>
120
+ <th>Source # Rules</th>
121
+ <th>Target #</th>
122
+ <th>Seconds Recorded</th>
123
+ <th>Call Stopped</th>
124
+ <th>Reason Stopped</th>
125
+ <th>Recording</th>
126
+ <th>Spectrogram</th>
127
+ <th>Waveform</th>
128
+ </tr>
129
+ </thead>
130
+ <!-- DataTables <tbody> -->
131
+ </table>
132
+ </div>
133
+
134
+ <script>
135
+ var htmlEntityEncode = $.fn.dataTable.render.text().display;
136
+ var line_entry_uri = "";
137
+ $(document).ready(function() {
138
+ var oldStart = 0;
139
+ var table = $('#pwn_phone_results').DataTable( {
140
+ "paging": true,
141
+ "pagingType": "full_numbers",
142
+ "fnDrawCallback": function ( oSettings ) {
143
+ /* Need to redo the counters if filtered or sorted */
144
+ if ( oSettings.bSorted || oSettings.bFiltered ) {
145
+ for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ ) {
146
+ $('td:eq(0)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
147
+ }
148
+ }
149
+ // Jump to top when utilizing pagination
150
+ if ( oSettings._iDisplayStart != oldStart ) {
151
+ var targetOffset = $('#pwn_body').offset().top;
152
+ $('html,body').animate({scrollTop: targetOffset}, 500);
153
+ oldStart = oSettings._iDisplayStart;
154
+ }
155
+ // Select individual lines in a row
156
+ $('#multi_line_select tbody').on('click', 'tr', function () {
157
+ $(this).toggleClass('highlighted');
158
+ if ($('#multi_line_select tr.highlighted').length > 0) {
159
+ $('#multi_line_select tr td button').attr('disabled', 'disabled');
160
+ // Remove multi-line bug button
161
+ } else {
162
+ $('#multi_line_select tr td button').removeAttr('disabled');
163
+ // Add multi-line bug button
164
+ }
165
+ });
166
+ },
167
+ "ajax": "pwn_phone.json",
168
+ //"deferRender": true,
169
+ "dom": "fplitfpliS",
170
+ "autoWidth": false,
171
+ "columns": [
172
+ { "data": null },
173
+ {
174
+ "data": "call_started",
175
+ "render": $.fn.dataTable.render.text()
176
+ },
177
+ {
178
+ "data": "src_num",
179
+ "render": $.fn.dataTable.render.text()
180
+ },
181
+ {
182
+ "data": "src_num_rules",
183
+ "render": $.fn.dataTable.render.text()
184
+ },
185
+ {
186
+ "data": "target_num",
187
+ "render": $.fn.dataTable.render.text()
188
+ },
189
+ {
190
+ "data": "seconds_recorded",
191
+ "render": $.fn.dataTable.render.text()
192
+ },
193
+ {
194
+ "data": "call_stopped",
195
+ "render": $.fn.dataTable.render.text()
196
+ },
197
+ {
198
+ "data": "reason",
199
+ "render": $.fn.dataTable.render.text()
200
+ },
201
+ {
202
+ "data": "recording",
203
+ "render": function (data, type, row, meta) {
204
+ var wav = htmlEntityEncode(data);
205
+ if (wav == '--') {
206
+ return wav;
207
+ } else {
208
+ return '<audio controls><source src="' + wav +'" type="audio/wav"></audio>';
209
+ }
210
+ }
211
+ },
212
+ {
213
+ "data": "spectrogram",
214
+ "render": function (data, type, row, meta) {
215
+ var spt = htmlEntityEncode(data);
216
+ if (spt == '--') {
217
+ return spt;
218
+ } else {
219
+ return '<a data-fancybox data-src="' + spt + '" data-caption="' + spt + '"><img src="' + data +'" target="_blank" style="width:150px; height:150px;"/></a>';
220
+ }
221
+ }
222
+ },
223
+ {
224
+ "data": "waveform",
225
+ "render": function (data, type, row, meta) {
226
+ var wfm = htmlEntityEncode(data);
227
+ if (wfm == '--') {
228
+ return wfm;
229
+ } else {
230
+ return '<a data-fancybox data-src="' + wfm + '" data-caption="' + wfm + '"><img src="' + data +'" target="_blank" style="width:150px; height:150px;"/></a>';
231
+ }
232
+ }
233
+ }
234
+ ]
235
+ });
236
+ // Toggle Columns
237
+ $('a.toggle-vis').on('click', function (e) {
238
+ e.preventDefault();
239
+
240
+ // Get the column API object
241
+ var column = table.column( $(this).attr('data-column') );
242
+
243
+ // Toggle the visibility
244
+ column.visible( ! column.visible() );
245
+ });
246
+
247
+ // TODO: Open bug for highlighted rows ;)
248
+ $('#button').click( function () {
249
+ alert($('#multi_line_select tr.highlighted').length +' row(s) highlighted');
250
+ });
251
+ });
252
+
253
+ function multi_line_select() {
254
+ // Select all lines in a row
255
+ //$('#pwn_phone_results tbody').on('click', 'tr', function () {
256
+ // $(this).children('td').children('#multi_line_select').children('tbody').children('tr').toggleClass('highlighted');
257
+ //});
258
+
259
+ }
260
+ </script>
261
+ </body>
262
+ </html>
263
+ }
264
+
265
+ File.open("#{dir_path}/pwn_phone.html", 'w') do |f|
266
+ f.print(html_report)
267
+ end
268
+ rescue StandardError => e
269
+ raise e
270
+ end
271
+
272
+ # Author(s):: 0day Inc. <request.pentest@0dayinc.com>
273
+
274
+ public_class_method def self.authors
275
+ "AUTHOR(S):
276
+ 0day Inc. <request.pentest@0dayinc.com>
277
+ "
278
+ end
279
+
280
+ # Display Usage for this Module
281
+
282
+ public_class_method def self.help
283
+ puts "USAGE:
284
+ #{self}.generate(
285
+ dir_path: dir_path,
286
+ results_hash: results_hash
287
+ )
288
+
289
+ #{self}.authors
290
+ "
291
+ end
292
+ end
293
+ end
294
+ end
@@ -101,7 +101,7 @@ module PWN
101
101
  <div>
102
102
  <b>Toggle Column(s):</b>&nbsp;
103
103
  <a class="toggle-vis" data-column="1" href="#">Timestamp</a>&nbsp;|&nbsp;
104
- <a class="toggle-vis" data-column="2" href="#">Test Case / Security Requirements</a>&nbsp;|&nbsp;
104
+ <a class="toggle-vis" data-column="2" href="#">Test Case / Security References</a>&nbsp;|&nbsp;
105
105
  <a class="toggle-vis" data-column="3" href="#">Path</a>&nbsp;|&nbsp;
106
106
  <a class="toggle-vis" data-column="4" href="#">Line#, Formatted Content, &amp; Last Committed By</a>&nbsp;|&nbsp;
107
107
  <a class="toggle-vis" data-column="5" href="#">Raw Content</a>&nbsp;|&nbsp;
@@ -115,7 +115,7 @@ module PWN
115
115
  <tr>
116
116
  <th>#</th>
117
117
  <th>Timestamp</th>
118
- <th>Test Case / Security Requirements</th>
118
+ <th>Test Case / Security References</th>
119
119
  <th>Path</th>
120
120
  <th>Line#, Formatted Content, &amp; Last Committed By</th>
121
121
  <th>Raw Content</th>
@@ -170,7 +170,7 @@ module PWN
170
170
  "render": $.fn.dataTable.render.text()
171
171
  },
172
172
  {
173
- "data": "security_requirements",
173
+ "data": "security_references",
174
174
  "render": function (data, type, row, meta) {
175
175
  var sast_dirname = data['sast_module'].split('::')[0].toLowerCase() + '/' + data['sast_module'].split('::')[1].toLowerCase();
176
176
  var sast_module = data['sast_module'].split('::')[2];
@@ -203,7 +203,7 @@ module PWN
203
203
 
204
204
  var bug_comment = 'Timestamp: ' + row.timestamp + '\n' +
205
205
  'Test Case: http://' + window.location.hostname + ':8808/doc_root/pwn-0.1.0/' +
206
- row.security_requirements['sast_module'].replace(/::/g, "/") + '\n' +
206
+ row.security_references['sast_module'].replace(/::/g, "/") + '\n' +
207
207
  'Source Code Impacted: ' + $("<div/>").html(filename_link).text() + '\n\n' +
208
208
  'Test Case Request:\n' +
209
209
  $("<div/>").html(row.test_case_filter.replace(/\s{2,}/g, " ")).text() + '\n\n' +
data/lib/pwn/reports.rb CHANGED
@@ -9,6 +9,7 @@ module PWN
9
9
  # autoload :JSON, 'pwn/reports/json'
10
10
  # autoload :PDF, 'pwn/reports/pdf'
11
11
  autoload :Fuzz, 'pwn/reports/fuzz'
12
+ autoload :Phone, 'pwn/reports/phone'
12
13
  autoload :SAST, 'pwn/reports/sast'
13
14
  # autoload :XML, 'pwn/reports/xml'
14
15
 
@@ -49,7 +49,7 @@ module PWN
49
49
 
50
50
  hash_line = {
51
51
  timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
52
- security_requirements: security_requirements,
52
+ security_references: security_references,
53
53
  filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
54
54
  line_no_and_contents: '',
55
55
  raw_content: str,
@@ -78,9 +78,11 @@ module PWN
78
78
  else
79
79
  author = 'N/A'
80
80
  end
81
- hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(line_no: line_no,
82
- contents: contents,
83
- author: author)
81
+ hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
82
+ line_no: line_no,
83
+ contents: contents,
84
+ author: author
85
+ )
84
86
  current_count += 2
85
87
  end
86
88
  result_arr.push(hash_line)
@@ -104,7 +106,7 @@ module PWN
104
106
  # to PWN Exploit & Static Code Anti-Pattern Matching Modules to
105
107
  # Determine the level of Testing Coverage w/ PWN.
106
108
 
107
- public_class_method def self.security_requirements
109
+ public_class_method def self.security_references
108
110
  {
109
111
  sast_module: self,
110
112
  section: 'ACCOUNT MANAGEMENT',
@@ -48,7 +48,7 @@ module PWN
48
48
 
49
49
  hash_line = {
50
50
  timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
51
- security_requirements: security_requirements,
51
+ security_references: security_references,
52
52
  filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
53
53
  line_no_and_contents: '',
54
54
  raw_content: str,
@@ -78,9 +78,11 @@ module PWN
78
78
  else
79
79
  author = 'N/A'
80
80
  end
81
- hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(line_no: line_no,
82
- contents: contents,
83
- author: author)
81
+ hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
82
+ line_no: line_no,
83
+ contents: contents,
84
+ author: author
85
+ )
84
86
 
85
87
  current_count += 2
86
88
  end
@@ -105,7 +107,7 @@ module PWN
105
107
  # to PWN Exploit & Static Code Anti-Pattern Matching Modules to
106
108
  # Determine the level of Testing Coverage w/ PWN.
107
109
 
108
- public_class_method def self.security_requirements
110
+ public_class_method def self.security_references
109
111
  {
110
112
  sast_module: self,
111
113
  section: 'INFORMATION INPUT VALIDATION',
data/lib/pwn/sast/aws.rb CHANGED
@@ -49,7 +49,7 @@ module PWN
49
49
 
50
50
  hash_line = {
51
51
  timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
52
- security_requirements: security_requirements,
52
+ security_references: security_references,
53
53
  filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
54
54
  line_no_and_contents: '',
55
55
  raw_content: str,
@@ -79,9 +79,11 @@ module PWN
79
79
  else
80
80
  author = 'N/A'
81
81
  end
82
- hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(line_no: line_no,
83
- contents: contents,
84
- author: author)
82
+ hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
83
+ line_no: line_no,
84
+ contents: contents,
85
+ author: author
86
+ )
85
87
 
86
88
  current_count += 2
87
89
  end
@@ -106,7 +108,7 @@ module PWN
106
108
  # to PWN Exploit & Static Code Anti-Pattern Matching Modules to
107
109
  # Determine the level of Testing Coverage w/ PWN.
108
110
 
109
- public_class_method def self.security_requirements
111
+ public_class_method def self.security_references
110
112
  {
111
113
  sast_module: self,
112
114
  section: 'TRANSMISSION CONFIDENTIALITY AND INTEGRITY',
@@ -176,7 +176,7 @@ module PWN
176
176
 
177
177
  hash_line = {
178
178
  timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
179
- security_requirements: security_requirements,
179
+ security_references: security_references,
180
180
  filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
181
181
  line_no_and_contents: '',
182
182
  raw_content: str,
@@ -206,9 +206,11 @@ module PWN
206
206
  else
207
207
  author = 'N/A'
208
208
  end
209
- hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(line_no: line_no,
210
- contents: contents,
211
- author: author)
209
+ hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
210
+ line_no: line_no,
211
+ contents: contents,
212
+ author: author
213
+ )
212
214
 
213
215
  current_count += 2
214
216
  end
@@ -233,7 +235,7 @@ module PWN
233
235
  # to PWN Exploit & Static Code Anti-Pattern Matching Modules to
234
236
  # Determine the level of Testing Coverage w/ PWN.
235
237
 
236
- public_class_method def self.security_requirements
238
+ public_class_method def self.security_references
237
239
  {
238
240
  sast_module: self,
239
241
  section: 'INFORMATION INPUT VALIDATION',
@@ -50,7 +50,7 @@ module PWN
50
50
 
51
51
  hash_line = {
52
52
  timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
53
- security_requirements: security_requirements,
53
+ security_references: security_references,
54
54
  filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
55
55
  line_no_and_contents: '',
56
56
  raw_content: str,
@@ -80,9 +80,11 @@ module PWN
80
80
  else
81
81
  author = 'N/A'
82
82
  end
83
- hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(line_no: line_no,
84
- contents: contents,
85
- author: author)
83
+ hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
84
+ line_no: line_no,
85
+ contents: contents,
86
+ author: author
87
+ )
86
88
 
87
89
  current_count += 2
88
90
  end
@@ -104,7 +106,7 @@ module PWN
104
106
 
105
107
  # Used to dictate Security Control Requirements for a Given SAST module.
106
108
 
107
- public_class_method def self.security_requirements
109
+ public_class_method def self.security_references
108
110
  {
109
111
  sast_module: self,
110
112
  section: 'PROTECTION OF INFORMATION AT REST',
@@ -44,7 +44,7 @@ module PWN
44
44
 
45
45
  hash_line = {
46
46
  timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
47
- security_requirements: security_requirements,
47
+ security_references: security_references,
48
48
  filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
49
49
  line_no_and_contents: '',
50
50
  raw_content: str,
@@ -74,9 +74,11 @@ module PWN
74
74
  else
75
75
  author = 'N/A'
76
76
  end
77
- hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(line_no: line_no,
78
- contents: contents,
79
- author: author)
77
+ hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
78
+ line_no: line_no,
79
+ contents: contents,
80
+ author: author
81
+ )
80
82
 
81
83
  current_count += 2
82
84
  end
@@ -101,7 +103,7 @@ module PWN
101
103
  # to PWN Exploit & Static Code Anti-Pattern Matching Modules to
102
104
  # Determine the level of Testing Coverage w/ PWN.
103
105
 
104
- public_class_method def self.security_requirements
106
+ public_class_method def self.security_references
105
107
  {
106
108
  sast_module: self,
107
109
  section: 'MALICIOUS CODE PROTECTION',
@@ -49,7 +49,7 @@ module PWN
49
49
 
50
50
  hash_line = {
51
51
  timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
52
- security_requirements: security_requirements,
52
+ security_references: security_references,
53
53
  filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
54
54
  line_no_and_contents: '',
55
55
  raw_content: str,
@@ -79,9 +79,11 @@ module PWN
79
79
  else
80
80
  author = 'N/A'
81
81
  end
82
- hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(line_no: line_no,
83
- contents: contents,
84
- author: author)
82
+ hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
83
+ line_no: line_no,
84
+ contents: contents,
85
+ author: author
86
+ )
85
87
 
86
88
  current_count += 2
87
89
  end
@@ -106,7 +108,7 @@ module PWN
106
108
  # to PWN Exploit & Static Code Anti-Pattern Matching Modules to
107
109
  # Determine the level of Testing Coverage w/ PWN.
108
110
 
109
- public_class_method def self.security_requirements
111
+ public_class_method def self.security_references
110
112
  {
111
113
  sast_module: self,
112
114
  section: 'INFORMATION INPUT VALIDATION',
@@ -51,7 +51,7 @@ module PWN
51
51
 
52
52
  hash_line = {
53
53
  timestamp: Time.now.strftime('%Y-%m-%d %H:%M:%S.%9N %z').to_s,
54
- security_requirements: security_requirements,
54
+ security_references: security_references,
55
55
  filename: { git_repo_root_uri: git_repo_root_uri, entry: entry },
56
56
  line_no_and_contents: '',
57
57
  raw_content: str,
@@ -81,9 +81,11 @@ module PWN
81
81
  else
82
82
  author = 'N/A'
83
83
  end
84
- hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(line_no: line_no,
85
- contents: contents,
86
- author: author)
84
+ hash_line[:line_no_and_contents] = line_no_and_contents_arr.push(
85
+ line_no: line_no,
86
+ contents: contents,
87
+ author: author
88
+ )
87
89
 
88
90
  current_count += 2
89
91
  end
@@ -108,7 +110,7 @@ module PWN
108
110
  # to PWN Exploit & Static Code Anti-Pattern Matching Modules to
109
111
  # Determine the level of Testing Coverage w/ PWN.
110
112
 
111
- public_class_method def self.security_requirements
113
+ public_class_method def self.security_references
112
114
  {
113
115
  sast_module: self,
114
116
  section: 'INFORMATION INPUT VALIDATION',