arachni 0.4.7 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/AUTHORS.md +1 -1
- data/CHANGELOG.md +211 -0
- data/CONTRIBUTORS.md +1 -0
- data/Gemfile +23 -2
- data/LICENSE.md +34 -1
- data/README.md +211 -127
- data/Rakefile +79 -67
- data/arachni.gemspec +54 -62
- data/bin/arachni +6 -18
- data/bin/arachni_console +5 -13
- data/bin/arachni_multi +6 -16
- data/bin/arachni_reporter +12 -0
- data/bin/arachni_restore +12 -0
- data/bin/arachni_rpc +6 -16
- data/bin/arachni_rpcd +6 -17
- data/bin/arachni_rpcd_monitor +6 -18
- data/bin/arachni_script +8 -19
- data/components/checks/active/code_injection.rb +123 -0
- data/components/checks/active/code_injection_php_input_wrapper.rb +99 -0
- data/components/checks/active/code_injection_timing.rb +106 -0
- data/components/checks/active/csrf.rb +218 -0
- data/components/checks/active/file_inclusion.rb +152 -0
- data/components/checks/active/ldap_injection.rb +109 -0
- data/{modules/audit/ldapi → components/checks/active/ldap_injection}/errors.txt +0 -0
- data/components/checks/active/no_sql_injection.rb +94 -0
- data/components/checks/active/no_sql_injection/patterns/mongodb +1 -0
- data/{extras/placeholder → components/checks/active/no_sql_injection/regexp_ignore.txt} +0 -0
- data/components/checks/active/no_sql_injection_differential.rb +78 -0
- data/components/checks/active/os_cmd_injection.rb +116 -0
- data/components/checks/active/os_cmd_injection_timing.rb +92 -0
- data/components/checks/active/path_traversal.rb +174 -0
- data/components/checks/active/response_splitting.rb +94 -0
- data/components/checks/active/rfi.rb +172 -0
- data/components/checks/active/session_fixation.rb +117 -0
- data/components/checks/active/source_code_disclosure.rb +177 -0
- data/components/checks/active/sql_injection.rb +123 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/access +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/coldfusion +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/db2 +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/emc +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/firebird +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/frontbase +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/hsqldb +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/informix +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/ingres +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/interbase +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/maxdb +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/mssql +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/mysql +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/oracle +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/pgsql +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/sqlite +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/patterns/sybase +0 -0
- data/{modules/audit/sqli → components/checks/active/sql_injection}/regexp_ignore.txt +0 -0
- data/components/checks/active/sql_injection_differential.rb +114 -0
- data/{modules/audit/sqli_blind_rdiff → components/checks/active/sql_injection_differential}/payloads.txt +0 -0
- data/components/checks/active/sql_injection_timing.rb +98 -0
- data/{modules/audit/sqli_blind_timing → components/checks/active/sql_injection_timing}/mssql.txt +0 -0
- data/{modules/audit/sqli_blind_timing → components/checks/active/sql_injection_timing}/mysql.txt +0 -0
- data/{modules/audit/sqli_blind_timing → components/checks/active/sql_injection_timing}/pgsql.txt +0 -0
- data/components/checks/active/trainer.rb +40 -0
- data/components/checks/active/unvalidated_redirect.rb +108 -0
- data/components/checks/active/xpath_injection.rb +87 -0
- data/{modules/audit/xpath → components/checks/active/xpath_injection}/errors.txt +0 -0
- data/components/checks/active/xss.rb +169 -0
- data/components/checks/active/xss_dom.rb +119 -0
- data/components/checks/active/xss_dom_inputs.rb +132 -0
- data/components/checks/active/xss_dom_script_context.rb +118 -0
- data/components/checks/active/xss_event.rb +165 -0
- data/components/checks/active/xss_path.rb +146 -0
- data/components/checks/active/xss_script_context.rb +207 -0
- data/components/checks/active/xss_tag.rb +135 -0
- data/components/checks/passive/allowed_methods.rb +92 -0
- data/components/checks/passive/backdoors.rb +79 -0
- data/{modules/recon → components/checks/passive}/backdoors/filenames.txt +0 -0
- data/components/checks/passive/backup_directories.rb +86 -0
- data/components/checks/passive/backup_directories/formats.txt +56 -0
- data/components/checks/passive/backup_files.rb +99 -0
- data/components/checks/passive/backup_files/formats.txt +106 -0
- data/components/checks/passive/common_directories.rb +81 -0
- data/{modules/recon → components/checks/passive}/common_directories/directories.txt +0 -0
- data/components/checks/passive/common_files.rb +73 -0
- data/components/checks/passive/common_files/filenames.txt +24 -0
- data/components/checks/passive/directory_listing.rb +129 -0
- data/components/checks/passive/grep/captcha.rb +73 -0
- data/components/checks/passive/grep/cookie_set_for_parent_domain.rb +71 -0
- data/components/checks/passive/grep/credit_card.rb +124 -0
- data/components/checks/passive/grep/cvs_svn_users.rb +75 -0
- data/components/checks/passive/grep/emails.rb +53 -0
- data/components/checks/passive/grep/form_upload.rb +75 -0
- data/components/checks/passive/grep/hsts.rb +74 -0
- data/components/checks/passive/grep/html_objects.rb +45 -0
- data/components/checks/passive/grep/http_only_cookies.rb +72 -0
- data/components/checks/passive/grep/insecure_cookies.rb +74 -0
- data/components/checks/passive/grep/mixed_resource.rb +109 -0
- data/components/checks/passive/grep/password_autocomplete.rb +80 -0
- data/components/checks/passive/grep/private_ip.rb +73 -0
- data/components/checks/passive/grep/ssn.rb +62 -0
- data/components/checks/passive/grep/unencrypted_password_forms.rb +88 -0
- data/components/checks/passive/htaccess_limit.rb +71 -0
- data/components/checks/passive/http_put.rb +91 -0
- data/components/checks/passive/interesting_responses.rb +88 -0
- data/components/checks/passive/localstart_asp.rb +88 -0
- data/components/checks/passive/origin_spoof_access_restriction_bypass.rb +83 -0
- data/components/checks/passive/webdav.rb +101 -0
- data/components/checks/passive/xst.rb +90 -0
- data/components/fingerprinters/frameworks/rack.rb +33 -0
- data/components/fingerprinters/languages/asp.rb +34 -0
- data/components/fingerprinters/languages/aspx.rb +55 -0
- data/components/fingerprinters/languages/jsp.rb +34 -0
- data/components/fingerprinters/languages/php.rb +35 -0
- data/components/fingerprinters/languages/python.rb +32 -0
- data/components/fingerprinters/languages/ruby.rb +33 -0
- data/components/fingerprinters/os/bsd.rb +28 -0
- data/components/fingerprinters/os/linux.rb +34 -0
- data/components/fingerprinters/os/solaris.rb +33 -0
- data/components/fingerprinters/os/unix.rb +28 -0
- data/components/fingerprinters/os/windows.rb +33 -0
- data/components/fingerprinters/servers/apache.rb +28 -0
- data/components/fingerprinters/servers/iis.rb +28 -0
- data/components/fingerprinters/servers/jetty.rb +28 -0
- data/components/fingerprinters/servers/nginx.rb +28 -0
- data/components/fingerprinters/servers/tomcat.rb +28 -0
- data/components/path_extractors/anchors.rb +29 -0
- data/components/path_extractors/areas.rb +29 -0
- data/components/path_extractors/comments.rb +21 -0
- data/components/path_extractors/forms.rb +29 -0
- data/components/path_extractors/frames.rb +29 -0
- data/components/path_extractors/generic.rb +76 -0
- data/components/path_extractors/links.rb +29 -0
- data/components/path_extractors/meta_refresh.rb +50 -0
- data/components/path_extractors/scripts.rb +31 -0
- data/components/plugins/autologin.rb +120 -0
- data/components/plugins/beep_notify.rb +43 -0
- data/components/plugins/content_types.rb +110 -0
- data/components/plugins/cookie_collector.rb +94 -0
- data/components/plugins/defaults/autothrottle.rb +73 -0
- data/components/plugins/defaults/healthmap.rb +79 -0
- data/components/plugins/defaults/meta/remedies/discovery.rb +122 -0
- data/components/plugins/defaults/meta/remedies/timing_attacks.rb +98 -0
- data/components/plugins/defaults/meta/uniformity.rb +55 -0
- data/components/plugins/email_notify.rb +112 -0
- data/components/plugins/form_dicattack.rb +128 -0
- data/components/plugins/http_dicattack.rb +102 -0
- data/components/plugins/proxy.rb +492 -0
- data/{plugins → components/plugins}/proxy/panel/403_forbidden.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/404_not_found.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/css/bootstrap-responsive.css +0 -0
- data/{plugins → components/plugins}/proxy/panel/css/bootstrap.min.css +0 -0
- data/{plugins → components/plugins}/proxy/panel/css/panel.css +0 -0
- data/{plugins → components/plugins}/proxy/panel/help.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/img/glyphicons-halflings-white.png +0 -0
- data/{plugins → components/plugins}/proxy/panel/img/glyphicons-halflings.png +0 -0
- data/{plugins → components/plugins}/proxy/panel/img/record.png +0 -0
- data/{plugins → components/plugins}/proxy/panel/inspect.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/js/bootstrap.min.js +0 -0
- data/{plugins → components/plugins}/proxy/panel/js/jquery.min.js +0 -0
- data/{plugins → components/plugins}/proxy/panel/js/panel.js +0 -0
- data/{plugins → components/plugins}/proxy/panel/layout.html.erb +0 -0
- data/components/plugins/proxy/panel/page_accordion.html.erb +67 -0
- data/{plugins → components/plugins}/proxy/panel/page_twin_accordion.html.erb +0 -0
- data/components/plugins/proxy/panel/panel.html.erb +69 -0
- data/{plugins → components/plugins}/proxy/panel/shutdown_message.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/sign_in.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/vectors.yml.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/verify_login_check.html.erb +0 -0
- data/{plugins → components/plugins}/proxy/panel/verify_login_final.html.erb +0 -0
- data/components/plugins/proxy/panel/verify_login_sequence.html.erb +45 -0
- data/components/plugins/proxy/template_scope.rb +130 -0
- data/components/plugins/script.rb +48 -0
- data/components/plugins/uncommon_headers.rb +92 -0
- data/components/plugins/vector_feed.rb +225 -0
- data/components/plugins/waf_detector.rb +169 -0
- data/components/reporters/ap.rb +38 -0
- data/components/reporters/html.rb +468 -0
- data/components/reporters/html/default.erb +68 -0
- data/components/reporters/html/default/configuration.erb +78 -0
- data/components/reporters/html/default/css/lib/bootstrap-theme.min.css +7 -0
- data/components/reporters/html/default/css/lib/bootstrap.min.css +7 -0
- data/components/reporters/html/default/css/lib/c3.css +203 -0
- data/components/reporters/html/default/css/lib/font-awesome.min.css +4 -0
- data/components/reporters/html/default/css/main.css +140 -0
- data/components/reporters/html/default/fonts/FontAwesome.otf +0 -0
- data/components/reporters/html/default/fonts/fontawesome-webfont.eot +0 -0
- data/components/reporters/html/default/fonts/fontawesome-webfont.svg +504 -0
- data/components/reporters/html/default/fonts/fontawesome-webfont.ttf +0 -0
- data/components/reporters/html/default/fonts/fontawesome-webfont.woff +0 -0
- data/components/reporters/html/default/fonts/glyphicons-halflings-regular.eot +0 -0
- data/components/reporters/html/default/fonts/glyphicons-halflings-regular.svg +229 -0
- data/components/reporters/html/default/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/components/reporters/html/default/fonts/glyphicons-halflings-regular.woff +0 -0
- data/components/reporters/html/default/issue.erb +81 -0
- data/components/reporters/html/default/issue/details.erb +68 -0
- data/components/reporters/html/default/issue/info.erb +74 -0
- data/components/reporters/html/default/issue/page.erb +117 -0
- data/components/reporters/html/default/issue/page/body.erb +42 -0
- data/components/reporters/html/default/issue/page/sink/data_flow.erb +95 -0
- data/components/reporters/html/default/issue/page/sink/data_flow/arguments.erb +70 -0
- data/components/reporters/html/default/issue/page/sink/data_flow/source.erb +1 -0
- data/components/reporters/html/default/issue/page/sink/execution_flow.erb +63 -0
- data/components/reporters/html/default/issue/page/sink/frame/source.erb +32 -0
- data/components/reporters/html/default/issue/page/sink/trace/table.erb +127 -0
- data/components/reporters/html/default/issue/page/transitions.erb +86 -0
- data/components/reporters/html/default/issue/platform.erb +8 -0
- data/components/reporters/html/default/issue/remarks.erb +28 -0
- data/components/reporters/html/default/issue/vector.erb +40 -0
- data/components/reporters/html/default/issues.erb +46 -0
- data/components/reporters/html/default/issues/grouped.erb +147 -0
- data/components/reporters/html/default/js/charts.js.erb +117 -0
- data/components/reporters/html/default/js/configuration.js.erb +12 -0
- data/components/reporters/html/default/js/helpers.js +107 -0
- data/components/reporters/html/default/js/init.js.erb +23 -0
- data/components/reporters/html/default/js/lib/bootstrap.min.js +6 -0
- data/components/reporters/html/default/js/lib/c3.min.js +3 -0
- data/components/reporters/html/default/js/lib/d3.min.js +5 -0
- data/components/reporters/html/default/js/lib/jquery.min.js +4 -0
- data/components/reporters/html/default/navigation.erb +136 -0
- data/components/reporters/html/default/plugins.erb +30 -0
- data/components/reporters/html/default/shared/hash.erb +10 -0
- data/components/reporters/html/default/shared/hash_table.erb +22 -0
- data/components/reporters/html/default/sitemap.erb +29 -0
- data/components/reporters/html/default/summary.erb +34 -0
- data/components/reporters/html/default/summary/charts.erb +67 -0
- data/components/reporters/html/default/summary/issues.erb +129 -0
- data/components/reporters/json.rb +44 -0
- data/components/reporters/marshal.rb +38 -0
- data/components/reporters/plugin_formatters/html/autologin.rb +50 -0
- data/components/reporters/plugin_formatters/html/content_types.rb +59 -0
- data/components/reporters/plugin_formatters/html/cookie_collector.rb +46 -0
- data/components/reporters/plugin_formatters/html/form_dicattack.rb +36 -0
- data/components/reporters/plugin_formatters/html/healthmap.rb +88 -0
- data/components/reporters/plugin_formatters/html/http_dicattack.rb +36 -0
- data/components/reporters/plugin_formatters/html/uncommon_headers.rb +40 -0
- data/components/reporters/plugin_formatters/html/uniformity.rb +55 -0
- data/components/reporters/plugin_formatters/html/waf_detector.rb +69 -0
- data/components/reporters/plugin_formatters/stdout/autologin.rb +25 -0
- data/components/reporters/plugin_formatters/stdout/content_types.rb +39 -0
- data/components/reporters/plugin_formatters/stdout/cookie_collector.rb +31 -0
- data/components/reporters/plugin_formatters/stdout/form_dicattack.rb +24 -0
- data/components/reporters/plugin_formatters/stdout/healthmap.rb +41 -0
- data/components/reporters/plugin_formatters/stdout/http_dicattack.rb +24 -0
- data/components/reporters/plugin_formatters/stdout/uncommon_headers.rb +29 -0
- data/components/reporters/plugin_formatters/stdout/uniformity.rb +35 -0
- data/components/reporters/plugin_formatters/stdout/waf_detector.rb +21 -0
- data/components/reporters/plugin_formatters/xml/autologin.rb +28 -0
- data/components/reporters/plugin_formatters/xml/content_types.rb +36 -0
- data/components/reporters/plugin_formatters/xml/cookie_collector.rb +32 -0
- data/components/reporters/plugin_formatters/xml/form_dicattack.rb +22 -0
- data/components/reporters/plugin_formatters/xml/healthmap.rb +30 -0
- data/components/reporters/plugin_formatters/xml/http_dicattack.rb +22 -0
- data/components/reporters/plugin_formatters/xml/uncommon_headers.rb +29 -0
- data/components/reporters/plugin_formatters/xml/uniformity.rb +23 -0
- data/components/reporters/plugin_formatters/xml/waf_detector.rb +22 -0
- data/components/reporters/stdout.rb +226 -0
- data/components/reporters/txt.rb +50 -0
- data/components/reporters/xml.rb +285 -0
- data/components/reporters/xml/schema.xsd +664 -0
- data/components/reporters/yaml.rb +37 -0
- data/{rpcd_handlers → components/services}/placeholder +0 -0
- data/lib/arachni.rb +29 -18
- data/lib/arachni/banner.rb +5 -13
- data/lib/arachni/browser.rb +1292 -0
- data/lib/arachni/browser/element_locator.rb +137 -0
- data/lib/arachni/browser/javascript.rb +383 -0
- data/lib/arachni/browser/javascript/dom_monitor.rb +31 -0
- data/lib/arachni/browser/javascript/proxy.rb +92 -0
- data/lib/arachni/browser/javascript/proxy/stub.rb +90 -0
- data/lib/arachni/browser/javascript/scripts/dom_monitor.js +146 -0
- data/lib/arachni/browser/javascript/scripts/taint_tracer.js +486 -0
- data/lib/arachni/browser/javascript/taint_tracer.rb +101 -0
- data/lib/arachni/browser/javascript/taint_tracer/frame.rb +73 -0
- data/lib/arachni/browser/javascript/taint_tracer/frame/called_function.rb +78 -0
- data/lib/arachni/browser/javascript/taint_tracer/sink/base.rb +63 -0
- data/lib/arachni/browser/javascript/taint_tracer/sink/data_flow.rb +83 -0
- data/lib/arachni/browser/javascript/taint_tracer/sink/execution_flow.rb +30 -0
- data/lib/arachni/browser_cluster.rb +414 -0
- data/lib/arachni/browser_cluster/job.rb +193 -0
- data/lib/arachni/browser_cluster/job/result.rb +29 -0
- data/lib/arachni/browser_cluster/jobs/browser_provider.rb +27 -0
- data/lib/arachni/browser_cluster/jobs/resource_exploration.rb +60 -0
- data/lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger.rb +43 -0
- data/lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger/result.rb +23 -0
- data/lib/arachni/browser_cluster/jobs/resource_exploration/result.rb +23 -0
- data/lib/arachni/browser_cluster/jobs/taint_trace.rb +48 -0
- data/lib/arachni/browser_cluster/jobs/taint_trace/event_trigger.rb +33 -0
- data/lib/arachni/browser_cluster/jobs/taint_trace/event_trigger/result.rb +23 -0
- data/lib/arachni/browser_cluster/jobs/taint_trace/result.rb +23 -0
- data/lib/arachni/browser_cluster/worker.rb +277 -0
- data/lib/arachni/check.rb +12 -0
- data/lib/arachni/check/auditor.rb +612 -0
- data/lib/arachni/check/base.rb +177 -0
- data/lib/arachni/check/manager.rb +137 -0
- data/lib/arachni/component.rb +11 -0
- data/lib/arachni/component/base.rb +62 -0
- data/lib/arachni/component/manager.rb +92 -90
- data/lib/arachni/component/options.rb +6 -28
- data/lib/arachni/component/options/address.rb +14 -30
- data/lib/arachni/component/options/base.rb +96 -81
- data/lib/arachni/component/options/bool.rb +20 -37
- data/lib/arachni/component/options/float.rb +12 -31
- data/lib/arachni/component/options/int.rb +14 -31
- data/lib/arachni/component/options/multiple_choice.rb +40 -0
- data/lib/arachni/component/options/object.rb +16 -0
- data/lib/arachni/component/options/path.rb +12 -25
- data/lib/arachni/component/options/port.rb +15 -25
- data/lib/arachni/component/options/string.rb +10 -32
- data/lib/arachni/component/options/url.rb +15 -30
- data/lib/arachni/component/output.rb +33 -0
- data/lib/arachni/component/utilities.rb +49 -0
- data/lib/arachni/data.rb +109 -0
- data/lib/arachni/data/framework.rb +160 -0
- data/lib/arachni/data/framework/rpc.rb +68 -0
- data/lib/arachni/data/issues.rb +227 -0
- data/lib/arachni/data/plugins.rb +109 -0
- data/lib/arachni/data/session.rb +48 -0
- data/lib/arachni/element/base.rb +131 -82
- data/lib/arachni/element/body.rb +43 -13
- data/lib/arachni/element/capabilities/analyzable.rb +46 -0
- data/lib/arachni/element/capabilities/analyzable/differential.rb +436 -0
- data/lib/arachni/element/capabilities/analyzable/taint.rb +218 -0
- data/lib/arachni/element/capabilities/analyzable/timeout.rb +433 -0
- data/lib/arachni/element/capabilities/auditable.rb +172 -577
- data/lib/arachni/element/capabilities/auditable/dom.rb +156 -0
- data/lib/arachni/element/capabilities/inputtable.rb +267 -0
- data/lib/arachni/element/capabilities/mutable.rb +197 -155
- data/lib/arachni/element/capabilities/refreshable.rb +31 -24
- data/lib/arachni/element/capabilities/submittable.rb +128 -0
- data/lib/arachni/element/capabilities/with_auditor.rb +60 -0
- data/lib/arachni/element/capabilities/with_auditor/output.rb +33 -0
- data/lib/arachni/element/capabilities/with_dom.rb +40 -0
- data/lib/arachni/element/capabilities/with_node.rb +52 -0
- data/lib/arachni/element/capabilities/with_scope.rb +25 -0
- data/lib/arachni/element/capabilities/with_scope/scope.rb +38 -0
- data/lib/arachni/element/cookie.rb +337 -862
- data/lib/arachni/element/cookie/dom.rb +67 -0
- data/lib/arachni/element/form.rb +326 -756
- data/lib/arachni/element/form/dom.rb +52 -0
- data/lib/arachni/element/generic_dom.rb +133 -0
- data/lib/arachni/element/header.rb +46 -46
- data/lib/arachni/element/link.rb +134 -172
- data/lib/arachni/element/link/dom.rb +128 -0
- data/lib/arachni/element/link_template.rb +268 -0
- data/lib/arachni/element/link_template/dom.rb +143 -0
- data/lib/arachni/element/path.rb +24 -13
- data/lib/arachni/element/server.rb +89 -13
- data/lib/arachni/element_filter.rb +101 -99
- data/lib/arachni/error.rb +5 -15
- data/lib/arachni/ethon/easy.rb +22 -0
- data/lib/arachni/framework.rb +841 -476
- data/lib/arachni/http.rb +6 -714
- data/lib/arachni/http/client.rb +801 -0
- data/lib/arachni/http/cookie_jar.rb +50 -51
- data/lib/arachni/http/headers.rb +122 -0
- data/lib/arachni/http/message.rb +76 -0
- data/lib/arachni/http/message/scope.rb +35 -0
- data/lib/arachni/http/proxy_server.rb +303 -0
- data/{plugins/proxy → lib/arachni/http/proxy_server}/ssl-interceptor-cert.pem +0 -0
- data/{plugins/proxy → lib/arachni/http/proxy_server}/ssl-interceptor-pkey.pem +0 -0
- data/lib/arachni/http/request.rb +471 -0
- data/lib/arachni/http/request/scope.rb +30 -0
- data/lib/arachni/http/response.rb +226 -0
- data/lib/arachni/http/response/scope.rb +67 -0
- data/lib/arachni/issue.rb +389 -223
- data/lib/arachni/issue/severity.rb +34 -0
- data/lib/arachni/issue/severity/base.rb +39 -0
- data/lib/arachni/option_group.rb +137 -0
- data/lib/arachni/option_groups.rb +13 -0
- data/lib/arachni/option_groups/audit.rb +226 -0
- data/lib/arachni/option_groups/browser_cluster.rb +50 -0
- data/lib/arachni/option_groups/datastore.rb +31 -0
- data/lib/arachni/option_groups/dispatcher.rb +132 -0
- data/lib/arachni/option_groups/http.rb +174 -0
- data/lib/arachni/option_groups/input.rb +156 -0
- data/lib/arachni/option_groups/output.rb +22 -0
- data/lib/arachni/option_groups/paths.rb +63 -0
- data/lib/arachni/option_groups/rpc.rb +87 -0
- data/lib/arachni/option_groups/scope.rb +233 -0
- data/lib/arachni/option_groups/session.rb +54 -0
- data/lib/arachni/option_groups/snapshot.rb +22 -0
- data/lib/arachni/options.rb +286 -1486
- data/lib/arachni/page.rb +504 -108
- data/lib/arachni/page/dom.rb +280 -0
- data/lib/arachni/page/dom/transition.rb +302 -0
- data/lib/arachni/page/scope.rb +53 -0
- data/lib/arachni/parser.rb +177 -210
- data/lib/arachni/platform.rb +5 -13
- data/lib/arachni/platform/fingerprinter.rb +24 -23
- data/lib/arachni/platform/list.rb +48 -27
- data/lib/arachni/platform/manager.rb +146 -83
- data/lib/arachni/plugin.rb +5 -13
- data/lib/arachni/plugin/base.rb +90 -110
- data/lib/arachni/plugin/formatter.rb +40 -0
- data/lib/arachni/plugin/manager.rb +129 -108
- data/lib/arachni/processes.rb +6 -14
- data/lib/arachni/processes/dispatchers.rb +51 -58
- data/lib/arachni/processes/executables/base.rb +9 -0
- data/lib/arachni/processes/executables/dispatcher.rb +6 -0
- data/lib/arachni/processes/executables/instance.rb +13 -0
- data/lib/arachni/processes/helpers.rb +4 -12
- data/lib/arachni/processes/helpers/dispatchers.rb +8 -12
- data/lib/arachni/processes/helpers/instances.rb +13 -13
- data/lib/arachni/processes/helpers/processes.rb +8 -28
- data/lib/arachni/processes/instances.rb +86 -63
- data/lib/arachni/processes/manager.rb +89 -52
- data/lib/arachni/report.rb +282 -15
- data/lib/arachni/reporter.rb +12 -0
- data/lib/arachni/reporter/base.rb +126 -0
- data/lib/arachni/reporter/formatter_manager.rb +20 -0
- data/lib/arachni/reporter/manager.rb +54 -0
- data/lib/arachni/reporter/options.rb +47 -0
- data/lib/arachni/rpc/client/base.rb +27 -35
- data/lib/arachni/rpc/client/dispatcher.rb +13 -21
- data/lib/arachni/rpc/client/instance.rb +45 -40
- data/lib/arachni/rpc/client/instance/framework.rb +88 -0
- data/lib/arachni/rpc/client/instance/service.rb +106 -0
- data/lib/arachni/rpc/serializer.rb +98 -0
- data/lib/arachni/rpc/server/active_options.rb +26 -42
- data/lib/arachni/rpc/server/base.rb +35 -26
- data/lib/arachni/rpc/server/check/manager.rb +38 -0
- data/lib/arachni/rpc/server/dispatcher.rb +125 -211
- data/lib/arachni/rpc/server/dispatcher/node.rb +36 -50
- data/lib/arachni/rpc/server/dispatcher/service.rb +153 -0
- data/lib/arachni/rpc/server/framework.rb +83 -176
- data/lib/arachni/rpc/server/framework/distributor.rb +292 -271
- data/lib/arachni/rpc/server/framework/master.rb +164 -296
- data/lib/arachni/rpc/server/framework/multi_instance.rb +96 -128
- data/lib/arachni/rpc/server/framework/slave.rb +79 -89
- data/lib/arachni/rpc/server/instance.rb +362 -413
- data/lib/arachni/rpc/server/output.rb +33 -147
- data/lib/arachni/rpc/server/plugin/manager.rb +18 -54
- data/lib/arachni/ruby.rb +5 -14
- data/lib/arachni/ruby/array.rb +4 -14
- data/lib/arachni/ruby/hash.rb +47 -15
- data/lib/arachni/ruby/io.rb +4 -14
- data/lib/arachni/ruby/object.rb +10 -52
- data/lib/arachni/ruby/set.rb +4 -12
- data/lib/arachni/ruby/string.rb +60 -40
- data/lib/arachni/ruby/webrick.rb +4 -12
- data/lib/arachni/ruby/webrick/cookie.rb +4 -12
- data/lib/arachni/ruby/webrick/httprequest.rb +4 -12
- data/lib/arachni/scope.rb +40 -0
- data/lib/arachni/selenium/webdriver/remote/http/typhoeus.rb +46 -0
- data/lib/arachni/session.rb +150 -173
- data/lib/arachni/snapshot.rb +181 -0
- data/lib/arachni/state.rb +122 -0
- data/lib/arachni/state/audit.rb +57 -0
- data/lib/arachni/state/element_filter.rb +67 -0
- data/lib/arachni/state/framework.rb +419 -0
- data/lib/arachni/state/framework/rpc.rb +63 -0
- data/lib/arachni/state/http.rb +60 -0
- data/lib/arachni/state/options.rb +39 -0
- data/lib/arachni/state/plugins.rb +94 -0
- data/lib/arachni/support.rb +6 -15
- data/lib/arachni/support/buffer.rb +5 -13
- data/lib/arachni/support/buffer/autoflush.rb +5 -15
- data/lib/arachni/support/buffer/base.rb +41 -70
- data/lib/arachni/support/cache.rb +5 -13
- data/lib/arachni/support/cache/base.rb +45 -50
- data/lib/arachni/support/cache/least_cost_replacement.rb +9 -19
- data/lib/arachni/support/cache/least_recently_used.rb +5 -15
- data/lib/arachni/support/cache/preference.rb +11 -20
- data/lib/arachni/support/cache/random_replacement.rb +10 -15
- data/lib/arachni/support/crypto.rb +5 -13
- data/lib/arachni/support/crypto/rsa_aes_cbc.rb +15 -27
- data/lib/arachni/support/database.rb +5 -13
- data/lib/arachni/support/database/base.rb +20 -37
- data/lib/arachni/support/database/hash.rb +265 -350
- data/lib/arachni/support/database/queue.rb +86 -27
- data/lib/arachni/support/lookup.rb +5 -13
- data/lib/arachni/support/lookup/base.rb +33 -26
- data/lib/arachni/support/lookup/hash_set.rb +11 -15
- data/lib/arachni/support/lookup/moolb.rb +9 -20
- data/lib/arachni/support/mixins.rb +14 -0
- data/lib/arachni/support/mixins/observable.rb +105 -0
- data/lib/arachni/support/mixins/terminal.rb +65 -0
- data/lib/arachni/support/profiler.rb +130 -0
- data/lib/arachni/support/signature.rb +37 -67
- data/lib/arachni/trainer.rb +57 -97
- data/lib/arachni/ui/foo/output.rb +31 -33
- data/lib/arachni/uri.rb +456 -462
- data/lib/arachni/uri/scope.rb +168 -0
- data/lib/arachni/utilities.rb +125 -147
- data/lib/arachni/version.rb +4 -12
- data/lib/arachni/watir/element.rb +17 -0
- data/lib/version +1 -1
- data/{spec/support/servers/modules/audit/sqli/jdbc → profiles/placeholder} +0 -0
- data/spec/arachni/browser/element_locator_spec.rb +228 -0
- data/spec/arachni/browser/javascript/dom_monitor_spec.rb +195 -0
- data/spec/arachni/browser/javascript/proxy/stub_spec.rb +106 -0
- data/spec/arachni/browser/javascript/proxy_spec.rb +144 -0
- data/spec/arachni/browser/javascript/taint_tracer/frame/called_function_spec.rb +72 -0
- data/spec/arachni/browser/javascript/taint_tracer/frame_spec.rb +46 -0
- data/spec/arachni/browser/javascript/taint_tracer/sink/data_flow_spec.rb +81 -0
- data/spec/arachni/browser/javascript/taint_tracer/sink/execution_flow_spec.rb +47 -0
- data/spec/arachni/browser/javascript/taint_tracer_spec.rb +1304 -0
- data/spec/arachni/browser/javascript_spec.rb +355 -0
- data/spec/arachni/browser_cluster/job/result_spec.rb +14 -0
- data/spec/arachni/browser_cluster/job_spec.rb +264 -0
- data/spec/arachni/browser_cluster/jobs/resource_exploration/event_trigger/result_spec.rb +7 -0
- data/spec/arachni/browser_cluster/jobs/resource_exploration/event_trigger_spec.rb +68 -0
- data/spec/arachni/browser_cluster/jobs/resource_exploration/result_spec.rb +7 -0
- data/spec/arachni/browser_cluster/jobs/resource_exploration_spec.rb +89 -0
- data/spec/arachni/browser_cluster/jobs/taint_tracer_spec.rb +149 -0
- data/spec/arachni/browser_cluster/worker_spec.rb +314 -0
- data/spec/arachni/browser_cluster_spec.rb +543 -0
- data/spec/arachni/browser_spec.rb +2368 -0
- data/spec/arachni/check/auditor_spec.rb +1089 -0
- data/spec/arachni/check/base_spec.rb +33 -0
- data/spec/arachni/check/manager_spec.rb +100 -0
- data/spec/arachni/component/base_spec.rb +64 -0
- data/spec/arachni/component/manager_spec.rb +37 -26
- data/spec/arachni/component/options/address_spec.rb +5 -11
- data/spec/arachni/component/options/base_spec.rb +29 -81
- data/spec/arachni/component/options/bool_spec.rb +16 -19
- data/spec/arachni/component/options/float_spec.rb +17 -16
- data/spec/arachni/component/options/int_spec.rb +17 -20
- data/spec/arachni/component/options/multiple_choice_spec.rb +82 -0
- data/spec/arachni/component/options/object_spec.rb +24 -0
- data/spec/arachni/component/options/path_spec.rb +8 -11
- data/spec/arachni/component/options/port_spec.rb +16 -15
- data/spec/arachni/component/options/string_spec.rb +8 -17
- data/spec/arachni/component/options/url_spec.rb +16 -14
- data/spec/arachni/component/utilities_spec.rb +30 -0
- data/spec/arachni/{module → component}/utilities_spec/read_file.txt +0 -0
- data/spec/arachni/data/framework/rpc_spec.rb +72 -0
- data/spec/arachni/data/framework_spec.rb +266 -0
- data/spec/arachni/data/issues_spec.rb +347 -0
- data/spec/arachni/data/plugins_spec.rb +102 -0
- data/spec/arachni/data/session_spec.rb +59 -0
- data/spec/arachni/data_spec.rb +71 -0
- data/spec/arachni/element/body_spec.rb +63 -4
- data/spec/arachni/element/capabilities/analyzable/differential_spec.rb +135 -0
- data/spec/arachni/element/capabilities/analyzable/taint_spec.rb +355 -0
- data/spec/arachni/element/capabilities/analyzable/timeout_spec.rb +386 -0
- data/spec/arachni/element/capabilities/with_scope/scope_spec.rb +25 -0
- data/spec/arachni/element/cookie/dom_spec.rb +145 -0
- data/spec/arachni/element/cookie_spec.rb +147 -108
- data/spec/arachni/element/form/dom_spec.rb +146 -0
- data/spec/arachni/element/form_spec.rb +519 -271
- data/spec/arachni/element/generic_dom_spec.rb +113 -0
- data/spec/arachni/element/header_spec.rb +68 -20
- data/spec/arachni/element/link/dom_spec.rb +206 -0
- data/spec/arachni/element/link_spec.rb +218 -130
- data/spec/arachni/element/link_template/dom_spec.rb +218 -0
- data/spec/arachni/element/link_template_spec.rb +403 -0
- data/spec/arachni/element/path_spec.rb +28 -4
- data/spec/arachni/element/server_spec.rb +171 -4
- data/spec/arachni/element_filter_spec.rb +227 -96
- data/spec/arachni/framework_spec.rb +1099 -759
- data/spec/arachni/http/client_spec.rb +1470 -0
- data/spec/arachni/http/cookie_jar_spec.rb +164 -130
- data/spec/arachni/http/headers_spec.rb +111 -0
- data/spec/arachni/http/message_spec.rb +5 -0
- data/spec/arachni/http/proxy_server_spec.rb +354 -0
- data/spec/arachni/http/request_spec.rb +602 -0
- data/spec/arachni/http/response/scope_spec.rb +135 -0
- data/spec/arachni/http/response_spec.rb +350 -0
- data/spec/arachni/issue/severity/base_spec.rb +15 -0
- data/spec/arachni/issue/severity_spec.rb +43 -0
- data/spec/arachni/issue_spec.rb +547 -284
- data/spec/arachni/option_groups/audit_spec.rb +298 -0
- data/spec/arachni/option_groups/browser_cluster_spec.rb +12 -0
- data/spec/arachni/option_groups/datastore_spec.rb +54 -0
- data/spec/arachni/option_groups/dispatcher_spec.rb +123 -0
- data/spec/arachni/option_groups/http_spec.rb +42 -0
- data/spec/arachni/option_groups/input_spec.rb +202 -0
- data/spec/arachni/option_groups/output_spec.rb +11 -0
- data/spec/arachni/option_groups/paths_spec.rb +34 -0
- data/spec/arachni/option_groups/rpc_spec.rb +13 -0
- data/spec/arachni/option_groups/scope_spec.rb +237 -0
- data/spec/arachni/option_groups/session_spec.rb +51 -0
- data/spec/arachni/option_groups/snapshot_spec.rb +11 -0
- data/spec/arachni/options_spec.rb +202 -756
- data/spec/arachni/page/dom/transition_spec.rb +515 -0
- data/spec/arachni/page/dom_spec.rb +308 -0
- data/spec/arachni/page/scope_spec.rb +80 -0
- data/spec/arachni/page_spec.rb +789 -175
- data/spec/arachni/parser_spec.rb +308 -200
- data/spec/arachni/platform/fingerprinter_spec.rb +51 -52
- data/spec/arachni/platform/manager_spec.rb +146 -34
- data/spec/arachni/plugin/base_spec.rb +97 -0
- data/spec/arachni/plugin/manager_spec.rb +186 -80
- data/spec/arachni/report_spec.rb +275 -0
- data/spec/arachni/reporter/base_spec.rb +96 -0
- data/spec/arachni/reporter/manager_spec.rb +38 -0
- data/spec/arachni/reporter/options_spec.rb +48 -0
- data/spec/arachni/rpc/client/base_spec.rb +43 -45
- data/spec/arachni/rpc/client/dispatcher_spec.rb +3 -3
- data/spec/arachni/rpc/client/instance_spec.rb +18 -40
- data/spec/arachni/rpc/server/active_options_spec.rb +35 -296
- data/spec/arachni/rpc/server/base_spec.rb +12 -6
- data/spec/arachni/rpc/server/checks/manager_spec.rb +48 -0
- data/spec/arachni/rpc/server/dispatcher/node_spec.rb +47 -74
- data/spec/arachni/rpc/server/dispatcher/service_spec.rb +99 -0
- data/spec/arachni/rpc/server/dispatcher_spec.rb +77 -38
- data/spec/arachni/rpc/server/framework/distributor_spec.rb +356 -396
- data/spec/arachni/rpc/server/framework_multi_spec.rb +336 -0
- data/spec/arachni/rpc/server/framework_spec.rb +396 -0
- data/spec/arachni/rpc/server/instance_spec.rb +480 -281
- data/spec/arachni/rpc/server/output_spec.rb +9 -212
- data/spec/arachni/rpc/server/plugin/manager_spec.rb +6 -11
- data/spec/arachni/ruby/hash_spec.rb +30 -0
- data/spec/arachni/ruby/object_spec.rb +0 -16
- data/spec/arachni/ruby/string_spec.rb +98 -6
- data/spec/arachni/scope_spec.rb +13 -0
- data/spec/arachni/session_spec.rb +279 -251
- data/spec/arachni/snapshot_spec.rb +127 -0
- data/spec/arachni/state/audit_spec.rb +107 -0
- data/spec/arachni/state/element_filter_spec.rb +66 -0
- data/spec/arachni/state/framework/rpc_spec.rb +85 -0
- data/spec/arachni/state/framework_spec.rb +853 -0
- data/spec/arachni/state/http_spec.rb +63 -0
- data/spec/arachni/state/options_spec.rb +55 -0
- data/spec/arachni/state/plugins_spec.rb +76 -0
- data/spec/arachni/state_spec.rb +87 -0
- data/spec/arachni/support/cache/least_cost_replacement_spec.rb +30 -32
- data/spec/arachni/support/cache/least_recently_used_spec.rb +39 -40
- data/spec/arachni/support/cache/preference_spec.rb +17 -18
- data/spec/arachni/support/cache/random_replacement_spec.rb +19 -20
- data/spec/arachni/support/database/queue_spec.rb +200 -32
- data/spec/arachni/support/lookup/hash_set_spec.rb +74 -0
- data/spec/arachni/support/mixins/observable_spec.rb +81 -0
- data/spec/arachni/support/signature_spec.rb +9 -25
- data/spec/arachni/trainer_spec.rb +141 -124
- data/spec/arachni/uri/scope_spec.rb +416 -0
- data/spec/arachni/uri_spec.rb +187 -195
- data/spec/arachni/utilities_spec.rb +178 -525
- data/spec/components/checks/active/code_injection_spec.rb +26 -0
- data/spec/components/checks/active/code_injection_timing_spec.rb +26 -0
- data/spec/components/checks/active/csrf_spec.rb +44 -0
- data/spec/components/checks/active/file_inclusion_spec.rb +56 -0
- data/spec/components/checks/active/ldap_injection_spec.rb +16 -0
- data/spec/components/checks/active/no_sql_injection_differential_spec.rb +15 -0
- data/spec/components/checks/active/no_sql_injection_spec.rb +28 -0
- data/spec/components/checks/active/os_cmd_injection_spec.rb +26 -0
- data/spec/components/checks/active/os_cmd_injection_timing_spec.rb +26 -0
- data/spec/components/checks/active/path_traversal_spec.rb +42 -0
- data/spec/components/checks/active/response_splitting_spec.rb +22 -0
- data/spec/components/checks/active/rfi_spec.rb +20 -0
- data/spec/components/checks/active/session_fixation_spec.rb +20 -0
- data/spec/components/checks/active/source_code_disclosure_spec.rb +26 -0
- data/spec/components/checks/active/sql_injection_differential_spec.rb +15 -0
- data/spec/components/checks/active/sql_injection_spec.rb +142 -0
- data/spec/components/checks/active/sql_injection_timing_spec.rb +24 -0
- data/spec/components/checks/active/trainer_spec.rb +36 -0
- data/spec/components/checks/active/unvalidated_redirect_spec.rb +20 -0
- data/spec/components/checks/active/xpath_injection_spec.rb +16 -0
- data/spec/components/checks/active/xss_dom_inputs_spec.rb +32 -0
- data/spec/components/checks/active/xss_dom_script_context_spec.rb +63 -0
- data/spec/components/checks/active/xss_dom_spec.rb +67 -0
- data/spec/components/checks/active/xss_event_spec.rb +15 -0
- data/spec/components/checks/active/xss_path_spec.rb +15 -0
- data/spec/components/checks/active/xss_script_context_spec.rb +22 -0
- data/spec/components/checks/active/xss_spec.rb +22 -0
- data/spec/components/checks/active/xss_tag_spec.rb +15 -0
- data/spec/components/checks/passive/allowed_methods_spec.rb +15 -0
- data/spec/components/checks/passive/backdoors_spec.rb +15 -0
- data/spec/components/checks/passive/backup_directories_spec.rb +15 -0
- data/spec/components/checks/passive/backup_files_spec.rb +15 -0
- data/spec/components/checks/passive/common_directories_spec.rb +15 -0
- data/spec/components/checks/passive/common_files_spec.rb +15 -0
- data/spec/components/checks/passive/directory_listing_spec.rb +15 -0
- data/spec/components/checks/passive/grep/captcha_spec.rb +15 -0
- data/spec/components/checks/passive/grep/cookie_set_for_parent_domain_spec.rb +15 -0
- data/spec/components/checks/passive/grep/credit_card_spec.rb +15 -0
- data/spec/components/checks/passive/grep/cvs_svn_users_spec.rb +15 -0
- data/spec/components/checks/passive/grep/emails_spec.rb +15 -0
- data/spec/components/checks/passive/grep/form_upload_spec.rb +15 -0
- data/spec/components/checks/passive/grep/hsts_spec.rb +17 -0
- data/spec/components/checks/passive/grep/html_objects_spec.rb +15 -0
- data/spec/components/checks/passive/grep/http_only_cookies_spec.rb +15 -0
- data/spec/components/checks/passive/grep/insecure_cookies_spec.rb +15 -0
- data/spec/components/checks/passive/grep/mixed_resource_spec.rb +16 -0
- data/spec/components/checks/passive/grep/password_autocomplete_spec.rb +15 -0
- data/spec/components/checks/passive/grep/private_ip_spec.rb +22 -0
- data/spec/components/checks/passive/grep/ssn_spec.rb +15 -0
- data/spec/components/checks/passive/grep/unencrypted_password_forms_spec.rb +15 -0
- data/spec/components/checks/passive/htaccess_limit_spec.rb +15 -0
- data/spec/components/checks/passive/http_put_spec.rb +15 -0
- data/spec/components/checks/passive/interesting_responses_spec.rb +23 -0
- data/spec/components/checks/passive/localstart_asp_spec.rb +15 -0
- data/spec/components/checks/passive/origin_spoof_access_restriction_bypass_spec.rb +15 -0
- data/spec/components/checks/passive/webdav_spec.rb +15 -0
- data/spec/components/checks/passive/xst_spec.rb +15 -0
- data/spec/components/fingerprinters/frameworks/rack_spec.rb +42 -0
- data/spec/components/fingerprinters/languages/asp_spec.rb +38 -0
- data/spec/components/fingerprinters/languages/aspx_spec.rb +79 -0
- data/spec/components/fingerprinters/languages/jsp_spec.rb +56 -0
- data/spec/components/fingerprinters/languages/php_spec.rb +59 -0
- data/spec/components/fingerprinters/languages/python_spec.rb +23 -0
- data/spec/components/fingerprinters/languages/ruby.rb +34 -0
- data/spec/components/fingerprinters/os/bsd_spec.rb +26 -0
- data/spec/components/fingerprinters/os/linux_spec.rb +34 -0
- data/spec/components/fingerprinters/os/solaris_spec.rb +34 -0
- data/spec/components/fingerprinters/os/unix_spec.rb +26 -0
- data/spec/components/fingerprinters/os/windows_spec.rb +34 -0
- data/spec/components/fingerprinters/servers/apache_spec.rb +26 -0
- data/spec/components/fingerprinters/servers/iis_spec.rb +28 -0
- data/spec/components/fingerprinters/servers/jetty_spec.rb +28 -0
- data/spec/components/fingerprinters/servers/nginx_spec.rb +26 -0
- data/spec/components/fingerprinters/servers/tomcat_spec.rb +28 -0
- data/spec/{path_extractors → components/path_extractors}/anchors_spec.rb +0 -0
- data/spec/{path_extractors → components/path_extractors}/areas_spec.rb +0 -0
- data/spec/components/path_extractors/comments_spec.rb +23 -0
- data/spec/{path_extractors → components/path_extractors}/forms_spec.rb +0 -0
- data/spec/{path_extractors → components/path_extractors}/frames_spec.rb +0 -0
- data/spec/{path_extractors → components/path_extractors}/generic_spec.rb +0 -0
- data/spec/{path_extractors → components/path_extractors}/links_spec.rb +0 -0
- data/spec/{path_extractors → components/path_extractors}/meta_refresh_spec.rb +0 -0
- data/spec/components/path_extractors/scripts_spec.rb +30 -0
- data/spec/components/plugins/autologin_spec.rb +96 -0
- data/spec/components/plugins/autothrottle_spec.rb +56 -0
- data/spec/components/plugins/content_types_spec.rb +91 -0
- data/spec/components/plugins/cookie_collector_spec.rb +41 -0
- data/spec/components/plugins/form_dicattack_spec.rb +54 -0
- data/spec/components/plugins/healthmap_spec.rb +40 -0
- data/spec/components/plugins/http_dicattack_spec.rb +40 -0
- data/spec/components/plugins/meta/remedies/discovery_spec.rb +23 -0
- data/spec/components/plugins/meta/remedies/timing_attacks_spec.rb +31 -0
- data/spec/components/plugins/meta/uniformity_spec.rb +29 -0
- data/spec/components/plugins/script_spec.rb +13 -0
- data/spec/components/plugins/uncommon_headers_spec.rb +64 -0
- data/spec/components/plugins/vector_feed_spec.rb +169 -0
- data/spec/components/plugins/waf_detector_spec.rb +50 -0
- data/spec/components/reporters/ap_spec.rb +9 -0
- data/spec/components/reporters/html_spec.rb +9 -0
- data/spec/components/reporters/json_spec.rb +17 -0
- data/spec/components/reporters/marshal_spec.rb +13 -0
- data/spec/components/reporters/stdout_spec.rb +9 -0
- data/spec/components/reporters/txt_spec.rb +8 -0
- data/spec/components/reporters/xml_spec.rb +9 -0
- data/spec/components/reporters/yaml_spec.rb +14 -0
- data/spec/external/wavsep/active/lfi_spec.rb +1 -1
- data/spec/external/wavsep/active/obsolete_files_spec.rb +225 -0
- data/spec/external/wavsep/active/rfi_spec.rb +1 -1
- data/spec/external/wavsep/active/sqli_spec.rb +8 -6
- data/spec/external/wavsep/active/unvalidated_redirect_spec.rb +57 -0
- data/spec/external/wavsep/active/xss_dom_spec.rb +27 -0
- data/spec/external/wavsep/active/xss_spec.rb +13 -3
- data/spec/external/wavsep/false_positives/lfi_spec.rb +4 -16
- data/spec/external/wavsep/false_positives/obsolete_files_spec.rb +21 -0
- data/spec/external/wavsep/false_positives/rfi_spec.rb +2 -2
- data/spec/external/wavsep/false_positives/sqli_spec.rb +4 -15
- data/spec/external/wavsep/false_positives/unvalidated_redirect_spec.rb +21 -0
- data/spec/external/wavsep/false_positives/xss_spec.rb +2 -2
- data/spec/spec_helper.rb +17 -18
- data/spec/support/factories/browser/javascript/taint_tracer/frame.rb +10 -0
- data/spec/support/factories/browser/javascript/taint_tracer/frame/called_function.rb +11 -0
- data/spec/support/factories/browser/javascript/taint_tracer/sink/data_flow.rb +14 -0
- data/spec/support/factories/browser/javascript/taint_tracer/sink/execution_flow.rb +10 -0
- data/spec/support/factories/browser_cluster/job.rb +27 -0
- data/spec/support/factories/element/cookie.rb +7 -0
- data/spec/support/factories/element/form.rb +12 -0
- data/spec/support/factories/element/header.rb +5 -0
- data/spec/support/factories/element/link.rb +11 -0
- data/spec/support/factories/element/link_template.rb +11 -0
- data/spec/support/factories/http/request.rb +9 -0
- data/spec/support/factories/http/response.rb +42 -0
- data/spec/support/factories/issue.rb +67 -0
- data/spec/support/factories/page.rb +7 -0
- data/spec/support/factories/page/dom.rb +13 -0
- data/spec/support/factories/page/dom/transition.rb +21 -0
- data/spec/support/factories/scan_report.rb +35 -0
- data/spec/support/factories/vector.rb +32 -0
- data/spec/support/fixtures/check_with_invalid_platforms/with_invalid_platforms.rb +37 -0
- data/spec/support/fixtures/checks/test.rb +58 -0
- data/spec/support/fixtures/checks/test2.rb +41 -0
- data/spec/support/fixtures/checks/test3.rb +41 -0
- data/spec/support/fixtures/executables/node.rb +47 -0
- data/spec/support/fixtures/fingerprinters/test.rb +5 -13
- data/spec/support/fixtures/option_groups/input.yml +2 -0
- data/spec/support/fixtures/plugins/bad.rb +5 -13
- data/spec/support/fixtures/plugins/defaults/default.rb +6 -14
- data/spec/support/fixtures/plugins/distributable.rb +7 -15
- data/spec/support/fixtures/plugins/loop.rb +5 -13
- data/spec/support/fixtures/plugins/suspendable.rb +44 -0
- data/spec/support/fixtures/plugins/wait.rb +6 -14
- data/spec/support/fixtures/plugins/with_options.rb +20 -16
- data/spec/support/fixtures/plugins_with_priorities/p0.rb +17 -0
- data/spec/support/fixtures/plugins_with_priorities/p00.rb +17 -0
- data/spec/support/fixtures/plugins_with_priorities/p1.rb +17 -0
- data/spec/support/fixtures/plugins_with_priorities/p2.rb +17 -0
- data/spec/support/fixtures/plugins_with_priorities/p22.rb +17 -0
- data/spec/support/fixtures/plugins_with_priorities/p222.rb +17 -0
- data/spec/support/fixtures/plugins_with_priorities/p_nil.rb +16 -0
- data/spec/support/fixtures/plugins_with_priorities/p_nil2.rb +16 -0
- data/spec/support/fixtures/report.afr +0 -0
- data/spec/support/fixtures/reporters/base_spec/plugin_formatters/with_formatters/foobar.rb +13 -0
- data/spec/support/fixtures/reporters/base_spec/with_formatters.rb +15 -0
- data/spec/support/fixtures/reporters/base_spec/with_outfile.rb +16 -0
- data/spec/support/fixtures/reporters/base_spec/without_outfile.rb +12 -0
- data/spec/support/fixtures/reporters/manager_spec/afr.rb +13 -0
- data/spec/support/fixtures/reporters/manager_spec/foo.rb +18 -0
- data/spec/support/fixtures/rescan.afr.tpl +4 -5
- data/spec/support/fixtures/run_check/body.rb +48 -0
- data/spec/support/fixtures/run_check/cookies.rb +48 -0
- data/spec/support/fixtures/run_check/empty.rb +34 -0
- data/spec/support/fixtures/run_check/flch.rb +53 -0
- data/spec/support/fixtures/run_check/forms.rb +48 -0
- data/spec/support/fixtures/run_check/headers.rb +48 -0
- data/spec/support/fixtures/run_check/links.rb +48 -0
- data/spec/support/fixtures/run_check/nil.rb +47 -0
- data/spec/support/fixtures/run_check/path.rb +48 -0
- data/spec/support/fixtures/run_check/server.rb +48 -0
- data/spec/support/fixtures/services/echo.rb +64 -0
- data/spec/support/fixtures/taint_check/taint.rb +38 -0
- data/spec/support/fixtures/wait_check/wait.rb +38 -0
- data/spec/support/helpers/auditor.rb +18 -5
- data/spec/support/helpers/browser.rb +6 -0
- data/spec/support/helpers/browser_cluster/jobs/taint_tracer.rb +32 -0
- data/spec/support/helpers/framework.rb +5 -13
- data/spec/support/helpers/misc.rb +4 -12
- data/spec/support/helpers/pages.rb +18 -0
- data/spec/support/helpers/paths.rb +4 -12
- data/spec/support/helpers/requires.rb +5 -13
- data/spec/support/helpers/resets.rb +12 -19
- data/spec/support/helpers/web_server.rb +11 -15
- data/spec/support/lib/factory.rb +115 -0
- data/spec/support/lib/web_server_client.rb +49 -0
- data/spec/support/lib/web_server_dispatcher.rb +33 -0
- data/spec/support/lib/web_server_manager.rb +29 -32
- data/spec/support/pems/cacert.pem +35 -37
- data/spec/support/pems/client/cert.pem +35 -37
- data/spec/support/pems/client/key.pem +49 -49
- data/spec/support/pems/server/cert.pem +35 -37
- data/spec/support/pems/server/key.pem +49 -49
- data/spec/support/servers/arachni/browser.rb +836 -0
- data/spec/support/servers/arachni/browser/javascript.rb +7 -0
- data/spec/support/servers/arachni/browser/javascript/angular-1.2.8.js +20554 -0
- data/spec/support/servers/arachni/browser/javascript/angular-route.js +911 -0
- data/spec/support/servers/arachni/browser/javascript/dom_monitor.rb +90 -0
- data/spec/support/servers/arachni/browser/javascript/jquery-2.0.3.js +8829 -0
- data/spec/support/servers/arachni/browser/javascript/proxy.rb +17 -0
- data/spec/support/servers/arachni/browser/javascript/taint_tracer.rb +714 -0
- data/spec/support/servers/arachni/browser_cluster/jobs/event_trigger.rb +25 -0
- data/spec/support/servers/arachni/browser_https.rb +60 -0
- data/spec/support/servers/arachni/check/auditor.rb +247 -0
- data/spec/support/servers/arachni/element/body.rb +5 -0
- data/spec/support/servers/arachni/element/capabilities/analyzable/differential.rb +162 -0
- data/spec/support/servers/arachni/element/capabilities/{auditable → analyzable}/taint.rb +0 -0
- data/spec/support/servers/arachni/element/capabilities/analyzable/timeout.rb +37 -0
- data/spec/support/servers/arachni/element/cookie.rb +1 -1
- data/spec/support/servers/arachni/element/cookie/cookie_dom.rb +21 -0
- data/spec/support/servers/arachni/element/form.rb +6 -22
- data/spec/support/servers/arachni/element/form/form_dom.rb +50 -0
- data/spec/support/servers/arachni/element/header.rb +7 -8
- data/spec/support/servers/arachni/element/link.rb +15 -7
- data/spec/support/servers/arachni/element/link/link_dom.rb +49 -0
- data/spec/support/servers/arachni/element/link_template.rb +11 -0
- data/spec/support/servers/arachni/element/link_template/link_template_dom.rb +43 -0
- data/spec/support/servers/arachni/framework.rb +18 -0
- data/spec/support/servers/arachni/http/client.rb +176 -0
- data/spec/support/servers/arachni/http/proxy_server.rb +9 -0
- data/spec/support/servers/arachni/http/proxy_server_https.rb +25 -0
- data/spec/support/servers/arachni/page/page_dom.rb +83 -0
- data/spec/support/servers/arachni/parser.rb +4 -0
- data/spec/support/servers/arachni/rpc/server/{framework_hpg.rb → framework_multi.rb} +0 -0
- data/spec/support/servers/arachni/session.rb +43 -9
- data/spec/support/servers/arachni/trainer.rb +11 -7
- data/spec/support/servers/checks/active/code_injection.rb +163 -0
- data/spec/support/servers/checks/active/code_injection_timing.rb +134 -0
- data/spec/support/servers/{modules/audit → checks/active}/csrf.rb +0 -0
- data/spec/support/servers/checks/active/file_inclusion.rb +228 -0
- data/spec/support/servers/checks/active/ldap_injection.rb +88 -0
- data/spec/support/servers/checks/active/no_sql_injection.rb +134 -0
- data/spec/support/servers/checks/active/no_sql_injection/mongodb +1 -0
- data/spec/support/servers/checks/active/no_sql_injection_differential.rb +61 -0
- data/spec/support/servers/checks/active/os_cmd_injection.rb +172 -0
- data/spec/support/servers/checks/active/os_cmd_injection_timing.rb +118 -0
- data/spec/support/servers/checks/active/path_traversal.rb +219 -0
- data/spec/support/servers/checks/active/response_splitting.rb +138 -0
- data/spec/support/servers/{modules/audit → checks/active}/rfi.rb +0 -0
- data/spec/support/servers/checks/active/session_fixation.rb +111 -0
- data/spec/support/servers/checks/active/source_code_disclosure.rb +118 -0
- data/spec/support/servers/checks/active/sql_injection.rb +133 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/access +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/coldfusion +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/db2 +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/emc +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/firebird +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/frontbase +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/hsqldb +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/informix +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/ingres +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/interbase +0 -0
- data/spec/support/servers/checks/active/sql_injection/jdbc +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/maxdb +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/mssql +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/mysql +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/oracle +0 -0
- data/spec/support/servers/{modules/audit/sqli/postgresql → checks/active/sql_injection/pgsql} +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/sqlite +0 -0
- data/spec/support/servers/{modules/audit/sqli → checks/active/sql_injection}/sybase +0 -0
- data/spec/support/servers/{modules/audit/sqli_blind_rdiff.rb → checks/active/sql_injection_differential.rb} +0 -0
- data/spec/support/servers/checks/active/sql_injection_timing.rb +145 -0
- data/spec/support/servers/{modules/audit/trainer_module.rb → checks/active/trainer_check.rb} +0 -0
- data/spec/support/servers/checks/active/unvalidated_redirect.rb +141 -0
- data/spec/support/servers/checks/active/xpath_injection.rb +121 -0
- data/spec/support/servers/{modules/audit/xpath → checks/active/xpath_injection}/dotnet +0 -0
- data/spec/support/servers/{modules/audit/xpath → checks/active/xpath_injection}/general +0 -0
- data/spec/support/servers/{modules/audit/xpath → checks/active/xpath_injection}/java +0 -0
- data/spec/support/servers/{modules/audit/xpath → checks/active/xpath_injection}/libxml2 +0 -0
- data/spec/support/servers/{modules/audit/xpath → checks/active/xpath_injection}/php +0 -0
- data/spec/support/servers/checks/active/xss.rb +239 -0
- data/spec/support/servers/checks/active/xss_dom.rb +133 -0
- data/spec/support/servers/checks/active/xss_dom_inputs.rb +35 -0
- data/spec/support/servers/checks/active/xss_dom_script_context.rb +139 -0
- data/spec/support/servers/checks/active/xss_event.rb +80 -0
- data/spec/support/servers/{modules/audit → checks/active}/xss_path.rb +0 -0
- data/spec/support/servers/checks/active/xss_script_context.rb +90 -0
- data/spec/support/servers/{modules/audit → checks/active}/xss_tag.rb +0 -0
- data/spec/support/servers/checks/check_server.rb +14 -0
- data/spec/support/servers/{modules/recon → checks/passive}/allowed_methods.rb +0 -0
- data/spec/support/servers/checks/passive/backdoors.rb +4 -0
- data/spec/support/servers/checks/passive/backup_directories.rb +15 -0
- data/spec/support/servers/checks/passive/backup_files.rb +15 -0
- data/spec/support/servers/checks/passive/common_directories.rb +6 -0
- data/spec/support/servers/checks/passive/common_files.rb +6 -0
- data/spec/support/servers/checks/passive/directory_listing.rb +30 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/captcha.rb +0 -0
- data/spec/support/servers/checks/passive/grep/cookie_set_for_parent_domain.rb +21 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/credit_card.rb +0 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/cvs_svn_users.rb +0 -0
- data/spec/support/servers/checks/passive/grep/emails.rb +23 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/form_upload.rb +0 -0
- data/spec/support/servers/checks/passive/grep/hsts_https.rb +37 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/html_objects.rb +0 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/http_only_cookies.rb +0 -0
- data/spec/support/servers/checks/passive/grep/insecure_cookies_https.rb +40 -0
- data/spec/support/servers/checks/passive/grep/mixed_resource_https.rb +69 -0
- data/spec/support/servers/checks/passive/grep/password_autocomplete.rb +33 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/private_ip.rb +0 -0
- data/spec/support/servers/{modules/recon → checks/passive}/grep/ssn.rb +0 -0
- data/spec/support/servers/checks/passive/grep/unencrypted_password_forms.rb +33 -0
- data/spec/support/servers/{modules/recon → checks/passive}/htaccess_limit.rb +0 -0
- data/spec/support/servers/checks/passive/http_put.rb +7 -0
- data/spec/support/servers/checks/passive/interesting_responses.rb +5 -0
- data/spec/support/servers/{modules/recon → checks/passive}/localstart_asp.rb +0 -0
- data/spec/support/servers/checks/passive/origin_spoof_access_restriction_bypass.rb +30 -0
- data/spec/support/servers/checks/passive/webdav.rb +25 -0
- data/spec/support/servers/{modules/recon → checks/passive}/xst.rb +0 -0
- data/spec/support/servers/plugins/meta/remedies/discovery.rb +2 -2
- data/spec/support/servers/plugins/meta/remedies/timing_attacks.rb +2 -0
- data/spec/support/shared/browser/javascript/taint_tracer/sink/base.rb +36 -0
- data/spec/support/shared/check.rb +198 -0
- data/spec/support/shared/component.rb +15 -4
- data/spec/support/shared/component/options/base.rb +187 -0
- data/spec/support/shared/element/base.rb +131 -0
- data/spec/support/shared/element/capabilities/auditable.rb +371 -604
- data/spec/support/shared/element/capabilities/auditable/dom.rb +303 -0
- data/spec/support/shared/element/capabilities/inputtable.rb +499 -0
- data/spec/support/shared/element/capabilities/mutable.rb +362 -0
- data/spec/support/shared/element/capabilities/refreshable.rb +26 -26
- data/spec/support/shared/element/capabilities/submitable.rb +155 -0
- data/spec/support/shared/element/capabilities/with_auditor.rb +75 -0
- data/spec/support/shared/element/capabilities/with_dom.rb +39 -0
- data/spec/support/shared/element/capabilities/with_node.rb +42 -0
- data/spec/support/shared/element/capabilities/with_scope.rb +22 -0
- data/spec/support/shared/external/wavsep.rb +30 -9
- data/spec/support/shared/http/message.rb +72 -0
- data/spec/support/shared/option_group.rb +98 -0
- data/spec/support/shared/path_extractor.rb +1 -1
- data/spec/support/shared/plugin.rb +33 -16
- data/spec/support/shared/reporter.rb +41 -0
- data/spec/support/shared/support/cache.rb +341 -0
- data/spec/support/shared/support/lookup.rb +93 -13
- data/ui/cli/framework.rb +466 -0
- data/ui/cli/framework/option_parser.rb +628 -0
- data/ui/cli/option_parser.rb +104 -0
- data/ui/cli/output.rb +377 -0
- data/ui/cli/reporter.rb +52 -0
- data/ui/cli/reporter/option_parser.rb +102 -0
- data/ui/cli/restored_framework.rb +127 -0
- data/ui/cli/restored_framework/option_parser.rb +115 -0
- data/ui/cli/rpc/client/dispatcher_monitor.rb +157 -0
- data/ui/cli/rpc/client/dispatcher_monitor/option_parser.rb +41 -0
- data/ui/cli/rpc/client/instance.rb +294 -0
- data/ui/cli/rpc/client/local.rb +65 -0
- data/ui/cli/rpc/client/local/option_parser.rb +35 -0
- data/ui/cli/rpc/client/remote.rb +84 -0
- data/ui/cli/rpc/client/remote/option_parser.rb +99 -0
- data/ui/cli/rpc/server/dispatcher.rb +36 -0
- data/ui/cli/rpc/server/dispatcher/option_parser.rb +165 -0
- data/ui/cli/utilities.rb +228 -0
- metadata +1260 -1266
- data/EXPLOITATION.md +0 -431
- data/HACKING.md +0 -120
- data/NOTICE +0 -12
- data/data/crypto/public.pem +0 -9
- data/external/metasploit/LICENSE +0 -24
- data/external/metasploit/plugins/arachni.rb +0 -516
- data/external/metasploit/plugins/arachni/modules/auxiliary/arachni_sqlmap.rb +0 -91
- data/external/metasploit/plugins/arachni/modules/exploits/unix/webapp/arachni_exec.rb +0 -142
- data/external/metasploit/plugins/arachni/modules/exploits/unix/webapp/arachni_path_traversal.rb +0 -113
- data/external/metasploit/plugins/arachni/modules/exploits/unix/webapp/arachni_php_eval.rb +0 -150
- data/external/metasploit/plugins/arachni/modules/exploits/unix/webapp/arachni_php_include.rb +0 -141
- data/fingerprinters/frameworks/rack.rb +0 -41
- data/fingerprinters/languages/asp.rb +0 -42
- data/fingerprinters/languages/aspx.rb +0 -63
- data/fingerprinters/languages/jsp.rb +0 -42
- data/fingerprinters/languages/php.rb +0 -43
- data/fingerprinters/languages/python.rb +0 -40
- data/fingerprinters/languages/ruby.rb +0 -41
- data/fingerprinters/os/bsd.rb +0 -36
- data/fingerprinters/os/linux.rb +0 -42
- data/fingerprinters/os/solaris.rb +0 -41
- data/fingerprinters/os/unix.rb +0 -36
- data/fingerprinters/os/windows.rb +0 -41
- data/fingerprinters/servers/apache.rb +0 -36
- data/fingerprinters/servers/iis.rb +0 -36
- data/fingerprinters/servers/jetty.rb +0 -36
- data/fingerprinters/servers/nginx.rb +0 -36
- data/fingerprinters/servers/tomcat.rb +0 -36
- data/gfx/README.md +0 -18
- data/gfx/compiled/banner.png +0 -0
- data/gfx/compiled/favicon.ico +0 -0
- data/gfx/compiled/icon.png +0 -0
- data/gfx/compiled/logo.png +0 -0
- data/gfx/compiled/spider.png +0 -0
- data/gfx/font/Beneath_the_Surface.ttf +0 -0
- data/gfx/font/bts_readme.txt +0 -14
- data/gfx/source/banner.svg +0 -999
- data/gfx/source/icon.svg +0 -627
- data/gfx/source/logo.svg +0 -672
- data/gfx/source/spider.png +0 -0
- data/gfx/source/spider.svg +0 -277
- data/lib/arachni/audit_store.rb +0 -321
- data/lib/arachni/component/options/enum.rb +0 -51
- data/lib/arachni/element/capabilities/auditable/rdiff.rb +0 -489
- data/lib/arachni/element/capabilities/auditable/taint.rb +0 -238
- data/lib/arachni/element/capabilities/auditable/timeout.rb +0 -469
- data/lib/arachni/mixins/observable.rb +0 -91
- data/lib/arachni/mixins/progress_bar.rb +0 -87
- data/lib/arachni/mixins/terminal.rb +0 -112
- data/lib/arachni/module.rb +0 -20
- data/lib/arachni/module/auditor.rb +0 -618
- data/lib/arachni/module/base.rb +0 -188
- data/lib/arachni/module/manager.rb +0 -255
- data/lib/arachni/module/output.rb +0 -68
- data/lib/arachni/module/utilities.rb +0 -64
- data/lib/arachni/report/base.rb +0 -201
- data/lib/arachni/report/manager.rb +0 -86
- data/lib/arachni/rpc/server/dispatcher/handler.rb +0 -166
- data/lib/arachni/rpc/server/module/manager.rb +0 -46
- data/lib/arachni/rpc/server/spider.rb +0 -404
- data/lib/arachni/ruby/enumerable.rb +0 -29
- data/lib/arachni/spider.rb +0 -477
- data/lib/arachni/support/key_filler.rb +0 -68
- data/lib/arachni/support/queue.rb +0 -18
- data/lib/arachni/support/queue/disk.rb +0 -171
- data/lib/arachni/typhoeus/hydra.rb +0 -56
- data/lib/arachni/typhoeus/request.rb +0 -80
- data/lib/arachni/typhoeus/response.rb +0 -103
- data/lib/arachni/typhoeus/utils.rb +0 -25
- data/lib/arachni/ui/cli/cli.rb +0 -469
- data/lib/arachni/ui/cli/output.rb +0 -391
- data/lib/arachni/ui/cli/rpc/dispatcher_monitor.rb +0 -188
- data/lib/arachni/ui/cli/rpc/instance.rb +0 -407
- data/lib/arachni/ui/cli/rpc/local.rb +0 -80
- data/lib/arachni/ui/cli/rpc/remote.rb +0 -134
- data/lib/arachni/ui/cli/utilities.rb +0 -509
- data/modules/audit/code_injection.rb +0 -137
- data/modules/audit/code_injection_php_input_wrapper.rb +0 -109
- data/modules/audit/code_injection_timing.rb +0 -122
- data/modules/audit/csrf.rb +0 -225
- data/modules/audit/file_inclusion.rb +0 -156
- data/modules/audit/ldapi.rb +0 -97
- data/modules/audit/os_cmd_injection.rb +0 -109
- data/modules/audit/os_cmd_injection_timing.rb +0 -98
- data/modules/audit/path_traversal.rb +0 -170
- data/modules/audit/response_splitting.rb +0 -99
- data/modules/audit/rfi.rb +0 -181
- data/modules/audit/session_fixation.rb +0 -117
- data/modules/audit/source_code_disclosure.rb +0 -179
- data/modules/audit/sqli.rb +0 -148
- data/modules/audit/sqli_blind_rdiff.rb +0 -138
- data/modules/audit/sqli_blind_timing.rb +0 -126
- data/modules/audit/trainer.rb +0 -49
- data/modules/audit/unvalidated_redirect.rb +0 -91
- data/modules/audit/xpath.rb +0 -97
- data/modules/audit/xss.rb +0 -154
- data/modules/audit/xss_event.rb +0 -153
- data/modules/audit/xss_path.rb +0 -152
- data/modules/audit/xss_script_tag.rb +0 -137
- data/modules/audit/xss_tag.rb +0 -137
- data/modules/recon/allowed_methods.rb +0 -99
- data/modules/recon/backdoors.rb +0 -82
- data/modules/recon/backup_files.rb +0 -100
- data/modules/recon/backup_files/extensions.txt +0 -28
- data/modules/recon/common_directories.rb +0 -87
- data/modules/recon/common_files.rb +0 -78
- data/modules/recon/common_files/filenames.txt +0 -21
- data/modules/recon/directory_listing.rb +0 -133
- data/modules/recon/grep/captcha.rb +0 -74
- data/modules/recon/grep/credit_card.rb +0 -128
- data/modules/recon/grep/cvs_svn_users.rb +0 -81
- data/modules/recon/grep/emails.rb +0 -73
- data/modules/recon/grep/form_upload.rb +0 -86
- data/modules/recon/grep/html_objects.rb +0 -56
- data/modules/recon/grep/http_only_cookies.rb +0 -82
- data/modules/recon/grep/insecure_cookies.rb +0 -82
- data/modules/recon/grep/mixed_resource.rb +0 -113
- data/modules/recon/grep/password_autocomplete.rb +0 -85
- data/modules/recon/grep/private_ip.rb +0 -70
- data/modules/recon/grep/ssn.rb +0 -66
- data/modules/recon/grep/unencrypted_password_forms.rb +0 -103
- data/modules/recon/htaccess_limit.rb +0 -76
- data/modules/recon/http_put.rb +0 -95
- data/modules/recon/interesting_responses.rb +0 -91
- data/modules/recon/localstart_asp.rb +0 -97
- data/modules/recon/webdav.rb +0 -106
- data/modules/recon/x_forwarded_for_access_restriction_bypass.rb +0 -76
- data/modules/recon/xst.rb +0 -103
- data/path_extractors/anchors.rb +0 -37
- data/path_extractors/areas.rb +0 -37
- data/path_extractors/forms.rb +0 -37
- data/path_extractors/frames.rb +0 -37
- data/path_extractors/generic.rb +0 -84
- data/path_extractors/links.rb +0 -37
- data/path_extractors/meta_refresh.rb +0 -58
- data/path_extractors/scripts.rb +0 -38
- data/plugins/autologin.rb +0 -133
- data/plugins/beep_notify.rb +0 -49
- data/plugins/content_types.rb +0 -107
- data/plugins/cookie_collector.rb +0 -85
- data/plugins/defaults/autothrottle.rb +0 -78
- data/plugins/defaults/healthmap.rb +0 -89
- data/plugins/defaults/meta/remedies/discovery.rb +0 -138
- data/plugins/defaults/meta/remedies/timing_attacks.rb +0 -117
- data/plugins/defaults/meta/uniformity.rb +0 -82
- data/plugins/defaults/resolver.rb +0 -60
- data/plugins/email_notify.rb +0 -106
- data/plugins/form_dicattack.rb +0 -123
- data/plugins/http_dicattack.rb +0 -108
- data/plugins/libnotify.rb +0 -82
- data/plugins/profiler.rb +0 -179
- data/plugins/proxy.rb +0 -502
- data/plugins/proxy/panel/page_accordion.html.erb +0 -67
- data/plugins/proxy/panel/panel.html.erb +0 -69
- data/plugins/proxy/panel/verify_login_sequence.html.erb +0 -45
- data/plugins/proxy/server.rb +0 -215
- data/plugins/proxy/template_scope.rb +0 -138
- data/plugins/rescan.rb +0 -59
- data/plugins/script.rb +0 -53
- data/plugins/uncommon_headers.rb +0 -92
- data/plugins/vector_feed.rb +0 -226
- data/plugins/waf_detector.rb +0 -167
- data/profiles/full.afp +0 -48
- data/reports/afr.rb +0 -44
- data/reports/ap.rb +0 -46
- data/reports/html.rb +0 -273
- data/reports/html/default.erb +0 -82
- data/reports/html/default/configuration.erb +0 -126
- data/reports/html/default/css/jquery-ui.css +0 -570
- data/reports/html/default/css/jquery.jqplot.min.css +0 -1
- data/reports/html/default/css/main.css +0 -391
- data/reports/html/default/headers.erb +0 -19
- data/reports/html/default/issue.erb +0 -178
- data/reports/html/default/issues.erb +0 -52
- data/reports/html/default/js/charts.js +0 -147
- data/reports/html/default/js/helpers.js +0 -53
- data/reports/html/default/js/init.js +0 -72
- data/reports/html/default/js/lib/jqplot.barRenderer.min.js +0 -57
- data/reports/html/default/js/lib/jqplot.categoryAxisRenderer.min.js +0 -57
- data/reports/html/default/js/lib/jqplot.cursor.min.js +0 -57
- data/reports/html/default/js/lib/jqplot.pieRenderer.min.js +0 -57
- data/reports/html/default/js/lib/jqplot.pointLabels.min.js +0 -57
- data/reports/html/default/js/lib/jquery-ui.min.js +0 -404
- data/reports/html/default/js/lib/jquery.jqplot.min.js +0 -57
- data/reports/html/default/js/lib/jquery.min.js +0 -167
- data/reports/html/default/plugins.erb +0 -22
- data/reports/html/default/search.erb +0 -8
- data/reports/html/default/sitemap.erb +0 -15
- data/reports/html/default/summary.erb +0 -75
- data/reports/html/default/summary_issue.erb +0 -20
- data/reports/json.rb +0 -52
- data/reports/marshal.rb +0 -46
- data/reports/metareport.rb +0 -104
- data/reports/plugin_formatters/html/autologin.rb +0 -45
- data/reports/plugin_formatters/html/content_types.rb +0 -67
- data/reports/plugin_formatters/html/cookie_collector.rb +0 -52
- data/reports/plugin_formatters/html/discovery.rb +0 -45
- data/reports/plugin_formatters/html/form_dicattack.rb +0 -40
- data/reports/plugin_formatters/html/healthmap.rb +0 -60
- data/reports/plugin_formatters/html/http_dicattack.rb +0 -40
- data/reports/plugin_formatters/html/profiler.rb +0 -36
- data/reports/plugin_formatters/html/profiler/template.erb +0 -84
- data/reports/plugin_formatters/html/resolver.rb +0 -55
- data/reports/plugin_formatters/html/timing_attacks.rb +0 -51
- data/reports/plugin_formatters/html/uncommon_headers.rb +0 -47
- data/reports/plugin_formatters/html/uniformity.rb +0 -54
- data/reports/plugin_formatters/html/waf_detector.rb +0 -38
- data/reports/plugin_formatters/stdout/autologin.rb +0 -38
- data/reports/plugin_formatters/stdout/content_types.rb +0 -51
- data/reports/plugin_formatters/stdout/cookie_collector.rb +0 -43
- data/reports/plugin_formatters/stdout/discovery.rb +0 -37
- data/reports/plugin_formatters/stdout/form_dicattack.rb +0 -34
- data/reports/plugin_formatters/stdout/healthmap.rb +0 -49
- data/reports/plugin_formatters/stdout/http_dicattack.rb +0 -34
- data/reports/plugin_formatters/stdout/profiler.rb +0 -66
- data/reports/plugin_formatters/stdout/resolver.rb +0 -29
- data/reports/plugin_formatters/stdout/timing_attacks.rb +0 -37
- data/reports/plugin_formatters/stdout/uncommon_headers.rb +0 -37
- data/reports/plugin_formatters/stdout/uniformity.rb +0 -48
- data/reports/plugin_formatters/stdout/waf_detector.rb +0 -31
- data/reports/plugin_formatters/xml/autologin.rb +0 -41
- data/reports/plugin_formatters/xml/content_types.rb +0 -61
- data/reports/plugin_formatters/xml/cookie_collector.rb +0 -45
- data/reports/plugin_formatters/xml/discovery.rb +0 -38
- data/reports/plugin_formatters/xml/form_dicattack.rb +0 -34
- data/reports/plugin_formatters/xml/healthmap.rb +0 -58
- data/reports/plugin_formatters/xml/http_dicattack.rb +0 -33
- data/reports/plugin_formatters/xml/profiler.rb +0 -80
- data/reports/plugin_formatters/xml/resolver.rb +0 -33
- data/reports/plugin_formatters/xml/timing_attacks.rb +0 -39
- data/reports/plugin_formatters/xml/uncommon_headers.rb +0 -38
- data/reports/plugin_formatters/xml/uniformity.rb +0 -54
- data/reports/plugin_formatters/xml/waf_detector.rb +0 -34
- data/reports/stdout.rb +0 -203
- data/reports/txt.rb +0 -58
- data/reports/xml.rb +0 -176
- data/reports/xml/buffer.rb +0 -97
- data/reports/yaml.rb +0 -46
- data/spec/arachni/audit_store_spec.rb +0 -239
- data/spec/arachni/component/options/enum_spec.rb +0 -51
- data/spec/arachni/element/base_spec.rb +0 -138
- data/spec/arachni/element/capabilities/auditable/rdiff_spec.rb +0 -134
- data/spec/arachni/element/capabilities/auditable/taint_spec.rb +0 -409
- data/spec/arachni/element/capabilities/auditable/timeout_spec.rb +0 -157
- data/spec/arachni/element/capabilities/mutable_spec.rb +0 -284
- data/spec/arachni/http_spec.rb +0 -962
- data/spec/arachni/mixins/observable_spec.rb +0 -75
- data/spec/arachni/mixins/progress_bar_spec.rb +0 -47
- data/spec/arachni/module/auditor_spec.rb +0 -544
- data/spec/arachni/module/manager_spec.rb +0 -150
- data/spec/arachni/module/utilities_spec.rb +0 -30
- data/spec/arachni/report/base_spec.rb +0 -61
- data/spec/arachni/report/manager_spec.rb +0 -82
- data/spec/arachni/rpc/server/dispatcher/handler_spec.rb +0 -102
- data/spec/arachni/rpc/server/framework_hpg_spec.rb +0 -376
- data/spec/arachni/rpc/server/framework_simple_spec.rb +0 -501
- data/spec/arachni/rpc/server/modules/manager_spec.rb +0 -47
- data/spec/arachni/rpc/server/spider_spec.rb +0 -68
- data/spec/arachni/ruby/enumerable_spec.rb +0 -37
- data/spec/arachni/spider_spec.rb +0 -539
- data/spec/arachni/support/cache/base_spec.rb +0 -282
- data/spec/arachni/support/key_filler.rb +0 -60
- data/spec/arachni/support/queue/disk_spec.rb +0 -116
- data/spec/arachni/typhoeus/requrest_spec.rb +0 -58
- data/spec/arachni/typhoeus/response_spec.rb +0 -171
- data/spec/fingerprinters/frameworks/rack_spec.rb +0 -41
- data/spec/fingerprinters/languages/asp_spec.rb +0 -40
- data/spec/fingerprinters/languages/aspx_spec.rb +0 -78
- data/spec/fingerprinters/languages/jsp_spec.rb +0 -58
- data/spec/fingerprinters/languages/php_spec.rb +0 -61
- data/spec/fingerprinters/languages/python_spec.rb +0 -23
- data/spec/fingerprinters/languages/ruby.rb +0 -34
- data/spec/fingerprinters/os/bsd_spec.rb +0 -26
- data/spec/fingerprinters/os/linux_spec.rb +0 -34
- data/spec/fingerprinters/os/solaris_spec.rb +0 -34
- data/spec/fingerprinters/os/unix_spec.rb +0 -26
- data/spec/fingerprinters/os/windows_spec.rb +0 -34
- data/spec/fingerprinters/servers/apache_spec.rb +0 -26
- data/spec/fingerprinters/servers/iis_spec.rb +0 -28
- data/spec/fingerprinters/servers/jetty_spec.rb +0 -28
- data/spec/fingerprinters/servers/nginx_spec.rb +0 -26
- data/spec/fingerprinters/servers/tomcat_spec.rb +0 -28
- data/spec/modules/audit/code_injection_spec.rb +0 -25
- data/spec/modules/audit/code_injection_timing_spec.rb +0 -24
- data/spec/modules/audit/csrf_spec.rb +0 -45
- data/spec/modules/audit/file_inclusion_spec.rb +0 -25
- data/spec/modules/audit/ldapi_spec.rb +0 -19
- data/spec/modules/audit/os_cmd_injection_spec.rb +0 -24
- data/spec/modules/audit/os_cmd_injection_timing_spec.rb +0 -24
- data/spec/modules/audit/path_traversal_spec.rb +0 -23
- data/spec/modules/audit/response_splitting_spec.rb +0 -19
- data/spec/modules/audit/rfi_spec.rb +0 -19
- data/spec/modules/audit/session_fixation_spec.rb +0 -23
- data/spec/modules/audit/source_code_disclosure_spec.rb +0 -24
- data/spec/modules/audit/sqli_blind_rdiff_spec.rb +0 -19
- data/spec/modules/audit/sqli_blind_timing_spec.rb +0 -23
- data/spec/modules/audit/sqli_spec.rb +0 -25
- data/spec/modules/audit/trainer_spec.rb +0 -35
- data/spec/modules/audit/unvalidated_redirect_spec.rb +0 -24
- data/spec/modules/audit/xpath_spec.rb +0 -25
- data/spec/modules/audit/xss_event_spec.rb +0 -19
- data/spec/modules/audit/xss_path_spec.rb +0 -19
- data/spec/modules/audit/xss_script_tag_spec.rb +0 -27
- data/spec/modules/audit/xss_spec.rb +0 -24
- data/spec/modules/audit/xss_tag_spec.rb +0 -19
- data/spec/modules/recon/allowed_methods_spec.rb +0 -19
- data/spec/modules/recon/backdoors_spec.rb +0 -19
- data/spec/modules/recon/backup_files_spec.rb +0 -19
- data/spec/modules/recon/common_directories_spec.rb +0 -19
- data/spec/modules/recon/common_files_spec.rb +0 -19
- data/spec/modules/recon/directory_listing_spec.rb +0 -19
- data/spec/modules/recon/grep/captcha_spec.rb +0 -19
- data/spec/modules/recon/grep/credit_card_spec.rb +0 -19
- data/spec/modules/recon/grep/cvs_svn_users_spec.rb +0 -19
- data/spec/modules/recon/grep/emails_spec.rb +0 -19
- data/spec/modules/recon/grep/form_upload_spec.rb +0 -19
- data/spec/modules/recon/grep/html_objects_spec.rb +0 -19
- data/spec/modules/recon/grep/http_only_cookies_spec.rb +0 -19
- data/spec/modules/recon/grep/insecure_cookies_spec.rb +0 -19
- data/spec/modules/recon/grep/mixed_resource_spec.rb +0 -20
- data/spec/modules/recon/grep/password_autocomplete_spec.rb +0 -19
- data/spec/modules/recon/grep/private_ip_spec.rb +0 -26
- data/spec/modules/recon/grep/ssn_spec.rb +0 -19
- data/spec/modules/recon/grep/unencrypted_password_forms_spec.rb +0 -19
- data/spec/modules/recon/htaccess_limit_spec.rb +0 -19
- data/spec/modules/recon/http_put_spec.rb +0 -19
- data/spec/modules/recon/interesting_responses_spec.rb +0 -30
- data/spec/modules/recon/localstart_asp_spec.rb +0 -19
- data/spec/modules/recon/webdav_spec.rb +0 -19
- data/spec/modules/recon/x_forwarded_for_access_restriction_bypass_spec.rb +0 -19
- data/spec/modules/recon/xst_spec.rb +0 -19
- data/spec/path_extractors/scripts_spec.rb +0 -19
- data/spec/plugins/autologin_spec.rb +0 -94
- data/spec/plugins/autothrottle_spec.rb +0 -45
- data/spec/plugins/content_types_spec.rb +0 -93
- data/spec/plugins/cookie_collector_spec.rb +0 -49
- data/spec/plugins/form_dicattack_spec.rb +0 -60
- data/spec/plugins/healthmap_spec.rb +0 -40
- data/spec/plugins/http_dicattack_spec.rb +0 -40
- data/spec/plugins/meta/remedies/discovery_spec.rb +0 -21
- data/spec/plugins/meta/remedies/timing_attacks_spec.rb +0 -34
- data/spec/plugins/meta/uniformity_spec.rb +0 -83
- data/spec/plugins/profiler_spec.rb +0 -82
- data/spec/plugins/rescan_spec.rb +0 -26
- data/spec/plugins/resolver_spec.rb +0 -16
- data/spec/plugins/script_spec.rb +0 -12
- data/spec/plugins/uncommon_headers_spec.rb +0 -64
- data/spec/plugins/vector_feed_spec.rb +0 -167
- data/spec/plugins/waf_detector_spec.rb +0 -41
- data/spec/reports/afr_spec.rb +0 -13
- data/spec/reports/ap_spec.rb +0 -9
- data/spec/reports/html_spec.rb +0 -13
- data/spec/reports/json_spec.rb +0 -17
- data/spec/reports/marshal_spec.rb +0 -13
- data/spec/reports/stdout_spec.rb +0 -9
- data/spec/reports/txt_spec.rb +0 -8
- data/spec/reports/xml_spec.rb +0 -13
- data/spec/reports/yaml_spec.rb +0 -13
- data/spec/support/fixtures/auditstore.afr +0 -76074
- data/spec/support/fixtures/modules/test.rb +0 -58
- data/spec/support/fixtures/modules/test2.rb +0 -46
- data/spec/support/fixtures/modules/test3.rb +0 -46
- data/spec/support/fixtures/plugins/spider_hook.rb +0 -50
- data/spec/support/fixtures/reports/base_spec/plugin_formatters/with_formatters/foobar.rb +0 -21
- data/spec/support/fixtures/reports/base_spec/with_formatters.rb +0 -23
- data/spec/support/fixtures/reports/base_spec/with_outfile.rb +0 -24
- data/spec/support/fixtures/reports/base_spec/without_outfile.rb +0 -20
- data/spec/support/fixtures/reports/manager_spec/afr.rb +0 -21
- data/spec/support/fixtures/reports/manager_spec/foo.rb +0 -26
- data/spec/support/fixtures/rpcd_handlers/echo.rb +0 -68
- data/spec/support/fixtures/run_mod/body.rb +0 -58
- data/spec/support/fixtures/run_mod/cookies.rb +0 -58
- data/spec/support/fixtures/run_mod/empty.rb +0 -58
- data/spec/support/fixtures/run_mod/flch.rb +0 -63
- data/spec/support/fixtures/run_mod/forms.rb +0 -58
- data/spec/support/fixtures/run_mod/headers.rb +0 -58
- data/spec/support/fixtures/run_mod/links.rb +0 -58
- data/spec/support/fixtures/run_mod/nil.rb +0 -57
- data/spec/support/fixtures/run_mod/path.rb +0 -58
- data/spec/support/fixtures/run_mod/server.rb +0 -58
- data/spec/support/fixtures/taint_module/taint.rb +0 -48
- data/spec/support/fixtures/wait_module/wait.rb +0 -48
- data/spec/support/logs/Dispatcher - 1332-56847.log +0 -9
- data/spec/support/logs/Dispatcher - 1361-63434.log +0 -21
- data/spec/support/logs/Dispatcher - 1545-55308.log +0 -9
- data/spec/support/logs/Dispatcher - 1559-18938.log +0 -19
- data/spec/support/logs/Dispatcher - 1568-25013.log +0 -17
- data/spec/support/logs/Dispatcher - 1577-55689.log +0 -13
- data/spec/support/logs/Dispatcher - 1586-18577.log +0 -9
- data/spec/support/logs/Dispatcher - 1595-49353.log +0 -9
- data/spec/support/logs/Dispatcher - 1604-27831.log +0 -11
- data/spec/support/logs/Dispatcher - 1617-57444.log +0 -11
- data/spec/support/logs/Dispatcher - 1631-28737.log +0 -11
- data/spec/support/logs/Dispatcher - 1644-21815.log +0 -33
- data/spec/support/logs/Dispatcher - 1738-53470.log +0 -21
- data/spec/support/logs/Dispatcher - 1747-64173.log +0 -21
- data/spec/support/logs/Dispatcher - 1756-11866.log +0 -23
- data/spec/support/logs/Dispatcher - 1798-12175.log +0 -19
- data/spec/support/logs/Dispatcher - 1807-22790.log +0 -17
- data/spec/support/logs/Dispatcher - 1816-57823.log +0 -15
- data/spec/support/logs/Dispatcher - 1831-64825.log +0 -11
- data/spec/support/logs/Dispatcher - 1845-27623.log +0 -9
- data/spec/support/logs/Dispatcher - 1854-26066.log +0 -9
- data/spec/support/logs/Dispatcher - 1863-37486.log +0 -9
- data/spec/support/logs/Dispatcher - 1874-22463.log +0 -9
- data/spec/support/logs/Dispatcher - 1883-41263.log +0 -11
- data/spec/support/logs/Dispatcher - 1900-53660.log +0 -9
- data/spec/support/logs/Dispatcher - 1909-44423.log +0 -9
- data/spec/support/logs/Dispatcher - 1921-58931.log +0 -9
- data/spec/support/logs/Dispatcher - 1993-6448.log +0 -63
- data/spec/support/logs/Dispatcher - 2002-19206.log +0 -43
- data/spec/support/logs/Dispatcher - 2011-11852.log +0 -39
- data/spec/support/logs/Dispatcher - 2020-65055.log +0 -34
- data/spec/support/logs/Dispatcher - 2029-48445.log +0 -28
- data/spec/support/logs/Dispatcher - 2038-55271.log +0 -21
- data/spec/support/logs/Dispatcher - 2047-45722.log +0 -13
- data/spec/support/logs/Dispatcher - 2057-48194.log +0 -9
- data/spec/support/logs/Dispatcher - 2189-39843.log +0 -19
- data/spec/support/logs/Dispatcher - 2199-15985.log +0 -21
- data/spec/support/logs/Dispatcher - 2208-22080.log +0 -15
- data/spec/support/logs/Dispatcher - 2221-37690.log +0 -19
- data/spec/support/logs/Dispatcher - 2230-47867.log +0 -21
- data/spec/support/logs/Dispatcher - 2239-27060.log +0 -15
- data/spec/support/logs/Dispatcher - 2358-8967.log +0 -17
- data/spec/support/logs/Dispatcher - 2367-27103.log +0 -21
- data/spec/support/logs/Dispatcher - 2376-16287.log +0 -13
- data/spec/support/logs/Dispatcher - 2389-9109.log +0 -19
- data/spec/support/logs/Dispatcher - 2398-62926.log +0 -21
- data/spec/support/logs/Dispatcher - 2407-48685.log +0 -15
- data/spec/support/logs/Dispatcher - 2459-62480.log +0 -17
- data/spec/support/logs/Dispatcher - 2470-57894.log +0 -21
- data/spec/support/logs/Dispatcher - 2479-51883.log +0 -13
- data/spec/support/logs/Dispatcher - 2493-36944.log +0 -17
- data/spec/support/logs/Dispatcher - 2503-59143.log +0 -21
- data/spec/support/logs/Dispatcher - 2513-33084.log +0 -13
- data/spec/support/logs/Dispatcher - 25430-46306.log +0 -9
- data/spec/support/logs/Dispatcher - 25457-10711.log +0 -23
- data/spec/support/logs/Dispatcher - 25603-48892.log +0 -9
- data/spec/support/logs/Dispatcher - 25613-24775.log +0 -19
- data/spec/support/logs/Dispatcher - 25622-59684.log +0 -17
- data/spec/support/logs/Dispatcher - 25631-23195.log +0 -13
- data/spec/support/logs/Dispatcher - 25640-9810.log +0 -9
- data/spec/support/logs/Dispatcher - 25649-52757.log +0 -9
- data/spec/support/logs/Dispatcher - 25658-58550.log +0 -11
- data/spec/support/logs/Dispatcher - 25671-30871.log +0 -11
- data/spec/support/logs/Dispatcher - 25684-48620.log +0 -11
- data/spec/support/logs/Dispatcher - 25697-18124.log +0 -37
- data/spec/support/logs/Dispatcher - 25762-35321.log +0 -21
- data/spec/support/logs/Dispatcher - 25771-64633.log +0 -21
- data/spec/support/logs/Dispatcher - 25780-43558.log +0 -23
- data/spec/support/logs/Dispatcher - 25821-43561.log +0 -19
- data/spec/support/logs/Dispatcher - 25830-39112.log +0 -17
- data/spec/support/logs/Dispatcher - 25839-44093.log +0 -15
- data/spec/support/logs/Dispatcher - 25852-12057.log +0 -11
- data/spec/support/logs/Dispatcher - 25866-49029.log +0 -9
- data/spec/support/logs/Dispatcher - 25875-32179.log +0 -9
- data/spec/support/logs/Dispatcher - 25884-62703.log +0 -9
- data/spec/support/logs/Dispatcher - 25894-4228.log +0 -9
- data/spec/support/logs/Dispatcher - 25903-6709.log +0 -11
- data/spec/support/logs/Dispatcher - 25917-29651.log +0 -9
- data/spec/support/logs/Dispatcher - 25926-12708.log +0 -9
- data/spec/support/logs/Dispatcher - 25935-54092.log +0 -9
- data/spec/support/logs/Dispatcher - 25990-26756.log +0 -63
- data/spec/support/logs/Dispatcher - 25999-4016.log +0 -43
- data/spec/support/logs/Dispatcher - 26008-52076.log +0 -39
- data/spec/support/logs/Dispatcher - 26017-48497.log +0 -34
- data/spec/support/logs/Dispatcher - 26026-28839.log +0 -28
- data/spec/support/logs/Dispatcher - 26035-54215.log +0 -21
- data/spec/support/logs/Dispatcher - 26044-27216.log +0 -13
- data/spec/support/logs/Dispatcher - 26054-53464.log +0 -9
- data/spec/support/logs/Dispatcher - 26163-65271.log +0 -19
- data/spec/support/logs/Dispatcher - 26173-58105.log +0 -21
- data/spec/support/logs/Dispatcher - 26182-40848.log +0 -15
- data/spec/support/logs/Dispatcher - 26195-2855.log +0 -19
- data/spec/support/logs/Dispatcher - 26204-35297.log +0 -21
- data/spec/support/logs/Dispatcher - 26213-59588.log +0 -15
- data/spec/support/logs/Dispatcher - 26333-40774.log +0 -17
- data/spec/support/logs/Dispatcher - 26342-45541.log +0 -21
- data/spec/support/logs/Dispatcher - 26351-3349.log +0 -13
- data/spec/support/logs/Dispatcher - 26364-37456.log +0 -19
- data/spec/support/logs/Dispatcher - 26373-37340.log +0 -21
- data/spec/support/logs/Dispatcher - 26382-54864.log +0 -15
- data/spec/support/logs/Dispatcher - 26434-3070.log +0 -17
- data/spec/support/logs/Dispatcher - 26448-14295.log +0 -21
- data/spec/support/logs/Dispatcher - 26474-30587.log +0 -13
- data/spec/support/logs/Dispatcher - 26500-32529.log +0 -17
- data/spec/support/logs/Dispatcher - 26509-16952.log +0 -21
- data/spec/support/logs/Dispatcher - 26519-43332.log +0 -13
- data/spec/support/logs/Dispatcher - 26750-61867.log +0 -19
- data/spec/support/logs/Dispatcher - 26759-22532.log +0 -21
- data/spec/support/logs/Dispatcher - 26768-18231.log +0 -15
- data/spec/support/logs/Dispatcher - 26792-41661.log +0 -21
- data/spec/support/logs/Dispatcher - 26801-14384.log +0 -25
- data/spec/support/logs/Dispatcher - 26810-2591.log +0 -15
- data/spec/support/logs/Dispatcher - 26846-14591.log +0 -17
- data/spec/support/logs/Dispatcher - 26855-15708.log +0 -21
- data/spec/support/logs/Dispatcher - 26864-2062.log +0 -13
- data/spec/support/logs/Dispatcher - 26877-14471.log +0 -21
- data/spec/support/logs/Dispatcher - 26886-49795.log +0 -25
- data/spec/support/logs/Dispatcher - 26895-21093.log +0 -15
- data/spec/support/logs/Dispatcher - 26931-30049.log +0 -17
- data/spec/support/logs/Dispatcher - 26940-34273.log +0 -21
- data/spec/support/logs/Dispatcher - 26949-30040.log +0 -13
- data/spec/support/logs/Dispatcher - 26962-8152.log +0 -17
- data/spec/support/logs/Dispatcher - 26971-53062.log +0 -21
- data/spec/support/logs/Dispatcher - 26980-7548.log +0 -13
- data/spec/support/logs/Dispatcher - 2737-20989.log +0 -19
- data/spec/support/logs/Dispatcher - 2746-5423.log +0 -21
- data/spec/support/logs/Dispatcher - 2755-53393.log +0 -15
- data/spec/support/logs/Dispatcher - 27615-41812.log +0 -19
- data/spec/support/logs/Dispatcher - 27624-43683.log +0 -21
- data/spec/support/logs/Dispatcher - 27633-11593.log +0 -15
- data/spec/support/logs/Dispatcher - 27658-12186.log +0 -21
- data/spec/support/logs/Dispatcher - 27667-15575.log +0 -25
- data/spec/support/logs/Dispatcher - 27676-17207.log +0 -15
- data/spec/support/logs/Dispatcher - 27712-2233.log +0 -17
- data/spec/support/logs/Dispatcher - 27721-3842.log +0 -21
- data/spec/support/logs/Dispatcher - 27730-22695.log +0 -13
- data/spec/support/logs/Dispatcher - 27743-8364.log +0 -21
- data/spec/support/logs/Dispatcher - 27752-6140.log +0 -25
- data/spec/support/logs/Dispatcher - 27761-25015.log +0 -15
- data/spec/support/logs/Dispatcher - 27797-9270.log +0 -17
- data/spec/support/logs/Dispatcher - 2780-58168.log +0 -21
- data/spec/support/logs/Dispatcher - 27806-48623.log +0 -21
- data/spec/support/logs/Dispatcher - 27815-58778.log +0 -13
- data/spec/support/logs/Dispatcher - 27828-29742.log +0 -17
- data/spec/support/logs/Dispatcher - 27837-46211.log +0 -21
- data/spec/support/logs/Dispatcher - 27846-16143.log +0 -13
- data/spec/support/logs/Dispatcher - 2789-29375.log +0 -25
- data/spec/support/logs/Dispatcher - 2798-10983.log +0 -15
- data/spec/support/logs/Dispatcher - 2836-2354.log +0 -17
- data/spec/support/logs/Dispatcher - 2845-65341.log +0 -21
- data/spec/support/logs/Dispatcher - 2854-18936.log +0 -13
- data/spec/support/logs/Dispatcher - 2867-51979.log +0 -21
- data/spec/support/logs/Dispatcher - 2876-21086.log +0 -25
- data/spec/support/logs/Dispatcher - 2887-17393.log +0 -15
- data/spec/support/logs/Dispatcher - 2930-37394.log +0 -17
- data/spec/support/logs/Dispatcher - 2943-46737.log +0 -21
- data/spec/support/logs/Dispatcher - 2956-37866.log +0 -13
- data/spec/support/logs/Dispatcher - 2976-21012.log +0 -17
- data/spec/support/logs/Dispatcher - 2990-48082.log +0 -21
- data/spec/support/logs/Dispatcher - 2999-16391.log +0 -13
- data/spec/support/logs/Instance - 2204-45164.error.log +0 -356
- data/spec/support/logs/Instance - 2475-49789.error.log +0 -356
- data/spec/support/logs/Instance - 2509-39450.error.log +0 -455
- data/spec/support/logs/Instance - 2533-5785.error.log +0 -354
- data/spec/support/logs/Instance - 2539-42941.error.log +0 -356
- data/spec/support/logs/Instance - 26178-57631.error.log +0 -324
- data/spec/support/logs/Instance - 26458-60253.error.log +0 -326
- data/spec/support/logs/Instance - 26514-44685.error.log +0 -423
- data/spec/support/logs/Instance - 26538-43093.error.log +0 -322
- data/spec/support/logs/Instance - 26544-52217.error.log +0 -328
- data/spec/support/logs/Instance - 26682-37056.error.log +0 -345
- data/spec/support/logs/Instance - 2669-56818.error.log +0 -354
- data/spec/support/logs/Instance - 27547-3928.error.log +0 -309
- data/spec/support/servers/arachni/element/capabilities/auditable/rdiff.rb +0 -162
- data/spec/support/servers/arachni/element/capabilities/auditable/timeout.rb +0 -34
- data/spec/support/servers/arachni/http.rb +0 -127
- data/spec/support/servers/arachni/http_auth.rb +0 -9
- data/spec/support/servers/arachni/module/auditor.rb +0 -136
- data/spec/support/servers/arachni/rpc/server/framework_simple.rb +0 -30
- data/spec/support/servers/arachni/spider.rb +0 -234
- data/spec/support/servers/arachni/spider_https.rb +0 -58
- data/spec/support/servers/modules/audit/code_injection.rb +0 -139
- data/spec/support/servers/modules/audit/code_injection_timing.rb +0 -110
- data/spec/support/servers/modules/audit/file_inclusion.rb +0 -202
- data/spec/support/servers/modules/audit/ldapi.rb +0 -73
- data/spec/support/servers/modules/audit/os_cmd_injection.rb +0 -140
- data/spec/support/servers/modules/audit/os_cmd_injection_timing.rb +0 -103
- data/spec/support/servers/modules/audit/path_traversal.rb +0 -197
- data/spec/support/servers/modules/audit/response_splitting.rb +0 -114
- data/spec/support/servers/modules/audit/session_fixation.rb +0 -87
- data/spec/support/servers/modules/audit/source_code_disclosure.rb +0 -95
- data/spec/support/servers/modules/audit/sqli.rb +0 -118
- data/spec/support/servers/modules/audit/sqli_blind_timing.rb +0 -121
- data/spec/support/servers/modules/audit/unvalidated_redirect.rb +0 -115
- data/spec/support/servers/modules/audit/xpath.rb +0 -111
- data/spec/support/servers/modules/audit/xss.rb +0 -152
- data/spec/support/servers/modules/audit/xss_event.rb +0 -80
- data/spec/support/servers/modules/audit/xss_script_tag.rb +0 -73
- data/spec/support/servers/modules/module_server.rb +0 -14
- data/spec/support/servers/modules/recon/backdoors.rb +0 -4
- data/spec/support/servers/modules/recon/backup_files.rb +0 -28
- data/spec/support/servers/modules/recon/common_directories.rb +0 -6
- data/spec/support/servers/modules/recon/common_files.rb +0 -6
- data/spec/support/servers/modules/recon/directory_listing.rb +0 -30
- data/spec/support/servers/modules/recon/grep/emails.rb +0 -21
- data/spec/support/servers/modules/recon/grep/insecure_cookies.rb +0 -21
- data/spec/support/servers/modules/recon/grep/mixed_resource.rb +0 -83
- data/spec/support/servers/modules/recon/grep/password_autocomplete.rb +0 -33
- data/spec/support/servers/modules/recon/grep/unencrypted_password_forms.rb +0 -33
- data/spec/support/servers/modules/recon/http_put.rb +0 -7
- data/spec/support/servers/modules/recon/interesting_responses.rb +0 -5
- data/spec/support/servers/modules/recon/webdav.rb +0 -25
- data/spec/support/servers/modules/recon/x_forwarded_for_access_restriction_bypass.rb +0 -16
- data/spec/support/servers/plugins/profiler.rb +0 -82
- data/spec/support/servers/plugins/rescan.rb +0 -31
- data/spec/support/shared/module.rb +0 -162
- data/spec/support/shared/reports.rb +0 -47
@@ -1,23 +1,17 @@
|
|
1
1
|
=begin
|
2
|
-
Copyright 2010-2014 Tasos Laskos <tasos.laskos@
|
2
|
+
Copyright 2010-2014 Tasos Laskos <tasos.laskos@arachni-scanner.com>
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
4
|
+
This file is part of the Arachni Framework project and is subject to
|
5
|
+
redistribution and commercial restrictions. Please see the Arachni Framework
|
6
|
+
web site for more information on licensing and terms of use.
|
15
7
|
=end
|
16
8
|
|
17
9
|
require 'ostruct'
|
18
10
|
|
19
11
|
module Arachni
|
20
|
-
lib = Options.
|
12
|
+
lib = Options.paths.lib
|
13
|
+
|
14
|
+
require lib + 'processes/manager'
|
21
15
|
|
22
16
|
require lib + 'rpc/client/instance'
|
23
17
|
require lib + 'rpc/client/dispatcher'
|
@@ -30,44 +24,29 @@ require lib + 'rpc/server/framework'
|
|
30
24
|
module RPC
|
31
25
|
class Server
|
32
26
|
|
33
|
-
#
|
34
27
|
# Represents an Arachni instance (or multiple instances when running a
|
35
|
-
#
|
36
|
-
# scanner's components:
|
37
|
-
#
|
38
|
-
# * {Instance self} -- mapped to `service`
|
39
|
-
# * {Options} -- mapped to `opts`
|
40
|
-
# * {Framework} -- mapped to `framework`
|
41
|
-
# * {Module::Manager} -- mapped to `modules`
|
42
|
-
# * {Plugin::Manager} -- mapped to `plugins`
|
43
|
-
# * {Spider} -- mapped to `spider`
|
44
|
-
#
|
45
|
-
# # Convenience methods
|
46
|
-
#
|
47
|
-
# The `service` RPC handler (which is this class) provides convenience
|
48
|
-
# methods which cover the most commonly used functionality so that you
|
49
|
-
# won't have to concern yourself with any other RPC handler.
|
28
|
+
# multi-Instance scan) and serves as a central point of access and control.
|
50
29
|
#
|
51
|
-
#
|
30
|
+
# # Methods
|
52
31
|
#
|
53
|
-
#
|
32
|
+
# Provides methods for:
|
54
33
|
#
|
55
|
-
# * Retrieving available components
|
56
|
-
# * {#
|
34
|
+
# * Retrieving available components:
|
35
|
+
# * {#list_checks Checks}
|
57
36
|
# * {#list_plugins Plugins}
|
58
|
-
# * {#
|
59
|
-
# * {#scan Configuring and running a scan}
|
60
|
-
# * Retrieving progress information
|
61
|
-
# * {#progress in aggregate form} (which includes a multitude of information)
|
37
|
+
# * {#list_reporters Reporters}
|
38
|
+
# * {#scan Configuring and running a scan}.
|
39
|
+
# * Retrieving progress information:
|
40
|
+
# * {#progress in aggregate form} (which includes a multitude of information).
|
62
41
|
# * or simply by:
|
63
|
-
# * {#busy? checking whether the scan is still in progress}
|
64
|
-
# * {#status checking the status of the scan}
|
42
|
+
# * {#busy? checking whether the scan is still in progress}.
|
43
|
+
# * {#status checking the status of the scan}.
|
65
44
|
# * {#pause Pausing}, {#resume resuming} or {#abort_and_report aborting} the scan.
|
66
|
-
# * Retrieving the scan report
|
67
|
-
# * {#report as a Hash}
|
45
|
+
# * Retrieving the scan report:
|
46
|
+
# * {#report as a Hash}.
|
68
47
|
# * {#report_as in one of the supported formats} (as made available by the
|
69
|
-
# {
|
70
|
-
# * {#shutdown Shutting down}
|
48
|
+
# {Reporters Reporter} components).
|
49
|
+
# * {#shutdown Shutting down}.
|
71
50
|
#
|
72
51
|
# (A nice simple example can be found in the {UI::CLI::RPC RPC command-line client}
|
73
52
|
# interface.)
|
@@ -80,10 +59,11 @@ class Server
|
|
80
59
|
# 'localhost:1111', 's3cr3t' )
|
81
60
|
#
|
82
61
|
# instance.service.scan url: 'http://testfire.net',
|
83
|
-
#
|
84
|
-
#
|
85
|
-
#
|
86
|
-
#
|
62
|
+
# audit: {
|
63
|
+
# elements: [:links, :forms]
|
64
|
+
# },
|
65
|
+
# # load all XSS checks
|
66
|
+
# checks: 'xss*'
|
87
67
|
#
|
88
68
|
# print 'Running.'
|
89
69
|
# while instance.service.busy?
|
@@ -91,8 +71,8 @@ class Server
|
|
91
71
|
# sleep 1
|
92
72
|
# end
|
93
73
|
#
|
94
|
-
# # Grab the report
|
95
|
-
# report = instance.service.
|
74
|
+
# # Grab the report
|
75
|
+
# report = instance.service.report
|
96
76
|
#
|
97
77
|
# # Kill the instance and its process, no zombies please...
|
98
78
|
# instance.service.shutdown
|
@@ -100,8 +80,8 @@ class Server
|
|
100
80
|
# puts
|
101
81
|
# puts
|
102
82
|
# puts 'Logged issues:'
|
103
|
-
# report
|
104
|
-
#
|
83
|
+
# report['issues'].each do |issue|
|
84
|
+
# puts " * #{issue['name']} in '#{issue['vector']['type']}' input '#{issue['vector']['affected_input_name']}' at '#{issue['vector']['action']}'."
|
105
85
|
# end
|
106
86
|
#
|
107
87
|
# @note Ignore:
|
@@ -111,11 +91,6 @@ class Server
|
|
111
91
|
# * `block` parameters, they are an RPC implementation detail for methods which
|
112
92
|
# perform asynchronous operations.
|
113
93
|
#
|
114
|
-
# @note Avoid calling methods which return Arachni-specific objects (like {AuditStore},
|
115
|
-
# {Issue}, etc.) when you don't have these objects available on the client-side
|
116
|
-
# (like when working from a non-Ruby platform or not having the Arachni framework
|
117
|
-
# installed).
|
118
|
-
#
|
119
94
|
# @note Methods which expect `Symbol` type parameters will also accept `String`
|
120
95
|
# types as well.
|
121
96
|
#
|
@@ -127,8 +102,7 @@ class Server
|
|
127
102
|
#
|
128
103
|
# instance.service.scan 'url' => 'http://testfire.net'
|
129
104
|
#
|
130
|
-
# @author Tasos "Zapotek" Laskos <tasos.laskos@
|
131
|
-
#
|
105
|
+
# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
|
132
106
|
class Instance
|
133
107
|
include UI::Output
|
134
108
|
include Utilities
|
@@ -136,48 +110,92 @@ class Instance
|
|
136
110
|
private :error_logfile
|
137
111
|
public :error_logfile
|
138
112
|
|
139
|
-
#
|
140
113
|
# Initializes the RPC interface and the framework.
|
141
114
|
#
|
142
|
-
# @param [Options]
|
143
|
-
# @param [String] token
|
144
|
-
#
|
145
|
-
def initialize(
|
146
|
-
@
|
147
|
-
@token
|
115
|
+
# @param [Options] options
|
116
|
+
# @param [String] token
|
117
|
+
# Authentication token.
|
118
|
+
def initialize( options, token )
|
119
|
+
@options = options
|
120
|
+
@token = token
|
121
|
+
|
122
|
+
@options.snapshot.save_path ||= @options.paths.snapshots
|
148
123
|
|
149
124
|
@framework = Server::Framework.new( Options.instance )
|
150
125
|
@active_options = Server::ActiveOptions.new( @framework )
|
151
126
|
|
152
|
-
@server = Base.new( @
|
153
|
-
@server.logger.level = @
|
154
|
-
|
155
|
-
@opts.datastore[:token] = token
|
127
|
+
@server = Base.new( @options, token )
|
128
|
+
@server.logger.level = @options.datastore.log_level if @options.datastore.log_level
|
156
129
|
|
157
|
-
|
130
|
+
@options.datastore.token = token
|
158
131
|
|
159
|
-
if @
|
160
|
-
reroute_to_file "#{@
|
132
|
+
if @options.output.reroute_to_logfile
|
133
|
+
reroute_to_file "#{@options.paths.logs}/Instance - #{Process.pid}" <<
|
134
|
+
"-#{@options.rpc.server_port}.log"
|
161
135
|
else
|
162
136
|
reroute_to_file false
|
163
137
|
end
|
164
138
|
|
165
|
-
set_error_logfile "#{@
|
139
|
+
set_error_logfile "#{@options.paths.logs}/Instance - #{Process.pid}" <<
|
140
|
+
"-#{@options.rpc.server_port}.error.log"
|
166
141
|
|
167
142
|
set_handlers( @server )
|
168
143
|
|
169
144
|
# trap interrupts and exit cleanly when required
|
170
145
|
%w(QUIT INT).each do |signal|
|
171
|
-
|
146
|
+
next if !Signal.list.has_key?( signal )
|
147
|
+
trap( signal ){ shutdown if !@options.datastore.do_not_trap }
|
172
148
|
end
|
173
149
|
|
174
150
|
@consumed_pids = []
|
175
151
|
|
176
|
-
|
152
|
+
Reactor.global.run do
|
177
153
|
run
|
178
154
|
end
|
179
155
|
end
|
180
156
|
|
157
|
+
# @return [String, nil]
|
158
|
+
# Path to the {Snapshot snapshot} of the {#suspend suspended} scan,
|
159
|
+
# `nil` if not {#suspended?}.
|
160
|
+
#
|
161
|
+
# @see #suspend
|
162
|
+
# @see #suspended?
|
163
|
+
def snapshot_path
|
164
|
+
return if !suspended?
|
165
|
+
@framework.snapshot_path
|
166
|
+
end
|
167
|
+
|
168
|
+
# @note The path to the snapshot can be retrieved via {#snapshot_path}.
|
169
|
+
#
|
170
|
+
# {Snapshot.dump Writes} a {Snapshot} to disk and aborts the scan.
|
171
|
+
#
|
172
|
+
# @see #restore
|
173
|
+
def suspend
|
174
|
+
if !@framework.solo?
|
175
|
+
fail State::Framework::Error::StateNotSuspendable,
|
176
|
+
'Cannot suspend a multi-Instance scan.'
|
177
|
+
end
|
178
|
+
|
179
|
+
@framework.suspend false
|
180
|
+
end
|
181
|
+
|
182
|
+
# @param (see Arachni::Framework#restore)
|
183
|
+
# @return (see Arachni::Framework#restore)
|
184
|
+
#
|
185
|
+
# @see #suspend
|
186
|
+
# @see #snapshot_path
|
187
|
+
def restore( snapshot )
|
188
|
+
@framework.restore snapshot
|
189
|
+
@framework.run
|
190
|
+
true
|
191
|
+
end
|
192
|
+
|
193
|
+
# @return (see Arachni::Framework#suspended?)
|
194
|
+
# @see #suspend
|
195
|
+
def suspended?
|
196
|
+
@framework.suspended?
|
197
|
+
end
|
198
|
+
|
181
199
|
# @return [true]
|
182
200
|
def alive?
|
183
201
|
@server.alive?
|
@@ -185,8 +203,6 @@ class Instance
|
|
185
203
|
|
186
204
|
# @return [Bool]
|
187
205
|
# `true` if the scan is initializing or running, `false` otherwise.
|
188
|
-
# If a scan is started by {#scan} then this method should be used
|
189
|
-
# instead of {Framework#busy?}.
|
190
206
|
def busy?( &block )
|
191
207
|
if @scan_initializing
|
192
208
|
block.call( true ) if block_given?
|
@@ -196,20 +212,26 @@ class Instance
|
|
196
212
|
@framework.busy?( &block )
|
197
213
|
end
|
198
214
|
|
199
|
-
# @param (see Arachni::RPC::Server::Framework#errors)
|
200
|
-
# @return (see Arachni::RPC::Server::Framework#errors)
|
215
|
+
# @param (see Arachni::RPC::Server::Framework::MultiInstance#errors)
|
216
|
+
# @return (see Arachni::RPC::Server::Framework::MultiInstance#errors)
|
201
217
|
def errors( starting_line = 0, &block )
|
202
218
|
@framework.errors( starting_line, &block )
|
203
219
|
end
|
204
220
|
|
221
|
+
# @param (see Arachni::RPC::Server::Framework::MultiInstance#sitemap_entries)
|
222
|
+
# @return (see Arachni::RPC::Server::Framework::MultiInstance#sitemap_entries)
|
223
|
+
def sitemap( index = 0 )
|
224
|
+
@framework.sitemap_entries( index )
|
225
|
+
end
|
226
|
+
|
205
227
|
# @return (see Arachni::Framework#list_platforms)
|
206
228
|
def list_platforms
|
207
229
|
@framework.list_platforms
|
208
230
|
end
|
209
231
|
|
210
|
-
# @return (see Arachni::Framework#
|
211
|
-
def
|
212
|
-
@framework.
|
232
|
+
# @return (see Arachni::Framework#list_checks)
|
233
|
+
def list_checks
|
234
|
+
@framework.list_checks
|
213
235
|
end
|
214
236
|
|
215
237
|
# @return (see Arachni::Framework#list_plugins)
|
@@ -217,98 +239,109 @@ class Instance
|
|
217
239
|
@framework.list_plugins
|
218
240
|
end
|
219
241
|
|
220
|
-
# @return (see Arachni::Framework#
|
221
|
-
def
|
222
|
-
@framework.
|
242
|
+
# @return (see Arachni::Framework#list_reporters)
|
243
|
+
def list_reporters
|
244
|
+
@framework.list_reporters
|
245
|
+
end
|
246
|
+
|
247
|
+
# @return (see Arachni::Framework#paused?)
|
248
|
+
def paused?
|
249
|
+
@framework.paused?
|
223
250
|
end
|
224
251
|
|
225
|
-
#
|
226
252
|
# Pauses the running scan on a best effort basis.
|
227
|
-
#
|
228
|
-
# @see Framework#pause
|
229
253
|
def pause( &block )
|
230
|
-
@
|
254
|
+
if @rpc_pause_request
|
255
|
+
block.call( true )
|
256
|
+
return
|
257
|
+
end
|
258
|
+
|
259
|
+
# Send the pause request but don't block.
|
260
|
+
r = @framework.pause( false )
|
261
|
+
@rpc_pause_request ||= r
|
262
|
+
|
263
|
+
if !@framework.has_slaves?
|
264
|
+
block.call( true )
|
265
|
+
return
|
266
|
+
end
|
267
|
+
|
268
|
+
each = proc { |instance, iter| instance.service.pause { iter.next } }
|
269
|
+
each_slave( each, proc { block.call true } )
|
231
270
|
end
|
232
271
|
|
233
|
-
#
|
234
|
-
# Resumes a paused scan.
|
235
|
-
#
|
236
|
-
# @see Framework#resume
|
272
|
+
# Resumes a paused scan right away.
|
237
273
|
def resume( &block )
|
238
|
-
|
274
|
+
return block.call( false ) if !@rpc_pause_request
|
275
|
+
|
276
|
+
@framework.resume( @rpc_pause_request )
|
277
|
+
|
278
|
+
if !@framework.has_slaves?
|
279
|
+
block.call true
|
280
|
+
return
|
281
|
+
end
|
282
|
+
|
283
|
+
each = proc { |instance, iter| instance.service.resume { iter.next } }
|
284
|
+
each_slave( each, proc { block.call true } )
|
239
285
|
end
|
240
286
|
|
287
|
+
# @note Don't forget to {#shutdown} the instance once you get the report.
|
241
288
|
#
|
242
289
|
# Cleans up and returns the report.
|
243
290
|
#
|
244
|
-
# @
|
245
|
-
# Report type to return, `:hash` for {#report} or `:audistore` for
|
246
|
-
# {#auditstore}.
|
291
|
+
# @return [Hash]
|
247
292
|
#
|
248
|
-
# @return [Hash,AuditStore]
|
249
|
-
#
|
250
|
-
# @note Don't forget to {#shutdown} the instance once you get the report.
|
251
|
-
#
|
252
|
-
# @see Framework#clean_up
|
253
|
-
# @see #abort_and_report
|
254
293
|
# @see #report
|
255
|
-
|
294
|
+
def abort_and_report( &block )
|
295
|
+
@framework.clean_up { block.call report.to_h }
|
296
|
+
end
|
297
|
+
|
298
|
+
# Like {#abort_and_report} but returns a {Serializer.dump} representation
|
299
|
+
# of {Report}.
|
256
300
|
#
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
end
|
301
|
+
# @private
|
302
|
+
def native_abort_and_report( &block )
|
303
|
+
@framework.clean_up { native_report( &block ) }
|
261
304
|
end
|
262
305
|
|
306
|
+
# @note Don't forget to {#shutdown} the instance once you get the report.
|
263
307
|
#
|
264
308
|
# Cleans up and delegates to {#report_as}.
|
265
309
|
#
|
266
310
|
# @param (see #report_as)
|
267
311
|
# @return (see #report_as)
|
268
312
|
#
|
269
|
-
# @note Don't forget to {#shutdown} the instance once you get the report.
|
270
|
-
#
|
271
|
-
# @see Framework#clean_up
|
272
313
|
# @see #abort_and_report
|
273
314
|
# @see #report_as
|
274
|
-
#
|
275
315
|
def abort_and_report_as( name, &block )
|
276
|
-
@framework.clean_up
|
277
|
-
block.call report_as( name )
|
278
|
-
end
|
316
|
+
@framework.clean_up { block.call report_as( name ) }
|
279
317
|
end
|
280
318
|
|
281
|
-
# @return (see Arachni::Framework#
|
282
|
-
# @
|
283
|
-
def
|
284
|
-
@framework.
|
319
|
+
# @return (see Arachni::Framework#report)
|
320
|
+
# @private
|
321
|
+
def native_report( &block )
|
322
|
+
@framework.report( &block )
|
285
323
|
end
|
286
324
|
|
287
|
-
# @return
|
288
|
-
#
|
325
|
+
# @return [Hash]
|
326
|
+
# {Report#to_h}
|
289
327
|
def report
|
290
|
-
@framework.report
|
328
|
+
@framework.report.to_h
|
291
329
|
end
|
292
330
|
|
293
331
|
# @param [String] name
|
294
|
-
# Name of the report component to run, as presented by {#
|
332
|
+
# Name of the report component to run, as presented by {#list_reporters}'s
|
295
333
|
# `:shortname` key.
|
296
334
|
#
|
297
335
|
# @return (see Arachni::Framework#report_as)
|
298
|
-
# @see Framework#report_as
|
299
336
|
def report_as( name )
|
300
337
|
@framework.report_as( name )
|
301
338
|
end
|
302
339
|
|
303
340
|
# @return (see Framework#status)
|
304
|
-
# @see Framework#status
|
305
341
|
def status
|
306
342
|
@framework.status
|
307
343
|
end
|
308
344
|
|
309
|
-
#
|
310
|
-
# Simplified version of {Framework::MultiInstance#progress}.
|
311
|
-
#
|
312
345
|
# # Recommended usage
|
313
346
|
#
|
314
347
|
# Please request from the method only the things you are going to actually
|
@@ -337,7 +370,7 @@ class Instance
|
|
337
370
|
# instance.service.error_test "BOOM! #{i+=1}"
|
338
371
|
#
|
339
372
|
# # Only request errors we don't already have
|
340
|
-
# errors = instance.service.progress( with: { errors: error_cnt } )[
|
373
|
+
# errors = instance.service.progress( with: { errors: error_cnt } )[:errors]
|
341
374
|
# error_cnt += errors.size
|
342
375
|
#
|
343
376
|
# # You will only see new errors
|
@@ -353,29 +386,24 @@ class Instance
|
|
353
386
|
# issue_digests = []
|
354
387
|
# while sleep 1
|
355
388
|
# issues = instance.service.progress(
|
356
|
-
#
|
357
|
-
# with: :native_issues,
|
389
|
+
# with: :issues,
|
358
390
|
# # Only request issues we don't already have
|
359
391
|
# without: { issues: issue_digests }
|
360
|
-
# )[
|
392
|
+
# )[:issues]
|
361
393
|
#
|
362
|
-
# issue_digests |= issues.map
|
394
|
+
# issue_digests |= issues.map { |issue| issue['digest'] }
|
363
395
|
#
|
364
396
|
# # You will only see new issues
|
365
397
|
# issues.each do |issue|
|
366
|
-
# puts " * #{issue
|
398
|
+
# puts " * #{issue['name']} in '#{issue['vector']['type']}' input '#{issue['vector']['affected_input_name']}' at '#{issue['vector']['action']}'."
|
367
399
|
# end
|
368
400
|
# end
|
369
401
|
#
|
370
|
-
# _If your client is on a platform that has no access to native Arachni
|
371
|
-
# objects, you'll have to calculate the {Issue#digest digests} yourself._
|
372
|
-
#
|
373
402
|
# @param [Hash] options
|
374
403
|
# Options about what progress data to retrieve and return.
|
375
404
|
# @option options [Array<Symbol, Hash>] :with
|
376
405
|
# Specify data to include:
|
377
406
|
#
|
378
|
-
# * :native_issues -- Discovered issues as {Arachni::Issue} objects.
|
379
407
|
# * :issues -- Discovered issues as {Arachni::Issue#to_h hashes}.
|
380
408
|
# * :instances -- Statistics and info for slave instances.
|
381
409
|
# * :errors -- Errors and the line offset to use for {#errors}.
|
@@ -383,87 +411,67 @@ class Instance
|
|
383
411
|
# @option options [Array<Symbol, Hash>] :without
|
384
412
|
# Specify data to exclude:
|
385
413
|
#
|
386
|
-
# * :
|
414
|
+
# * :statistics -- Don't include runtime statistics.
|
387
415
|
# * :issues -- Don't include issues with the given {Arachni::Issue#digest digests}.
|
388
416
|
# Pass as a hash, like: `{ issues: [...] }`
|
389
417
|
#
|
390
418
|
# @return [Hash]
|
391
|
-
# * `
|
419
|
+
# * `statistics` -- General runtime statistics (merged when part of Grid)
|
392
420
|
# (enabled by default)
|
393
421
|
# * `status` -- {#status}
|
394
422
|
# * `busy` -- {#busy?}
|
395
|
-
# * `issues` --
|
423
|
+
# * `issues` -- Discovered issues as {Arachni::Issue#to_h hashes}.
|
396
424
|
# (disabled by default)
|
397
|
-
# * `instances` -- Raw `
|
425
|
+
# * `instances` -- Raw `statistics` for each running instance (only when part
|
398
426
|
# of Grid) (disabled by default)
|
399
427
|
# * `errors` -- {#errors} (disabled by default)
|
400
|
-
#
|
428
|
+
# * `sitemap` -- {#sitemap} (disabled by default)
|
401
429
|
def progress( options = {}, &block )
|
402
|
-
|
403
|
-
without = parse_progress_opts( options, :without )
|
404
|
-
|
405
|
-
@framework.progress( as_hash: !with.include?( :native_issues ),
|
406
|
-
issues: with.include?( :native_issues ) ||
|
407
|
-
with.include?( :issues ),
|
408
|
-
stats: !without.include?( :stats ),
|
409
|
-
slaves: with.include?( :instances ),
|
410
|
-
messages: false,
|
411
|
-
errors: with[:errors]
|
412
|
-
) do |data|
|
413
|
-
data['instances'] ||= [] if with.include?( :instances )
|
414
|
-
data['busy'] = busy?
|
415
|
-
|
416
|
-
if data['issues']
|
417
|
-
data['issues'] = data['issues'].dup
|
418
|
-
|
419
|
-
if without[:issues].is_a? Array
|
420
|
-
data['issues'].reject! do |i|
|
421
|
-
without[:issues].include?( i.is_a?( Hash ) ? i['digest'] : i.digest )
|
422
|
-
end
|
423
|
-
end
|
424
|
-
end
|
425
|
-
|
426
|
-
block.call( data )
|
427
|
-
end
|
430
|
+
progress_handler( options.merge( as_hash: true ), &block )
|
428
431
|
end
|
429
432
|
|
433
|
+
# Like {#progress} but returns MessagePack representation of native objects
|
434
|
+
# instead of simplified hashes.
|
430
435
|
#
|
436
|
+
# @private
|
437
|
+
def native_progress( options = {}, &block )
|
438
|
+
progress_handler( options.merge( as_hash: false ), &block )
|
439
|
+
end
|
440
|
+
|
431
441
|
# Configures and runs a scan.
|
432
442
|
#
|
433
|
-
# @note If you use this method to start the scan use {#busy?} instead of
|
434
|
-
# {Framework#busy?} to check if the scan is still running.
|
435
|
-
#
|
436
443
|
# @note Options marked with an asterisk are required.
|
437
444
|
# @note Options which expect patterns will interpret their arguments as
|
438
445
|
# regular expressions regardless of their type.
|
439
|
-
# @note When using more than one Instance, the `http_req_limit` and
|
440
|
-
# `link_count_limit` options will be divided by the number of Instance to
|
441
|
-
# be used.
|
442
446
|
#
|
443
447
|
# @param [Hash] opts
|
444
|
-
# Scan options to be passed to {Options#
|
448
|
+
# Scan options to be passed to {Options#update} (along with some extra ones
|
445
449
|
# to keep configuration in one place).
|
446
450
|
#
|
447
451
|
# _The options presented here are the most commonly used ones, in
|
448
|
-
# actuality, you can use
|
452
|
+
# actuality, you can use anything supported by {Options#update}._
|
449
453
|
# @option opts [String] *:url
|
450
454
|
# Target URL to audit.
|
451
|
-
# @option opts [
|
452
|
-
#
|
453
|
-
#
|
454
|
-
#
|
455
|
-
# @option opts [
|
456
|
-
#
|
457
|
-
# @option opts [
|
458
|
-
#
|
459
|
-
# @option opts [
|
460
|
-
#
|
461
|
-
#
|
462
|
-
#
|
455
|
+
# @option opts [String] :authorized_by (nil)
|
456
|
+
# The e-mail address of the person who authorized the scan.
|
457
|
+
#
|
458
|
+
# john.doe@bigscanners.com
|
459
|
+
# @option opts [Hash] :audit
|
460
|
+
# {OptionGroups::Audit Audit} options.
|
461
|
+
# @option opts [Hash] :scope
|
462
|
+
# {OptionGroups::Scope Scope} options.
|
463
|
+
# @option opts [Hash] :http
|
464
|
+
# {OptionGroups::HTTP HTTP} options.
|
465
|
+
# @option opts [Hash] :login
|
466
|
+
# {OptionGroups::Session Session} options.
|
467
|
+
# @option opts [String,Array<String>] :checks ([])
|
468
|
+
# Checks to load, by name.
|
469
|
+
#
|
470
|
+
# # To load all checks use the wildcard on its own
|
463
471
|
# '*'
|
464
472
|
#
|
465
|
-
# # To load all XSS and SQLi
|
466
|
-
# [ 'xss*', '
|
473
|
+
# # To load all XSS and SQLi checks:
|
474
|
+
# [ 'xss*', 'sql_injection*' ]
|
467
475
|
#
|
468
476
|
# @option opts [Hash<Hash>] :plugins ({})
|
469
477
|
# Plugins to load, by name, along with their options.
|
@@ -471,99 +479,26 @@ class Instance
|
|
471
479
|
# {
|
472
480
|
# 'proxy' => {}, # empty options
|
473
481
|
# 'autologin' => {
|
474
|
-
# 'url'
|
475
|
-
# '
|
476
|
-
# 'check'
|
482
|
+
# 'url' => 'http://demo.testfire.net/bank/login.aspx',
|
483
|
+
# 'parameters' => 'uid=jsmith&passw=Demo1234',
|
484
|
+
# 'check' => 'MY ACCOUNT'
|
477
485
|
# },
|
478
486
|
# }
|
479
487
|
#
|
480
488
|
# @option opts [String, Symbol, Array<String, Symbol>] :platforms ([])
|
481
|
-
# Initialize the fingerprinter with the given platforms.
|
482
|
-
#
|
483
|
-
#
|
484
|
-
#
|
489
|
+
# Initialize the fingerprinter with the given platforms.
|
490
|
+
#
|
491
|
+
# The fingerprinter cannot identify database servers so specifying the
|
492
|
+
# remote DB backend will greatly enhance performance and reduce bandwidth
|
493
|
+
# consumption.
|
494
|
+
# @option opts [Bool] :no_fingerprinting (false)
|
485
495
|
# Disable platform fingerprinting and include all payloads in the audit.
|
496
|
+
#
|
486
497
|
# Use this option in addition to the `:platforms` one to restrict the
|
487
498
|
# audit payloads to explicitly specified platforms.
|
488
|
-
# @option opts [Integer] :link_count_limit (nil)
|
489
|
-
# Limit the amount of pages to be crawled and audited.
|
490
|
-
# @option opts [Integer] :depth_limit (nil)
|
491
|
-
# Directory depth limit.
|
492
|
-
#
|
493
|
-
# How deep Arachni should go into the website structure.
|
494
|
-
# @option opts [Array<String, Regexp>] :exclude ([])
|
495
|
-
# URLs that match any of the given patterns will be ignored.
|
496
|
-
#
|
497
|
-
# [ 'logout', /skip.*.me too/i ]
|
498
|
-
#
|
499
|
-
# @option opts [Array<String, Regexp>] :exclude_pages ([])
|
500
|
-
# Exclude pages from the crawl and audit processes based on their
|
501
|
-
# content (i.e. HTTP response bodies).
|
502
|
-
#
|
503
|
-
# [ /.*forbidden.*/, "I'm a weird 404 and I should be ignored" ]
|
504
|
-
#
|
505
|
-
# @option opts [Array<String>] :exclude_vectors ([])
|
506
|
-
# Exclude input vectors from the audit, by name.
|
507
|
-
#
|
508
|
-
# [ 'sessionid', 'please_dont_audit_me' ]
|
509
|
-
#
|
510
|
-
# @option opts [Array<String, Regexp>] :include ([])
|
511
|
-
# Only URLs that match any of the given patterns will be followed and audited.
|
512
|
-
#
|
513
|
-
# [ 'only-follow-me', 'follow-me-as-well' ]
|
514
|
-
#
|
515
|
-
# @option opts [Hash<<String, Regexp>,Integer>] :redundant ({})
|
516
|
-
# Redundancy patterns to limit how many times certain paths should be
|
517
|
-
# followed.
|
518
|
-
#
|
519
|
-
# { "follow_me_3_times" => 3, /follow_me_5_times/ => 5 }
|
520
|
-
#
|
521
|
-
# Useful when scanning pages that create an large number of
|
522
|
-
# pages like galleries and calendars.
|
523
|
-
#
|
524
|
-
# @option opts [Array<String>] :restrict_paths ([])
|
525
|
-
# Restrict the audit to the provided paths.
|
526
|
-
#
|
527
|
-
# The crawl phase gets skipped and these paths are used instead.
|
528
|
-
# @option opts [Array<String>] :extend_paths ([])
|
529
|
-
# Extend the scope of the crawl and audit with the provided paths.
|
530
|
-
# @option opts [Array<String, Hash, Arachni::Element::Cookie>] :cookies ({})
|
531
|
-
# Cookies to use for the HTTP requests.
|
532
|
-
#
|
533
|
-
# [
|
534
|
-
# 'secret=blah',
|
535
|
-
# {
|
536
|
-
# 'userid' => '1',
|
537
|
-
# },
|
538
|
-
# {
|
539
|
-
# name: 'sessionid',
|
540
|
-
# value: 'fdfdfDDfsdfszdf',
|
541
|
-
# http_only: true
|
542
|
-
# }
|
543
|
-
# ]
|
544
|
-
#
|
545
|
-
# _Cookie values will be encoded automatically._
|
546
|
-
#
|
547
|
-
# @option opts [Integer] :http_req_limit (20)
|
548
|
-
# HTTP request concurrency limit.
|
549
|
-
# @option opts [String] :user_agent ('Arachni/v<version>')
|
550
|
-
# User agent to use.
|
551
|
-
# @option opts [String] :authed_by (nil)
|
552
|
-
# The e-mail address of the person who authorized the scan.
|
553
|
-
#
|
554
|
-
# john.doe@bigscanners.com
|
555
|
-
#
|
556
|
-
# @option opts [Array<Hash>] :slaves
|
557
|
-
# Info of Instances to {Framework::Master#enslave enslave}.
|
558
|
-
#
|
559
|
-
# [
|
560
|
-
# { url: 'address:port', token: 's3cr3t' },
|
561
|
-
# { url: 'anotheraddress:port', token: '3v3nm0r3s3cr3t' }
|
562
|
-
# ]
|
563
499
|
#
|
564
500
|
# @option opts [Bool] :grid (false)
|
565
|
-
#
|
566
|
-
# scan.
|
501
|
+
# Use the Dispatcher Grid to load-balance scans across the available nodes.
|
567
502
|
#
|
568
503
|
# If set to `true`, it serves as a shorthand for:
|
569
504
|
#
|
@@ -575,22 +510,20 @@ class Instance
|
|
575
510
|
# * `nil` -- No grid.
|
576
511
|
# * `:balance` -- Slave Instances will be provided by the least burdened
|
577
512
|
# grid members to keep the overall Grid workload even across all Dispatchers.
|
578
|
-
# * `:aggregate` --
|
579
|
-
#
|
513
|
+
# * `:aggregate` -- Used to perform a multi-Instance scan and will only
|
514
|
+
# request Instances from Grid members with different Pipe-IDs, resulting
|
515
|
+
# in application-level bandwidth aggregation.
|
580
516
|
# @option opts [Integer] :spawns (0)
|
581
517
|
# The amount of slaves to spawn. The behavior of this option changes
|
582
518
|
# depending on the `grid_mode` setting:
|
583
519
|
#
|
584
520
|
# * `nil` -- All slave Instances will be spawned by this Instance directly,
|
585
|
-
# and thus reside in the same machine.
|
586
|
-
# using UNIX-domain sockets for inter-process communication and avoiding
|
587
|
-
# the overhead of TCP/IP.
|
521
|
+
# and thus reside in the same machine.
|
588
522
|
# * `:balance` -- Slaves will be provided by the least burdened Grid Dispatchers.
|
589
523
|
# * `:aggregate` -- Slaves will be provided by Grid Dispatchers with unique
|
590
524
|
# Pipe-IDs and the value of this option will be treated as a possible
|
591
525
|
# maximum rather than a hard setting. Actual spawn count will be determined
|
592
|
-
# by Dispatcher availability
|
593
|
-
#
|
526
|
+
# by Dispatcher availability at the time.
|
594
527
|
def scan( opts = {}, &block )
|
595
528
|
# If the instance isn't clean bail out now.
|
596
529
|
if busy? || @called
|
@@ -598,32 +531,35 @@ class Instance
|
|
598
531
|
return false
|
599
532
|
end
|
600
533
|
|
601
|
-
# Normalize this sucker to have symbols as keys
|
534
|
+
# Normalize this sucker to have symbols as keys.
|
602
535
|
opts = opts.symbolize_keys( false )
|
603
536
|
|
604
|
-
slaves = opts
|
605
|
-
spawn_count = opts[:spawns]
|
537
|
+
slaves = opts.delete(:slaves) || []
|
538
|
+
spawn_count = opts[:spawns]
|
539
|
+
spawn_count = spawn_count.to_i
|
606
540
|
|
607
|
-
if opts
|
541
|
+
if (platforms = opts.delete(:platforms))
|
608
542
|
begin
|
609
|
-
Platform::Manager.new( [
|
543
|
+
Platform::Manager.new( [platforms].flatten.compact )
|
610
544
|
rescue => e
|
611
545
|
fail ArgumentError, e.to_s
|
612
546
|
end
|
613
547
|
end
|
614
548
|
|
615
|
-
|
616
|
-
|
617
|
-
end
|
549
|
+
opts[:dispatcher] ||= {}
|
550
|
+
opts[:scope] ||= {}
|
618
551
|
|
619
|
-
if
|
620
|
-
|
621
|
-
|
622
|
-
|
552
|
+
if opts[:grid] || opts[:grid_mode]
|
553
|
+
if spawn_count <= 0
|
554
|
+
fail ArgumentError,
|
555
|
+
'Option \'spawns\' must be greater than 1 for Grid scans.'
|
556
|
+
end
|
623
557
|
|
624
|
-
|
625
|
-
|
626
|
-
|
558
|
+
if [opts[:scope]['restrict_paths']].flatten.compact.any?
|
559
|
+
fail ArgumentError,
|
560
|
+
'Scope option \'restrict_paths\' is not supported when in' <<
|
561
|
+
' multi-Instance mode.'
|
562
|
+
end
|
627
563
|
end
|
628
564
|
|
629
565
|
# There may be follow-up/retry calls by the client in cases of network
|
@@ -636,43 +572,36 @@ class Instance
|
|
636
572
|
opts[:plugins] = opts[:plugins].inject( {} ) { |h, n| h[n] = {}; h }
|
637
573
|
end
|
638
574
|
|
639
|
-
|
575
|
+
if opts.include?( :grid )
|
576
|
+
@framework.options.dispatcher.grid = opts.delete(:grid)
|
577
|
+
end
|
640
578
|
|
641
|
-
if
|
642
|
-
|
579
|
+
if opts.include?( :grid_mode )
|
580
|
+
@framework.options.dispatcher.grid_mode = opts.delete(:grid_mode)
|
643
581
|
end
|
644
582
|
|
645
|
-
|
646
|
-
# for multi-Instance scans.
|
647
|
-
if opts[:multi]
|
648
|
-
@framework.update_page_queue( opts[:multi][:pages] || [] )
|
649
|
-
@framework.restrict_to_elements( opts[:multi][:elements] || [] )
|
583
|
+
@active_options.set( opts )
|
650
584
|
|
651
|
-
|
652
|
-
|
653
|
-
end
|
585
|
+
if @framework.options.url.to_s.empty?
|
586
|
+
fail ArgumentError, 'Option \'url\' is mandatory.'
|
654
587
|
end
|
655
588
|
|
656
|
-
opts[:
|
657
|
-
@framework.modules.load opts[:modules] if opts[:modules]
|
589
|
+
@framework.checks.load opts[:checks] if opts[:checks]
|
658
590
|
@framework.plugins.load opts[:plugins] if opts[:plugins]
|
659
591
|
|
660
592
|
# Starts the scan after all necessary options have been set.
|
661
593
|
after = proc { block.call @framework.run; @scan_initializing = false }
|
662
594
|
|
663
|
-
if @framework.
|
664
|
-
# If a Grid scan has been selected then just set us as the master
|
665
|
-
#
|
666
|
-
#
|
667
|
-
# The Framework will sort out the rest...
|
595
|
+
if @framework.options.dispatcher.grid?
|
596
|
+
# If a Grid scan has been selected then just set us as the master,
|
597
|
+
# the Framework will sort out the rest.
|
668
598
|
@framework.set_as_master
|
669
|
-
@framework.opts.max_slaves = spawn_count
|
670
599
|
|
671
600
|
# Rock n' roll!
|
672
601
|
after.call
|
673
602
|
else
|
674
603
|
# Handles each spawn, enslaving it for a multi-Instance scan.
|
675
|
-
each
|
604
|
+
each = proc do |slave, iter|
|
676
605
|
@framework.enslave( slave ){ iter.next }
|
677
606
|
end
|
678
607
|
|
@@ -681,7 +610,7 @@ class Instance
|
|
681
610
|
slaves |= spawns
|
682
611
|
|
683
612
|
# Process the Instances.
|
684
|
-
|
613
|
+
Reactor.global.create_iterator( slaves, slaves.empty? ? 1 : slaves.size ).
|
685
614
|
each( each, after )
|
686
615
|
end
|
687
616
|
end
|
@@ -691,19 +620,34 @@ class Instance
|
|
691
620
|
|
692
621
|
# Makes the server go bye-bye...Lights out!
|
693
622
|
def shutdown( &block )
|
623
|
+
if @shutdown
|
624
|
+
block.call if block_given?
|
625
|
+
return
|
626
|
+
end
|
627
|
+
@shutdown = true
|
628
|
+
|
694
629
|
print_status 'Shutting down...'
|
695
630
|
|
696
|
-
|
631
|
+
# We're shutting down services so we need to use a concurrent way but
|
632
|
+
# without going through the Reactor.
|
633
|
+
Thread.new do
|
697
634
|
t = []
|
635
|
+
|
636
|
+
if browser_cluster
|
637
|
+
# We can't block until the browser cluster shuts down cleanly
|
638
|
+
# (i.e. wait for any running jobs) but we don't need to anyways.
|
639
|
+
t << Thread.new { browser_cluster.shutdown false }
|
640
|
+
end
|
641
|
+
|
698
642
|
@framework.instance_eval do
|
699
643
|
next if !has_slaves?
|
700
|
-
|
701
|
-
|
644
|
+
|
645
|
+
@slaves.each do |instance|
|
702
646
|
t << Thread.new { connect_to_instance( instance ).service.shutdown }
|
703
647
|
end
|
704
648
|
end
|
705
|
-
t.join
|
706
649
|
|
650
|
+
t.each(&:join)
|
707
651
|
@server.shutdown
|
708
652
|
|
709
653
|
block.call true if block_given?
|
@@ -712,25 +656,89 @@ class Instance
|
|
712
656
|
true
|
713
657
|
end
|
714
658
|
|
715
|
-
# @param (see Arachni::RPC::Server::Framework#auditstore)
|
716
|
-
# @return (see Arachni::RPC::Server::Framework#auditstore)
|
717
|
-
#
|
718
|
-
# @deprecated
|
719
|
-
def output( &block )
|
720
|
-
@framework.output( &block )
|
721
|
-
end
|
722
|
-
|
723
659
|
# @private
|
724
660
|
def error_test( str, &block )
|
725
661
|
@framework.error_test( str, &block )
|
726
662
|
end
|
727
663
|
|
728
|
-
|
729
|
-
|
664
|
+
# @private
|
665
|
+
def consumed_pids( &block )
|
666
|
+
pids = ([Process.pid] | @consumed_pids)
|
667
|
+
pids |= browser_cluster.consumed_pids if browser_cluster
|
668
|
+
|
669
|
+
if @consumed_pids.empty?
|
670
|
+
return block.call pids
|
671
|
+
end
|
672
|
+
|
673
|
+
foreach = proc do |instance, iter|
|
674
|
+
instance.service.consumed_pids do |slave_pids|
|
675
|
+
iter.return( !slave_pids.rpc_exception? ? slave_pids : [] )
|
676
|
+
end
|
677
|
+
end
|
678
|
+
after = proc do |results|
|
679
|
+
block.call pids | results.flatten
|
680
|
+
end
|
681
|
+
|
682
|
+
@framework.map_slaves( foreach, after )
|
683
|
+
|
684
|
+
true
|
685
|
+
end
|
686
|
+
|
687
|
+
# For testing.
|
688
|
+
# @private
|
689
|
+
def cookies
|
690
|
+
Arachni::HTTP::Client.cookies.map(&:to_rpc_data)
|
691
|
+
end
|
692
|
+
|
693
|
+
# For testing.
|
694
|
+
# @private
|
695
|
+
def clear_cookies
|
696
|
+
Arachni::Options.reset
|
697
|
+
Arachni::HTTP::Client.cookie_jar.clear
|
698
|
+
true
|
730
699
|
end
|
731
700
|
|
732
701
|
private
|
733
702
|
|
703
|
+
def browser_cluster
|
704
|
+
@framework.instance_eval { @browser_cluster }
|
705
|
+
end
|
706
|
+
|
707
|
+
def progress_handler( options = {}, &block )
|
708
|
+
with = parse_progress_opts( options, :with )
|
709
|
+
without = parse_progress_opts( options, :without )
|
710
|
+
|
711
|
+
options = {
|
712
|
+
as_hash: options[:as_hash],
|
713
|
+
issues: with.include?( :issues ),
|
714
|
+
statistics: !without.include?( :statistics ),
|
715
|
+
slaves: with.include?( :instances )
|
716
|
+
}
|
717
|
+
|
718
|
+
if with[:errors]
|
719
|
+
options[:errors] = with[:errors]
|
720
|
+
end
|
721
|
+
|
722
|
+
if with[:sitemap]
|
723
|
+
options[:sitemap] = with[:sitemap]
|
724
|
+
end
|
725
|
+
|
726
|
+
@framework.progress( options ) do |data|
|
727
|
+
data[:instances] ||= [] if with.include?( :instances )
|
728
|
+
data[:busy] = busy?
|
729
|
+
|
730
|
+
if data[:issues]
|
731
|
+
if without[:issues].is_a? Array
|
732
|
+
data[:issues].reject! do |i|
|
733
|
+
without[:issues].include?( i[:digest] || i['digest'] )
|
734
|
+
end
|
735
|
+
end
|
736
|
+
end
|
737
|
+
|
738
|
+
block.call( data )
|
739
|
+
end
|
740
|
+
end
|
741
|
+
|
734
742
|
def parse_progress_opts( options, key )
|
735
743
|
parsed = {}
|
736
744
|
[options.delete( key ) || options.delete( key.to_s )].compact.each do |w|
|
@@ -740,6 +748,7 @@ class Instance
|
|
740
748
|
case q
|
741
749
|
when String, Symbol
|
742
750
|
parsed[q.to_sym] = nil
|
751
|
+
|
743
752
|
when Hash
|
744
753
|
parsed.merge!( q.symbolize_keys )
|
745
754
|
end
|
@@ -756,52 +765,33 @@ class Instance
|
|
756
765
|
parsed
|
757
766
|
end
|
758
767
|
|
759
|
-
#
|
760
768
|
# Provides `num` Instances.
|
761
769
|
#
|
762
|
-
#
|
763
|
-
#
|
764
|
-
#
|
765
|
-
#
|
766
|
-
# @param [Integer] num Amount of Instances to return.
|
767
|
-
#
|
768
|
-
# @return [Array<Hash>] Instance info (urls and tokens).
|
769
|
-
#
|
770
|
+
# @param [Integer] num
|
771
|
+
# Amount of Instances to return.
|
772
|
+
# @return [Array<Hash>]
|
773
|
+
# Instance info (urls and tokens).
|
770
774
|
def spawn( num, &block )
|
771
775
|
if num <= 0
|
772
776
|
block.call []
|
773
777
|
return
|
774
778
|
end
|
775
779
|
|
776
|
-
q =
|
777
|
-
|
778
|
-
# Before spawning slaves, expose our API over a UNIX socket via
|
779
|
-
# which they should talk to us.
|
780
|
-
expose_over_unix_socket do
|
781
|
-
num.times do
|
782
|
-
token = generate_token
|
780
|
+
q = Reactor.global.create_queue
|
783
781
|
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
# All Instances will be on the same host so use UNIX
|
789
|
-
# domain sockets to avoid TCP/IP overhead.
|
790
|
-
Options.rpc_address = nil
|
791
|
-
Options.rpc_external_address = nil
|
792
|
-
Options.rpc_port = nil
|
793
|
-
Options.rpc_socket = "/tmp/arachni-instance-slave-#{Process.pid}"
|
794
|
-
|
795
|
-
Server::Instance.new( Options.instance, token )
|
796
|
-
}
|
782
|
+
num.times do
|
783
|
+
instance_info = { token: generate_token }
|
784
|
+
options = instance_info.dup
|
797
785
|
|
798
|
-
|
799
|
-
|
786
|
+
options[:port] = Utilities.available_port
|
787
|
+
instance_info[:url] = "#{Options.rpc.server_address}:#{options[:port]}"
|
800
788
|
|
801
|
-
|
802
|
-
|
789
|
+
pid = Processes::Manager.spawn( :instance, options )
|
790
|
+
Process.detach pid
|
791
|
+
@consumed_pids << pid
|
803
792
|
|
804
|
-
|
793
|
+
Client::Instance.when_ready( instance_info[:url], instance_info[:token] ) do
|
794
|
+
q << instance_info
|
805
795
|
end
|
806
796
|
end
|
807
797
|
|
@@ -814,70 +804,30 @@ class Instance
|
|
814
804
|
end
|
815
805
|
end
|
816
806
|
|
817
|
-
def wait_till_alive( socket, &block )
|
818
|
-
::EM.defer do
|
819
|
-
# We're using UNIX sockets as URLs so wait till the Instance
|
820
|
-
# has created its socket before proceeding.
|
821
|
-
sleep 0.1 while !File.exist?( socket )
|
822
|
-
block.call true
|
823
|
-
end
|
824
|
-
end
|
825
|
-
|
826
807
|
# Starts RPC service.
|
827
808
|
def run
|
828
809
|
print_status 'Starting the server...'
|
829
|
-
@server.
|
810
|
+
@server.start
|
830
811
|
end
|
831
812
|
|
832
813
|
def dispatcher
|
833
814
|
@dispatcher ||=
|
834
|
-
Client::Dispatcher.new( @
|
815
|
+
Client::Dispatcher.new( @options, @options.datastore[:dispatcher_url] )
|
835
816
|
end
|
836
817
|
|
837
818
|
def has_dispatcher?
|
838
|
-
!!@
|
819
|
+
!!@options.datastore[:dispatcher_url]
|
839
820
|
end
|
840
821
|
|
841
|
-
#
|
842
822
|
# Outputs the Arachni banner.
|
843
823
|
#
|
844
|
-
# Displays version number,
|
845
|
-
#
|
824
|
+
# Displays version number, author details etc.
|
846
825
|
def banner
|
847
826
|
puts BANNER
|
848
827
|
puts
|
849
828
|
puts
|
850
829
|
end
|
851
830
|
|
852
|
-
# Exposes self over an UNIX socket.
|
853
|
-
#
|
854
|
-
# @param [Block] block
|
855
|
-
# Block to call once the operation has completed.
|
856
|
-
def expose_over_unix_socket( &block )
|
857
|
-
# If it's already exposed over a UNIX socket then there's nothing to
|
858
|
-
# be done.
|
859
|
-
if Options.rpc_socket
|
860
|
-
block.call true
|
861
|
-
return
|
862
|
-
end
|
863
|
-
|
864
|
-
Options.rpc_socket = "/tmp/arachni-instance-master-#{Process.pid}"
|
865
|
-
|
866
|
-
::EM.defer do
|
867
|
-
unix = Base.new( @opts, @token )
|
868
|
-
set_handlers( unix )
|
869
|
-
|
870
|
-
::EM.defer do
|
871
|
-
unix.run
|
872
|
-
end
|
873
|
-
|
874
|
-
sleep 0.1 while !File.exist?( Options.rpc_socket )
|
875
|
-
block.call true
|
876
|
-
end
|
877
|
-
|
878
|
-
true
|
879
|
-
end
|
880
|
-
|
881
831
|
# @param [Base] server
|
882
832
|
# Prepares all the RPC handlers for the given `server`.
|
883
833
|
def set_handlers( server )
|
@@ -888,9 +838,8 @@ class Instance
|
|
888
838
|
|
889
839
|
server.add_handler( 'service', self )
|
890
840
|
server.add_handler( 'framework', @framework )
|
891
|
-
server.add_handler( '
|
892
|
-
server.add_handler( '
|
893
|
-
server.add_handler( 'modules', @framework.modules )
|
841
|
+
server.add_handler( 'options', @active_options )
|
842
|
+
server.add_handler( 'checks', @framework.checks )
|
894
843
|
server.add_handler( 'plugins', @framework.plugins )
|
895
844
|
end
|
896
845
|
|