arachni 1.2.1 → 1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +66 -0
- data/Gemfile +1 -1
- data/README.md +16 -5
- data/components/checks/active/ldap_injection/errors.txt +1 -0
- data/components/checks/active/source_code_disclosure.rb +1 -1
- data/components/checks/active/unvalidated_redirect.rb +6 -6
- data/components/checks/active/unvalidated_redirect_dom.rb +10 -7
- data/components/checks/passive/grep/captcha.rb +14 -5
- data/components/checks/passive/grep/form_upload.rb +7 -3
- data/components/checks/passive/grep/hsts.rb +3 -3
- data/components/checks/passive/grep/html_objects.rb +2 -3
- data/components/checks/passive/grep/http_only_cookies.rb +2 -3
- data/components/checks/passive/grep/insecure_cookies.rb +1 -1
- data/components/checks/passive/grep/password_autocomplete.rb +2 -2
- data/components/checks/passive/grep/unencrypted_password_forms.rb +7 -7
- data/components/checks/passive/grep/x_frame_options.rb +2 -2
- data/components/checks/passive/http_put.rb +2 -3
- data/components/path_extractors/comments.rb +3 -3
- data/components/path_extractors/scripts.rb +10 -1
- data/components/plugins/defaults/autothrottle.rb +27 -18
- data/components/plugins/defaults/meta/remedies/discovery.rb +30 -33
- data/components/plugins/defaults/meta/remedies/timing_attacks.rb +7 -11
- data/components/plugins/login_script.rb +9 -3
- data/components/plugins/proxy.rb +4 -3
- data/components/reporters/html.rb +11 -14
- data/components/reporters/html/default/issue.erb +13 -38
- data/components/reporters/html/default/issue/info.erb +1 -1
- data/components/reporters/html/default/summary/issues/by_name.erb +3 -3
- data/components/reporters/stdout.rb +62 -71
- data/components/reporters/xml.rb +26 -40
- data/components/reporters/xml/schema.xsd +43 -89
- data/lib/arachni/browser.rb +52 -3
- data/lib/arachni/browser/javascript.rb +3 -3
- data/lib/arachni/browser/javascript/scripts/taint_tracer.js +46 -25
- data/lib/arachni/browser_cluster.rb +61 -0
- data/lib/arachni/browser_cluster/job.rb +21 -1
- data/lib/arachni/browser_cluster/jobs/browser_provider.rb +3 -1
- data/lib/arachni/browser_cluster/jobs/resource_exploration.rb +2 -1
- data/lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger.rb +2 -1
- data/lib/arachni/browser_cluster/jobs/taint_trace.rb +3 -2
- data/lib/arachni/browser_cluster/jobs/taint_trace/event_trigger.rb +1 -1
- data/lib/arachni/browser_cluster/worker.rb +5 -0
- data/lib/arachni/check/auditor.rb +22 -12
- data/lib/arachni/data/framework.rb +13 -1
- data/lib/arachni/data/issues.rb +9 -25
- data/lib/arachni/element/base.rb +9 -3
- data/lib/arachni/element/capabilities/analyzable.rb +2 -6
- data/lib/arachni/element/capabilities/analyzable/differential.rb +24 -7
- data/lib/arachni/element/capabilities/analyzable/{taint.rb → signature.rb} +23 -23
- data/lib/arachni/element/capabilities/auditable.rb +0 -6
- data/lib/arachni/element/capabilities/dom_only.rb +61 -0
- data/lib/arachni/element/capabilities/with_dom.rb +3 -1
- data/lib/arachni/element/cookie.rb +35 -5
- data/lib/arachni/element/cookie/dom.rb +13 -4
- data/lib/arachni/element/{capabilities/auditable/dom.rb → dom.rb} +20 -68
- data/lib/arachni/element/dom/capabilities/auditable.rb +29 -0
- data/lib/arachni/element/dom/capabilities/inputtable.rb +27 -0
- data/lib/arachni/element/dom/capabilities/mutable.rb +21 -0
- data/lib/arachni/element/dom/capabilities/submittable.rb +52 -0
- data/lib/arachni/element/form.rb +12 -1
- data/lib/arachni/element/form/capabilities/mutable.rb +2 -1
- data/lib/arachni/element/form/capabilities/with_dom.rb +0 -1
- data/lib/arachni/element/form/dom.rb +9 -3
- data/lib/arachni/element/header.rb +14 -33
- data/lib/arachni/element/header/capabilities/inputtable.rb +29 -0
- data/lib/arachni/element/header/capabilities/mutable.rb +51 -0
- data/lib/arachni/element/input/dom.rb +71 -0
- data/lib/arachni/element/json.rb +2 -0
- data/lib/arachni/element/link.rb +3 -0
- data/lib/arachni/element/link/capabilities/with_dom.rb +0 -1
- data/lib/arachni/element/link/dom.rb +16 -3
- data/lib/arachni/element/link/dom/capabilities/submittable.rb +29 -0
- data/lib/arachni/element/link_template.rb +3 -5
- data/lib/arachni/element/link_template/capabilities/inputtable.rb +5 -0
- data/lib/arachni/element/link_template/capabilities/with_dom.rb +0 -1
- data/lib/arachni/element/link_template/dom.rb +16 -3
- data/lib/arachni/element/link_template/dom/capabilities/submittable.rb +29 -0
- data/lib/arachni/element/server.rb +3 -5
- data/lib/arachni/element/ui_form.rb +106 -0
- data/lib/arachni/element/ui_form/dom.rb +107 -0
- data/lib/arachni/element/ui_input.rb +62 -0
- data/lib/arachni/element/xml.rb +2 -1
- data/lib/arachni/framework.rb +7 -5
- data/lib/arachni/framework/parts/audit.rb +0 -1
- data/lib/arachni/framework/parts/check.rb +1 -0
- data/lib/arachni/framework/parts/data.rb +4 -0
- data/lib/arachni/framework/parts/state.rb +0 -2
- data/lib/arachni/http/client.rb +17 -6
- data/lib/arachni/http/proxy_server.rb +52 -5
- data/lib/arachni/http/request.rb +1 -1
- data/lib/arachni/issue.rb +34 -179
- data/lib/arachni/issue/severity.rb +2 -0
- data/lib/arachni/option_groups/audit.rb +22 -2
- data/lib/arachni/option_groups/browser_cluster.rb +15 -0
- data/lib/arachni/page.rb +3 -2
- data/lib/arachni/parser.rb +24 -5
- data/lib/arachni/platform/manager.rb +1 -2
- data/lib/arachni/rpc/server/framework.rb +3 -4
- data/lib/arachni/rpc/server/framework/multi_instance.rb +2 -1
- data/lib/arachni/session.rb +1 -1
- data/lib/arachni/trainer.rb +4 -7
- data/lib/arachni/watir/element.rb +12 -1
- data/lib/version +1 -1
- data/spec/arachni/browser/element_locator_spec.rb +43 -43
- data/spec/arachni/browser/javascript/dom_monitor_spec.rb +44 -44
- data/spec/arachni/browser/javascript/proxy/stub_spec.rb +17 -14
- data/spec/arachni/browser/javascript/proxy_spec.rb +24 -24
- data/spec/arachni/browser/javascript/taint_tracer/frame/called_function_spec.rb +11 -11
- data/spec/arachni/browser/javascript/taint_tracer/frame_spec.rb +7 -7
- data/spec/arachni/browser/javascript/taint_tracer/sink/data_flow_spec.rb +13 -13
- data/spec/arachni/browser/javascript/taint_tracer/sink/execution_flow_spec.rb +7 -7
- data/spec/arachni/browser/javascript/taint_tracer_spec.rb +568 -558
- data/spec/arachni/browser/javascript_spec.rb +73 -63
- data/spec/arachni/browser_cluster/job/result_spec.rb +3 -3
- data/spec/arachni/browser_cluster/job_spec.rb +68 -48
- data/spec/arachni/browser_cluster/jobs/resource_exploration/event_trigger/result_spec.rb +2 -2
- data/spec/arachni/browser_cluster/jobs/resource_exploration/event_trigger_spec.rb +5 -4
- data/spec/arachni/browser_cluster/jobs/resource_exploration/result_spec.rb +2 -2
- data/spec/arachni/browser_cluster/jobs/resource_exploration_spec.rb +5 -5
- data/spec/arachni/browser_cluster/worker_spec.rb +87 -70
- data/spec/arachni/browser_cluster_spec.rb +64 -39
- data/spec/arachni/browser_spec.rb +692 -527
- data/spec/arachni/check/auditor_spec.rb +177 -147
- data/spec/arachni/check/base_spec.rb +33 -33
- data/spec/arachni/check/manager_spec.rb +15 -15
- data/spec/arachni/component/base_spec.rb +8 -8
- data/spec/arachni/component/manager_spec.rb +100 -99
- data/spec/arachni/component/options/address_spec.rb +3 -3
- data/spec/arachni/component/options/base_spec.rb +7 -7
- data/spec/arachni/component/options/bool_spec.rb +9 -9
- data/spec/arachni/component/options/float_spec.rb +6 -6
- data/spec/arachni/component/options/int_spec.rb +5 -5
- data/spec/arachni/component/options/multiple_choice_spec.rb +12 -12
- data/spec/arachni/component/options/object_spec.rb +2 -2
- data/spec/arachni/component/options/path_spec.rb +3 -3
- data/spec/arachni/component/options/port_spec.rb +5 -5
- data/spec/arachni/component/options/string_spec.rb +3 -3
- data/spec/arachni/component/options/url_spec.rb +4 -4
- data/spec/arachni/component/utilities_spec.rb +2 -2
- data/spec/arachni/data/framework/rpc_spec.rb +10 -9
- data/spec/arachni/data/framework_spec.rb +65 -46
- data/spec/arachni/data/issues_spec.rb +39 -77
- data/spec/arachni/data/plugins_spec.rb +11 -11
- data/spec/arachni/data/session_spec.rb +6 -6
- data/spec/arachni/data_spec.rb +8 -8
- data/spec/arachni/element/body_spec.rb +10 -10
- data/spec/arachni/element/capabilities/analyzable/differential_spec.rb +39 -21
- data/spec/arachni/element/capabilities/analyzable/{taint_spec.rb → signature_spec.rb} +63 -63
- data/spec/arachni/element/capabilities/analyzable/timeout_spec.rb +51 -51
- data/spec/arachni/element/capabilities/with_scope/scope_spec.rb +5 -5
- data/spec/arachni/element/cookie/dom_spec.rb +37 -18
- data/spec/arachni/element/cookie_spec.rb +206 -139
- data/spec/arachni/element/form/dom_spec.rb +36 -19
- data/spec/arachni/element/form_spec.rb +210 -187
- data/spec/arachni/element/generic_dom_spec.rb +14 -14
- data/spec/arachni/element/header_spec.rb +35 -17
- data/spec/arachni/element/json_spec.rb +53 -31
- data/spec/arachni/element/link/dom_spec.rb +46 -28
- data/spec/arachni/element/link_spec.rb +58 -40
- data/spec/arachni/element/link_template/dom_spec.rb +47 -29
- data/spec/arachni/element/link_template_spec.rb +79 -61
- data/spec/arachni/element/path_spec.rb +1 -1
- data/spec/arachni/element/server_spec.rb +33 -32
- data/spec/arachni/element/ui_form/ui_form_dom_spec.rb +164 -0
- data/spec/arachni/element/ui_form_spec.rb +242 -0
- data/spec/arachni/element/ui_input/dom_spec.rb +157 -0
- data/spec/arachni/element/ui_input_spec.rb +136 -0
- data/spec/arachni/element/xml_spec.rb +42 -24
- data/spec/arachni/element_filter_spec.rb +49 -48
- data/spec/arachni/error_spec.rb +3 -3
- data/spec/arachni/framework/parts/audit_spec.rb +64 -63
- data/spec/arachni/framework/parts/browser_spec.rb +16 -16
- data/spec/arachni/framework/parts/check_spec.rb +3 -3
- data/spec/arachni/framework/parts/data_spec.rb +48 -48
- data/spec/arachni/framework/parts/platform_spec.rb +3 -3
- data/spec/arachni/framework/parts/plugin_spec.rb +7 -6
- data/spec/arachni/framework/parts/report_spec.rb +7 -7
- data/spec/arachni/framework/parts/scope_spec.rb +16 -16
- data/spec/arachni/framework/parts/state_spec.rb +68 -69
- data/spec/arachni/framework_spec.rb +39 -31
- data/spec/arachni/http/client/dynamic_404_handlers_spec.rb +32 -32
- data/spec/arachni/http/client_spec.rb +219 -208
- data/spec/arachni/http/cookie_jar_spec.rb +72 -72
- data/spec/arachni/http/headers_spec.rb +14 -14
- data/spec/arachni/http/proxy_server_spec.rb +43 -42
- data/spec/arachni/http/request_spec.rb +105 -103
- data/spec/arachni/http/response/scope_spec.rb +24 -24
- data/spec/arachni/http/response_spec.rb +50 -49
- data/spec/arachni/issue/severity_spec.rb +10 -9
- data/spec/arachni/issue_spec.rb +71 -369
- data/spec/arachni/option_groups/audit_spec.rb +114 -114
- data/spec/arachni/option_groups/browser_cluster_spec.rb +20 -3
- data/spec/arachni/option_groups/datastore_spec.rb +6 -6
- data/spec/arachni/option_groups/dispatcher_spec.rb +19 -19
- data/spec/arachni/option_groups/http_spec.rb +11 -11
- data/spec/arachni/option_groups/input_spec.rb +31 -27
- data/spec/arachni/option_groups/output_spec.rb +2 -2
- data/spec/arachni/option_groups/paths_spec.rb +17 -17
- data/spec/arachni/option_groups/rpc_spec.rb +2 -2
- data/spec/arachni/option_groups/scope_spec.rb +40 -40
- data/spec/arachni/option_groups/session_spec.rb +6 -5
- data/spec/arachni/option_groups/snapshot_spec.rb +4 -4
- data/spec/arachni/options_spec.rb +46 -45
- data/spec/arachni/page/dom/transition_spec.rb +74 -72
- data/spec/arachni/page/dom_spec.rb +35 -35
- data/spec/arachni/page/scope_spec.rb +15 -15
- data/spec/arachni/page_spec.rb +217 -217
- data/spec/arachni/parser_spec.rb +106 -104
- data/spec/arachni/platform/fingerprinter_spec.rb +17 -14
- data/spec/arachni/platform/list_spec.rb +33 -33
- data/spec/arachni/platform/manager_spec.rb +67 -64
- data/spec/arachni/plugin/base_spec.rb +10 -10
- data/spec/arachni/plugin/manager_spec.rb +38 -37
- data/spec/arachni/report_spec.rb +43 -40
- data/spec/arachni/reporter/base_spec.rb +15 -15
- data/spec/arachni/reporter/manager_spec.rb +4 -4
- data/spec/arachni/reporter/options_spec.rb +6 -6
- data/spec/arachni/rpc/client/base_spec.rb +6 -6
- data/spec/arachni/rpc/client/dispatcher_spec.rb +2 -2
- data/spec/arachni/rpc/client/instance_spec.rb +6 -6
- data/spec/arachni/rpc/server/active_options_spec.rb +11 -8
- data/spec/arachni/rpc/server/base_spec.rb +5 -5
- data/spec/arachni/rpc/server/checks/manager_spec.rb +8 -8
- data/spec/arachni/rpc/server/dispatcher/node_spec.rb +37 -37
- data/spec/arachni/rpc/server/dispatcher/service_spec.rb +15 -14
- data/spec/arachni/rpc/server/dispatcher_spec.rb +36 -35
- data/spec/arachni/rpc/server/framework/distributor_spec.rb +36 -36
- data/spec/arachni/rpc/server/framework_multi_spec.rb +340 -336
- data/spec/arachni/rpc/server/framework_spec.rb +90 -85
- data/spec/arachni/rpc/server/instance_spec.rb +126 -107
- data/spec/arachni/rpc/server/output_spec.rb +1 -1
- data/spec/arachni/rpc/server/plugin/manager_spec.rb +6 -6
- data/spec/arachni/ruby/array_spec.rb +42 -42
- data/spec/arachni/ruby/hash_spec.rb +20 -18
- data/spec/arachni/ruby/io_spec.rb +2 -2
- data/spec/arachni/ruby/object_spec.rb +1 -1
- data/spec/arachni/ruby/set_spec.rb +3 -3
- data/spec/arachni/ruby/string_spec.rb +30 -30
- data/spec/arachni/ruby/webrick_spec.rb +2 -2
- data/spec/arachni/scope_spec.rb +1 -1
- data/spec/arachni/session_spec.rb +67 -64
- data/spec/arachni/snapshot_spec.rb +15 -15
- data/spec/arachni/state/audit_spec.rb +11 -11
- data/spec/arachni/state/element_filter_spec.rb +6 -6
- data/spec/arachni/state/framework/rpc_spec.rb +12 -12
- data/spec/arachni/state/framework_spec.rb +125 -121
- data/spec/arachni/state/http_spec.rb +7 -7
- data/spec/arachni/state/options_spec.rb +7 -7
- data/spec/arachni/state/plugins_spec.rb +8 -8
- data/spec/arachni/state_spec.rb +10 -10
- data/spec/arachni/support/buffer/autoflush_spec.rb +16 -16
- data/spec/arachni/support/buffer/base_spec.rb +39 -39
- data/spec/arachni/support/cache/least_cost_replacement_spec.rb +18 -18
- data/spec/arachni/support/cache/least_recently_pushed_spec.rb +24 -24
- data/spec/arachni/support/cache/least_recently_used_spec.rb +20 -20
- data/spec/arachni/support/cache/preference_spec.rb +4 -4
- data/spec/arachni/support/cache/random_replacement_spec.rb +8 -8
- data/spec/arachni/support/crypto/rsa_aes_cbc_spec.rb +1 -1
- data/spec/arachni/support/database/hash_spec.rb +44 -43
- data/spec/arachni/support/database/queue_spec.rb +27 -27
- data/spec/arachni/support/lookup/hash_set_spec.rb +8 -8
- data/spec/arachni/support/lookup/moolb_spec.rb +3 -3
- data/spec/arachni/support/mixins/observable_spec.rb +6 -6
- data/spec/arachni/support/signature_spec.rb +19 -19
- data/spec/arachni/trainer_spec.rb +39 -39
- data/spec/arachni/typhoeus/hydra_spec.rb +2 -2
- data/spec/arachni/uri/scope_spec.rb +66 -66
- data/spec/arachni/uri_spec.rb +107 -105
- data/spec/arachni/utilities_spec.rb +40 -40
- data/spec/components/checks/active/csrf_spec.rb +8 -8
- data/spec/components/checks/active/no_sql_injection_spec.rb +1 -1
- data/spec/components/checks/active/sql_injection_spec.rb +16 -16
- data/spec/components/checks/active/trainer_spec.rb +4 -4
- data/spec/components/checks/active/unvalidated_redirect_dom_spec.rb +4 -2
- data/spec/components/checks/active/xpath_injection_spec.rb +1 -1
- data/spec/components/checks/active/xss_dom_script_context_spec.rb +51 -21
- data/spec/components/checks/active/xss_dom_spec.rb +46 -24
- data/spec/components/checks/passive/allowed_methods_spec.rb +1 -1
- data/spec/components/checks/passive/grep/cookie_set_for_parent_domain_spec.rb +1 -1
- data/spec/components/checks/passive/grep/hsts_spec.rb +2 -2
- data/spec/components/checks/passive/grep/http_only_cookies_spec.rb +1 -1
- data/spec/components/checks/passive/grep/insecure_cookies_spec.rb +1 -1
- data/spec/components/checks/passive/grep/insecure_cors_policy_spec.rb +2 -2
- data/spec/components/checks/passive/grep/password_autocomplete_spec.rb +1 -1
- data/spec/components/checks/passive/grep/private_ip_spec.rb +3 -3
- data/spec/components/checks/passive/grep/unencrypted_password_forms_spec.rb +1 -1
- data/spec/components/checks/passive/grep/x_frame_options_spec.rb +2 -2
- data/spec/components/checks/passive/interesting_responses_spec.rb +2 -2
- data/spec/components/checks/passive/webdav_spec.rb +1 -1
- data/spec/components/checks/passive/xst_spec.rb +1 -1
- data/spec/components/fingerprinters/servers/apache_spec.rb +2 -2
- data/spec/components/path_extractors/comments_spec.rb +5 -1
- data/spec/components/path_extractors/scripts_spec.rb +5 -2
- data/spec/components/plugins/autologin_spec.rb +22 -22
- data/spec/components/plugins/autothrottle_spec.rb +6 -5
- data/spec/components/plugins/content_types_spec.rb +4 -4
- data/spec/components/plugins/cookie_collector_spec.rb +5 -5
- data/spec/components/plugins/exec_spec.rb +12 -12
- data/spec/components/plugins/form_dicattack_spec.rb +3 -3
- data/spec/components/plugins/headers_collector_spec.rb +8 -8
- data/spec/components/plugins/healthmap_spec.rb +3 -3
- data/spec/components/plugins/http_dicattack_spec.rb +3 -3
- data/spec/components/plugins/login_script_spec.rb +79 -22
- data/spec/components/plugins/meta/remedies/discovery_spec.rb +3 -2
- data/spec/components/plugins/meta/remedies/timing_attacks_spec.rb +3 -3
- data/spec/components/plugins/meta/uniformity_spec.rb +2 -2
- data/spec/components/plugins/restrict_to_dom_state_spec.rb +1 -1
- data/spec/components/plugins/script_spec.rb +1 -1
- data/spec/components/plugins/uncommon_headers_spec.rb +2 -2
- data/spec/components/plugins/vector_collector_spec.rb +2 -2
- data/spec/components/plugins/vector_feed_spec.rb +40 -40
- data/spec/components/plugins/waf_detector_spec.rb +6 -6
- data/spec/components/reporters/json_spec.rb +4 -4
- data/spec/components/reporters/marshal_spec.rb +2 -2
- data/spec/components/reporters/yaml_spec.rb +3 -2
- data/spec/external/wavsep/active/sqli_spec.rb +1 -3
- data/spec/spec_helper.rb +4 -0
- data/spec/support/factories/element/ui_form.rb +14 -0
- data/spec/support/factories/element/ui_input.rb +13 -0
- data/spec/support/factories/issue.rb +0 -13
- data/spec/support/fixtures/report.afr +0 -0
- data/spec/support/fixtures/{taint_check/taint.rb → signature_check/signature.rb} +2 -2
- data/spec/support/helpers/browser_cluster/jobs/taint_tracer.rb +11 -11
- data/spec/support/helpers/framework.rb +1 -1
- data/spec/support/helpers/pages.rb +2 -2
- data/spec/support/servers/arachni/browser.rb +139 -0
- data/spec/support/servers/arachni/browser/javascript/taint_tracer.rb +40 -0
- data/spec/support/servers/arachni/element/capabilities/analyzable/{taint.rb → signature.rb} +0 -0
- data/spec/support/servers/arachni/element/input/input_dom.rb +102 -0
- data/spec/support/servers/arachni/element/ui_form/ui_form_dom.rb +238 -0
- data/spec/support/servers/checks/active/trainer_check.rb +7 -7
- data/spec/support/servers/checks/active/unvalidated_redirect_dom.rb +22 -6
- data/spec/support/servers/checks/active/xss_dom.rb +50 -0
- data/spec/support/servers/checks/active/xss_dom_script_context.rb +53 -0
- data/spec/support/shared/browser/javascript/taint_tracer/sink/base.rb +6 -6
- data/spec/support/shared/check.rb +10 -12
- data/spec/support/shared/component/options/base.rb +24 -24
- data/spec/support/shared/element/base.rb +25 -25
- data/spec/support/shared/element/capabilities/auditable.rb +116 -140
- data/spec/support/shared/element/capabilities/dom_only.rb +65 -0
- data/spec/support/shared/element/capabilities/inputtable.rb +71 -86
- data/spec/support/shared/element/capabilities/mutable.rb +122 -111
- data/spec/support/shared/element/capabilities/refreshable.rb +10 -10
- data/spec/support/shared/element/capabilities/{submitable.rb → submittable.rb} +26 -26
- data/spec/support/shared/element/capabilities/with_auditor.rb +10 -10
- data/spec/support/shared/element/capabilities/with_dom.rb +8 -8
- data/spec/support/shared/element/capabilities/with_node.rb +4 -6
- data/spec/support/shared/element/capabilities/with_scope.rb +2 -2
- data/spec/support/shared/element/capabilities/with_source.rb +6 -8
- data/spec/support/shared/element/dom.rb +144 -0
- data/spec/support/shared/element/dom/auditable.rb +42 -0
- data/spec/support/shared/element/dom/inputtable.rb +5 -0
- data/spec/support/shared/element/dom/mutable.rb +3 -0
- data/spec/support/shared/element/dom/submittable.rb +119 -0
- data/spec/support/shared/external/wavsep.rb +3 -3
- data/spec/support/shared/fingerprinter.rb +2 -2
- data/spec/support/shared/framework.rb +1 -1
- data/spec/support/shared/http/message.rb +9 -9
- data/spec/support/shared/option_group.rb +17 -17
- data/spec/support/shared/path_extractor.rb +1 -1
- data/spec/support/shared/plugin.rb +2 -2
- data/spec/support/shared/support/cache.rb +57 -57
- data/spec/support/shared/support/lookup.rb +25 -25
- data/ui/cli/framework.rb +22 -11
- data/ui/cli/framework/option_parser.rb +15 -0
- data/ui/cli/option_parser.rb +8 -1
- data/ui/cli/output.rb +2 -1
- metadata +54 -20
- data/components/checks/active/xss_dom_inputs.rb +0 -236
- data/spec/components/checks/active/xss_dom_inputs_spec.rb +0 -30
- data/spec/support/servers/checks/active/xss_dom_inputs.rb +0 -59
- data/spec/support/shared/element/capabilities/auditable/dom.rb +0 -322
@@ -3,7 +3,7 @@
|
|
3
3
|
%>
|
4
4
|
|
5
5
|
<%= erb 'issue/remarks.erb', issue: issue %>
|
6
|
-
<%= erb 'issue/platform.erb', issue:
|
6
|
+
<%= erb 'issue/platform.erb', issue: issue %>
|
7
7
|
|
8
8
|
<% if (issue.vector.respond_to?(:seed) && issue.vector.seed) || issue.signature || issue.proof %>
|
9
9
|
<table class="table table-condensed table-fixed">
|
@@ -38,7 +38,7 @@
|
|
38
38
|
</th>
|
39
39
|
<% end %>
|
40
40
|
|
41
|
-
<% if group.first.
|
41
|
+
<% if group.first.request %>
|
42
42
|
<th>
|
43
43
|
HTTP method
|
44
44
|
</th>
|
@@ -69,9 +69,9 @@
|
|
69
69
|
</td>
|
70
70
|
<% end %>
|
71
71
|
|
72
|
-
<% if issue.
|
72
|
+
<% if issue.request %>
|
73
73
|
<td>
|
74
|
-
<code><%= issue.
|
74
|
+
<code><%= issue.request.method.to_s.upcase %></code>
|
75
75
|
</td>
|
76
76
|
<% end %>
|
77
77
|
|
@@ -10,7 +10,6 @@
|
|
10
10
|
# All UIs must have a default report.
|
11
11
|
#
|
12
12
|
# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
|
13
|
-
# @version 0.3.1
|
14
13
|
class Arachni::Reporters::Stdout < Arachni::Reporter::Base
|
15
14
|
|
16
15
|
def run
|
@@ -42,12 +41,14 @@ class Arachni::Reporters::Stdout < Arachni::Reporter::Base
|
|
42
41
|
print_info "User agent: #{report.options[:http][:user_agent]}"
|
43
42
|
print_line
|
44
43
|
print_status 'Audited elements: '
|
45
|
-
print_info '* Links'
|
46
|
-
print_info '* Forms'
|
47
|
-
print_info '* Cookies'
|
48
|
-
print_info '* Headers'
|
49
|
-
print_info '* XMLs'
|
50
|
-
print_info '* JSONs'
|
44
|
+
print_info '* Links' if report.options[:audit][:links]
|
45
|
+
print_info '* Forms' if report.options[:audit][:forms]
|
46
|
+
print_info '* Cookies' if report.options[:audit][:cookies]
|
47
|
+
print_info '* Headers' if report.options[:audit][:headers]
|
48
|
+
print_info '* XMLs' if report.options[:audit][:xmls]
|
49
|
+
print_info '* JSONs' if report.options[:audit][:jsons]
|
50
|
+
print_info '* UI inputs' if report.options[:audit][:ui_inputs]
|
51
|
+
print_info '* UI forms' if report.options[:audit][:ui_forms]
|
51
52
|
print_line
|
52
53
|
print_status "Checks: #{report.options[:checks].join( ', ' )}"
|
53
54
|
|
@@ -97,33 +98,20 @@ class Arachni::Reporters::Stdout < Arachni::Reporter::Base
|
|
97
98
|
print_line
|
98
99
|
|
99
100
|
report.issues.each_with_index do |issue, i|
|
100
|
-
|
101
|
+
trusted = issue.trusted? ? 'Trusted' : 'Untrusted'
|
102
|
+
|
103
|
+
print_ok "[#{i+1}] #{issue.name} (#{trusted})"
|
101
104
|
print_info '~~~~~~~~~~~~~~~~~~~~'
|
102
105
|
|
103
106
|
print_info "Digest: #{issue.digest}"
|
104
107
|
print_info "Severity: #{issue.severity.to_s.capitalize}"
|
105
|
-
print_line
|
106
|
-
print_info "URL: #{issue.vector.action}"
|
107
|
-
print_info "Element: #{issue.vector.type}"
|
108
|
-
|
109
|
-
if issue.active?
|
110
|
-
print_info "Method: #{issue.vector.method.to_s.upcase}"
|
111
|
-
print_info "Input name: #{issue.affected_input_name}"
|
112
|
-
end
|
113
|
-
|
114
|
-
if issue.vector.respond_to? :inputs
|
115
|
-
print_info "All inputs: #{issue.vector.inputs.keys.join(', ')}"
|
116
|
-
end
|
117
|
-
|
118
|
-
print_line
|
119
|
-
print_info "Tags: #{issue.tags.join(', ')}" if issue.tags.is_a?( Array )
|
120
|
-
print_line
|
121
108
|
print_info 'Description: '
|
122
109
|
print_info issue.description
|
110
|
+
print_info "Tags: #{issue.tags.join(', ')}" if issue.tags.is_a?( Array )
|
123
111
|
|
124
112
|
if issue.cwe_url
|
125
113
|
print_line
|
126
|
-
print_info issue.cwe_url
|
114
|
+
print_info "CWE: #{issue.cwe_url}"
|
127
115
|
end
|
128
116
|
|
129
117
|
if issue.references
|
@@ -131,7 +119,20 @@ class Arachni::Reporters::Stdout < Arachni::Reporter::Base
|
|
131
119
|
issue.references.each{ |ref| print_info " #{ref[0]} - #{ref[1]}" }
|
132
120
|
end
|
133
121
|
|
134
|
-
|
122
|
+
print_line
|
123
|
+
print_info "URL: #{issue.vector.action}"
|
124
|
+
print_info "Element: #{issue.vector.type}"
|
125
|
+
|
126
|
+
if issue.vector.respond_to? :inputs
|
127
|
+
print_info "All inputs: #{issue.vector.inputs.keys.join(', ')}"
|
128
|
+
end
|
129
|
+
|
130
|
+
if issue.active?
|
131
|
+
print_info "Method: #{issue.vector.method.to_s.upcase}"
|
132
|
+
print_info "Input name: #{issue.affected_input_name}"
|
133
|
+
end
|
134
|
+
|
135
|
+
print_info_issue_details issue
|
135
136
|
print_line
|
136
137
|
end
|
137
138
|
|
@@ -154,61 +155,51 @@ class Arachni::Reporters::Stdout < Arachni::Reporter::Base
|
|
154
155
|
end
|
155
156
|
end
|
156
157
|
|
157
|
-
def
|
158
|
+
def print_info_issue_details( issue )
|
158
159
|
print_line
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
issue.variations.each_with_index do |var, i|
|
163
|
-
print_line
|
164
|
-
trusted = var.trusted? ? 'Trusted' : 'Untrusted'
|
165
|
-
|
166
|
-
print_info "Variation #{i+1} (#{trusted}):"
|
167
|
-
|
168
|
-
if var.active?
|
169
|
-
if var.vector.respond_to? :seed
|
170
|
-
print_info "Seed: #{var.vector.seed.inspect}"
|
171
|
-
end
|
172
|
-
|
173
|
-
print_info "Injected: #{var.vector.affected_input_value.inspect}"
|
160
|
+
if issue.active?
|
161
|
+
if issue.vector.respond_to? :seed
|
162
|
+
print_info "Seed: #{issue.vector.seed.inspect}"
|
174
163
|
end
|
175
164
|
|
176
|
-
print_info "
|
177
|
-
|
165
|
+
print_info "Injected: #{issue.vector.affected_input_value.inspect}"
|
166
|
+
end
|
178
167
|
|
179
|
-
|
180
|
-
|
181
|
-
if var.referring_page.dom.transitions.any?
|
182
|
-
print_info 'DOM transitions:'
|
183
|
-
var.referring_page.dom.print_transitions( method(:print_info), ' ' )
|
184
|
-
end
|
168
|
+
print_info "Signature: #{issue.signature}" if issue.signature
|
169
|
+
print_info "Proof: #{issue.proof.inspect}" if issue.proof
|
185
170
|
|
186
|
-
|
187
|
-
|
171
|
+
print_line
|
172
|
+
print_info "Referring page: #{issue.referring_page.dom.url}"
|
173
|
+
if issue.referring_page.dom.transitions.any?
|
174
|
+
print_info 'DOM transitions:'
|
175
|
+
issue.referring_page.dom.print_transitions( method(:print_info), ' ' )
|
176
|
+
end
|
188
177
|
|
189
|
-
|
190
|
-
|
191
|
-
end
|
178
|
+
print_line
|
179
|
+
print_info "Affected page: #{issue.page.dom.url}"
|
192
180
|
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
end
|
181
|
+
if !issue.request.to_s.empty?
|
182
|
+
print_info "HTTP request\n#{issue.request}"
|
183
|
+
end
|
197
184
|
|
198
|
-
|
185
|
+
if issue.page.dom.transitions.any?
|
186
|
+
print_info 'DOM transitions:'
|
187
|
+
issue.page.dom.print_transitions( method(:print_info), ' ' )
|
188
|
+
end
|
199
189
|
|
200
|
-
|
201
|
-
print_info 'Remarks'
|
202
|
-
print_info '-------'
|
203
|
-
var.remarks.each do |logger, remarks|
|
204
|
-
print_info " By #{logger}:"
|
205
|
-
remarks.each do |remark|
|
206
|
-
print_info " * #{word_wrap remark}"
|
207
|
-
end
|
208
|
-
end
|
190
|
+
return if issue.remarks.empty?
|
209
191
|
|
210
|
-
|
192
|
+
print_line
|
193
|
+
print_info 'Remarks'
|
194
|
+
print_info '-------'
|
195
|
+
issue.remarks.each do |logger, remarks|
|
196
|
+
print_info " By #{logger}:"
|
197
|
+
remarks.each do |remark|
|
198
|
+
print_info " * #{word_wrap remark}"
|
199
|
+
end
|
211
200
|
end
|
201
|
+
|
202
|
+
print_line
|
212
203
|
end
|
213
204
|
|
214
205
|
# Stolen from Rails.
|
@@ -225,7 +216,7 @@ class Arachni::Reporters::Stdout < Arachni::Reporter::Base
|
|
225
216
|
name: 'Stdout',
|
226
217
|
description: %q{Prints the results to standard output.},
|
227
218
|
author: 'Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>',
|
228
|
-
version: '0.3.
|
219
|
+
version: '0.3.2'
|
229
220
|
}
|
230
221
|
end
|
231
222
|
|
data/components/reporters/xml.rb
CHANGED
@@ -73,60 +73,46 @@ class Arachni::Reporters::XML < Arachni::Reporter::Base
|
|
73
73
|
xml.source vector.source
|
74
74
|
end
|
75
75
|
|
76
|
+
if vector.respond_to? :seed
|
77
|
+
xml.seed vector.seed
|
78
|
+
end
|
79
|
+
|
76
80
|
if issue.active?
|
77
81
|
xml.method_ vector.method
|
78
82
|
end
|
79
83
|
|
80
|
-
if
|
81
|
-
xml.affected_input_name
|
84
|
+
if vector.respond_to? :affected_input_name
|
85
|
+
xml.affected_input_name vector.affected_input_name
|
82
86
|
end
|
83
87
|
|
84
88
|
if vector.respond_to? :inputs
|
85
89
|
add_inputs( xml, vector.inputs )
|
86
90
|
end
|
87
|
-
}
|
88
|
-
|
89
|
-
xml.variations {
|
90
|
-
issue.variations.each do |variation|
|
91
|
-
xml.variation {
|
92
|
-
vector = variation.vector
|
93
91
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
if vector.respond_to? :seed
|
100
|
-
xml.seed vector.seed
|
101
|
-
end
|
102
|
-
|
103
|
-
if vector.respond_to? :inputs
|
104
|
-
add_inputs( xml, vector.inputs )
|
105
|
-
end
|
106
|
-
}
|
92
|
+
if vector.respond_to? :default_inputs
|
93
|
+
add_inputs( xml, vector.default_inputs, :default_inputs )
|
94
|
+
end
|
95
|
+
}
|
107
96
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
}
|
115
|
-
end
|
116
|
-
end
|
97
|
+
xml.remarks {
|
98
|
+
issue.remarks.each do |commenter, remarks|
|
99
|
+
remarks.each do |remark|
|
100
|
+
xml.remark {
|
101
|
+
xml.commenter commenter
|
102
|
+
xml.text_ remark
|
117
103
|
}
|
118
|
-
|
119
|
-
add_page( xml, variation.page )
|
120
|
-
add_page( xml, variation.referring_page, :referring_page )
|
121
|
-
|
122
|
-
xml.signature variation.signature
|
123
|
-
xml.proof variation.proof
|
124
|
-
xml.trusted variation.trusted
|
125
|
-
xml.platform_type variation.platform_type
|
126
|
-
xml.platform_name variation.platform_name
|
127
|
-
}
|
104
|
+
end
|
128
105
|
end
|
129
106
|
}
|
107
|
+
|
108
|
+
add_page( xml, issue.page )
|
109
|
+
add_page( xml, issue.referring_page, :referring_page )
|
110
|
+
|
111
|
+
xml.signature issue.signature
|
112
|
+
xml.proof issue.proof
|
113
|
+
xml.trusted issue.trusted
|
114
|
+
xml.platform_type issue.platform_type
|
115
|
+
xml.platform_name issue.platform_name
|
130
116
|
}
|
131
117
|
end
|
132
118
|
}
|
@@ -387,10 +387,6 @@
|
|
387
387
|
</xs:sequence>
|
388
388
|
</xs:complexType>
|
389
389
|
|
390
|
-
<!--
|
391
|
-
Holds generic information about the logged issue, while providing
|
392
|
-
details as "issuevariations" via the "variations" attribute.
|
393
|
-
-->
|
394
390
|
<xs:complexType name="issue">
|
395
391
|
<xs:all>
|
396
392
|
<xs:element name="name" type="xs:string"/>
|
@@ -403,8 +399,45 @@
|
|
403
399
|
<xs:element name="cwe" type="xs:integer" minOccurs="0"/>
|
404
400
|
<xs:element name="vector" type="vector"/>
|
405
401
|
<xs:element name="digest" type="xs:integer"/>
|
406
|
-
<xs:element name="variations" type="issuevariations"/>
|
407
402
|
<xs:element name="check" type="check"/>
|
403
|
+
|
404
|
+
<!--
|
405
|
+
Page which displays the logged issue.
|
406
|
+
-->
|
407
|
+
<xs:element name="page" type="page"/>
|
408
|
+
<xs:element name="referring_page" type="page"/>
|
409
|
+
|
410
|
+
<!--
|
411
|
+
Signature used to identify the issue. Its match will be the
|
412
|
+
"proof".
|
413
|
+
-->
|
414
|
+
<xs:element name="signature" type="xs:string" minOccurs="0"/>
|
415
|
+
|
416
|
+
<!--
|
417
|
+
String proving the existence of the issue.
|
418
|
+
-->
|
419
|
+
<xs:element name="proof" type="xs:string"/>
|
420
|
+
|
421
|
+
<!--
|
422
|
+
Some issues may be logged even though the system doesn't
|
423
|
+
have 100% confidence in them, in that case they will be
|
424
|
+
marked as not trusted.
|
425
|
+
-->
|
426
|
+
<xs:element name="trusted" type="xs:boolean"/>
|
427
|
+
|
428
|
+
<xs:element name="remarks" type="remarks"/>
|
429
|
+
|
430
|
+
<!--
|
431
|
+
Type of the platform affected by this issue.
|
432
|
+
"db", "os", etc.
|
433
|
+
-->
|
434
|
+
<xs:element name="platform_type" type="xs:string"/>
|
435
|
+
|
436
|
+
<!--
|
437
|
+
Name of the platform affected by this issue.
|
438
|
+
"mysql", "linux", etc.
|
439
|
+
-->
|
440
|
+
<xs:element name="platform_name" type="xs:string"/>
|
408
441
|
</xs:all>
|
409
442
|
</xs:complexType>
|
410
443
|
|
@@ -421,18 +454,6 @@
|
|
421
454
|
</xs:all>
|
422
455
|
</xs:complexType>
|
423
456
|
|
424
|
-
<!--
|
425
|
-
Issues have 1 or more variations.
|
426
|
-
Currently, active checks only have 1 variation while passive ones
|
427
|
-
can have multiple.
|
428
|
-
-->
|
429
|
-
<xs:complexType name="issuevariations">
|
430
|
-
<xs:sequence>
|
431
|
-
<xs:element name="variation" type="issuevariation"
|
432
|
-
minOccurs="1" maxOccurs="unbounded"/>
|
433
|
-
</xs:sequence>
|
434
|
-
</xs:complexType>
|
435
|
-
|
436
457
|
<!--
|
437
458
|
Input vector information, in essence, the element affected
|
438
459
|
by the logged issue.
|
@@ -481,56 +502,11 @@
|
|
481
502
|
<xs:element name="affected_input_name" type="xs:string"
|
482
503
|
minOccurs="0"/>
|
483
504
|
|
505
|
+
<xs:element name="default_inputs" type="inputs" minOccurs="0"/>
|
484
506
|
<xs:element name="inputs" type="inputs" minOccurs="0"/>
|
485
|
-
</xs:all>
|
486
|
-
</xs:complexType>
|
487
|
-
|
488
|
-
<!--
|
489
|
-
Details about the logged issue, each variation represents a
|
490
|
-
situation where the same issue has been identified albeit in
|
491
|
-
different ways.
|
492
|
-
-->
|
493
|
-
<xs:complexType name="issuevariation">
|
494
|
-
<xs:all>
|
495
|
-
<xs:element name="vector" type="variationvector"/>
|
496
|
-
|
497
|
-
<!--
|
498
|
-
Page which displays the logged issue.
|
499
|
-
-->
|
500
|
-
<xs:element name="page" type="page"/>
|
501
|
-
<xs:element name="referring_page" type="page"/>
|
502
|
-
|
503
|
-
<!--
|
504
|
-
Signature used to identify the issue. Its match will be the
|
505
|
-
"proof".
|
506
|
-
-->
|
507
|
-
<xs:element name="signature" type="xs:string" minOccurs="0"/>
|
508
507
|
|
509
|
-
|
510
|
-
|
511
|
-
-->
|
512
|
-
<xs:element name="proof" type="xs:string"/>
|
513
|
-
|
514
|
-
<!--
|
515
|
-
Some issues may be logged even though the system doesn't
|
516
|
-
have 100% confidence in them, in that case they will be
|
517
|
-
marked as not trusted.
|
518
|
-
-->
|
519
|
-
<xs:element name="trusted" type="xs:boolean"/>
|
520
|
-
|
521
|
-
<xs:element name="remarks" type="remarks"/>
|
522
|
-
|
523
|
-
<!--
|
524
|
-
Type of the platform affected by this issue.
|
525
|
-
"db", "os", etc.
|
526
|
-
-->
|
527
|
-
<xs:element name="platform_type" type="xs:string"/>
|
528
|
-
|
529
|
-
<!--
|
530
|
-
Name of the platform affected by this issue.
|
531
|
-
"mysql", "linux", etc.
|
532
|
-
-->
|
533
|
-
<xs:element name="platform_name" type="xs:string"/>
|
508
|
+
<xs:element name="seed" type="xs:string" minOccurs="0"
|
509
|
+
maxOccurs="1"/>
|
534
510
|
</xs:all>
|
535
511
|
</xs:complexType>
|
536
512
|
|
@@ -576,30 +552,6 @@
|
|
576
552
|
</xs:all>
|
577
553
|
</xs:complexType>
|
578
554
|
|
579
|
-
<!--
|
580
|
-
This is details on the state of the logged vector when
|
581
|
-
an "issuevariation" was identified.
|
582
|
-
|
583
|
-
Merged with "vector" it forms the full vector mutation.
|
584
|
-
-->
|
585
|
-
<xs:complexType name="variationvector">
|
586
|
-
<xs:sequence>
|
587
|
-
<!--
|
588
|
-
HTTP method used to submit the vector. Can be different
|
589
|
-
from the "vector" one because the fuzzed version could
|
590
|
-
have been submitted with a different method.
|
591
|
-
-->
|
592
|
-
<xs:element name="method" type="xs:string" minOccurs="0"
|
593
|
-
maxOccurs="1"/>
|
594
|
-
|
595
|
-
<xs:element name="seed" type="xs:string" minOccurs="0"
|
596
|
-
maxOccurs="1"/>
|
597
|
-
|
598
|
-
<xs:element name="inputs" type="inputs" minOccurs="0"
|
599
|
-
maxOccurs="1"/>
|
600
|
-
</xs:sequence>
|
601
|
-
</xs:complexType>
|
602
|
-
|
603
555
|
<xs:complexType name="page">
|
604
556
|
<xs:all>
|
605
557
|
<xs:element name="body" type="xs:string"/>
|
@@ -801,6 +753,8 @@
|
|
801
753
|
<xs:enumeration value="Arachni::Element::GenericDOM" />
|
802
754
|
<xs:enumeration value="Arachni::Element::JSON" />
|
803
755
|
<xs:enumeration value="Arachni::Element::XML" />
|
756
|
+
<xs:enumeration value="Arachni::Element::UIForm::DOM" />
|
757
|
+
<xs:enumeration value="Arachni::Element::UIInput::DOM" />
|
804
758
|
</xs:restriction>
|
805
759
|
</xs:simpleType>
|
806
760
|
|