arachni 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/ACKNOWLEDGMENTS.md +3 -0
- data/CHANGELOG.md +181 -1
- data/README.md +68 -14
- data/Rakefile +1 -5
- data/arachni.gemspec +9 -6
- data/bin/arachni_multi +23 -0
- data/bin/arachni_rpc +2 -2
- data/bin/arachni_rpcd_monitor +1 -1
- data/fingerprinters/frameworks/rack.rb +41 -0
- data/fingerprinters/languages/asp.rb +42 -0
- data/fingerprinters/languages/aspx.rb +63 -0
- data/fingerprinters/languages/jsp.rb +44 -0
- data/fingerprinters/languages/php.rb +43 -0
- data/fingerprinters/languages/python.rb +40 -0
- data/fingerprinters/languages/ruby.rb +41 -0
- data/fingerprinters/os/bsd.rb +36 -0
- data/fingerprinters/os/linux.rb +42 -0
- data/fingerprinters/os/solaris.rb +41 -0
- data/fingerprinters/os/unix.rb +36 -0
- data/fingerprinters/os/windows.rb +41 -0
- data/fingerprinters/servers/apache.rb +36 -0
- data/fingerprinters/servers/iis.rb +36 -0
- data/fingerprinters/servers/jetty.rb +36 -0
- data/fingerprinters/servers/nginx.rb +36 -0
- data/fingerprinters/servers/tomcat.rb +36 -0
- data/lib/arachni/audit_store.rb +3 -4
- data/lib/arachni/banner.rb +0 -2
- data/lib/arachni/element/base.rb +25 -35
- data/lib/arachni/element/capabilities/auditable.rb +265 -133
- data/lib/arachni/element/capabilities/auditable/rdiff.rb +14 -4
- data/lib/arachni/element/capabilities/auditable/taint.rb +32 -10
- data/lib/arachni/element/capabilities/auditable/timeout.rb +59 -29
- data/lib/arachni/element/cookie.rb +4 -3
- data/lib/arachni/element/form.rb +1 -5
- data/lib/arachni/element/header.rb +10 -0
- data/lib/arachni/element/link.rb +0 -1
- data/lib/arachni/element_filter.rb +2 -2
- data/lib/arachni/framework.rb +37 -13
- data/lib/arachni/http.rb +3 -2
- data/lib/arachni/issue.rb +27 -0
- data/lib/arachni/module.rb +16 -0
- data/lib/arachni/module/auditor.rb +107 -70
- data/lib/arachni/module/base.rb +1 -1
- data/lib/arachni/module/key_filler.rb +26 -39
- data/lib/arachni/module/manager.rb +53 -56
- data/lib/arachni/options.rb +126 -19
- data/lib/arachni/page.rb +41 -42
- data/lib/arachni/parser.rb +91 -139
- data/lib/arachni/platform.rb +19 -0
- data/lib/arachni/platform/fingerprinter.rb +100 -0
- data/lib/arachni/platform/list.rb +293 -0
- data/lib/arachni/platform/manager.rb +435 -0
- data/lib/arachni/platforms.rb +498 -0
- data/lib/arachni/plugin.rb +17 -1
- data/lib/arachni/plugin/manager.rb +35 -36
- data/lib/arachni/processes.rb +27 -0
- data/lib/arachni/processes/dispatchers.rb +149 -0
- data/lib/arachni/processes/helpers.rb +19 -0
- data/lib/arachni/processes/helpers/dispatchers.rb +45 -0
- data/lib/arachni/processes/helpers/instances.rb +51 -0
- data/lib/arachni/processes/helpers/processes.rb +51 -0
- data/lib/arachni/processes/instances.rb +196 -0
- data/lib/arachni/processes/manager.rb +129 -0
- data/lib/arachni/report.rb +16 -0
- data/lib/arachni/rpc/client/base.rb +9 -1
- data/lib/arachni/rpc/server/base.rb +1 -0
- data/lib/arachni/rpc/server/dispatcher.rb +60 -24
- data/lib/arachni/rpc/server/dispatcher/handler.rb +4 -2
- data/lib/arachni/rpc/server/dispatcher/node.rb +8 -3
- data/lib/arachni/rpc/server/framework.rb +70 -772
- data/lib/arachni/rpc/server/{distributor.rb → framework/distributor.rb} +150 -117
- data/lib/arachni/rpc/server/framework/master.rb +470 -0
- data/lib/arachni/rpc/server/framework/multi_instance.rb +267 -0
- data/lib/arachni/rpc/server/framework/slave.rb +159 -0
- data/lib/arachni/rpc/server/instance.rb +187 -109
- data/lib/arachni/rpc/server/spider.rb +136 -38
- data/lib/arachni/ruby.rb +19 -0
- data/lib/arachni/ruby/hash.rb +62 -0
- data/lib/arachni/ruby/io.rb +49 -0
- data/lib/arachni/ruby/set.rb +27 -0
- data/lib/arachni/ruby/string.rb +17 -2
- data/lib/arachni/spider.rb +60 -38
- data/lib/arachni/support.rb +26 -0
- data/lib/arachni/support/buffer.rb +19 -0
- data/lib/arachni/support/buffer/autoflush.rb +79 -0
- data/lib/arachni/{buffer → support/buffer}/base.rb +1 -1
- data/lib/arachni/{cache.rb → support/cache.rb} +1 -1
- data/lib/arachni/{cache → support/cache}/base.rb +7 -9
- data/lib/arachni/{cache → support/cache}/least_cost_replacement.rb +7 -1
- data/lib/arachni/{cache → support/cache}/least_recently_used.rb +10 -34
- data/lib/arachni/{cache → support/cache}/preference.rb +8 -3
- data/lib/arachni/{cache → support/cache}/random_replacement.rb +8 -3
- data/lib/arachni/support/crypto.rb +18 -0
- data/lib/arachni/{crypto → support/crypto}/rsa_aes_cbc.rb +7 -4
- data/lib/arachni/support/database.rb +20 -0
- data/lib/arachni/support/database/base.rb +124 -0
- data/lib/arachni/{database → support/database}/hash.rb +1 -1
- data/lib/arachni/{database → support/database}/queue.rb +1 -1
- data/lib/arachni/support/lookup.rb +20 -0
- data/lib/arachni/support/lookup/base.rb +91 -0
- data/lib/arachni/support/lookup/hash_set.rb +42 -0
- data/lib/arachni/support/lookup/moolb.rb +66 -0
- data/lib/arachni/support/queue.rb +18 -0
- data/lib/arachni/support/queue/disk.rb +171 -0
- data/lib/arachni/trainer.rb +2 -2
- data/lib/arachni/ui/cli/cli.rb +22 -0
- data/lib/arachni/ui/cli/rpc/dispatcher_monitor.rb +7 -3
- data/lib/arachni/ui/cli/rpc/{rpc.rb → instance.rb} +69 -97
- data/lib/arachni/ui/cli/rpc/local.rb +80 -0
- data/lib/arachni/ui/cli/rpc/remote.rb +134 -0
- data/lib/arachni/ui/cli/utilities.rb +40 -5
- data/lib/arachni/ui/foo/output.rb +19 -16
- data/lib/arachni/uri.rb +35 -5
- data/lib/arachni/utilities.rb +5 -39
- data/lib/version +1 -1
- data/logs/Dispatcher - 21448-7331.log +17 -0
- data/logs/Dispatcher - 21645-1111.log +13 -0
- data/logs/Dispatcher - 21673-1111.log +21 -0
- data/modules/audit/code_injection.rb +21 -20
- data/modules/audit/code_injection_timing.rb +15 -13
- data/modules/audit/os_cmd_injection.rb +14 -10
- data/modules/audit/os_cmd_injection_timing.rb +12 -12
- data/modules/audit/path_traversal.rb +52 -47
- data/modules/audit/rfi.rb +25 -18
- data/modules/audit/sqli.rb +10 -10
- data/modules/audit/sqli_blind_rdiff.rb +3 -3
- data/modules/audit/sqli_blind_timing.rb +10 -10
- data/modules/audit/sqli_blind_timing/mssql.txt +9 -0
- data/modules/audit/sqli_blind_timing/mysql.txt +32 -0
- data/modules/audit/sqli_blind_timing/pgsql.txt +28 -0
- data/modules/audit/trainer.rb +7 -4
- data/modules/audit/unvalidated_redirect.rb +13 -11
- data/modules/audit/xpath.rb +10 -6
- data/modules/audit/xss_tag.rb +10 -3
- data/modules/recon/grep/html_objects.rb +9 -4
- data/plugins/defaults/content_types.rb +3 -3
- data/plugins/defaults/meta/remedies/timing_attacks.rb +4 -2
- data/plugins/defaults/meta/uniformity.rb +4 -3
- data/plugins/proxy.rb +42 -132
- data/plugins/proxy/panel/panel.html.erb +6 -0
- data/plugins/proxy/panel/vectors.yml.erb +9 -0
- data/plugins/proxy/server.rb +41 -10
- data/plugins/proxy/template_scope.rb +138 -0
- data/plugins/vector_feed.rb +12 -12
- data/reports/html.rb +1 -0
- data/spec/arachni/audit_store_spec.rb +1 -1
- data/spec/arachni/component/manager_spec.rb +10 -57
- data/spec/arachni/component/options/address_spec.rb +1 -1
- data/spec/arachni/component/options/base_spec.rb +1 -1
- data/spec/arachni/component/options/bool_spec.rb +1 -1
- data/spec/arachni/component/options/enum_spec.rb +1 -1
- data/spec/arachni/component/options/float_spec.rb +1 -1
- data/spec/arachni/component/options/int_spec.rb +1 -1
- data/spec/arachni/component/options/path_spec.rb +1 -1
- data/spec/arachni/component/options/port_spec.rb +1 -1
- data/spec/arachni/component/options/string_spec.rb +1 -1
- data/spec/arachni/component/options/url_spec.rb +1 -1
- data/spec/arachni/element/base_spec.rb +16 -5
- data/spec/arachni/element/body_spec.rb +1 -1
- data/spec/arachni/element/capabilities/auditable/rdiff_spec.rb +11 -3
- data/spec/arachni/element/capabilities/auditable/taint_spec.rb +27 -3
- data/spec/arachni/element/capabilities/auditable/timeout_spec.rb +32 -3
- data/spec/arachni/element/capabilities/mutable_spec.rb +1 -1
- data/spec/arachni/element/cookie_spec.rb +21 -7
- data/spec/arachni/element/form_spec.rb +7 -58
- data/spec/arachni/element/header_spec.rb +15 -3
- data/spec/arachni/element/link_spec.rb +3 -26
- data/spec/arachni/element/path_spec.rb +1 -1
- data/spec/arachni/element/server_spec.rb +1 -1
- data/spec/arachni/element_filter_spec.rb +1 -1
- data/spec/arachni/{error.rb → error_spec.rb} +1 -1
- data/spec/arachni/framework_spec.rb +127 -50
- data/spec/arachni/http/cookie_jar_spec.rb +9 -42
- data/spec/arachni/http_spec.rb +9 -21
- data/spec/arachni/issue_spec.rb +29 -1
- data/spec/arachni/mixins/observable_spec.rb +4 -6
- data/spec/arachni/mixins/progress_bar_spec.rb +1 -1
- data/spec/arachni/module/auditor_spec.rb +17 -5
- data/spec/arachni/module/key_filler.rb +33 -8
- data/spec/arachni/module/manager_spec.rb +1 -3
- data/spec/arachni/module/utilities_spec.rb +1 -1
- data/spec/arachni/options_spec.rb +185 -1
- data/spec/arachni/page_spec.rb +16 -3
- data/spec/arachni/parser_spec.rb +27 -123
- data/spec/arachni/platform/fingerprinter_spec.rb +159 -0
- data/spec/arachni/platform/list_spec.rb +399 -0
- data/spec/arachni/platform/manager_spec.rb +373 -0
- data/spec/arachni/plugin/manager_spec.rb +6 -29
- data/spec/arachni/report/base_spec.rb +2 -2
- data/spec/arachni/report/manager_spec.rb +2 -2
- data/spec/arachni/rpc/client/base_spec.rb +22 -27
- data/spec/arachni/rpc/client/dispatcher_spec.rb +4 -15
- data/spec/arachni/rpc/client/instance_spec.rb +3 -11
- data/spec/arachni/rpc/server/active_options_spec.rb +2 -17
- data/spec/arachni/rpc/server/base_spec.rb +23 -7
- data/spec/arachni/rpc/server/dispatcher/handler_spec.rb +4 -21
- data/spec/arachni/rpc/server/dispatcher/node_spec.rb +30 -8
- data/spec/arachni/rpc/server/dispatcher_spec.rb +130 -70
- data/spec/arachni/rpc/server/{distributor_spec.rb → framework/distributor_spec.rb} +95 -130
- data/spec/arachni/rpc/server/framework_hpg_spec.rb +38 -99
- data/spec/arachni/rpc/server/framework_simple_spec.rb +38 -71
- data/spec/arachni/rpc/server/instance_spec.rb +183 -135
- data/spec/arachni/rpc/server/modules/manager_spec.rb +18 -50
- data/spec/arachni/rpc/server/output_spec.rb +1 -1
- data/spec/arachni/rpc/server/plugin/manager_spec.rb +12 -36
- data/spec/arachni/rpc/server/spider_spec.rb +23 -48
- data/spec/arachni/ruby/array_spec.rb +1 -1
- data/spec/arachni/ruby/enumerable_spec.rb +1 -1
- data/spec/arachni/ruby/hash_spec.rb +70 -0
- data/spec/arachni/ruby/io_spec.rb +26 -0
- data/spec/arachni/ruby/object_spec.rb +1 -1
- data/spec/arachni/ruby/set_spec.rb +15 -0
- data/spec/arachni/ruby/string_spec.rb +18 -1
- data/spec/arachni/ruby/webrick_spec.rb +1 -1
- data/spec/arachni/session_spec.rb +3 -3
- data/spec/arachni/spider_spec.rb +30 -6
- data/spec/arachni/{buffer → support/buffer}/autoflush_spec.rb +7 -12
- data/spec/arachni/{buffer → support/buffer}/base_spec.rb +19 -23
- data/spec/arachni/{cache → support/cache}/base_spec.rb +7 -7
- data/spec/arachni/{cache → support/cache}/least_cost_replacement_spec.rb +3 -3
- data/spec/arachni/{cache → support/cache}/least_recently_used_spec.rb +3 -3
- data/spec/arachni/{cache → support/cache}/preference_spec.rb +3 -3
- data/spec/arachni/{cache → support/cache}/random_replacement_spec.rb +3 -3
- data/spec/arachni/{crypto → support/crypto}/rsa_aes_cbc_spec.rb +3 -5
- data/spec/arachni/{database → support/database}/hash_spec.rb +4 -5
- data/spec/arachni/{database → support/database}/queue_spec.rb +3 -4
- data/spec/arachni/support/lookup/hash_set_spec.rb +5 -0
- data/spec/arachni/support/lookup/moolb_spec.rb +41 -0
- data/spec/arachni/support/queue/disk_spec.rb +116 -0
- data/spec/arachni/trainer_spec.rb +6 -2
- data/spec/arachni/typhoeus/hydra_spec.rb +1 -1
- data/spec/arachni/typhoeus/requrest_spec.rb +1 -1
- data/spec/arachni/typhoeus/response_spec.rb +1 -1
- data/spec/arachni/uri_spec.rb +72 -38
- data/spec/arachni/utilities_spec.rb +6 -46
- data/spec/fingerprinters/frameworks/rack_spec.rb +41 -0
- data/spec/fingerprinters/languages/asp_spec.rb +40 -0
- data/spec/fingerprinters/languages/aspx_spec.rb +78 -0
- data/spec/fingerprinters/languages/jsp_spec.rb +58 -0
- data/spec/fingerprinters/languages/php_spec.rb +61 -0
- data/spec/fingerprinters/languages/python_spec.rb +23 -0
- data/spec/fingerprinters/languages/ruby.rb +34 -0
- data/spec/fingerprinters/os/bsd_spec.rb +26 -0
- data/spec/fingerprinters/os/linux_spec.rb +34 -0
- data/spec/fingerprinters/os/solaris_spec.rb +34 -0
- data/spec/fingerprinters/os/unix_spec.rb +26 -0
- data/spec/fingerprinters/os/windows_spec.rb +34 -0
- data/spec/fingerprinters/servers/apache_spec.rb +26 -0
- data/spec/fingerprinters/servers/iis_spec.rb +28 -0
- data/spec/fingerprinters/servers/jetty_spec.rb +28 -0
- data/spec/fingerprinters/servers/nginx_spec.rb +26 -0
- data/spec/fingerprinters/servers/tomcat_spec.rb +28 -0
- data/spec/modules/audit/code_injection_spec.rb +2 -2
- data/spec/modules/audit/code_injection_timing_spec.rb +1 -1
- data/spec/modules/audit/csrf_spec.rb +1 -1
- data/spec/modules/audit/ldapi_spec.rb +1 -1
- data/spec/modules/audit/os_cmd_injection_spec.rb +1 -1
- data/spec/modules/audit/os_cmd_injection_timing_spec.rb +2 -2
- data/spec/modules/audit/path_traversal_spec.rb +1 -1
- data/spec/modules/audit/response_splitting_spec.rb +1 -1
- data/spec/modules/audit/rfi_spec.rb +1 -1
- data/spec/modules/audit/session_fixation_spec.rb +1 -1
- data/spec/modules/audit/sqli_blind_rdiff_spec.rb +1 -1
- data/spec/modules/audit/sqli_blind_timing_spec.rb +4 -4
- data/spec/modules/audit/sqli_spec.rb +2 -2
- data/spec/modules/audit/trainer_spec.rb +11 -1
- data/spec/modules/audit/unvalidated_redirect_spec.rb +1 -1
- data/spec/modules/audit/xpath_spec.rb +1 -1
- data/spec/modules/audit/xss_event_spec.rb +1 -1
- data/spec/modules/audit/xss_path_spec.rb +1 -1
- data/spec/modules/audit/xss_script_tag_spec.rb +1 -1
- data/spec/modules/audit/xss_spec.rb +1 -1
- data/spec/modules/audit/xss_tag_spec.rb +1 -1
- data/spec/modules/recon/allowed_methods_spec.rb +1 -1
- data/spec/modules/recon/backdoors_spec.rb +1 -1
- data/spec/modules/recon/backup_files_spec.rb +1 -1
- data/spec/modules/recon/common_directories_spec.rb +1 -1
- data/spec/modules/recon/common_files_spec.rb +1 -1
- data/spec/modules/recon/directory_listing_spec.rb +1 -1
- data/spec/modules/recon/grep/captcha_spec.rb +1 -1
- data/spec/modules/recon/grep/credit_card_spec.rb +1 -1
- data/spec/modules/recon/grep/cvs_svn_users_spec.rb +1 -1
- data/spec/modules/recon/grep/emails_spec.rb +1 -1
- data/spec/modules/recon/grep/html_objects_spec.rb +1 -1
- data/spec/modules/recon/grep/http_only_cookies_spec.rb +1 -1
- data/spec/modules/recon/grep/insecure_cookies_spec.rb +1 -1
- data/spec/modules/recon/grep/mixed_resource_spec.rb +1 -1
- data/spec/modules/recon/grep/password_autocomplete_spec.rb +1 -1
- data/spec/modules/recon/grep/private_ip_spec.rb +1 -1
- data/spec/modules/recon/grep/ssn_spec.rb +1 -1
- data/spec/modules/recon/grep/unencrypted_password_forms_spec.rb +1 -1
- data/spec/modules/recon/htaccess_limit_spec.rb +1 -1
- data/spec/modules/recon/http_put_spec.rb +1 -1
- data/spec/modules/recon/interesting_responses_spec.rb +1 -1
- data/spec/modules/recon/webdav_spec.rb +1 -1
- data/spec/modules/recon/xst_spec.rb +1 -1
- data/spec/path_extractors/anchors_spec.rb +1 -1
- data/spec/path_extractors/areas_spec.rb +1 -1
- data/spec/path_extractors/forms_spec.rb +1 -1
- data/spec/path_extractors/frames_spec.rb +1 -1
- data/spec/path_extractors/generic_spec.rb +1 -1
- data/spec/path_extractors/links_spec.rb +1 -1
- data/spec/path_extractors/meta_refresh_spec.rb +1 -1
- data/spec/path_extractors/scripts_spec.rb +1 -1
- data/spec/plugins/autologin_spec.rb +1 -1
- data/spec/plugins/autothrottle_spec.rb +2 -2
- data/spec/plugins/content_types_spec.rb +1 -1
- data/spec/plugins/cookie_collector_spec.rb +1 -1
- data/spec/plugins/form_dicattack_spec.rb +7 -7
- data/spec/plugins/healthmap_spec.rb +1 -1
- data/spec/plugins/http_dicattack_spec.rb +6 -6
- data/spec/plugins/meta/remedies/discovery_spec.rb +1 -1
- data/spec/plugins/meta/remedies/timing_attacks_spec.rb +1 -1
- data/spec/plugins/meta/uniformity_spec.rb +1 -1
- data/spec/plugins/profiler_spec.rb +3 -3
- data/spec/plugins/rescan_spec.rb +3 -3
- data/spec/plugins/resolver_spec.rb +1 -1
- data/spec/plugins/script_spec.rb +2 -2
- data/spec/plugins/vector_feed_spec.rb +13 -1
- data/spec/plugins/waf_detector_spec.rb +2 -2
- data/spec/reports/afr_spec.rb +1 -1
- data/spec/reports/ap_spec.rb +1 -1
- data/spec/reports/html_spec.rb +1 -1
- data/spec/reports/json_spec.rb +1 -1
- data/spec/reports/marshal_spec.rb +1 -1
- data/spec/reports/stdout_spec.rb +1 -1
- data/spec/reports/txt_spec.rb +1 -1
- data/spec/reports/xml_spec.rb +1 -1
- data/spec/reports/yaml_spec.rb +1 -1
- data/spec/spec_helper.rb +27 -32
- data/spec/{fixtures → support/fixtures}/auditstore.afr +0 -0
- data/spec/{fixtures → support/fixtures}/cookies.txt +0 -0
- data/spec/support/fixtures/fingerprinters/test.rb +36 -0
- data/spec/{fixtures → support/fixtures}/modules/test.rb +0 -0
- data/spec/{fixtures → support/fixtures}/modules/test2.rb +0 -0
- data/spec/{fixtures → support/fixtures}/modules/test3.rb +0 -0
- data/spec/{fixtures → support/fixtures}/passwords.txt +0 -0
- data/spec/{fixtures → support/fixtures}/plugins/bad.rb +0 -0
- data/spec/{fixtures → support/fixtures}/plugins/defaults/default.rb +0 -0
- data/spec/{fixtures → support/fixtures}/plugins/distributable.rb +0 -0
- data/spec/{fixtures → support/fixtures}/plugins/loop.rb +0 -0
- data/spec/{fixtures → support/fixtures}/plugins/spider_hook.rb +1 -0
- data/spec/{fixtures → support/fixtures}/plugins/wait.rb +0 -0
- data/spec/{fixtures → support/fixtures}/plugins/with_options.rb +0 -0
- data/spec/{fixtures → support/fixtures}/reports/base_spec/plugin_formatters/with_formatters/foobar.rb +0 -0
- data/spec/{fixtures → support/fixtures}/reports/base_spec/with_formatters.rb +0 -0
- data/spec/{fixtures → support/fixtures}/reports/base_spec/with_outfile.rb +0 -0
- data/spec/{fixtures → support/fixtures}/reports/base_spec/without_outfile.rb +0 -0
- data/spec/{fixtures → support/fixtures}/reports/manager_spec/afr.rb +0 -0
- data/spec/{fixtures → support/fixtures}/reports/manager_spec/foo.rb +0 -0
- data/spec/{fixtures → support/fixtures}/rescan.afr.tpl +0 -0
- data/spec/{fixtures → support/fixtures}/rpcd_handlers/echo.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/body.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/cookies.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/empty.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/flch.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/forms.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/headers.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/links.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/nil.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/path.rb +0 -0
- data/spec/{fixtures → support/fixtures}/run_mod/server.rb +0 -0
- data/spec/{fixtures → support/fixtures}/script_plugin.rb +0 -0
- data/spec/{fixtures → support/fixtures}/taint_module/taint.rb +0 -0
- data/spec/{fixtures → support/fixtures}/usernames.txt +0 -0
- data/spec/{fixtures → support/fixtures}/wait_module/wait.rb +0 -0
- data/spec/{helpers → support/helpers}/auditor.rb +0 -0
- data/spec/support/helpers/framework.rb +19 -0
- data/spec/support/helpers/misc.rb +19 -0
- data/spec/support/helpers/paths.rb +31 -0
- data/spec/support/helpers/requires.rb +24 -0
- data/spec/support/helpers/resets.rb +42 -0
- data/spec/support/helpers/web_server.rb +27 -0
- data/spec/support/lib/web_server_manager.rb +120 -0
- data/spec/support/logs/Dispatcher - 11642-42685.log +9 -0
- data/spec/support/logs/Dispatcher - 11669-58445.log +21 -0
- data/spec/support/logs/Dispatcher - 11803-19013.log +9 -0
- data/spec/support/logs/Dispatcher - 11813-58646.log +19 -0
- data/spec/support/logs/Dispatcher - 11822-1913.log +17 -0
- data/spec/support/logs/Dispatcher - 11831-60571.log +13 -0
- data/spec/support/logs/Dispatcher - 11840-20151.log +9 -0
- data/spec/support/logs/Dispatcher - 11850-21796.log +9 -0
- data/spec/support/logs/Dispatcher - 11859-47650.log +11 -0
- data/spec/support/logs/Dispatcher - 11872-13669.log +11 -0
- data/spec/support/logs/Dispatcher - 11885-40034.log +35 -0
- data/spec/support/logs/Dispatcher - 11946-10629.log +21 -0
- data/spec/support/logs/Dispatcher - 11955-55497.log +21 -0
- data/spec/support/logs/Dispatcher - 11964-33080.log +23 -0
- data/spec/support/logs/Dispatcher - 12005-28558.log +19 -0
- data/spec/support/logs/Dispatcher - 12014-59368.log +17 -0
- data/spec/support/logs/Dispatcher - 12023-41547.log +15 -0
- data/spec/support/logs/Dispatcher - 12037-54838.log +11 -0
- data/spec/support/logs/Dispatcher - 12050-38840.log +9 -0
- data/spec/support/logs/Dispatcher - 12059-7283.log +9 -0
- data/spec/support/logs/Dispatcher - 12068-19765.log +9 -0
- data/spec/support/logs/Dispatcher - 12077-24147.log +9 -0
- data/spec/support/logs/Dispatcher - 12086-60404.log +11 -0
- data/spec/support/logs/Dispatcher - 12099-43307.log +9 -0
- data/spec/support/logs/Dispatcher - 12109-9701.log +9 -0
- data/spec/support/logs/Dispatcher - 12162-19782.log +63 -0
- data/spec/support/logs/Dispatcher - 12171-35883.log +43 -0
- data/spec/support/logs/Dispatcher - 12180-6456.log +39 -0
- data/spec/support/logs/Dispatcher - 12189-64516.log +34 -0
- data/spec/support/logs/Dispatcher - 12198-50800.log +28 -0
- data/spec/support/logs/Dispatcher - 12207-6148.log +21 -0
- data/spec/support/logs/Dispatcher - 12216-45994.log +13 -0
- data/spec/support/logs/Dispatcher - 12226-59932.log +9 -0
- data/spec/support/logs/Dispatcher - 12369-42683.log +19 -0
- data/spec/support/logs/Dispatcher - 12379-51205.log +21 -0
- data/spec/support/logs/Dispatcher - 12388-15229.log +15 -0
- data/spec/support/logs/Dispatcher - 12401-35502.log +19 -0
- data/spec/support/logs/Dispatcher - 12410-3386.log +21 -0
- data/spec/support/logs/Dispatcher - 12419-16056.log +15 -0
- data/spec/support/logs/Dispatcher - 12540-25763.log +17 -0
- data/spec/support/logs/Dispatcher - 12549-49234.log +21 -0
- data/spec/support/logs/Dispatcher - 12558-61027.log +13 -0
- data/spec/support/logs/Dispatcher - 12571-34789.log +19 -0
- data/spec/support/logs/Dispatcher - 12580-27968.log +21 -0
- data/spec/support/logs/Dispatcher - 12589-38100.log +15 -0
- data/spec/support/logs/Dispatcher - 12643-8172.log +17 -0
- data/spec/support/logs/Dispatcher - 12652-44715.log +21 -0
- data/spec/support/logs/Dispatcher - 12661-40547.log +13 -0
- data/spec/support/logs/Dispatcher - 12674-20100.log +17 -0
- data/spec/support/logs/Dispatcher - 12683-57063.log +21 -0
- data/spec/support/logs/Dispatcher - 12692-20974.log +13 -0
- data/spec/support/logs/Dispatcher - 12920-24047.log +19 -0
- data/spec/support/logs/Dispatcher - 12929-13265.log +21 -0
- data/spec/support/logs/Dispatcher - 12938-38472.log +15 -0
- data/spec/support/logs/Dispatcher - 12962-47051.log +21 -0
- data/spec/support/logs/Dispatcher - 12971-48844.log +25 -0
- data/spec/support/logs/Dispatcher - 12980-2331.log +15 -0
- data/spec/support/logs/Dispatcher - 13016-57455.log +17 -0
- data/spec/support/logs/Dispatcher - 13025-44069.log +21 -0
- data/spec/support/logs/Dispatcher - 13034-59986.log +13 -0
- data/spec/support/logs/Dispatcher - 13047-17338.log +21 -0
- data/spec/support/logs/Dispatcher - 13056-57124.log +25 -0
- data/spec/support/logs/Dispatcher - 13065-3014.log +15 -0
- data/spec/support/logs/Dispatcher - 13101-42040.log +17 -0
- data/spec/support/logs/Dispatcher - 13110-29137.log +21 -0
- data/spec/support/logs/Dispatcher - 13119-52878.log +13 -0
- data/spec/support/logs/Dispatcher - 13132-20646.log +17 -0
- data/spec/support/logs/Dispatcher - 13141-21629.log +21 -0
- data/spec/support/logs/Dispatcher - 13150-42002.log +13 -0
- data/spec/support/logs/Dispatcher - 8291-38888.log +9 -0
- data/spec/support/logs/Dispatcher - 8325-2241.log +21 -0
- data/spec/support/logs/Dispatcher - 8458-40239.log +9 -0
- data/spec/support/logs/Dispatcher - 8468-26555.log +19 -0
- data/spec/support/logs/Dispatcher - 8477-28819.log +17 -0
- data/spec/support/logs/Dispatcher - 8486-36985.log +13 -0
- data/spec/support/logs/Dispatcher - 8495-59407.log +9 -0
- data/spec/support/logs/Dispatcher - 8504-27479.log +9 -0
- data/spec/support/logs/Dispatcher - 8513-51807.log +11 -0
- data/spec/support/logs/Dispatcher - 8526-53739.log +11 -0
- data/spec/support/logs/Dispatcher - 8539-55908.log +35 -0
- data/spec/support/logs/Dispatcher - 8603-24287.log +21 -0
- data/spec/support/logs/Dispatcher - 8612-37320.log +21 -0
- data/spec/support/logs/Dispatcher - 8621-60797.log +23 -0
- data/spec/support/logs/Dispatcher - 8662-56395.log +19 -0
- data/spec/support/logs/Dispatcher - 8671-54268.log +17 -0
- data/spec/support/logs/Dispatcher - 8680-32387.log +15 -0
- data/spec/support/logs/Dispatcher - 8693-60728.log +11 -0
- data/spec/support/logs/Dispatcher - 8706-53092.log +9 -0
- data/spec/support/logs/Dispatcher - 8715-35576.log +9 -0
- data/spec/support/logs/Dispatcher - 8724-9842.log +9 -0
- data/spec/support/logs/Dispatcher - 8734-37290.log +9 -0
- data/spec/support/logs/Dispatcher - 8743-46516.log +11 -0
- data/spec/support/logs/Dispatcher - 8756-59294.log +9 -0
- data/spec/support/logs/Dispatcher - 8765-16318.log +9 -0
- data/spec/support/logs/Dispatcher - 8818-35968.log +63 -0
- data/spec/support/logs/Dispatcher - 8827-57068.log +43 -0
- data/spec/support/logs/Dispatcher - 8836-31238.log +39 -0
- data/spec/support/logs/Dispatcher - 8845-48148.log +34 -0
- data/spec/support/logs/Dispatcher - 8854-17355.log +28 -0
- data/spec/support/logs/Dispatcher - 8863-6616.log +21 -0
- data/spec/support/logs/Dispatcher - 8872-1373.log +13 -0
- data/spec/support/logs/Dispatcher - 8882-40014.log +9 -0
- data/spec/support/logs/Dispatcher - 8989-17108.log +19 -0
- data/spec/support/logs/Dispatcher - 9000-23195.log +21 -0
- data/spec/support/logs/Dispatcher - 9009-33836.log +15 -0
- data/spec/support/logs/Dispatcher - 9022-55515.log +19 -0
- data/spec/support/logs/Dispatcher - 9031-51301.log +21 -0
- data/spec/support/logs/Dispatcher - 9040-10025.log +15 -0
- data/spec/support/logs/Dispatcher - 9180-20874.log +17 -0
- data/spec/support/logs/Dispatcher - 9189-29826.log +21 -0
- data/spec/support/logs/Dispatcher - 9198-21818.log +13 -0
- data/spec/support/logs/Dispatcher - 9211-64830.log +19 -0
- data/spec/support/logs/Dispatcher - 9220-2570.log +21 -0
- data/spec/support/logs/Dispatcher - 9229-45654.log +15 -0
- data/spec/support/logs/Dispatcher - 9286-1284.log +17 -0
- data/spec/support/logs/Dispatcher - 9295-58545.log +21 -0
- data/spec/support/logs/Dispatcher - 9304-52355.log +13 -0
- data/spec/support/logs/Dispatcher - 9317-58138.log +17 -0
- data/spec/support/logs/Dispatcher - 9326-39184.log +21 -0
- data/spec/support/logs/Dispatcher - 9336-44714.log +13 -0
- data/spec/support/logs/Dispatcher - 9555-26114.log +19 -0
- data/spec/support/logs/Dispatcher - 9564-2270.log +21 -0
- data/spec/support/logs/Dispatcher - 9573-26148.log +15 -0
- data/spec/support/logs/Dispatcher - 9597-62247.log +21 -0
- data/spec/support/logs/Dispatcher - 9606-16162.log +25 -0
- data/spec/support/logs/Dispatcher - 9615-8643.log +15 -0
- data/spec/support/logs/Dispatcher - 9651-49224.log +17 -0
- data/spec/support/logs/Dispatcher - 9660-4390.log +21 -0
- data/spec/support/logs/Dispatcher - 9669-18266.log +13 -0
- data/spec/support/logs/Dispatcher - 9682-44582.log +21 -0
- data/spec/support/logs/Dispatcher - 9691-15941.log +25 -0
- data/spec/support/logs/Dispatcher - 9700-22186.log +15 -0
- data/spec/support/logs/Dispatcher - 9736-29672.log +17 -0
- data/spec/support/logs/Dispatcher - 9745-33231.log +21 -0
- data/spec/support/logs/Dispatcher - 9754-48381.log +13 -0
- data/spec/support/logs/Dispatcher - 9767-29812.log +17 -0
- data/spec/support/logs/Dispatcher - 9776-9894.log +21 -0
- data/spec/support/logs/Dispatcher - 9785-1421.log +13 -0
- data/spec/support/logs/Instance - 12384-38605.error.log +328 -0
- data/spec/support/logs/Instance - 12657-2379.error.log +328 -0
- data/spec/support/logs/Instance - 12688-50940.error.log +427 -0
- data/spec/support/logs/Instance - 12708-13716.error.log +326 -0
- data/spec/support/logs/Instance - 12714-45400.error.log +328 -0
- data/spec/support/logs/Instance - 12848-32645.error.log +326 -0
- data/spec/support/logs/Instance - 9005-21883.error.log +328 -0
- data/spec/support/logs/Instance - 9300-33102.error.log +328 -0
- data/spec/support/logs/Instance - 9331-48336.error.log +427 -0
- data/spec/support/logs/Instance - 9352-62807.error.log +326 -0
- data/spec/support/logs/Instance - 9358-45154.error.log +328 -0
- data/spec/support/logs/Instance - 9487-8746.error.log +326 -0
- data/spec/{logs → support/logs}/placeholder +0 -0
- data/spec/{pems → support/pems}/cacert.pem +0 -0
- data/spec/{pems → support/pems}/client/cert.pem +0 -0
- data/spec/{pems → support/pems}/client/foo-cert.pem +0 -0
- data/spec/{pems → support/pems}/client/foo-key.pem +0 -0
- data/spec/{pems → support/pems}/client/key.pem +0 -0
- data/spec/{pems → support/pems}/server/cert.pem +0 -0
- data/spec/{pems → support/pems}/server/key.pem +0 -0
- data/spec/{servers → support/servers}/arachni/element/capabilities/auditable/rdiff.rb +0 -0
- data/spec/{servers → support/servers}/arachni/element/capabilities/auditable/taint.rb +0 -0
- data/spec/{servers → support/servers}/arachni/element/capabilities/auditable/timeout.rb +0 -0
- data/spec/{servers → support/servers}/arachni/element/cookie.rb +0 -0
- data/spec/{servers → support/servers}/arachni/element/form.rb +0 -0
- data/spec/{servers → support/servers}/arachni/element/header.rb +0 -0
- data/spec/{servers → support/servers}/arachni/element/link.rb +0 -0
- data/spec/{servers → support/servers}/arachni/framework.rb +0 -0
- data/spec/{servers → support/servers}/arachni/http.rb +0 -0
- data/spec/{servers → support/servers}/arachni/http_auth.rb +0 -0
- data/spec/{servers → support/servers}/arachni/module/auditor.rb +0 -0
- data/spec/{servers → support/servers}/arachni/parser.rb +0 -0
- data/spec/{servers → support/servers}/arachni/rpc/server/framework_hpg.rb +0 -1
- data/spec/{servers → support/servers}/arachni/rpc/server/framework_simple.rb +0 -0
- data/spec/{servers → support/servers}/arachni/session.rb +0 -0
- data/spec/{servers → support/servers}/arachni/spider.rb +0 -0
- data/spec/{servers → support/servers}/arachni/spider_https.rb +0 -0
- data/spec/{servers → support/servers}/arachni/trainer.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/code_injection.rb +3 -4
- data/spec/{servers → support/servers}/modules/audit/code_injection_timing.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/csrf.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/ldapi.rb +1 -1
- data/spec/{servers → support/servers}/modules/audit/os_cmd_injection.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/os_cmd_injection_timing.rb +1 -10
- data/spec/{servers → support/servers}/modules/audit/path_traversal.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/response_splitting.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/rfi.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/session_fixation.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli.rb +1 -1
- data/spec/{servers → support/servers}/modules/audit/sqli/coldfusion +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/db2 +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/emc +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/informix +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/interbase +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/jdbc +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/mssql +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/mysql +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/oracle +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/postgresql +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/sqlite +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli/sybase +0 -0
- data/spec/{servers → support/servers}/modules/audit/sqli_blind_rdiff.rb +1 -1
- data/spec/{servers → support/servers}/modules/audit/sqli_blind_timing.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/trainer_module.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/unvalidated_redirect.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/xpath.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/xpath/dotnet +0 -0
- data/spec/{servers → support/servers}/modules/audit/xpath/general +0 -0
- data/spec/{servers → support/servers}/modules/audit/xpath/java +0 -0
- data/spec/{servers → support/servers}/modules/audit/xpath/libxml2 +0 -0
- data/spec/{servers → support/servers}/modules/audit/xpath/php +0 -0
- data/spec/{servers → support/servers}/modules/audit/xss.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/xss_event.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/xss_path.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/xss_script_tag.rb +0 -0
- data/spec/{servers → support/servers}/modules/audit/xss_tag.rb +0 -0
- data/spec/{servers → support/servers}/modules/module_server.rb +1 -1
- data/spec/{servers → support/servers}/modules/recon/allowed_methods.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/backdoors.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/backup_files.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/common_directories.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/common_files.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/directory_listing.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/captcha.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/credit_card.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/cvs_svn_users.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/emails.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/html_objects.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/http_only_cookies.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/insecure_cookies.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/mixed_resource.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/password_autocomplete.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/private_ip.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/ssn.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/grep/unencrypted_password_forms.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/htaccess_limit.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/http_put.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/interesting_responses.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/webdav.rb +0 -0
- data/spec/{servers → support/servers}/modules/recon/xst.rb +0 -0
- data/spec/{servers → support/servers}/plugins/autologin.rb +0 -0
- data/spec/{servers → support/servers}/plugins/autothrottle.rb +0 -0
- data/spec/{servers → support/servers}/plugins/content_types.rb +0 -0
- data/spec/{servers → support/servers}/plugins/cookie_collector.rb +0 -0
- data/spec/{servers → support/servers}/plugins/form_dicattack.rb +0 -0
- data/spec/{servers → support/servers}/plugins/healthmap.rb +0 -0
- data/spec/{servers → support/servers}/plugins/http_dicattack.rb +0 -0
- data/spec/{servers → support/servers}/plugins/http_dicattack_secure.rb +0 -0
- data/spec/{servers → support/servers}/plugins/http_dicattack_unprotected.rb +0 -0
- data/spec/{servers → support/servers}/plugins/meta/remedies/discovery.rb +1 -1
- data/spec/{servers → support/servers}/plugins/meta/remedies/timing_attacks.rb +0 -0
- data/spec/{servers → support/servers}/plugins/profiler.rb +0 -0
- data/spec/{servers → support/servers}/plugins/rescan.rb +0 -0
- data/spec/{servers → support/servers}/plugins/waf_detector.rb +0 -0
- data/spec/{shared → support/shared}/component.rb +1 -1
- data/spec/{shared → support/shared}/element/capabilities/auditable.rb +363 -194
- data/spec/{shared → support/shared}/element/capabilities/refreshable.rb +0 -0
- data/spec/support/shared/fingerprinter.rb +14 -0
- data/spec/{shared → support/shared}/module.rb +1 -1
- data/spec/{shared → support/shared}/path_extractor.rb +0 -0
- data/spec/{shared → support/shared}/plugin.rb +0 -0
- data/spec/{shared → support/shared}/reports.rb +1 -1
- data/spec/{arachni/bloom_filter_spec.rb → support/shared/support/lookup.rb} +11 -11
- metadata +936 -199
- data/lib/arachni/bloom_filter.rb +0 -74
- data/lib/arachni/buffer.rb +0 -3
- data/lib/arachni/buffer/autoflush.rb +0 -77
- data/lib/arachni/database.rb +0 -4
- data/lib/arachni/database/base.rb +0 -131
- data/modules/audit/code_injection_timing/payloads.txt +0 -4
- data/modules/audit/os_cmd_injection/payloads.txt +0 -3
- data/modules/audit/os_cmd_injection_timing/payloads.txt +0 -2
- data/modules/audit/sqli_blind_timing/payloads.txt +0 -69
- data/spec/helpers/misc.rb +0 -41
- data/spec/helpers/processes.rb +0 -112
- data/spec/helpers/requires.rb +0 -8
- data/spec/helpers/server.rb +0 -54
@@ -16,8 +16,6 @@
|
|
16
16
|
|
17
17
|
module Arachni
|
18
18
|
|
19
|
-
require Options.dir['lib'] + 'bloom_filter'
|
20
|
-
|
21
19
|
module Element::Capabilities
|
22
20
|
|
23
21
|
#
|
@@ -34,7 +32,7 @@ module Auditable::RDiff
|
|
34
32
|
def self.included( mod )
|
35
33
|
# the rdiff attack performs it own redundancy checks so we need this to
|
36
34
|
# keep track of audited elements
|
37
|
-
@@rdiff_audited ||=
|
35
|
+
@@rdiff_audited ||= Support::LookUp::HashSet.new
|
38
36
|
end
|
39
37
|
|
40
38
|
RDIFF_OPTIONS = {
|
@@ -89,19 +87,29 @@ module Auditable::RDiff
|
|
89
87
|
# webapp behavior when interpreted).
|
90
88
|
# @param [Block] block
|
91
89
|
# To be used for custom analysis of responses; will be passed the following:
|
90
|
+
#
|
92
91
|
# * injected string
|
93
92
|
# * audited element
|
94
93
|
# * default response body
|
95
94
|
# * boolean response
|
96
95
|
# * fault injection response body
|
97
96
|
#
|
97
|
+
# @return [Bool]
|
98
|
+
# `true` if the audit was scheduled successfully, `false` otherwise (like
|
99
|
+
# if the resource is out of scope or already audited).
|
100
|
+
#
|
98
101
|
def rdiff_analysis( opts = {}, &block )
|
102
|
+
if skip_path? self.action
|
103
|
+
print_debug "Element's action matches skip rule, bailing out."
|
104
|
+
return false
|
105
|
+
end
|
106
|
+
|
99
107
|
opts = self.class::MUTATION_OPTIONS.merge( RDIFF_OPTIONS.merge( opts ) )
|
100
108
|
|
101
109
|
# don't continue if there's a missing value
|
102
110
|
auditable.values.each { |val| return if !val || val.empty? }
|
103
111
|
|
104
|
-
return if rdiff_audited?
|
112
|
+
return false if rdiff_audited?
|
105
113
|
rdiff_audited
|
106
114
|
|
107
115
|
responses = {
|
@@ -220,6 +228,8 @@ module Auditable::RDiff
|
|
220
228
|
end
|
221
229
|
end
|
222
230
|
}
|
231
|
+
|
232
|
+
true
|
223
233
|
end
|
224
234
|
|
225
235
|
private
|
@@ -52,24 +52,44 @@ module Auditable::Taint
|
|
52
52
|
ignore: nil
|
53
53
|
}
|
54
54
|
|
55
|
-
REMARK =
|
56
|
-
|
55
|
+
REMARK = 'This issue was identified by a pattern but the pattern matched ' <<
|
56
|
+
'the page\'s response body even before auditing the logged element.'
|
57
57
|
|
58
58
|
#
|
59
59
|
# Performs taint analysis and logs an issue should there be one.
|
60
60
|
#
|
61
61
|
# It logs an issue when:
|
62
|
-
# * _:match_ == nil AND _:regexp_ matches the response body
|
63
|
-
# * _:match_ == not nil AND _:regexp_ match == _:match_
|
64
|
-
# * _:substring_ exists in the response body
|
65
62
|
#
|
66
|
-
#
|
67
|
-
#
|
63
|
+
# * `:match` == nil AND `:regexp` matches the response body
|
64
|
+
# * `:match`` == not nil AND `:regexp` match == `:match`
|
65
|
+
# * `:substring`exists in the response body
|
68
66
|
#
|
69
|
-
|
67
|
+
# @param [String, Array<String>, Hash{Symbol => <String, Array<String>>}] payloads
|
68
|
+
# Payloads to inject, if given:
|
69
|
+
#
|
70
|
+
# * {String} -- Will inject the single payload.
|
71
|
+
# * {Array} -- Will iterate over all payloads and inject them.
|
72
|
+
# * {Hash} -- Expects {Platform} (as `Symbol`s ) for keys and {Array} of
|
73
|
+
# `payloads` for values. The applicable `payloads` will be
|
74
|
+
# {Platform#pick picked} from the hash based on
|
75
|
+
# {Element::Base#platforms applicable platforms} for the
|
76
|
+
# {Base#action resource} to be audited.
|
77
|
+
# @param [Hash] opts
|
78
|
+
# Options as described in {Arachni::Module::Auditor::OPTIONS} and
|
79
|
+
# {TAINT_OPTIONS}.
|
80
|
+
#
|
81
|
+
# @return [Bool]
|
82
|
+
# `true` if the audit was scheduled successfully, `false` otherwise (like
|
83
|
+
# if the resource is out of scope).
|
84
|
+
#
|
85
|
+
def taint_analysis( payloads, opts = { } )
|
86
|
+
if skip_path? self.action
|
87
|
+
print_debug "Element's action matches skip rule, bailing out."
|
88
|
+
return false
|
89
|
+
end
|
90
|
+
|
70
91
|
opts = self.class::OPTIONS.merge( TAINT_OPTIONS.merge( opts ) )
|
71
|
-
opts
|
72
|
-
audit( seed, opts ) { |res, c_opts| get_matches( res, c_opts ) }
|
92
|
+
audit( payloads, opts ) { |res, c_opts| get_matches( res, c_opts ) }
|
73
93
|
end
|
74
94
|
|
75
95
|
private
|
@@ -83,6 +103,8 @@ module Auditable::Taint
|
|
83
103
|
# @param [Hash] opts
|
84
104
|
#
|
85
105
|
def get_matches( res, opts )
|
106
|
+
opts[:substring] = opts[:injected_orig] if !opts[:regexp] && !opts[:substring]
|
107
|
+
|
86
108
|
[opts[:regexp]].flatten.compact.each { |regexp| match_regexp_and_log( regexp, res, opts ) }
|
87
109
|
[opts[:substring]].flatten.compact.each { |substring| match_substring_and_log( substring, res, opts ) }
|
88
110
|
end
|
@@ -14,8 +14,6 @@
|
|
14
14
|
limitations under the License.
|
15
15
|
=end
|
16
16
|
|
17
|
-
require 'set'
|
18
|
-
|
19
17
|
module Arachni::Element::Capabilities
|
20
18
|
|
21
19
|
#
|
@@ -82,8 +80,9 @@ module Auditable::Timeout
|
|
82
80
|
@@timeout_candidates
|
83
81
|
end
|
84
82
|
|
85
|
-
# @return [Integer]
|
86
|
-
#
|
83
|
+
# @return [Integer]
|
84
|
+
# Amount of timeout-audit related operations
|
85
|
+
# (`audit blocks + candidate elements`).
|
87
86
|
def @@parent.current_timeout_audit_operations_cnt
|
88
87
|
@@timeout_candidates.size + @@timeout_candidates_phase3.size
|
89
88
|
end
|
@@ -181,7 +180,7 @@ module Auditable::Timeout
|
|
181
180
|
@@timeout_candidate_phase3_ids << elem.audit_id
|
182
181
|
end
|
183
182
|
|
184
|
-
elem.print_info
|
183
|
+
elem.print_info 'Phase 2: Candidate can progress to Phase 3 --' <<
|
185
184
|
" #{elem.type.capitalize} input " +
|
186
185
|
"'#{elem.altered}' at #{elem.action}"
|
187
186
|
|
@@ -250,17 +249,17 @@ module Auditable::Timeout
|
|
250
249
|
|
251
250
|
@@timeout_audit_operations_cnt ||= 0
|
252
251
|
|
253
|
-
#
|
254
|
-
#
|
252
|
+
# Populated by timing attack phase 1 with candidate elements to be
|
253
|
+
# verified by phase 2.
|
255
254
|
@@timeout_candidates ||= []
|
256
|
-
@@timeout_candidate_ids ||= ::Arachni::
|
255
|
+
@@timeout_candidate_ids ||= ::Arachni::Support::LookUp::HashSet.new
|
257
256
|
|
258
257
|
@@timeout_candidates_phase3 ||= []
|
259
|
-
@@timeout_candidate_phase3_ids ||= ::Arachni::
|
258
|
+
@@timeout_candidate_phase3_ids ||= ::Arachni::Support::LookUp::HashSet.new
|
260
259
|
|
261
|
-
#
|
262
|
-
# we're interested in the
|
263
|
-
# determine scan progress
|
260
|
+
# Modules which have called the timing attack audit method
|
261
|
+
# ({Arachni::Module::Auditor#audit_timeout}) we're interested in the
|
262
|
+
# amount, not the names, and is used to determine scan progress.
|
264
263
|
@@timeout_loaded_modules ||= Set.new
|
265
264
|
|
266
265
|
@@on_timing_attacks ||= []
|
@@ -299,23 +298,42 @@ module Auditable::Timeout
|
|
299
298
|
#
|
300
299
|
# Performs timeout/time-delay analysis and logs an issue should there be one.
|
301
300
|
#
|
302
|
-
# @param
|
303
|
-
#
|
301
|
+
# @param [String, Array<String>, Hash{Symbol => <String, Array<String>>}] payloads
|
302
|
+
# Payloads to inject, if given:
|
303
|
+
#
|
304
|
+
# * {String} -- Will inject the single payload.
|
305
|
+
# * {Array} -- Will iterate over all payloads and inject them.
|
306
|
+
# * {Hash} -- Expects {Platform} (as `Symbol`s ) for keys and {Array} of
|
307
|
+
# `payloads` for values. The applicable `payloads` will be
|
308
|
+
# {Platform#pick picked} from the hash based on
|
309
|
+
# {Element::Base#platforms applicable platforms} for the
|
310
|
+
# {Base#action resource} to be audited.
|
311
|
+
#
|
312
|
+
# Delay placeholder `__TIME__` will be substituted with `timeout / timeout_divider`.
|
304
313
|
# @param [Hash] opts
|
305
|
-
# Options as described in {Arachni::Element::Mutable::
|
306
|
-
# specified extras.
|
314
|
+
# Options as described in {Arachni::Element::Capabilities::Mutable::MUTATION_OPTIONS}
|
315
|
+
# with the specified extras.
|
307
316
|
# @option opts [Integer] :timeout
|
308
317
|
# Milliseconds to wait for the request to complete.
|
309
318
|
# @option opts [Integer] :timeout_divider
|
310
319
|
# `__TIME__ = timeout / timeout_divider`
|
311
320
|
#
|
312
|
-
|
321
|
+
# @return [Bool]
|
322
|
+
# `true` if the audit was scheduled successfully, `false` otherwise (like
|
323
|
+
# if the resource is out of scope).
|
324
|
+
#
|
325
|
+
def timeout_analysis( payloads, opts )
|
326
|
+
if skip_path? self.action
|
327
|
+
print_debug "Element's action matches skip rule, bailing out."
|
328
|
+
return false
|
329
|
+
end
|
330
|
+
|
313
331
|
@@timeout_loaded_modules << @auditor.fancy_name
|
314
332
|
|
315
333
|
delay = opts[:timeout]
|
316
334
|
|
317
335
|
audit_timeout_debug_msg( 1, delay )
|
318
|
-
timing_attack(
|
336
|
+
timing_attack( payloads, opts ) do |elem|
|
319
337
|
elem.auditor = @auditor
|
320
338
|
|
321
339
|
if deduplicate?
|
@@ -323,11 +341,13 @@ module Auditable::Timeout
|
|
323
341
|
@@timeout_candidate_ids << elem.audit_id
|
324
342
|
end
|
325
343
|
|
326
|
-
print_info
|
344
|
+
print_info 'Found a candidate for Phase 2 -- ' <<
|
327
345
|
"#{elem.type.capitalize} input '#{elem.altered}' at #{elem.action}"
|
328
346
|
|
329
347
|
@@parent.add_timeout_candidate( elem ) if elem.responsive?
|
330
348
|
end
|
349
|
+
|
350
|
+
true
|
331
351
|
end
|
332
352
|
|
333
353
|
#
|
@@ -370,6 +390,7 @@ module Auditable::Timeout
|
|
370
390
|
end
|
371
391
|
|
372
392
|
private
|
393
|
+
|
373
394
|
def audit_timeout_debug_msg( phase, delay )
|
374
395
|
print_debug '---------------------------------------------'
|
375
396
|
print_debug "Running phase #{phase.to_s} of timing attack."
|
@@ -383,7 +404,7 @@ module Auditable::Timeout
|
|
383
404
|
# 'opts' needs to contain a :timeout value in milliseconds.</br>
|
384
405
|
# Optionally, you can add a :timeout_divider.
|
385
406
|
#
|
386
|
-
# @param [Array]
|
407
|
+
# @param [String, Array, Hash{Symbol => String, Array<String>}] payloads
|
387
408
|
# Injection strings (`__TIME__` will be substituted with
|
388
409
|
# `timeout / timeout_divider`).
|
389
410
|
# @param [Hash] opts
|
@@ -392,19 +413,28 @@ module Auditable::Timeout
|
|
392
413
|
# Block to call if a timeout occurs, it will be passed the
|
393
414
|
# {Typhoeus::Response response} and `opts`.
|
394
415
|
#
|
395
|
-
def timing_attack(
|
416
|
+
def timing_attack( payloads, opts, &block )
|
417
|
+
opts = opts.dup
|
396
418
|
opts[:timeout_divider] ||= 1
|
419
|
+
delay = opts[:timeout] / opts[:timeout_divider]
|
397
420
|
|
398
|
-
|
421
|
+
# Intercept each element mutation prior to it being submitted and replace
|
422
|
+
# the '__TIME__' placeholder with the actual delay value.
|
423
|
+
each_mutation = proc do |mutation|
|
424
|
+
injected = mutation.altered_value
|
399
425
|
|
400
|
-
|
401
|
-
|
402
|
-
opts[:
|
426
|
+
# Preserve the original because it's going to be needed for the
|
427
|
+
# verification phases.
|
428
|
+
mutation.opts[:timing_string] = injected
|
403
429
|
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
430
|
+
mutation.altered_value = injected.gsub( '__TIME__', delay.to_s )
|
431
|
+
end
|
432
|
+
|
433
|
+
opts.merge!( each_mutation: each_mutation, skip_orig: true )
|
434
|
+
|
435
|
+
audit( payloads, opts ) do |res, _, elem|
|
436
|
+
call_on_timing_blocks( res, elem )
|
437
|
+
block.call( elem ) if block && res.timed_out?
|
408
438
|
end
|
409
439
|
end
|
410
440
|
|
@@ -57,7 +57,7 @@ class Cookie < Arachni::Element::Base
|
|
57
57
|
|
58
58
|
@raw ||= {}
|
59
59
|
if @raw['name'] && @raw['value']
|
60
|
-
self.auditable = { @raw['name'] => @raw['value'] }
|
60
|
+
self.auditable = { @raw['name'].to_s.recode => @raw['value'].to_s.recode }
|
61
61
|
else
|
62
62
|
self.auditable = raw.dup
|
63
63
|
end
|
@@ -981,6 +981,7 @@ class Cookie < Arachni::Element::Base
|
|
981
981
|
end
|
982
982
|
cookie_hash['expires'] = cookie.expires
|
983
983
|
|
984
|
+
cookie_hash['path'] ||= '/'
|
984
985
|
cookie_hash['name'] = decode( cookie.name )
|
985
986
|
cookie_hash['value'] = decode( cookie.value )
|
986
987
|
|
@@ -1115,7 +1116,7 @@ class Cookie < Arachni::Element::Base
|
|
1115
1116
|
# @return [String]
|
1116
1117
|
#
|
1117
1118
|
def self.encode( str )
|
1118
|
-
URI.encode( str, "+;%=\0" ).gsub( ' ', '+' )
|
1119
|
+
URI.encode( str, "+;%=\0" ).recode.gsub( ' ', '+' )
|
1119
1120
|
end
|
1120
1121
|
# @see .encode
|
1121
1122
|
def encode( str )
|
@@ -1134,7 +1135,7 @@ class Cookie < Arachni::Element::Base
|
|
1134
1135
|
# @return [String]
|
1135
1136
|
#
|
1136
1137
|
def self.decode( str )
|
1137
|
-
URI.decode( str.gsub( '+', ' ' ) )
|
1138
|
+
URI.decode( str.to_s.recode.gsub( '+', ' ' ) )
|
1138
1139
|
end
|
1139
1140
|
# @see .decode
|
1140
1141
|
def decode( str )
|
data/lib/arachni/element/form.rb
CHANGED
@@ -1295,11 +1295,7 @@ class Form < Arachni::Element::Base
|
|
1295
1295
|
action = url_sanitize( c_form['attrs']['action'] )
|
1296
1296
|
end
|
1297
1297
|
|
1298
|
-
|
1299
|
-
action = to_absolute( action.dup, url ).to_s
|
1300
|
-
return if skip_path? action
|
1301
|
-
rescue
|
1302
|
-
end
|
1298
|
+
action = to_absolute( action.to_s, url ).to_s
|
1303
1299
|
|
1304
1300
|
c_form['attrs']['action'] = action
|
1305
1301
|
|
@@ -57,6 +57,16 @@ class Header < Arachni::Element::Base
|
|
57
57
|
muts
|
58
58
|
end
|
59
59
|
|
60
|
+
# @return [String] Header name.
|
61
|
+
def name
|
62
|
+
@auditable.first.first
|
63
|
+
end
|
64
|
+
|
65
|
+
# @return [String] Header value.
|
66
|
+
def value
|
67
|
+
@auditable.first.last
|
68
|
+
end
|
69
|
+
|
60
70
|
def type
|
61
71
|
Arachni::Element::HEADER
|
62
72
|
end
|
data/lib/arachni/element/link.rb
CHANGED
@@ -27,8 +27,8 @@ module Arachni
|
|
27
27
|
module ElementFilter
|
28
28
|
include Utilities
|
29
29
|
|
30
|
-
@@forms ||=
|
31
|
-
@@links ||=
|
30
|
+
@@forms ||= Support::LookUp::HashSet.new
|
31
|
+
@@links ||= Support::LookUp::HashSet.new
|
32
32
|
@@cookies ||= Set.new
|
33
33
|
|
34
34
|
def self.reset
|
data/lib/arachni/framework.rb
CHANGED
@@ -30,9 +30,11 @@ lib = Options.dir['lib']
|
|
30
30
|
require lib + 'version'
|
31
31
|
require lib + 'ruby'
|
32
32
|
require lib + 'error'
|
33
|
-
require lib + '
|
33
|
+
require lib + 'support'
|
34
34
|
require lib + 'utilities'
|
35
35
|
require lib + 'uri'
|
36
|
+
require lib + 'component/manager'
|
37
|
+
require lib + 'platform'
|
36
38
|
require lib + 'spider'
|
37
39
|
require lib + 'parser'
|
38
40
|
require lib + 'issue'
|
@@ -41,8 +43,6 @@ require lib + 'plugin'
|
|
41
43
|
require lib + 'audit_store'
|
42
44
|
require lib + 'http'
|
43
45
|
require lib + 'report'
|
44
|
-
require lib + 'database'
|
45
|
-
require lib + 'component/manager'
|
46
46
|
require lib + 'session'
|
47
47
|
require lib + 'trainer'
|
48
48
|
|
@@ -226,6 +226,10 @@ class Framework
|
|
226
226
|
print_line
|
227
227
|
print_status "Auditing: [HTTP: #{page.code}] #{page.url}"
|
228
228
|
|
229
|
+
if page.platforms.any?
|
230
|
+
print_info "Identified as: #{page.platforms.to_a.join( ', ' )}"
|
231
|
+
end
|
232
|
+
|
229
233
|
call_on_audit_page( page )
|
230
234
|
|
231
235
|
@current_url = page.url.to_s
|
@@ -252,6 +256,13 @@ class Framework
|
|
252
256
|
end
|
253
257
|
alias :on_run_mods :on_audit_page
|
254
258
|
|
259
|
+
# @return [Bool]
|
260
|
+
# `true` if the {Options#link_count_limit} has been reached, `false`
|
261
|
+
# otherwise.
|
262
|
+
def link_count_limit_reached?
|
263
|
+
@opts.link_count_limit_reached? @sitemap.size
|
264
|
+
end
|
265
|
+
|
255
266
|
#
|
256
267
|
# Returns the following framework stats:
|
257
268
|
#
|
@@ -433,7 +444,7 @@ class Framework
|
|
433
444
|
@reports.clear
|
434
445
|
|
435
446
|
if !@reports[name].has_outfile?
|
436
|
-
fail Component::Error::
|
447
|
+
fail Component::Options::Error::Invalid,
|
437
448
|
"Report '#{name}' cannot format the audit results as a String."
|
438
449
|
end
|
439
450
|
|
@@ -442,7 +453,7 @@ class Framework
|
|
442
453
|
|
443
454
|
IO.read( outfile )
|
444
455
|
ensure
|
445
|
-
File.delete( outfile )
|
456
|
+
File.delete( outfile ) if outfile
|
446
457
|
@reports.clear
|
447
458
|
@reports.load loaded
|
448
459
|
end
|
@@ -523,6 +534,18 @@ class Framework
|
|
523
534
|
end
|
524
535
|
alias :lsplug :list_plugins
|
525
536
|
|
537
|
+
# @return [Array<Hash>] Information about all available platforms.
|
538
|
+
def list_platforms
|
539
|
+
platforms = Platform::Manager.new
|
540
|
+
platforms.valid.inject({}) do |h, platform|
|
541
|
+
type = Platform::Manager::TYPES[platforms.find_type( platform )]
|
542
|
+
h[type] ||= {}
|
543
|
+
h[type][platform] = platforms.fullname( platform )
|
544
|
+
h
|
545
|
+
end
|
546
|
+
end
|
547
|
+
alias :lsplat :list_platforms
|
548
|
+
|
526
549
|
# @return [String]
|
527
550
|
# Status of the instance, possible values are (in order):
|
528
551
|
#
|
@@ -557,7 +580,6 @@ class Framework
|
|
557
580
|
@paused << caller
|
558
581
|
true
|
559
582
|
end
|
560
|
-
alias :pause! :pause
|
561
583
|
|
562
584
|
# @return [TrueClass] Resumes the scan/audit.
|
563
585
|
def resume
|
@@ -565,7 +587,6 @@ class Framework
|
|
565
587
|
spider.resume
|
566
588
|
true
|
567
589
|
end
|
568
|
-
alias :resume! :resume
|
569
590
|
|
570
591
|
# @return [String] Returns the version of the framework.
|
571
592
|
def version
|
@@ -601,7 +622,6 @@ class Framework
|
|
601
622
|
|
602
623
|
true
|
603
624
|
end
|
604
|
-
alias :clean_up! :clean_up
|
605
625
|
|
606
626
|
def reset_spider
|
607
627
|
@spider = Spider.new( @opts )
|
@@ -643,6 +663,8 @@ class Framework
|
|
643
663
|
# You should first update {Arachni::Options}.
|
644
664
|
#
|
645
665
|
def self.reset
|
666
|
+
UI::Output.reset_output_options
|
667
|
+
Platform::Manager.reset
|
646
668
|
Module::Auditor.reset
|
647
669
|
ElementFilter.reset
|
648
670
|
Element::Capabilities::Auditable.reset
|
@@ -689,16 +711,16 @@ class Framework
|
|
689
711
|
@opts.restrict_paths.each { |url| push_to_url_queue( url ) }
|
690
712
|
else
|
691
713
|
# initiates the crawl
|
692
|
-
spider.run
|
714
|
+
spider.run do |page|
|
693
715
|
@sitemap |= spider.sitemap
|
694
|
-
push_to_url_queue
|
716
|
+
push_to_url_queue page.url
|
717
|
+
|
718
|
+
next if page.platforms.empty?
|
719
|
+
print_info "Identified as: #{page.platforms.to_a.join( ', ' )}"
|
695
720
|
end
|
696
721
|
end
|
697
722
|
|
698
|
-
@status = :auditing
|
699
723
|
audit_queues
|
700
|
-
|
701
|
-
exception_jail { audit_queues }
|
702
724
|
end
|
703
725
|
|
704
726
|
#
|
@@ -707,6 +729,8 @@ class Framework
|
|
707
729
|
def audit_queues
|
708
730
|
return if modules.empty?
|
709
731
|
|
732
|
+
@status = :auditing
|
733
|
+
|
710
734
|
# goes through the URLs discovered by the spider, repeats the request
|
711
735
|
# and parses the responses into page objects
|
712
736
|
#
|