watobo 0.9.8.677
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/watobo_gui.rb +39 -0
- data/certificates/cert.pem +19 -0
- data/certificates/privkey.pem +15 -0
- data/certificates/watobo_dh.key +5 -0
- data/config/datastore.yml +5 -0
- data/config/forwarding_proxy.yml +12 -0
- data/config/general.yml +4 -0
- data/config/gui.yml +23 -0
- data/config/interceptor.yml +16 -0
- data/config/scan_policy.yml +13 -0
- data/config/scanner.yml +34 -0
- data/icons/Add.ico +0 -0
- data/icons/Add_24x24.ico +0 -0
- data/icons/Bandwidth.ico +0 -0
- data/icons/Bandwidth_24x24.ico +0 -0
- data/icons/Mr. Bomb.ico +0 -0
- data/icons/Mr. Bomb_16x16.ico +0 -0
- data/icons/Mr. Bomb_24x24.ico +0 -0
- data/icons/Orange Ball.ico +0 -0
- data/icons/Orange Ball_16x16.ico +0 -0
- data/icons/Orange Ball_24x24.ico +0 -0
- data/icons/Pause.ico +0 -0
- data/icons/Play.ico +0 -0
- data/icons/Play_24x24.ico +0 -0
- data/icons/Red Ball.ico +0 -0
- data/icons/Red Ball_16x16.ico +0 -0
- data/icons/Red Ball_24x24.ico +0 -0
- data/icons/Run.ico +0 -0
- data/icons/Stop.ico +0 -0
- data/icons/Stop_24x24.ico +0 -0
- data/icons/Terminal.ico +0 -0
- data/icons/Transfer.ico +0 -0
- data/icons/Transfer_16x16.ico +0 -0
- data/icons/User.ico +0 -0
- data/icons/User_16x16.ico +0 -0
- data/icons/User_24x24.ico +0 -0
- data/icons/Web Browser.ico +0 -0
- data/icons/Web Browser_16x16.ico +0 -0
- data/icons/Write Document.ico +0 -0
- data/icons/Yellow Ball.ico +0 -0
- data/icons/Yellow Ball_16x16.ico +0 -0
- data/icons/Yellow Ball_24x24.ico +0 -0
- data/icons/advanced.ico +0 -0
- data/icons/advanced_16x16.ico +0 -0
- data/icons/advanced_24x24.ico +0 -0
- data/icons/applications.ico +0 -0
- data/icons/applications_16x16.ico +0 -0
- data/icons/applications_24x24.ico +0 -0
- data/icons/browser_16x16.ico +0 -0
- data/icons/browser_24x24.ico +0 -0
- data/icons/burn.ico +0 -0
- data/icons/burn_16x16.ico +0 -0
- data/icons/burn_24x24.ico +0 -0
- data/icons/calculator.ico +0 -0
- data/icons/calculator_24x24.ico +0 -0
- data/icons/cb_checked.ico +0 -0
- data/icons/cb_checked_orange.ico +0 -0
- data/icons/cb_unchecked.ico +0 -0
- data/icons/coin_24x24.ico +0 -0
- data/icons/conversation.ico +0 -0
- data/icons/conversation_24x24.ico +0 -0
- data/icons/engine.ico +0 -0
- data/icons/filter.ico +0 -0
- data/icons/folder.ico +0 -0
- data/icons/folder_16x16.ico +0 -0
- data/icons/fuzzer_16x16.ico +0 -0
- data/icons/fuzzer_24x24.ico +0 -0
- data/icons/go-down_16x16.png +0 -0
- data/icons/go-up_16x16.png +0 -0
- data/icons/help.ico +0 -0
- data/icons/help_16x16.ico +0 -0
- data/icons/help_24x24.ico +0 -0
- data/icons/iChat.ico +0 -0
- data/icons/iChat_16x16.ico +0 -0
- data/icons/iChat_24x24.ico +0 -0
- data/icons/icons.txt +3 -0
- data/icons/info.ico +0 -0
- data/icons/info_16x16.ico +0 -0
- data/icons/info_24x24.ico +0 -0
- data/icons/interceptor_24x24.ico +0 -0
- data/icons/lock.ico +0 -0
- data/icons/lock_12x12.ico +0 -0
- data/icons/lock_16x16.ico +0 -0
- data/icons/monitor.ico +0 -0
- data/icons/plugin.ico +0 -0
- data/icons/plugin_24x24.ico +0 -0
- data/icons/scan_16x16.png +0 -0
- data/icons/send.ico +0 -0
- data/icons/server.ico +0 -0
- data/icons/server_16x16.ico +0 -0
- data/icons/siberas_logo_x24.gif +0 -0
- data/icons/tag_blue_32x32.ico +0 -0
- data/icons/watobo-48x48.png +0 -0
- data/icons/watobo-logo.png +0 -0
- data/icons/watobo.ico +0 -0
- data/lib/watobo/adapters/data_store.rb +38 -0
- data/lib/watobo/adapters/file/file_store.rb +211 -0
- data/lib/watobo/adapters/session_store.rb +27 -0
- data/lib/watobo/adapters.rb +26 -0
- data/lib/watobo/config.rb +143 -0
- data/lib/watobo/constants.rb +92 -0
- data/lib/watobo/core/active_check.rb +404 -0
- data/lib/watobo/core/cookie.rb +69 -0
- data/lib/watobo/core/fuzz_gen.rb +160 -0
- data/lib/watobo/core/http_socket.rb +142 -0
- data/lib/watobo/core/interceptor.rb +729 -0
- data/lib/watobo/core/passive_check.rb +141 -0
- data/lib/watobo/core/project.rb +1058 -0
- data/lib/watobo/core/scanner.rb +396 -0
- data/lib/watobo/core/session.rb +1320 -0
- data/lib/watobo/core/simple_ca.rb +393 -0
- data/lib/watobo/core.rb +34 -0
- data/lib/watobo/defaults.rb +40 -0
- data/lib/watobo/external/diff/lcs/array.rb +42 -0
- data/lib/watobo/external/diff/lcs/block.rb +72 -0
- data/lib/watobo/external/diff/lcs/callbacks.rb +343 -0
- data/lib/watobo/external/diff/lcs/change.rb +190 -0
- data/lib/watobo/external/diff/lcs/hunk.rb +279 -0
- data/lib/watobo/external/diff/lcs/ldiff.rb +247 -0
- data/lib/watobo/external/diff/lcs/string.rb +40 -0
- data/lib/watobo/external/diff/lcs.rb +1124 -0
- data/lib/watobo/external/ntlm/ntlm.rb +797 -0
- data/lib/watobo/externals.rb +28 -0
- data/lib/watobo/framework/create_project.rb +55 -0
- data/lib/watobo/framework/init.rb +149 -0
- data/lib/watobo/framework/init_modules.rb +116 -0
- data/lib/watobo/framework/license_text.rb +50 -0
- data/lib/watobo/framework.rb +26 -0
- data/lib/watobo/gui/about_watobo.rb +68 -0
- data/lib/watobo/gui/browser_preview.rb +460 -0
- data/lib/watobo/gui/certificate_dialog.rb +132 -0
- data/lib/watobo/gui/chat_diff.rb +415 -0
- data/lib/watobo/gui/chatviewer_frame.rb +427 -0
- data/lib/watobo/gui/checkboxtree.rb +221 -0
- data/lib/watobo/gui/checks_policy_frame.rb +123 -0
- data/lib/watobo/gui/client_cert_dialog.rb +227 -0
- data/lib/watobo/gui/confirm_scan_dialog.rb +67 -0
- data/lib/watobo/gui/conversation_table.rb +386 -0
- data/lib/watobo/gui/conversation_table_ctrl.rb +175 -0
- data/lib/watobo/gui/csrf_token_dialog.rb +446 -0
- data/lib/watobo/gui/dashboard.rb +341 -0
- data/lib/watobo/gui/define_scope_frame.rb +380 -0
- data/lib/watobo/gui/edit_comment.rb +70 -0
- data/lib/watobo/gui/edit_scope_dialog.rb +69 -0
- data/lib/watobo/gui/finding_info.rb +212 -0
- data/lib/watobo/gui/findings_tree.rb +459 -0
- data/lib/watobo/gui/full_scan_dialog.rb +269 -0
- data/lib/watobo/gui/fuzzer_gui.rb +1522 -0
- data/lib/watobo/gui/hex_viewer.rb +106 -0
- data/lib/watobo/gui/interceptor_gui.rb +994 -0
- data/lib/watobo/gui/interceptor_settings_dialog.rb +201 -0
- data/lib/watobo/gui/log_viewer.rb +97 -0
- data/lib/watobo/gui/login_wizzard.rb +301 -0
- data/lib/watobo/gui/main_window.rb +1815 -0
- data/lib/watobo/gui/manual_request_editor.rb +1105 -0
- data/lib/watobo/gui/master_pw_dialog.rb +142 -0
- data/lib/watobo/gui/password_policy_dialog.rb +98 -0
- data/lib/watobo/gui/plugin/base.rb +82 -0
- data/lib/watobo/gui/plugin_board.rb +95 -0
- data/lib/watobo/gui/preferences_dialog.rb +116 -0
- data/lib/watobo/gui/progress_window.rb +102 -0
- data/lib/watobo/gui/project_wizzard.rb +369 -0
- data/lib/watobo/gui/proxy_dialog.rb +550 -0
- data/lib/watobo/gui/quick_scan_dialog.rb +242 -0
- data/lib/watobo/gui/request_editor.rb +480 -0
- data/lib/watobo/gui/save_chat_dialog.rb +158 -0
- data/lib/watobo/gui/scanner_settings_dialog.rb +360 -0
- data/lib/watobo/gui/select_chat_dialog.rb +169 -0
- data/lib/watobo/gui/session_management_dialog.rb +688 -0
- data/lib/watobo/gui/sites_tree.rb +347 -0
- data/lib/watobo/gui/status_bar.rb +88 -0
- data/lib/watobo/gui/table_editor.rb +445 -0
- data/lib/watobo/gui/tagless_viewer.rb +62 -0
- data/lib/watobo/gui/templates/plugin.rb +80 -0
- data/lib/watobo/gui/templates/plugin2.rb +103 -0
- data/lib/watobo/gui/text_viewer.rb +247 -0
- data/lib/watobo/gui/transcoder_window.rb +215 -0
- data/lib/watobo/gui/utils/gui_utils.rb +129 -0
- data/lib/watobo/gui/utils/init_icons.rb +106 -0
- data/lib/watobo/gui/utils/load_icons.rb +54 -0
- data/lib/watobo/gui/utils/load_plugins.rb +94 -0
- data/lib/watobo/gui/utils/master_password.rb +90 -0
- data/lib/watobo/gui/utils/save_default_settings.rb +99 -0
- data/lib/watobo/gui/utils/save_project_settings.rb +21 -0
- data/lib/watobo/gui/utils/save_proxy_settings.rb +45 -0
- data/lib/watobo/gui/utils/save_session_settings.rb +21 -0
- data/lib/watobo/gui/utils/session_history.rb +134 -0
- data/lib/watobo/gui/workspace_dialog.rb +89 -0
- data/lib/watobo/gui/www_auth_dialog.rb +348 -0
- data/lib/watobo/gui/xml_viewer_frame.rb +114 -0
- data/lib/watobo/gui.rb +139 -0
- data/lib/watobo/mixins/httpparser.rb +664 -0
- data/lib/watobo/mixins/request_parser.rb +210 -0
- data/lib/watobo/mixins/shapers.rb +345 -0
- data/lib/watobo/mixins/transcoders.rb +88 -0
- data/lib/watobo/mixins.rb +32 -0
- data/lib/watobo/utils/check_regex.rb +36 -0
- data/lib/watobo/utils/copy_object.rb +29 -0
- data/lib/watobo/utils/crypto.rb +74 -0
- data/lib/watobo/utils/expand_range.rb +45 -0
- data/lib/watobo/utils/file_management.rb +73 -0
- data/lib/watobo/utils/load_chat.rb +219 -0
- data/lib/watobo/utils/load_icon.rb +47 -0
- data/lib/watobo/utils/print_debug.rb +34 -0
- data/lib/watobo/utils/response_hash.rb +143 -0
- data/lib/watobo/utils/secure_eval.rb +57 -0
- data/lib/watobo/utils/text2request.rb +96 -0
- data/lib/watobo/utils.rb +32 -0
- data/lib/watobo.rb +76 -0
- data/modules/active/Apache/mod_status.rb +123 -0
- data/modules/active/Flash/crossdomain.rb +102 -0
- data/modules/active/directories/dirwalker.rb +89 -0
- data/modules/active/discovery/fileextensions.rb +151 -0
- data/modules/active/discovery/http_methods.rb +135 -0
- data/modules/active/domino/domino_db.lst +164 -0
- data/modules/active/domino/domino_db.rb +128 -0
- data/modules/active/fileinclusion/lfi_simple.rb +134 -0
- data/modules/active/jboss/jboss_basic.rb +119 -0
- data/modules/active/sap/business_objects.rb +73 -0
- data/modules/active/sap/its_commands.rb +101 -0
- data/modules/active/sap/its_service_parameter.rb +105 -0
- data/modules/active/sap/its_services.rb +103 -0
- data/modules/active/sap/its_xss.rb +98 -0
- data/modules/active/sqlinjection/sql_boolean.rb +262 -0
- data/modules/active/sqlinjection/sqli_simple.rb +205 -0
- data/modules/active/xss/xss_simple.rb +179 -0
- data/modules/passive/cookie_options.rb +97 -0
- data/modules/passive/cookie_xss.rb +85 -0
- data/modules/passive/detect_code.rb +89 -0
- data/modules/passive/detect_fileupload.rb +80 -0
- data/modules/passive/detect_infrastructure.rb +98 -0
- data/modules/passive/detect_one_time_tokens.rb +86 -0
- data/modules/passive/dirindexing.rb +81 -0
- data/modules/passive/disclosure_emails.rb +82 -0
- data/modules/passive/disclosure_ipaddr.rb +87 -0
- data/modules/passive/filename_as_parameter.rb +85 -0
- data/modules/passive/form_spotter.rb +75 -0
- data/modules/passive/hotspots.rb +86 -0
- data/modules/passive/in_script_parameter.rb +92 -0
- data/modules/passive/multiple_server_headers.rb +98 -0
- data/modules/passive/possible_login.rb +134 -0
- data/modules/passive/redirect_url.rb +88 -0
- data/modules/passive/redirectionz.rb +96 -0
- data/modules/passive/xss_dom.rb +91 -0
- data/plugins/catalog/catalog.ico +0 -0
- data/plugins/catalog/catalog.rb +726 -0
- data/plugins/catalog/db_tests +6483 -0
- data/plugins/catalog/db_variables +29 -0
- data/plugins/filefinder/dbs/hbci.db +12 -0
- data/plugins/filefinder/filefinder.rb +602 -0
- data/plugins/sslchecker/cli/sslchecker_cli.rb +21 -0
- data/plugins/sslchecker/gui/cipher_table.rb +260 -0
- data/plugins/sslchecker/gui/gui.rb +245 -0
- data/plugins/sslchecker/gui/sslchecker.rb +26 -0
- data/plugins/sslchecker/icons/green_16x16.ico +0 -0
- data/plugins/sslchecker/icons/grey_16x16.ico +0 -0
- data/plugins/sslchecker/icons/red_16x16.ico +0 -0
- data/plugins/sslchecker/icons/sslchecker.ico +0 -0
- data/plugins/sslchecker/lib/check.rb +117 -0
- metadata +317 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
# .
|
2
|
+
# secure_eval.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 Utils
|
24
|
+
|
25
|
+
def Utils.secure_eval(exp)
|
26
|
+
result = nil
|
27
|
+
t = Thread.new(exp) { |e|
|
28
|
+
e.untaint
|
29
|
+
# $SAFE = 3
|
30
|
+
$SAFE = 4 # does not work here
|
31
|
+
begin
|
32
|
+
|
33
|
+
result = eval(e)
|
34
|
+
|
35
|
+
|
36
|
+
rescue SyntaxError => bang
|
37
|
+
puts bang
|
38
|
+
puts bang.backtrace if $DEBUG
|
39
|
+
rescue LocalJumpError => bang
|
40
|
+
puts bang
|
41
|
+
puts bang.backtrace if $DEBUG
|
42
|
+
rescue SecurityError => bang
|
43
|
+
puts "WARNING: Desired functionality forbidden. it may harm your system!"
|
44
|
+
puts bang.backtrace if $DEBUG
|
45
|
+
rescue => bang
|
46
|
+
puts bang
|
47
|
+
puts bang.backtrace if $DEBUG
|
48
|
+
|
49
|
+
end
|
50
|
+
}
|
51
|
+
t.join
|
52
|
+
return result
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# .
|
2
|
+
# text2request.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 Utils
|
24
|
+
def Utils.text2request(text)
|
25
|
+
result = []
|
26
|
+
if text =~ /\n\n/
|
27
|
+
dummy = text.split(/\n\n/)
|
28
|
+
header = dummy.shift.split(/\n/)
|
29
|
+
body = dummy.join("\n\n")
|
30
|
+
else
|
31
|
+
header = text.split(/\n/)
|
32
|
+
body = nil
|
33
|
+
end
|
34
|
+
|
35
|
+
header.each do |h|
|
36
|
+
result.push "#{h}\r\n"
|
37
|
+
end
|
38
|
+
|
39
|
+
result.extend Watobo::Mixin::Parser::Url
|
40
|
+
result.extend Watobo::Mixin::Parser::Web10
|
41
|
+
result.extend Watobo::Mixin::Shaper::Web10
|
42
|
+
|
43
|
+
ct = result.content_type
|
44
|
+
# last line is without "\r\n" if text has a body
|
45
|
+
if ct =~ /multipart\/form/ and body then
|
46
|
+
#Content-Type: multipart/form-data; boundary=---------------------------3035221901842
|
47
|
+
if ct =~ /boundary=([\-\w]+)/
|
48
|
+
boundary = $1.strip
|
49
|
+
chunks = body.split(boundary)
|
50
|
+
e = chunks.pop # remove "--"
|
51
|
+
new_body = []
|
52
|
+
chunks.each do |c|
|
53
|
+
new_chunk = ''
|
54
|
+
c.gsub!(/[\-]+$/,'')
|
55
|
+
next if c.nil?
|
56
|
+
next if c.strip.empty?
|
57
|
+
c.strip!
|
58
|
+
if c =~ /\n\n/
|
59
|
+
ctmp = c.split(/\n\n/)
|
60
|
+
cheader = ctmp.shift.split(/\n/)
|
61
|
+
cbody = ctmp.join("\n\n")
|
62
|
+
else
|
63
|
+
cheader = c.split(/\n/)
|
64
|
+
cbody = nil
|
65
|
+
end
|
66
|
+
new_chunk = cheader.join("\r\n")
|
67
|
+
new_chunk += "\r\n\r\n"
|
68
|
+
new_chunk += cbody.strip + "\r\n" if cbody
|
69
|
+
|
70
|
+
# puts cbody
|
71
|
+
new_body.push new_chunk
|
72
|
+
|
73
|
+
end
|
74
|
+
body = "--#{boundary}\r\n"
|
75
|
+
body += new_body.join("--#{boundary}\r\n")
|
76
|
+
body += "--#{boundary}--"
|
77
|
+
end
|
78
|
+
# body.gsub!(/\n/, "\r\n") if body
|
79
|
+
|
80
|
+
end
|
81
|
+
|
82
|
+
if body then
|
83
|
+
result.push "\r\n"
|
84
|
+
result.push body.strip
|
85
|
+
end
|
86
|
+
|
87
|
+
|
88
|
+
return result
|
89
|
+
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
if __FILE__ == $0
|
95
|
+
# TODO Generated stub
|
96
|
+
end
|
data/lib/watobo/utils.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# .
|
2
|
+
# utils.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 Utils
|
24
|
+
utils_path = File.expand_path(File.join(File.dirname(__FILE__), "utils"))
|
25
|
+
#puts "* loading utils #{utils_path}"
|
26
|
+
Dir.glob("#{utils_path}/*.rb").each do |cf|
|
27
|
+
puts "+ #{File.basename(cf)}" if $DEBUG
|
28
|
+
require File.join("watobo","utils", File.basename(cf))
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/watobo.rb
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# .
|
2
|
+
# watobo.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
|
+
require 'rubygems'
|
23
|
+
require 'yaml'
|
24
|
+
require 'thread'
|
25
|
+
require 'socket'
|
26
|
+
require 'timeout'
|
27
|
+
require 'openssl'
|
28
|
+
require 'optparse'
|
29
|
+
require 'digest/md5'
|
30
|
+
require 'zlib'
|
31
|
+
require 'base64'
|
32
|
+
require 'cgi'
|
33
|
+
require 'pathname'
|
34
|
+
|
35
|
+
require 'watobo/constants'
|
36
|
+
require 'watobo/utils'
|
37
|
+
require 'watobo/mixins'
|
38
|
+
require 'watobo/config'
|
39
|
+
require 'watobo/defaults'
|
40
|
+
require 'watobo/core'
|
41
|
+
require 'watobo/externals'
|
42
|
+
require 'watobo/adapters'
|
43
|
+
require 'watobo/framework'
|
44
|
+
|
45
|
+
module Watobo
|
46
|
+
|
47
|
+
VERSION = "0.9.8.677"
|
48
|
+
|
49
|
+
def self.base_directory
|
50
|
+
@base_directory ||= ""
|
51
|
+
@base_directory = File.expand_path(File.join(File.dirname(__FILE__),".."))
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.plugin_path
|
55
|
+
@plugin_directory ||= ""
|
56
|
+
@plugin_directory = File.join(base_directory, "plugins")
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.active_module_path
|
60
|
+
@active_module_path = ""
|
61
|
+
@active_path = File.join(base_directory, "modules", "active")
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.passive_module_path
|
65
|
+
@passive_module_path = ""
|
66
|
+
@passive_path = File.join(base_directory, "modules", "passive")
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.version
|
70
|
+
Watobo::VERSION
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
puts "* init framework ..."
|
75
|
+
Watobo.init_framework
|
76
|
+
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# .
|
2
|
+
# mod_status.rb
|
3
|
+
#
|
4
|
+
# Copyright 2010 by it.sec, http://www.www.it-sec.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 Modules
|
24
|
+
module Active
|
25
|
+
module Apache
|
26
|
+
class Mod_status < Watobo::ActiveCheck
|
27
|
+
def reset()
|
28
|
+
#@checked_dirs.clear
|
29
|
+
end
|
30
|
+
|
31
|
+
def initialize(project, prefs={})
|
32
|
+
super(project, prefs)
|
33
|
+
|
34
|
+
@info.update(
|
35
|
+
:check_name => 'Server-Status page', # name of check which briefly describes functionality, will be used for tree and progress views
|
36
|
+
:description => "Check for status page created by mod_status", # description of checkfunction
|
37
|
+
:author => "Hans-Martin Muench", # author of check
|
38
|
+
:check_group => AC_GROUP_APACHE,
|
39
|
+
:version => "0.1" # check version
|
40
|
+
)
|
41
|
+
|
42
|
+
@finding.update(
|
43
|
+
:class => "Information disclosure", # vulnerability class, e.g. Stored XSS, SQL-Injection, ...
|
44
|
+
:type => FINDING_TYPE_HINT, # FINDING_TYPE_HINT, FINDING_TYPE_INFO, FINDING_TYPE_VULN
|
45
|
+
:measure => "Disable the mod_status module or restrict the access to the status page",
|
46
|
+
:threat => "The result page of the mod-status module is accessible without authentication. This page contains information about the server activity and performance"
|
47
|
+
)
|
48
|
+
|
49
|
+
@status_checks = ['/server-status/', '/server_status/', '/serverstatus/', '/mod-status/', '/mod_status/', '/modstatus', 'status']
|
50
|
+
|
51
|
+
@checked_sites = Hash.new
|
52
|
+
end
|
53
|
+
|
54
|
+
def generateChecks(chat)
|
55
|
+
if not @checked_sites.has_key?(chat.request.site)
|
56
|
+
@checked_sites[chat.request.site] = :checked
|
57
|
+
@status_checks.each do |status_path|
|
58
|
+
checker = proc {
|
59
|
+
|
60
|
+
test_request = nil
|
61
|
+
test_response = nil
|
62
|
+
|
63
|
+
# IMPORTANT!!!
|
64
|
+
# use copyRequest(chat) for cloning the original request
|
65
|
+
test = chat.copyRequest
|
66
|
+
test.setDir(status_path)
|
67
|
+
|
68
|
+
status, test_request, test_response = fileExists?(test, :default => true)
|
69
|
+
|
70
|
+
if test_response.status =~ /200/ and test_response.join =~ /Apache Server Status for/ then
|
71
|
+
|
72
|
+
addFinding( test_request, test_response,
|
73
|
+
:check_pattern => "#{status_path}",
|
74
|
+
:proof_pattern => "Apache Server Status for",
|
75
|
+
:test_item => status_path,
|
76
|
+
:chat => chat,
|
77
|
+
:title => "[Server] - Server-Status page",
|
78
|
+
:rating => VULN_RATING_LOW
|
79
|
+
)
|
80
|
+
|
81
|
+
elsif test_response.status =~ /403/ then
|
82
|
+
|
83
|
+
addFinding( test_request, test_response,
|
84
|
+
:threat => "Mod-status is installed but access is denied",
|
85
|
+
:measure => "Disable the mod_status module if not needed",
|
86
|
+
:check_pattern => "#{status_path}",
|
87
|
+
:proof_pattern => "403 Forbidden",
|
88
|
+
:test_item => status_path,
|
89
|
+
:type => FINDING_TYPE_INFO,
|
90
|
+
:class => "Information",
|
91
|
+
:chat => chat,
|
92
|
+
:title => "[Server] - Server-Status page",
|
93
|
+
:rating => VULN_RATING_LOW
|
94
|
+
)
|
95
|
+
|
96
|
+
elsif test_response.status =~ /401/ then
|
97
|
+
|
98
|
+
addFinding( test_request, test_response,
|
99
|
+
:threat => "Mod-status is installed but access is password protected",
|
100
|
+
:measure => "Disable the mod_status module if not needed",
|
101
|
+
:check_pattern => "#{status_path}",
|
102
|
+
:proof_pattern => "401 Unauthorized",
|
103
|
+
:test_item => status_path,
|
104
|
+
:type => FINDING_TYPE_HINT,
|
105
|
+
:class => "Information",
|
106
|
+
:chat => chat,
|
107
|
+
:title => "[Server] - Server-Status page",
|
108
|
+
:rating => VULN_RATING_LOW
|
109
|
+
)
|
110
|
+
|
111
|
+
end
|
112
|
+
|
113
|
+
[ test_request, test_response ]
|
114
|
+
}
|
115
|
+
yield checker
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# .
|
2
|
+
# crossdomain.rb
|
3
|
+
#
|
4
|
+
# Copyright 2010 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 Modules
|
24
|
+
module Active
|
25
|
+
module Flash
|
26
|
+
|
27
|
+
|
28
|
+
class Crossdomain < Watobo::ActiveCheck
|
29
|
+
|
30
|
+
def reset()
|
31
|
+
@checked_dirs.clear
|
32
|
+
end
|
33
|
+
|
34
|
+
def initialize(project, prefs={})
|
35
|
+
super(project, prefs)
|
36
|
+
@info.update(
|
37
|
+
:check_name => 'Crossdomain Policy', # name of check which briefly describes functionality, will be used for tree and progress views
|
38
|
+
:description => "Check for crossdomain.xml weaknesses", # description of checkfunction
|
39
|
+
:check_group => AC_GROUP_FLASH,
|
40
|
+
:author => "Hans-Martin Muench", # author of check
|
41
|
+
:version => "0.1" # check version
|
42
|
+
)
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
@finding.update(
|
47
|
+
:class => "Crossdomain.xml check", # vulnerability class, e.g. Stored XSS, SQL-Injection, ...
|
48
|
+
:type => FINDING_TYPE_VULN # FINDING_TYPE_HINT, FINDING_TYPE_INFO, FINDING_TYPE_VULN
|
49
|
+
)
|
50
|
+
|
51
|
+
|
52
|
+
@checked_dirs = Hash.new
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
def generateChecks(chat)
|
57
|
+
directory = chat.request.dir
|
58
|
+
if not @checked_dirs.has_key?(directory)
|
59
|
+
@checked_dirs[directory] = :checked
|
60
|
+
checker = proc {
|
61
|
+
test_request = nil
|
62
|
+
test_response = nil
|
63
|
+
path = directory + "/crossdomain.xml"
|
64
|
+
|
65
|
+
# IMPORTANT!!!
|
66
|
+
# use copyRequest(chat) for cloning the original request
|
67
|
+
test = chat.copyRequest
|
68
|
+
test.setDir(path)
|
69
|
+
status, test_request, test_response = fileExists?(test, :default => true)
|
70
|
+
|
71
|
+
if status == true
|
72
|
+
|
73
|
+
# Do a simple match on the response to detect
|
74
|
+
# if we have <allow-access-from domain="*"/>
|
75
|
+
if test_response.join =~ /<allow-access-from\s+domain="\*"\s+/i then
|
76
|
+
|
77
|
+
proof_pattern = $~
|
78
|
+
|
79
|
+
addFinding( test_request, test_response,
|
80
|
+
:check_pattern => "<allow-access-from\\s+domain=\"*\"\\s+",
|
81
|
+
:proof_pattern => proof_pattern.to_s,
|
82
|
+
:test_item => "test-item",
|
83
|
+
:chat => chat,
|
84
|
+
:title => "Badly configured crossdomain.xml",
|
85
|
+
:rating => VULN_RATING_CRITICAL,
|
86
|
+
:threat => "The current crossdomain.xml policy allows cross domain access from everywhere",
|
87
|
+
:measure => "Restrict the allowed hosts setting inside the policy",
|
88
|
+
:class => "Flash security"
|
89
|
+
)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
[ test_request, test_response ]
|
93
|
+
|
94
|
+
}
|
95
|
+
yield checker
|
96
|
+
end # end ifnot
|
97
|
+
end
|
98
|
+
end # end proc
|
99
|
+
end # end class
|
100
|
+
end # end module flash
|
101
|
+
end # end Active
|
102
|
+
end # End modules
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# .
|
2
|
+
# dirwalker.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 Modules
|
24
|
+
module Active
|
25
|
+
module Directories
|
26
|
+
|
27
|
+
#class Dir_indexing < Watobo::Mixin::Session
|
28
|
+
class Dirwalker < Watobo::ActiveCheck
|
29
|
+
@@tested_directories = Hash.new
|
30
|
+
|
31
|
+
def initialize(project, prefs={})
|
32
|
+
super(project, prefs)
|
33
|
+
|
34
|
+
@info.update(
|
35
|
+
:check_name => 'Directory Walker', # name of check which briefly describes functionality, will be used for tree and progress views
|
36
|
+
:description => "Do request on each directory and run passive checks on result.", # description of checkfunction
|
37
|
+
:author => "Andreas Schmidt", # author of check
|
38
|
+
:version => "1.0" # check version
|
39
|
+
)
|
40
|
+
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
def reset()
|
45
|
+
@@tested_directories.clear
|
46
|
+
end
|
47
|
+
|
48
|
+
def generateChecks(chat)
|
49
|
+
|
50
|
+
begin
|
51
|
+
path = chat.request.dir
|
52
|
+
if !@@tested_directories.has_key?(path) then
|
53
|
+
@@tested_directories[path] = true
|
54
|
+
checker = proc {
|
55
|
+
begin
|
56
|
+
test_request = nil
|
57
|
+
test_response = nil
|
58
|
+
# !!! ATTENTION !!!
|
59
|
+
# MAKE COPY BEFORE MODIFIYING REQUEST
|
60
|
+
test = chat.copyRequest
|
61
|
+
test.strip_path()
|
62
|
+
# puts "!Dirwalker"
|
63
|
+
# puts test.first
|
64
|
+
# fire it up!
|
65
|
+
test_request, test_response = doRequest(test, :default => true)
|
66
|
+
#nc = Qchat.new(test_request, test_response, chat.id)
|
67
|
+
#@project.runPassiveChecks(nc)
|
68
|
+
[ test_request, test_response ]
|
69
|
+
|
70
|
+
rescue => bang
|
71
|
+
puts bang
|
72
|
+
puts bang.backtrace if $DEBUG
|
73
|
+
end
|
74
|
+
[ nil, nil ]
|
75
|
+
|
76
|
+
}
|
77
|
+
yield checker
|
78
|
+
end
|
79
|
+
rescue => bang
|
80
|
+
puts "!error in module #{Module.nesting[0].name}"
|
81
|
+
puts bang
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|