watobo 0.9.8.677

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.
Files changed (260) hide show
  1. data/bin/watobo_gui.rb +39 -0
  2. data/certificates/cert.pem +19 -0
  3. data/certificates/privkey.pem +15 -0
  4. data/certificates/watobo_dh.key +5 -0
  5. data/config/datastore.yml +5 -0
  6. data/config/forwarding_proxy.yml +12 -0
  7. data/config/general.yml +4 -0
  8. data/config/gui.yml +23 -0
  9. data/config/interceptor.yml +16 -0
  10. data/config/scan_policy.yml +13 -0
  11. data/config/scanner.yml +34 -0
  12. data/icons/Add.ico +0 -0
  13. data/icons/Add_24x24.ico +0 -0
  14. data/icons/Bandwidth.ico +0 -0
  15. data/icons/Bandwidth_24x24.ico +0 -0
  16. data/icons/Mr. Bomb.ico +0 -0
  17. data/icons/Mr. Bomb_16x16.ico +0 -0
  18. data/icons/Mr. Bomb_24x24.ico +0 -0
  19. data/icons/Orange Ball.ico +0 -0
  20. data/icons/Orange Ball_16x16.ico +0 -0
  21. data/icons/Orange Ball_24x24.ico +0 -0
  22. data/icons/Pause.ico +0 -0
  23. data/icons/Play.ico +0 -0
  24. data/icons/Play_24x24.ico +0 -0
  25. data/icons/Red Ball.ico +0 -0
  26. data/icons/Red Ball_16x16.ico +0 -0
  27. data/icons/Red Ball_24x24.ico +0 -0
  28. data/icons/Run.ico +0 -0
  29. data/icons/Stop.ico +0 -0
  30. data/icons/Stop_24x24.ico +0 -0
  31. data/icons/Terminal.ico +0 -0
  32. data/icons/Transfer.ico +0 -0
  33. data/icons/Transfer_16x16.ico +0 -0
  34. data/icons/User.ico +0 -0
  35. data/icons/User_16x16.ico +0 -0
  36. data/icons/User_24x24.ico +0 -0
  37. data/icons/Web Browser.ico +0 -0
  38. data/icons/Web Browser_16x16.ico +0 -0
  39. data/icons/Write Document.ico +0 -0
  40. data/icons/Yellow Ball.ico +0 -0
  41. data/icons/Yellow Ball_16x16.ico +0 -0
  42. data/icons/Yellow Ball_24x24.ico +0 -0
  43. data/icons/advanced.ico +0 -0
  44. data/icons/advanced_16x16.ico +0 -0
  45. data/icons/advanced_24x24.ico +0 -0
  46. data/icons/applications.ico +0 -0
  47. data/icons/applications_16x16.ico +0 -0
  48. data/icons/applications_24x24.ico +0 -0
  49. data/icons/browser_16x16.ico +0 -0
  50. data/icons/browser_24x24.ico +0 -0
  51. data/icons/burn.ico +0 -0
  52. data/icons/burn_16x16.ico +0 -0
  53. data/icons/burn_24x24.ico +0 -0
  54. data/icons/calculator.ico +0 -0
  55. data/icons/calculator_24x24.ico +0 -0
  56. data/icons/cb_checked.ico +0 -0
  57. data/icons/cb_checked_orange.ico +0 -0
  58. data/icons/cb_unchecked.ico +0 -0
  59. data/icons/coin_24x24.ico +0 -0
  60. data/icons/conversation.ico +0 -0
  61. data/icons/conversation_24x24.ico +0 -0
  62. data/icons/engine.ico +0 -0
  63. data/icons/filter.ico +0 -0
  64. data/icons/folder.ico +0 -0
  65. data/icons/folder_16x16.ico +0 -0
  66. data/icons/fuzzer_16x16.ico +0 -0
  67. data/icons/fuzzer_24x24.ico +0 -0
  68. data/icons/go-down_16x16.png +0 -0
  69. data/icons/go-up_16x16.png +0 -0
  70. data/icons/help.ico +0 -0
  71. data/icons/help_16x16.ico +0 -0
  72. data/icons/help_24x24.ico +0 -0
  73. data/icons/iChat.ico +0 -0
  74. data/icons/iChat_16x16.ico +0 -0
  75. data/icons/iChat_24x24.ico +0 -0
  76. data/icons/icons.txt +3 -0
  77. data/icons/info.ico +0 -0
  78. data/icons/info_16x16.ico +0 -0
  79. data/icons/info_24x24.ico +0 -0
  80. data/icons/interceptor_24x24.ico +0 -0
  81. data/icons/lock.ico +0 -0
  82. data/icons/lock_12x12.ico +0 -0
  83. data/icons/lock_16x16.ico +0 -0
  84. data/icons/monitor.ico +0 -0
  85. data/icons/plugin.ico +0 -0
  86. data/icons/plugin_24x24.ico +0 -0
  87. data/icons/scan_16x16.png +0 -0
  88. data/icons/send.ico +0 -0
  89. data/icons/server.ico +0 -0
  90. data/icons/server_16x16.ico +0 -0
  91. data/icons/siberas_logo_x24.gif +0 -0
  92. data/icons/tag_blue_32x32.ico +0 -0
  93. data/icons/watobo-48x48.png +0 -0
  94. data/icons/watobo-logo.png +0 -0
  95. data/icons/watobo.ico +0 -0
  96. data/lib/watobo/adapters/data_store.rb +38 -0
  97. data/lib/watobo/adapters/file/file_store.rb +211 -0
  98. data/lib/watobo/adapters/session_store.rb +27 -0
  99. data/lib/watobo/adapters.rb +26 -0
  100. data/lib/watobo/config.rb +143 -0
  101. data/lib/watobo/constants.rb +92 -0
  102. data/lib/watobo/core/active_check.rb +404 -0
  103. data/lib/watobo/core/cookie.rb +69 -0
  104. data/lib/watobo/core/fuzz_gen.rb +160 -0
  105. data/lib/watobo/core/http_socket.rb +142 -0
  106. data/lib/watobo/core/interceptor.rb +729 -0
  107. data/lib/watobo/core/passive_check.rb +141 -0
  108. data/lib/watobo/core/project.rb +1058 -0
  109. data/lib/watobo/core/scanner.rb +396 -0
  110. data/lib/watobo/core/session.rb +1320 -0
  111. data/lib/watobo/core/simple_ca.rb +393 -0
  112. data/lib/watobo/core.rb +34 -0
  113. data/lib/watobo/defaults.rb +40 -0
  114. data/lib/watobo/external/diff/lcs/array.rb +42 -0
  115. data/lib/watobo/external/diff/lcs/block.rb +72 -0
  116. data/lib/watobo/external/diff/lcs/callbacks.rb +343 -0
  117. data/lib/watobo/external/diff/lcs/change.rb +190 -0
  118. data/lib/watobo/external/diff/lcs/hunk.rb +279 -0
  119. data/lib/watobo/external/diff/lcs/ldiff.rb +247 -0
  120. data/lib/watobo/external/diff/lcs/string.rb +40 -0
  121. data/lib/watobo/external/diff/lcs.rb +1124 -0
  122. data/lib/watobo/external/ntlm/ntlm.rb +797 -0
  123. data/lib/watobo/externals.rb +28 -0
  124. data/lib/watobo/framework/create_project.rb +55 -0
  125. data/lib/watobo/framework/init.rb +149 -0
  126. data/lib/watobo/framework/init_modules.rb +116 -0
  127. data/lib/watobo/framework/license_text.rb +50 -0
  128. data/lib/watobo/framework.rb +26 -0
  129. data/lib/watobo/gui/about_watobo.rb +68 -0
  130. data/lib/watobo/gui/browser_preview.rb +460 -0
  131. data/lib/watobo/gui/certificate_dialog.rb +132 -0
  132. data/lib/watobo/gui/chat_diff.rb +415 -0
  133. data/lib/watobo/gui/chatviewer_frame.rb +427 -0
  134. data/lib/watobo/gui/checkboxtree.rb +221 -0
  135. data/lib/watobo/gui/checks_policy_frame.rb +123 -0
  136. data/lib/watobo/gui/client_cert_dialog.rb +227 -0
  137. data/lib/watobo/gui/confirm_scan_dialog.rb +67 -0
  138. data/lib/watobo/gui/conversation_table.rb +386 -0
  139. data/lib/watobo/gui/conversation_table_ctrl.rb +175 -0
  140. data/lib/watobo/gui/csrf_token_dialog.rb +446 -0
  141. data/lib/watobo/gui/dashboard.rb +341 -0
  142. data/lib/watobo/gui/define_scope_frame.rb +380 -0
  143. data/lib/watobo/gui/edit_comment.rb +70 -0
  144. data/lib/watobo/gui/edit_scope_dialog.rb +69 -0
  145. data/lib/watobo/gui/finding_info.rb +212 -0
  146. data/lib/watobo/gui/findings_tree.rb +459 -0
  147. data/lib/watobo/gui/full_scan_dialog.rb +269 -0
  148. data/lib/watobo/gui/fuzzer_gui.rb +1522 -0
  149. data/lib/watobo/gui/hex_viewer.rb +106 -0
  150. data/lib/watobo/gui/interceptor_gui.rb +994 -0
  151. data/lib/watobo/gui/interceptor_settings_dialog.rb +201 -0
  152. data/lib/watobo/gui/log_viewer.rb +97 -0
  153. data/lib/watobo/gui/login_wizzard.rb +301 -0
  154. data/lib/watobo/gui/main_window.rb +1815 -0
  155. data/lib/watobo/gui/manual_request_editor.rb +1105 -0
  156. data/lib/watobo/gui/master_pw_dialog.rb +142 -0
  157. data/lib/watobo/gui/password_policy_dialog.rb +98 -0
  158. data/lib/watobo/gui/plugin/base.rb +82 -0
  159. data/lib/watobo/gui/plugin_board.rb +95 -0
  160. data/lib/watobo/gui/preferences_dialog.rb +116 -0
  161. data/lib/watobo/gui/progress_window.rb +102 -0
  162. data/lib/watobo/gui/project_wizzard.rb +369 -0
  163. data/lib/watobo/gui/proxy_dialog.rb +550 -0
  164. data/lib/watobo/gui/quick_scan_dialog.rb +242 -0
  165. data/lib/watobo/gui/request_editor.rb +480 -0
  166. data/lib/watobo/gui/save_chat_dialog.rb +158 -0
  167. data/lib/watobo/gui/scanner_settings_dialog.rb +360 -0
  168. data/lib/watobo/gui/select_chat_dialog.rb +169 -0
  169. data/lib/watobo/gui/session_management_dialog.rb +688 -0
  170. data/lib/watobo/gui/sites_tree.rb +347 -0
  171. data/lib/watobo/gui/status_bar.rb +88 -0
  172. data/lib/watobo/gui/table_editor.rb +445 -0
  173. data/lib/watobo/gui/tagless_viewer.rb +62 -0
  174. data/lib/watobo/gui/templates/plugin.rb +80 -0
  175. data/lib/watobo/gui/templates/plugin2.rb +103 -0
  176. data/lib/watobo/gui/text_viewer.rb +247 -0
  177. data/lib/watobo/gui/transcoder_window.rb +215 -0
  178. data/lib/watobo/gui/utils/gui_utils.rb +129 -0
  179. data/lib/watobo/gui/utils/init_icons.rb +106 -0
  180. data/lib/watobo/gui/utils/load_icons.rb +54 -0
  181. data/lib/watobo/gui/utils/load_plugins.rb +94 -0
  182. data/lib/watobo/gui/utils/master_password.rb +90 -0
  183. data/lib/watobo/gui/utils/save_default_settings.rb +99 -0
  184. data/lib/watobo/gui/utils/save_project_settings.rb +21 -0
  185. data/lib/watobo/gui/utils/save_proxy_settings.rb +45 -0
  186. data/lib/watobo/gui/utils/save_session_settings.rb +21 -0
  187. data/lib/watobo/gui/utils/session_history.rb +134 -0
  188. data/lib/watobo/gui/workspace_dialog.rb +89 -0
  189. data/lib/watobo/gui/www_auth_dialog.rb +348 -0
  190. data/lib/watobo/gui/xml_viewer_frame.rb +114 -0
  191. data/lib/watobo/gui.rb +139 -0
  192. data/lib/watobo/mixins/httpparser.rb +664 -0
  193. data/lib/watobo/mixins/request_parser.rb +210 -0
  194. data/lib/watobo/mixins/shapers.rb +345 -0
  195. data/lib/watobo/mixins/transcoders.rb +88 -0
  196. data/lib/watobo/mixins.rb +32 -0
  197. data/lib/watobo/utils/check_regex.rb +36 -0
  198. data/lib/watobo/utils/copy_object.rb +29 -0
  199. data/lib/watobo/utils/crypto.rb +74 -0
  200. data/lib/watobo/utils/expand_range.rb +45 -0
  201. data/lib/watobo/utils/file_management.rb +73 -0
  202. data/lib/watobo/utils/load_chat.rb +219 -0
  203. data/lib/watobo/utils/load_icon.rb +47 -0
  204. data/lib/watobo/utils/print_debug.rb +34 -0
  205. data/lib/watobo/utils/response_hash.rb +143 -0
  206. data/lib/watobo/utils/secure_eval.rb +57 -0
  207. data/lib/watobo/utils/text2request.rb +96 -0
  208. data/lib/watobo/utils.rb +32 -0
  209. data/lib/watobo.rb +76 -0
  210. data/modules/active/Apache/mod_status.rb +123 -0
  211. data/modules/active/Flash/crossdomain.rb +102 -0
  212. data/modules/active/directories/dirwalker.rb +89 -0
  213. data/modules/active/discovery/fileextensions.rb +151 -0
  214. data/modules/active/discovery/http_methods.rb +135 -0
  215. data/modules/active/domino/domino_db.lst +164 -0
  216. data/modules/active/domino/domino_db.rb +128 -0
  217. data/modules/active/fileinclusion/lfi_simple.rb +134 -0
  218. data/modules/active/jboss/jboss_basic.rb +119 -0
  219. data/modules/active/sap/business_objects.rb +73 -0
  220. data/modules/active/sap/its_commands.rb +101 -0
  221. data/modules/active/sap/its_service_parameter.rb +105 -0
  222. data/modules/active/sap/its_services.rb +103 -0
  223. data/modules/active/sap/its_xss.rb +98 -0
  224. data/modules/active/sqlinjection/sql_boolean.rb +262 -0
  225. data/modules/active/sqlinjection/sqli_simple.rb +205 -0
  226. data/modules/active/xss/xss_simple.rb +179 -0
  227. data/modules/passive/cookie_options.rb +97 -0
  228. data/modules/passive/cookie_xss.rb +85 -0
  229. data/modules/passive/detect_code.rb +89 -0
  230. data/modules/passive/detect_fileupload.rb +80 -0
  231. data/modules/passive/detect_infrastructure.rb +98 -0
  232. data/modules/passive/detect_one_time_tokens.rb +86 -0
  233. data/modules/passive/dirindexing.rb +81 -0
  234. data/modules/passive/disclosure_emails.rb +82 -0
  235. data/modules/passive/disclosure_ipaddr.rb +87 -0
  236. data/modules/passive/filename_as_parameter.rb +85 -0
  237. data/modules/passive/form_spotter.rb +75 -0
  238. data/modules/passive/hotspots.rb +86 -0
  239. data/modules/passive/in_script_parameter.rb +92 -0
  240. data/modules/passive/multiple_server_headers.rb +98 -0
  241. data/modules/passive/possible_login.rb +134 -0
  242. data/modules/passive/redirect_url.rb +88 -0
  243. data/modules/passive/redirectionz.rb +96 -0
  244. data/modules/passive/xss_dom.rb +91 -0
  245. data/plugins/catalog/catalog.ico +0 -0
  246. data/plugins/catalog/catalog.rb +726 -0
  247. data/plugins/catalog/db_tests +6483 -0
  248. data/plugins/catalog/db_variables +29 -0
  249. data/plugins/filefinder/dbs/hbci.db +12 -0
  250. data/plugins/filefinder/filefinder.rb +602 -0
  251. data/plugins/sslchecker/cli/sslchecker_cli.rb +21 -0
  252. data/plugins/sslchecker/gui/cipher_table.rb +260 -0
  253. data/plugins/sslchecker/gui/gui.rb +245 -0
  254. data/plugins/sslchecker/gui/sslchecker.rb +26 -0
  255. data/plugins/sslchecker/icons/green_16x16.ico +0 -0
  256. data/plugins/sslchecker/icons/grey_16x16.ico +0 -0
  257. data/plugins/sslchecker/icons/red_16x16.ico +0 -0
  258. data/plugins/sslchecker/icons/sslchecker.ico +0 -0
  259. data/plugins/sslchecker/lib/check.rb +117 -0
  260. metadata +317 -0
@@ -0,0 +1,260 @@
1
+ # .
2
+ # cipher_table.rb
3
+ #
4
+ # Copyright 2012 by siberas, http://www.siberas.de
5
+ #
6
+ # This file is part of WATOBO (Web Application Tool Box)
7
+ # http://watobo.sourceforge.com
8
+ #
9
+ # WATOBO is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation version 2 of the License.
12
+ #
13
+ # WATOBO is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with WATOBO; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ # .
22
+ module Watobo
23
+ module Plugin
24
+ module Sslchecker
25
+ module Gui
26
+
27
+ class CipherTableController < FXHorizontalFrame
28
+ def subscribe(event, &callback)
29
+ (@event_dispatcher_listeners[event] ||= []) << callback
30
+ end
31
+
32
+ def clearEvents(event)
33
+ @event_dispatcher_listener[event].clear
34
+ end
35
+
36
+ def notify(event, *args)
37
+ if @event_dispatcher_listeners[event]
38
+ @event_dispatcher_listeners[event].each do |m|
39
+ m.call(*args) if m.respond_to? :call
40
+ end
41
+ end
42
+ end
43
+
44
+ def initialize(owner, opts)
45
+ super(owner,opts)
46
+ @event_dispatcher_listeners = Hash.new
47
+ @good_cb = FXCheckButton.new(self, "good", nil, 0, ICON_BEFORE_TEXT|LAYOUT_SIDE_LEFT)
48
+ @good_cb.connect(SEL_COMMAND) { update_table }
49
+ @good_cb.checkState = true
50
+ @bad_cb = FXCheckButton.new(self, "bad", nil, 0, ICON_BEFORE_TEXT|LAYOUT_SIDE_LEFT)
51
+ @bad_cb.connect(SEL_COMMAND) { update_table }
52
+ @bad_cb.checkState = true
53
+ @na_cb = FXCheckButton.new(self, "n/a", nil, 0, ICON_BEFORE_TEXT|LAYOUT_SIDE_LEFT)
54
+ @na_cb.connect(SEL_COMMAND) { update_table }
55
+ @na_cb.checkState = true
56
+ FXButton.new(self, "copy").connect(SEL_COMMAND) { notify(:copy_table) }
57
+ # FXButton.new(self, "clear").connect(SEL_COMMAND) { notify(:clear_ciphers) }
58
+
59
+ end
60
+
61
+ def update_table
62
+ show_prefs = CipherTable::CTF_NONE
63
+ show_prefs = show_prefs | CipherTable::CTF_BAD if @bad_cb.checked?
64
+ show_prefs = show_prefs | CipherTable::CTF_GOOD if @good_cb.checked?
65
+ show_prefs = show_prefs | CipherTable::CTF_NA if @na_cb.checked?
66
+ notify(:apply_filter, show_prefs)
67
+ end
68
+ end
69
+
70
+ class CipherTable < FXTable
71
+ CTF_NONE = 0x00
72
+ CTF_GOOD = 0x01
73
+ CTF_BAD = 0x02
74
+ CTF_NA = 0x04
75
+ CTF_ALL = 0x07
76
+
77
+ attr :ciphers
78
+ attr_accessor :min_bit_length
79
+ attr_accessor :filter
80
+
81
+ # this returns a comma seperated list of the table [string]
82
+ def to_csv
83
+ csv = ""
84
+ self.each_row do |c,b,r|
85
+ csv << c.text.strip << ";"
86
+ csv << b.text.strip << ";"
87
+ csv << r.text.strip
88
+ csv << "\n"
89
+ end
90
+ csv
91
+ end
92
+
93
+ def setNewFont(font_type=nil, size=nil)
94
+ begin
95
+ new_size = size.nil? ? GUI_REGULAR_FONT_SIZE : size
96
+ new_font_type = font_type.nil? ? "helvetica" : font_type
97
+ new_font = FXFont.new(getApp(), new_font_type, new_size)
98
+ new_font.create
99
+
100
+ self.font = new_font
101
+ self.rowHeader.font = new_font
102
+ self.defRowHeight = new_size+10
103
+
104
+ updateTable()
105
+
106
+ rescue => bang
107
+ puts bang
108
+ puts bang.backtrace if $DEBUG
109
+ end
110
+ end
111
+
112
+ def add_cipher( cipher )
113
+
114
+ [ :name, :bits, :result ].each do |k|
115
+ return false unless cipher.has_key? k
116
+ end
117
+
118
+ @ciphers.push cipher
119
+ add_cipher_row(cipher)
120
+
121
+ true
122
+ end
123
+
124
+ def show_all
125
+ @filter = CTF_ALL
126
+ end
127
+
128
+ def update_table
129
+ # puts "update table: #{filter}"
130
+ self.clearItems
131
+ initColumns
132
+ @ciphers.each do |c|
133
+ add_cipher_row c
134
+ end
135
+ end
136
+
137
+ def clear_ciphers
138
+ self.clearItems
139
+ initColumns
140
+ @ciphers.clear
141
+ end
142
+
143
+ def initialize(owner, opts)
144
+ super(owner, :opts => TABLE_COL_SIZABLE|TABLE_ROW_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y|TABLE_READONLY|LAYOUT_SIDE_TOP, :padding => 2)
145
+ @ciphers = []
146
+ @min_bit_length = 128
147
+
148
+ @columns = Hash.new
149
+ @columns[:cipher] = { :label => "Cipher", :pos => 0, :width => 250 }
150
+ @columns[:bits] = { :label => "Bits", :pos => 1, :width => 100 }
151
+ @columns[:result] = { :label => "Result", :pos => 2, :width => 50 }
152
+
153
+ @filter = CTF_ALL
154
+
155
+ init_icons
156
+ initColumns()
157
+ adjustCellWidth
158
+ end
159
+
160
+ private
161
+
162
+ def init_icons
163
+ begin
164
+ path = File.expand_path(File.join(File.dirname(__FILE__), "..", "icons" ))
165
+ file = "green_16x16.ico"
166
+ icon_file = File.join(path, file)
167
+ # puts icon_file
168
+
169
+ @icon_ok = Watobo::Gui.load_icon(icon_file)
170
+
171
+ file = "red_16x16.ico"
172
+ icon_file = File.join(path, file)
173
+ @icon_bad = Watobo::Gui.load_icon(icon_file)
174
+
175
+ file = "grey_16x16.ico"
176
+ icon_file = File.join(path, file)
177
+ @icon_na = Watobo::Gui.load_icon(icon_file)
178
+ rescue => bang
179
+ puts bang
180
+ puts bang.backtrace
181
+ end
182
+ end
183
+
184
+ def initColumns()
185
+ self.setTableSize(0, @columns.length)
186
+ self.visibleRows = 20
187
+ self.visibleColumns = @columns.length
188
+
189
+ @columns.each do |key, opts|
190
+ self.setColumnText( opts[:pos], opts[:label] )
191
+ #self.setColumnIcon(@col_order.index(TABLE_COL_SSL), TBL_ICON_LOCK)# puts self.getItem(@col_order.index(col), 0 ).class.to_s
192
+ end
193
+
194
+ adjustCellWidth
195
+
196
+ end
197
+
198
+ def adjustCellWidth()
199
+ begin
200
+ self.rowHeader.width = 0
201
+ @columns.each_value do |opts|
202
+ self.setColumnWidth( opts[:pos], opts[:width] )
203
+ end
204
+ rescue => bang
205
+ puts bang
206
+ puts bang.backtrace
207
+ puts "!!!ERROR: adjustCellWidth"
208
+ end
209
+
210
+ end
211
+
212
+ def add_cipher_row(cipher)
213
+ add_cipher = @filter == CTF_ALL ? true : false
214
+
215
+ if cipher[:result] == false
216
+ # @result_viewer.appendStyledText("checked: #{cipher} - #{bits} - #{result}\n",0)
217
+ text = "N/A"
218
+ icon = @icon_na
219
+ add_cipher = true if ( @filter & CTF_NA > 0 )
220
+
221
+ elsif cipher[:bits].to_i < @min_bit_length
222
+ # @result_viewer.appendStyledText("checked: #{cipher} - #{bits} - #{result}\n",2)
223
+ text = "BAD"
224
+ icon = @icon_bad
225
+ add_cipher = true if ( @filter & CTF_BAD > 0 )
226
+ else
227
+ text = "OK"
228
+ icon = @icon_ok
229
+ add_cipher = true if ( @filter & CTF_GOOD > 0 )
230
+ # @result_viewer.appendStyledText("checked: #{cipher} - #{bits} - #{result}\n",1)
231
+ end
232
+
233
+ if add_cipher
234
+ lastRowIndex = self.getNumRows
235
+ self.appendRows(1)
236
+
237
+ index = @columns[:cipher][:pos]
238
+ self.setItemText(lastRowIndex, index, cipher[:name])
239
+ self.getItem(lastRowIndex, index).justify = FXTableItem::LEFT
240
+
241
+ index = @columns[:bits][:pos]
242
+ self.setItemText(lastRowIndex, index, cipher[:bits].to_s)
243
+ self.getItem(lastRowIndex,index).justify = FXTableItem::LEFT
244
+
245
+ index = @columns[:result][:pos]
246
+
247
+
248
+ self.setItemIcon(lastRowIndex, index, icon)
249
+ self.setItemIconPosition(lastRowIndex, index, FXTableItem::BEFORE)
250
+ self.setItemText(lastRowIndex, index, text)
251
+ self.getItem(lastRowIndex,index).justify = FXTableItem::LEFT
252
+ end
253
+ end
254
+
255
+ end
256
+
257
+ end
258
+ end
259
+ end
260
+ end
@@ -0,0 +1,245 @@
1
+ # .
2
+ # gui.rb
3
+ #
4
+ # Copyright 2012 by siberas, http://www.siberas.de
5
+ #
6
+ # This file is part of WATOBO (Web Application Tool Box)
7
+ # http://watobo.sourceforge.com
8
+ #
9
+ # WATOBO is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation version 2 of the License.
12
+ #
13
+ # WATOBO is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with WATOBO; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ # .
22
+ module Watobo
23
+ module Plugin
24
+ module Sslchecker
25
+ module Gui
26
+
27
+
28
+ class Main < Watobo::Plugin2
29
+
30
+ include Watobo::Constants
31
+
32
+ def createChat(site)
33
+ chat = nil
34
+ url = "https://#{site}/"
35
+ request = []
36
+ request << "GET #{url} HTTP/1.1\r\n"
37
+ request << "Host: #{site}\r\n"
38
+ request << "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*\r\n"
39
+ request << "Accept-Language: de\r\n"
40
+ request << "Proxy-Connection: close\r\n"
41
+ request << "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r\n"
42
+ request << "\r\n"
43
+
44
+ chat = Watobo::Chat.new(request, [], :id => 0)
45
+
46
+ return chat
47
+ end
48
+
49
+ def onSiteSelect(sender, sel, item)
50
+ if sender.numItems > 0
51
+ @site = sender.getItemData(sender.currentItem)
52
+ else
53
+ unless sender.text.empty?
54
+ @site = sender.text.gsub(/^https?:\/\//,"").strip
55
+ end
56
+ end
57
+
58
+ end
59
+
60
+ def updateView()
61
+ #@project = project
62
+ @site = nil
63
+ @sites_combo.clearItems()
64
+ #@dir_combo.clearItems()
65
+ unless @project.nil? then
66
+ @project.listSites(:ssl => true).each do |site|
67
+ #puts "Site: #{site}"
68
+ @sites_combo.appendItem(site.slice(0..35), site)
69
+ end
70
+ if @sites_combo.numItems > 0
71
+ @sites_combo.setCurrentItem(0)
72
+ @site = @sites_combo.getItemData(0)
73
+ else
74
+ @log_viewer.log(LOG_INFO,"No SSL Sites available - you need to visit a SSL Site first!")
75
+ end
76
+ end
77
+
78
+ end
79
+
80
+ def start(sender, sel, item)
81
+ unless @site.nil?
82
+ @cipher_table.clear_ciphers
83
+
84
+ #puts "Site: #{site}"
85
+ #puts "Directory: #{@dir}"
86
+ chat = createChat(@site)
87
+ checklist = []
88
+ checklist.push @check
89
+ chatlist = []
90
+ chatlist.push chat
91
+ scan_prefs = @project.getScanPreferences
92
+ scanner = Watobo::Scanner2.new(chatlist, checklist, nil, scan_prefs)
93
+
94
+ @pbar.total = scanner.numTotalChecks
95
+ #@pbar.progress = 0
96
+ #@pbar.barColor = FXRGB(255,0,0)
97
+
98
+ scanner.subscribe(:progress) { |m|
99
+ print "="
100
+ @pbar.increment(1)
101
+ }
102
+
103
+ #@pbar.total = @check.cipherlist.length
104
+ @pbar.progress = 0
105
+ @pbar.barColor = 'red'
106
+ unless @project.getCurrentProxy().nil?
107
+ @log_viewer.log(LOG_INFO,"!!! WARNING FORWARDING PROXY IS SET !!! - SSL-Check running against proxy may not make sense!")
108
+ end
109
+ @log_viewer.log LOG_INFO, "Scan started ..."
110
+ @scan_thread = Thread.new(scanner) { |scan|
111
+ begin
112
+
113
+ scan.run(:default => true)
114
+ @log_viewer.log LOG_INFO, "Scan finished."
115
+ rescue => bang
116
+ puts bang
117
+ puts bang.backtrace if $DEBUG
118
+ end
119
+ }
120
+
121
+ end
122
+ end
123
+
124
+ def initialize(owner, project)
125
+ super(owner, "SSL-Plugin", project, :opts => DECOR_ALL,:width=>800, :height=>600)
126
+
127
+ @plugin_name = "SSL-Checker"
128
+ @project = project
129
+ @site = nil
130
+ @dir = nil
131
+ @scan_thread = nil
132
+
133
+ @results = []
134
+ @results_lock = Mutex.new
135
+
136
+ @clipboard_text = ""
137
+ self.connect(SEL_CLIPBOARD_REQUEST) do
138
+ # setDNDData(FROM_CLIPBOARD, FXWindow.stringType, Fox.fxencodeStringData(@clipboard_text))
139
+ setDNDData(FROM_CLIPBOARD, FXWindow.stringType, @clipboard_text + "\x00" )
140
+ end
141
+
142
+ load_icon(__FILE__)
143
+
144
+ mr_splitter = FXSplitter.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y|SPLITTER_VERTICAL|SPLITTER_REVERSED|SPLITTER_TRACKING)
145
+ # top = FXHorizontalFrame.new(mr_splitter, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_SIDE_BOTTOM)
146
+ top_frame = FXVerticalFrame.new(mr_splitter, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FIX_HEIGHT|LAYOUT_BOTTOM,:height => 500)
147
+ top_splitter = FXSplitter.new(top_frame, LAYOUT_FILL_X|SPLITTER_HORIZONTAL|LAYOUT_FILL_Y|SPLITTER_TRACKING)
148
+ log_frame = FXVerticalFrame.new(mr_splitter, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_BOTTOM,:height => 100)
149
+
150
+ @settings_frame = FXVerticalFrame.new(top_splitter, :opts => LAYOUT_FILL_Y)
151
+ result_frame = FXVerticalFrame.new(top_splitter, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
152
+
153
+ @controller = CipherTableController.new(result_frame, :opts => LAYOUT_FILL_X)
154
+ @controller.subscribe(:apply_filter){ |f| @cipher_table.filter = f ; @cipher_table.update_table}
155
+ @controller.subscribe(:copy_table){
156
+ types = [ FXWindow.stringType ]
157
+ if acquireClipboard(types)
158
+ puts
159
+ @clipboard_text = @cipher_table.to_csv
160
+ end
161
+
162
+ }
163
+
164
+ frame = FXVerticalFrame.new(result_frame, LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN|FRAME_THICK, :padding=>0)
165
+ @cipher_table = CipherTable.new(frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
166
+
167
+ FXLabel.new(@settings_frame, "Available Sites:")
168
+ @sites_combo = FXComboBox.new(@settings_frame, 5, nil, 0,
169
+ COMBOBOX_STATIC|FRAME_SUNKEN|FRAME_THICK|LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
170
+ #@filterCombo.width =200
171
+
172
+ @sites_combo.numVisible = 20
173
+ @sites_combo.numColumns = 35
174
+ @sites_combo.editable = true
175
+ @sites_combo.connect(SEL_COMMAND, method(:onSiteSelect))
176
+ begin
177
+
178
+
179
+ @pbar = FXProgressBar.new(@settings_frame, nil, 0, LAYOUT_FILL_X|FRAME_SUNKEN|FRAME_THICK|PROGRESSBAR_HORIZONTAL)
180
+
181
+ @pbar.progress = 0
182
+ @pbar.total = 0
183
+ @pbar.barColor=0
184
+ @pbar.barColor = 'grey' #FXRGB(255,0,0)
185
+
186
+ button = FXButton.new(@settings_frame, "start")
187
+ button.connect(SEL_COMMAND, method(:start))
188
+
189
+ @check = Check.new(@project)
190
+
191
+ @check.subscribe(:cipher_checked) { |cipher, bits, result|
192
+ begin
193
+ @results_lock.synchronize do
194
+ @results << { :name => cipher, :bits => bits, :result => result}
195
+ end
196
+ # FXApp.instance.forceRefresh
197
+ rescue => bang
198
+ puts bang
199
+ puts bang.backtrace if $DEBUG
200
+ end
201
+ #puts "#{@pbar.progress} of #{@pbar.total}"
202
+ # logger
203
+
204
+ }
205
+
206
+ @check.subscribe(:new_finding) { |f|
207
+ @project.addFinding(f)
208
+ }
209
+
210
+ log_frame_header = FXHorizontalFrame.new(log_frame, :opts => LAYOUT_FILL_X)
211
+ FXLabel.new(log_frame_header, "Logs:" )
212
+
213
+ #log_text_frame = FXHorizontalFrame.new(bottom_frame, :opts => LAYOUT_FILL_X|FRAME_SUNKEN|LAYOUT_BOTTOM)
214
+ log_text_frame = FXVerticalFrame.new(log_frame, LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN|FRAME_THICK, :padding=>0)
215
+ @log_viewer = LogViewer.new(log_text_frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
216
+
217
+ updateView()
218
+ add_update_timer(50)
219
+ rescue => bang
220
+ puts bang
221
+ puts bang.backtrace if $DEBUG
222
+ end
223
+
224
+ end
225
+
226
+ private
227
+
228
+ def add_update_timer(ms)
229
+ @update_timer = FXApp.instance.addTimeout( ms, :repeat => true) do
230
+ @results_lock.synchronize do
231
+ unless @results.empty?
232
+ @results.each do |r|
233
+ @cipher_table.add_cipher(r)
234
+ end
235
+ @results.clear
236
+ end
237
+ end
238
+
239
+ end
240
+ end
241
+ end
242
+ end
243
+ end
244
+ end
245
+ end
@@ -0,0 +1,26 @@
1
+ # .
2
+ # sslchecker.rb
3
+ #
4
+ # Copyright 2012 by siberas, http://www.siberas.de
5
+ #
6
+ # This file is part of WATOBO (Web Application Tool Box)
7
+ # http://watobo.sourceforge.com
8
+ #
9
+ # WATOBO is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation version 2 of the License.
12
+ #
13
+ # WATOBO is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with WATOBO; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ # .
22
+ path = File.expand_path(File.dirname(__FILE__))
23
+
24
+ require File.join(path, "..", "lib", "check.rb")
25
+ require File.join(path, "cipher_table.rb")
26
+ require File.join(path, "gui.rb")
@@ -0,0 +1,117 @@
1
+ # .
2
+ # check.rb
3
+ #
4
+ # Copyright 2012 by siberas, http://www.siberas.de
5
+ #
6
+ # This file is part of WATOBO (Web Application Tool Box)
7
+ # http://watobo.sourceforge.com
8
+ #
9
+ # WATOBO is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation version 2 of the License.
12
+ #
13
+ # WATOBO is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with WATOBO; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ # .
22
+ module Watobo
23
+ module Plugin
24
+ module Sslchecker
25
+ class Check < Watobo::ActiveCheck
26
+ attr :cipherlist
27
+ def initialize(project)
28
+ super(project)
29
+
30
+ @result = Hash.new
31
+
32
+ @info.update(
33
+ :check_name => 'SSL-Checker', # name of check which briefly describes functionality, will be used for tree and progress views
34
+ :description => "Test applikation for supportes SSL Ciphers.", # description of checkfunction
35
+ :author => "Andreas Schmidt", # author of check
36
+ :version => "0.9" # check version
37
+ )
38
+
39
+ @finding.update(
40
+ :threat => 'Attacks on weak encryption ciphers which may lead loss of privacy', # thread of vulnerability, e.g. loss of information
41
+ :class => "SSL Ciphers", # vulnerability class, e.g. Stored XSS, SQL-Injection, ...
42
+ :type => FINDING_TYPE_VULN, # FINDING_TYPE_HINT, FINDING_TYPE_INFO, FINDING_TYPE_VULN
43
+ :rating => VULN_RATING_LOW
44
+ )
45
+
46
+ ctx = OpenSSL::SSL::SSLContext.new()
47
+ @cipherlist = Array.new
48
+ ctx.ciphers="eNULL" # because ALL don't include Null-Ciphers!!!
49
+ ctx.ciphers.each do |c|
50
+ @cipherlist.push c[0]
51
+ end
52
+
53
+ ctx.ciphers="ALL"
54
+ ctx.ciphers.each do |c|
55
+ @cipherlist.push c[0]
56
+ end
57
+ end
58
+
59
+ def reset()
60
+ @result.clear
61
+ end
62
+
63
+ def generateChecks(chat)
64
+ begin
65
+ @cipherlist.each do |c|
66
+ checker = proc {
67
+
68
+ test_request = nil
69
+ test_response = nil
70
+ # !!! ATTENTION !!!
71
+ # MAKE COPY BEFORE MODIFIYING REQUEST
72
+ request = chat.copyRequest
73
+
74
+
75
+ ctx = OpenSSL::SSL::SSLContext.new()
76
+ ctx.ciphers = c
77
+ cypher = ctx.ciphers.first
78
+ bits = cypher[2].to_i
79
+ algo = cypher[0]
80
+
81
+ test_request, test_response = doRequest( request, :ssl_cipher => c )
82
+
83
+ if test_request and test_response
84
+
85
+ notify( :cipher_checked, algo, bits, true)
86
+ if bits < 128
87
+
88
+ addFinding( test_request, test_response,
89
+ :test_item => "#{algo}#{bits}",
90
+ #:proof_pattern => "#{match}",
91
+ :chat => chat,
92
+ :title => "[#{algo}] - #{bits} Bit"
93
+ )
94
+ end
95
+ else
96
+ notify(:cipher_checked, algo, bits, false)
97
+ # puts "!!! ERROR: #{c}"
98
+ end
99
+
100
+ [ test_request, test_response ]
101
+
102
+ }
103
+ yield checker
104
+ end
105
+ rescue => bang
106
+ puts "!error in module #{Module.nesting[0].name}"
107
+ puts bang
108
+ end
109
+ end
110
+ end
111
+
112
+
113
+ end
114
+ end
115
+ end
116
+
117
+