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.
- 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,86 @@
|
|
|
1
|
+
# .
|
|
2
|
+
# detect_one_time_tokens.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 Passive
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Detect_one_time_tokens < Watobo::PassiveCheck
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def initialize(project)
|
|
31
|
+
@project = project
|
|
32
|
+
super(project)
|
|
33
|
+
begin
|
|
34
|
+
@info.update(
|
|
35
|
+
:check_name => 'Detect One-Time-Tokens', # name of check which briefly describes functionality, will be used for tree and progress views
|
|
36
|
+
:description => "Detects parameters which are used as One-Time-Tokens to prevent CSRF-Attacks.", # description of checkfunction
|
|
37
|
+
:author => "Andreas Schmidt", # author of check
|
|
38
|
+
:version => "0.9" # check version
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
@finding.update(
|
|
42
|
+
:threat => 'Informational', # thread of vulnerability, e.g. loss of information
|
|
43
|
+
:class => "One-Time-Tokens", # vulnerability class, e.g. Stored XSS, SQL-Injection, ...
|
|
44
|
+
:type => FINDING_TYPE_HINT # FINDING_TYPE_HINT, FINDING_TYPE_INFO, FINDING_TYPE_VULN
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@pattern_list = []
|
|
49
|
+
@pattern_list << "csrf"
|
|
50
|
+
@pattern_list << "token"
|
|
51
|
+
rescue => bang
|
|
52
|
+
puts bang
|
|
53
|
+
puts bang.backtrace if $DEBUG
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def do_test(chat)
|
|
58
|
+
begin
|
|
59
|
+
parm_names = chat.request.parm_names
|
|
60
|
+
|
|
61
|
+
parm_names.each do |parm|
|
|
62
|
+
@pattern_list.each do |pat|
|
|
63
|
+
#puts "+check pattern #{pat}"
|
|
64
|
+
if parm =~ /(#{pat})/i then
|
|
65
|
+
match = $1
|
|
66
|
+
# puts match
|
|
67
|
+
addFinding(
|
|
68
|
+
:check_pattern => "#{pat}",
|
|
69
|
+
:proof_pattern => "#{match}",
|
|
70
|
+
:title => "[#{parm}] - #{chat.request.path}",
|
|
71
|
+
:chat => chat
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
rescue => bang
|
|
78
|
+
puts "ERROR!! #{Module.nesting[0].name}"
|
|
79
|
+
puts bang
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# .
|
|
2
|
+
# dirindexing.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
|
+
|
|
23
|
+
module Watobo
|
|
24
|
+
module Modules
|
|
25
|
+
module Passive
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class Dirindexing < Watobo::PassiveCheck
|
|
29
|
+
|
|
30
|
+
def initialize(project)
|
|
31
|
+
@project = project
|
|
32
|
+
super(project)
|
|
33
|
+
@info.update(
|
|
34
|
+
:check_name => 'Directory Indexing', # name of check which briefly describes functionality, will be used for tree and progress views
|
|
35
|
+
:description => "Detects if directory indexing is not disabled.", # description of checkfunction
|
|
36
|
+
:author => "Andreas Schmidt", # author of check
|
|
37
|
+
:version => "0.9" # check version
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
@finding.update(
|
|
41
|
+
:threat => 'May reveal sensitive information..', # thread of vulnerability, e.g. loss of information
|
|
42
|
+
:class => "Directory Indexing", # vulnerability class, e.g. Stored XSS, SQL-Injection, ...
|
|
43
|
+
:type => FINDING_TYPE_VULN, # FINDING_TYPE_HINT, FINDING_TYPE_INFO, FINDING_TYPE_VULN
|
|
44
|
+
:rating => VULN_RATING_LOW
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
@tested_directories = []
|
|
48
|
+
|
|
49
|
+
@pattern_list = []
|
|
50
|
+
@pattern_list << 'Parent Directory</a>'
|
|
51
|
+
@pattern_list << 'Directory Listing for'
|
|
52
|
+
@pattern_list << '<title>.*Folder Listing.*<\/title>'
|
|
53
|
+
@pattern_list << '<title>.*Index of /.*</title>'
|
|
54
|
+
|
|
55
|
+
@pattern_list << '<table summary="Directory Listing" '
|
|
56
|
+
@pattern_list << 'Browsing directory'
|
|
57
|
+
@pattern_list << 'To Parent Directory'
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def do_test(chat)
|
|
61
|
+
begin
|
|
62
|
+
@pattern_list.each do |pat|
|
|
63
|
+
if chat.response.body =~ /(#{pat})/i then
|
|
64
|
+
match = $1
|
|
65
|
+
addFinding(
|
|
66
|
+
:proof_pattern => "#{match}",
|
|
67
|
+
:chat => chat,
|
|
68
|
+
:title => "/#{chat.request.path}"
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
rescue => bang
|
|
73
|
+
puts "ERROR!! #{Module.nesting[0].name}"
|
|
74
|
+
puts bang
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# .
|
|
2
|
+
# disclosure_emails.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 Passive
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Disclosure_emails < Watobo::PassiveCheck
|
|
28
|
+
|
|
29
|
+
def initialize(project)
|
|
30
|
+
@project = project
|
|
31
|
+
super(project)
|
|
32
|
+
|
|
33
|
+
@info.update(
|
|
34
|
+
:check_name => 'Email Adresses', # name of check which briefly describes functionality, will be used for tree and progress views
|
|
35
|
+
:description => "Collects email adresses.", # description of checkfunction
|
|
36
|
+
:author => "Andreas Schmidt", # author of check
|
|
37
|
+
:version => "0.9" # check version
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
@finding.update(
|
|
41
|
+
:threat => 'email adresses can be used for social engineering attacks.', # thread of vulnerability, e.g. loss of information
|
|
42
|
+
:class => "EMail Adresses", # vulnerability class, e.g. Stored XSS, SQL-Injection, ...
|
|
43
|
+
:type => FINDING_TYPE_INFO # FINDING_TYPE_HINT, FINDING_TYPE_INFO, FINDING_TYPE_VULN
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
valid = '[a-zA-Z\d\.+-]+'
|
|
47
|
+
@pattern = "#{valid}@#{valid}\\.(#{valid}){2}"
|
|
48
|
+
@mail_list = []
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def do_test(chat)
|
|
52
|
+
begin
|
|
53
|
+
# puts "running module: #{Module.nesting[0].name}"
|
|
54
|
+
if chat.response.content_type =~ /text/ and not chat.response.content_type =~ /text.csv/ then
|
|
55
|
+
if chat.response.each do |line|
|
|
56
|
+
if line =~ /(#{@pattern})/ then
|
|
57
|
+
match = $1
|
|
58
|
+
if not @mail_list.include?(match) then
|
|
59
|
+
@mail_list.push match
|
|
60
|
+
addFinding(
|
|
61
|
+
:proof_pattern => "#{match}",
|
|
62
|
+
:chat => chat,
|
|
63
|
+
:title => match
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
rescue => bang
|
|
72
|
+
# raise
|
|
73
|
+
puts "ERROR!! #{self.class}"
|
|
74
|
+
puts bang
|
|
75
|
+
puts bang.backtrace if $DEBUG
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# .
|
|
2
|
+
# disclosure_ipaddr.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
|
+
|
|
23
|
+
module Watobo
|
|
24
|
+
module Modules
|
|
25
|
+
module Passive
|
|
26
|
+
|
|
27
|
+
class Disclosure_ipaddr < Watobo::PassiveCheck
|
|
28
|
+
|
|
29
|
+
def initialize(project)
|
|
30
|
+
@project = project
|
|
31
|
+
super(project)
|
|
32
|
+
@info.update(
|
|
33
|
+
:check_name => 'IP Adress Disclosure', # name of check which briefly describes functionality, will be used for tree and progress views
|
|
34
|
+
:description => 'Looks for (internal) IP adresses.', # description of checkfunction
|
|
35
|
+
:author => "Andreas Schmidt", # author of check
|
|
36
|
+
:version => "0.9" # check version
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
@finding.update(
|
|
40
|
+
:threat => 'Internal information may be revealed, which could help an attacker to prepare further attacks', # thread of vulnerability, e.g. loss of information
|
|
41
|
+
:class => "IP Adress Disclosure",# vulnerability class, e.g. Stored XSS, SQL-Injection, ...
|
|
42
|
+
:type => FINDING_TYPE_INFO, # FINDING_TYPE_HINT, FINDING_TYPE_INFO, FINDING_TYPE_VULN
|
|
43
|
+
:measure => "Remove all information which reveal internal information."
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
@pattern = '[^\d\.](\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})[^(\d\.)]+?'
|
|
47
|
+
@known_ips = []
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def do_test(chat)
|
|
51
|
+
begin
|
|
52
|
+
# puts "running module: #{Module.nesting[0].name}"
|
|
53
|
+
if chat.response.content_type =~ /text/ then
|
|
54
|
+
if chat.response.each do |line|
|
|
55
|
+
if line =~ /#{@pattern}/ then
|
|
56
|
+
ip_addr = $1
|
|
57
|
+
octets = ip_addr.split('.')
|
|
58
|
+
isIP = true
|
|
59
|
+
octets.each do |o|
|
|
60
|
+
isIP = false if o.to_i > 255
|
|
61
|
+
end
|
|
62
|
+
if isIP then
|
|
63
|
+
title = "IP: #{ip_addr}"
|
|
64
|
+
dummy = chat.request.site + ":" + ip_addr
|
|
65
|
+
if not @known_ips.include?(dummy)
|
|
66
|
+
addFinding( :proof_pattern => ip_addr,
|
|
67
|
+
:chat => chat,
|
|
68
|
+
:title => title)
|
|
69
|
+
@known_ips.push dummy
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
rescue => bang
|
|
78
|
+
# raise
|
|
79
|
+
puts "ERROR!! #{Module.nesting[0].name}"
|
|
80
|
+
puts bang
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# .
|
|
2
|
+
# filename_as_parameter.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 Passive
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Filename_as_parameter < Watobo::PassiveCheck
|
|
28
|
+
|
|
29
|
+
def initialize(project)
|
|
30
|
+
@project = project
|
|
31
|
+
super(project)
|
|
32
|
+
|
|
33
|
+
@info.update(
|
|
34
|
+
:check_name => 'Detect Filename Parameters', # name of check which briefly describes functionality, will be used for tree and progress views
|
|
35
|
+
:description => "Detects parameters which sounds like 'filename', e.g. filename, fname.", # description of checkfunction
|
|
36
|
+
:author => "Andreas Schmidt", # author of check
|
|
37
|
+
:version => "0.9" # check version
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
@finding.update(
|
|
41
|
+
:threat => 'If filename parameters are not proper handled by the application an attacker may excecute malicious files or reveal sensitive information.', # thread of vulnerability, e.g. loss of information
|
|
42
|
+
:class => "Filename Parameter", # vulnerability class, e.g. Stored XSS, SQL-Injection, ...
|
|
43
|
+
:type => FINDING_TYPE_HINT # FINDING_TYPE_HINT, FINDING_TYPE_INFO, FINDING_TYPE_VULN
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@possible_parm_names=%w[ (.*fname.*) (.*file.*) ]
|
|
48
|
+
@findings = []
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def do_test(chat)
|
|
52
|
+
begin
|
|
53
|
+
# puts "running module: #{Module.nesting[0].name}"
|
|
54
|
+
all_parms = chat.request.parm_names
|
|
55
|
+
if all_parms
|
|
56
|
+
# puts all_parms
|
|
57
|
+
all_parms.each do |parm|
|
|
58
|
+
@possible_parm_names.each do |pattern|
|
|
59
|
+
|
|
60
|
+
if parm =~ /#{pattern}/i
|
|
61
|
+
match = $1
|
|
62
|
+
if not @findings.include?(parm)
|
|
63
|
+
@findings.push parm
|
|
64
|
+
addFinding(
|
|
65
|
+
:check_pattern => match,
|
|
66
|
+
:chat=>chat
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
rescue => bang
|
|
77
|
+
puts "ERROR!! #{Module.nesting[0].name}"
|
|
78
|
+
puts bang
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# .
|
|
2
|
+
# form_spotter.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 Passive
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Form_spotter < Watobo::PassiveCheck
|
|
28
|
+
def initialize(project)
|
|
29
|
+
@project = project
|
|
30
|
+
super(project)
|
|
31
|
+
|
|
32
|
+
@info.update(
|
|
33
|
+
:check_name => 'Form Spotter', # name of check which briefly describes functionality, will be used for tree and progress views
|
|
34
|
+
:description => "Detects all HTML-Forms", # description of checkfunction
|
|
35
|
+
:author => "Andreas Schmidt", # author of check
|
|
36
|
+
:version => "0.9" # check version
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
@finding.update(
|
|
40
|
+
:threat => 'Lists all HTML-Forms.', # thread of vulnerability, e.g. loss of information
|
|
41
|
+
:class => "Forms", # vulnerability class, e.g. Stored XSS, SQL-Injection, ...
|
|
42
|
+
:type => FINDING_TYPE_INFO, # FINDING_TYPE_HINT, FINDING_TYPE_INFO, FINDING_TYPE_VULN
|
|
43
|
+
:measure => "Check if all forms are checked for vulnerabilities."
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def do_test(chat)
|
|
48
|
+
begin
|
|
49
|
+
# puts "running module: #{Module.nesting[0].name}"
|
|
50
|
+
return true unless chat.response.content_type =~ /(text|script)/
|
|
51
|
+
return true if chat.response.body.nil?
|
|
52
|
+
off = chat.response.body.index(/<form/i, 0)
|
|
53
|
+
until off.nil?
|
|
54
|
+
action = chat.response.body[off..-1] =~ /<form [^<\/form]*action="([^"]*)"/i ? $1 : "undefined"
|
|
55
|
+
# puts "!FOUND FORM #{action}"
|
|
56
|
+
addFinding(
|
|
57
|
+
:proof_pattern => "<form [^>]*>",
|
|
58
|
+
:title => "#{action}",
|
|
59
|
+
:chat => chat
|
|
60
|
+
)
|
|
61
|
+
off = chat.response.body.index(/<form/i, off+1)
|
|
62
|
+
end
|
|
63
|
+
rescue => bang
|
|
64
|
+
# raise
|
|
65
|
+
puts "ERROR!! #{Module.nesting[0].name}"
|
|
66
|
+
puts bang
|
|
67
|
+
puts bang.backtrace if $DEBUG
|
|
68
|
+
end
|
|
69
|
+
return false
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# .
|
|
2
|
+
# hotspots.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 Passive
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Hotspots < Watobo::PassiveCheck
|
|
28
|
+
def initialize(project)
|
|
29
|
+
@project = project
|
|
30
|
+
super(project)
|
|
31
|
+
|
|
32
|
+
@info.update(
|
|
33
|
+
:check_name => 'Active Content References', # name of check which briefly describes functionality, will be used for tree and progress views
|
|
34
|
+
:description => "Detects all references to active content pages, e.g. php, asp.", # description of checkfunction
|
|
35
|
+
:author => "Andreas Schmidt", # author of check
|
|
36
|
+
:version => "0.9" # check version
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
@finding.update(
|
|
40
|
+
:threat => 'References to active content pages have been found. Sometimes old and/or vulnerable functions are revealed. With this information you can also estimate if all parts of the application are covered.', # thread of vulnerability, e.g. loss of information
|
|
41
|
+
:class => "Hotspots", # vulnerability class, e.g. Stored XSS, SQL-Injection, ...
|
|
42
|
+
:type => FINDING_TYPE_INFO, # FINDING_TYPE_HINT, FINDING_TYPE_INFO, FINDING_TYPE_VULN
|
|
43
|
+
:measure => "Check if these references are only pointing to \"good\" functions."
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@pattern_list = %w( php asp aspx jsp cgi )
|
|
49
|
+
|
|
50
|
+
@known_functions = []
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def do_test(chat)
|
|
54
|
+
begin
|
|
55
|
+
# puts "running module: #{Module.nesting[0].name}"
|
|
56
|
+
if chat.response.content_type =~ /(text|script)/ and chat.response.status !~ /404/ then
|
|
57
|
+
if chat.response.each do |chunk|
|
|
58
|
+
chunk.split(/\n/).each do |line|
|
|
59
|
+
@pattern_list.each do |ext|
|
|
60
|
+
if line =~ /([\w%\/\\\.:-]*\.#{ext})[^\w]/ then
|
|
61
|
+
match = $1
|
|
62
|
+
if not @known_functions.include?(match) then
|
|
63
|
+
addFinding(
|
|
64
|
+
:proof_pattern => match,
|
|
65
|
+
:title => match,
|
|
66
|
+
:chat => chat
|
|
67
|
+
)
|
|
68
|
+
@known_functions.push match
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
rescue => bang
|
|
77
|
+
# raise
|
|
78
|
+
puts "ERROR!! #{Module.nesting[0].name}"
|
|
79
|
+
puts bang
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# .
|
|
2
|
+
# in_script_parameter.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 'cgi'
|
|
23
|
+
module Watobo
|
|
24
|
+
module Modules
|
|
25
|
+
module Passive
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class In_script_parameter < Watobo::PassiveCheck
|
|
29
|
+
|
|
30
|
+
def initialize(project)
|
|
31
|
+
@project = project
|
|
32
|
+
super(project)
|
|
33
|
+
|
|
34
|
+
@info.update(
|
|
35
|
+
:check_name => 'Parameters in Script', # name of check which briefly describes functionality, will be used for tree and progress views
|
|
36
|
+
:description => "Checks if parameter values are used within script-tags.", # description of checkfunction
|
|
37
|
+
:author => "Andreas Schmidt", # author of check
|
|
38
|
+
:version => "0.9" # check version
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
@finding.update(
|
|
42
|
+
:threat => 'Parameter value may be exploitable for XSS.', # thread of vulnerability, e.g. loss of information
|
|
43
|
+
:class => "Script-Parameters", # vulnerability class, e.g. Stored XSS, SQL-Injection, ...
|
|
44
|
+
:type => FINDING_TYPE_HINT # FINDING_TYPE_HINT, FINDING_TYPE_INFO, FINDING_TYPE_VULN
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def showError(chatid, message)
|
|
50
|
+
puts "!!! Error"
|
|
51
|
+
puts "Chat: [#{chatid}]"
|
|
52
|
+
puts message
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def do_test(chat)
|
|
56
|
+
begin
|
|
57
|
+
parm_values = []
|
|
58
|
+
minlen = 3
|
|
59
|
+
return true unless chat.response.content_type =~ /(text|script)/
|
|
60
|
+
chat.request.get_parm_names.each do |parm|
|
|
61
|
+
pv = Regexp.quote(chat.request.get_parm_value(parm))
|
|
62
|
+
parm_values.push pv unless pv.strip.empty? or pv.strip.length < minlen
|
|
63
|
+
end
|
|
64
|
+
chat.request.post_parm_names.each do |parm|
|
|
65
|
+
pv = chat.request.post_parm_value(parm)
|
|
66
|
+
parm_values.push pv unless pv.strip.empty? or pv.strip.length < minlen
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
parm_values.each do |parm_value|
|
|
70
|
+
|
|
71
|
+
pattern = Regexp.quote(CGI::unescape(parm_value))
|
|
72
|
+
if chat.response.body =~ /<script[^<\/]*#{pattern}/i then
|
|
73
|
+
# puts "* Found: Parameter within script"
|
|
74
|
+
addFinding(
|
|
75
|
+
:check_pattern => "#{parm_value}",
|
|
76
|
+
:proof_pattern => "#{parm_value}",
|
|
77
|
+
:chat=>chat,
|
|
78
|
+
:title =>"[#{parm_value}] - #{chat.request.path}"
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
rescue => bang
|
|
84
|
+
# raise
|
|
85
|
+
showError(chat.id, bang)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|