arachni 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/ACKNOWLEDGMENTS.md +1 -1
- data/CHANGELOG.md +146 -0
- data/CONTRIBUTORS.md +1 -0
- data/HACKING.md +3 -3
- data/README.md +81 -49
- data/Rakefile +11 -14
- data/bin/arachni +4 -8
- data/bin/arachni_rpc +17 -0
- data/bin/arachni_rpcd +18 -0
- data/bin/arachni_rpcd_monitor +18 -0
- data/bin/arachni_web +25 -48
- data/bin/arachni_web_autostart +3 -3
- data/conf/README.webui.yaml.txt +7 -21
- data/external/metasploit/plugins/arachni.rb +0 -7
- data/extras/modules/recon/raft_dirs.rb +108 -0
- data/extras/modules/recon/raft_dirs/raft-large-directories.txt +62290 -0
- data/extras/modules/recon/raft_files.rb +110 -0
- data/extras/modules/recon/raft_files/raft-large-files.txt +37037 -0
- data/extras/modules/recon/svn_digger_dirs.rb +108 -0
- data/extras/modules/recon/svn_digger_dirs/Licence.txt +674 -0
- data/extras/modules/recon/svn_digger_dirs/ReadMe-Arachni.txt +4 -0
- data/extras/modules/recon/svn_digger_dirs/ReadMe.txt +6 -0
- data/extras/modules/recon/svn_digger_dirs/all-dirs.txt +5960 -0
- data/extras/modules/recon/svn_digger_files.rb +114 -0
- data/extras/modules/recon/svn_digger_files/Licence.txt +674 -0
- data/extras/modules/recon/svn_digger_files/ReadMe-Arachni.txt +4 -0
- data/extras/modules/recon/svn_digger_files/ReadMe.txt +6 -0
- data/extras/modules/recon/svn_digger_files/all-extensionless.txt +25419 -0
- data/extras/modules/recon/svn_digger_files/all.txt +43135 -0
- data/lib/arachni.rb +2 -7
- data/lib/{audit_store.rb → arachni/audit_store.rb} +68 -60
- data/lib/{component_manager.rb → arachni/component_manager.rb} +8 -8
- data/lib/{component_options.rb → arachni/component_options.rb} +34 -4
- data/lib/{crypto → arachni/crypto}/rsa_aes_cbc.rb +1 -2
- data/lib/arachni/database.rb +4 -0
- data/lib/arachni/database/base.rb +125 -0
- data/lib/arachni/database/hash.rb +384 -0
- data/lib/arachni/database/queue.rb +93 -0
- data/lib/{exceptions.rb → arachni/exceptions.rb} +1 -1
- data/lib/arachni/framework.rb +899 -0
- data/lib/{http.rb → arachni/http.rb} +63 -166
- data/lib/{issue.rb → arachni/issue.rb} +46 -17
- data/lib/{mixins → arachni/mixins}/observable.rb +1 -1
- data/lib/arachni/mixins/progress_bar.rb +81 -0
- data/lib/arachni/mixins/terminal.rb +106 -0
- data/lib/{module.rb → arachni/module.rb} +0 -0
- data/lib/{module → arachni/module}/auditor.rb +250 -86
- data/lib/{module → arachni/module}/base.rb +8 -18
- data/lib/{module → arachni/module}/element_db.rb +10 -2
- data/lib/{module → arachni/module}/key_filler.rb +1 -1
- data/lib/arachni/module/manager.rb +145 -0
- data/lib/{module → arachni/module}/output.rb +6 -1
- data/lib/{module → arachni/module}/trainer.rb +48 -52
- data/lib/{module → arachni/module}/utilities.rb +66 -15
- data/lib/{nokogiri → arachni/nokogiri}/xml/node.rb +0 -0
- data/lib/arachni/options.rb +986 -0
- data/lib/{parser.rb → arachni/parser.rb} +0 -0
- data/lib/{parser → arachni/parser}/auditable.rb +111 -32
- data/lib/{parser → arachni/parser}/elements.rb +28 -20
- data/lib/{parser → arachni/parser}/page.rb +20 -3
- data/lib/{parser → arachni/parser}/parser.rb +100 -63
- data/lib/{plugin.rb → arachni/plugin.rb} +0 -0
- data/lib/{plugin → arachni/plugin}/base.rb +43 -6
- data/lib/{plugin → arachni/plugin}/manager.rb +40 -13
- data/lib/{report.rb → arachni/report.rb} +0 -0
- data/lib/{report → arachni/report}/base.rb +43 -2
- data/lib/{report → arachni/report}/manager.rb +7 -18
- data/lib/arachni/rpc/client/base.rb +42 -0
- data/lib/{rpc/xml → arachni/rpc}/client/dispatcher.rb +12 -13
- data/lib/arachni/rpc/client/instance.rb +62 -0
- data/lib/arachni/rpc/server/base.rb +51 -0
- data/lib/arachni/rpc/server/dispatcher.rb +438 -0
- data/lib/arachni/rpc/server/framework.rb +1163 -0
- data/lib/arachni/rpc/server/instance.rb +184 -0
- data/lib/{rpc/xml → arachni/rpc}/server/module/manager.rb +8 -5
- data/lib/arachni/rpc/server/node.rb +267 -0
- data/lib/{rpc/xml → arachni/rpc}/server/options.rb +6 -35
- data/lib/{rpc/xml → arachni/rpc}/server/output.rb +29 -3
- data/lib/{rpc/xml → arachni/rpc}/server/plugin/manager.rb +5 -6
- data/lib/{ruby.rb → arachni/ruby.rb} +1 -2
- data/lib/arachni/ruby/array.rb +31 -0
- data/lib/{ruby → arachni/ruby}/object.rb +1 -1
- data/lib/{ruby → arachni/ruby}/string.rb +1 -1
- data/lib/{spider.rb → arachni/spider.rb} +83 -110
- data/lib/arachni/typhoeus/hydra.rb +7 -0
- data/lib/{typhoeus → arachni/typhoeus}/request.rb +11 -9
- data/lib/{typhoeus → arachni/typhoeus}/response.rb +4 -0
- data/lib/{ui → arachni/ui}/cli/cli.rb +154 -84
- data/lib/{ui → arachni/ui}/cli/output.rb +57 -19
- data/lib/{ui/xmlrpc → arachni/ui/rpc}/dispatcher_monitor.rb +11 -10
- data/lib/{ui/xmlrpc/xmlrpc.rb → arachni/ui/rpc/rpc.rb} +102 -158
- data/lib/{ui → arachni/ui}/web/addon_manager.rb +23 -3
- data/lib/arachni/ui/web/addons/autodeploy.rb +207 -0
- data/lib/{ui → arachni/ui}/web/addons/autodeploy/lib/manager.rb +142 -35
- data/lib/arachni/ui/web/addons/autodeploy/views/index.erb +291 -0
- data/lib/{ui → arachni/ui}/web/addons/sample.rb +1 -1
- data/lib/{ui → arachni/ui}/web/addons/sample/views/index.erb +0 -0
- data/lib/{ui → arachni/ui}/web/addons/scheduler.rb +30 -22
- data/lib/{ui → arachni/ui}/web/addons/scheduler/views/index.erb +56 -22
- data/lib/{ui → arachni/ui}/web/addons/scheduler/views/options.erb +0 -0
- data/lib/arachni/ui/web/dispatcher_manager.rb +274 -0
- data/lib/arachni/ui/web/instance_manager.rb +69 -0
- data/lib/{ui → arachni/ui}/web/log.rb +1 -1
- data/lib/arachni/ui/web/output_stream.rb +54 -0
- data/lib/{ui → arachni/ui}/web/report_manager.rb +48 -54
- data/lib/{ui → arachni/ui}/web/scheduler.rb +42 -47
- data/lib/arachni/ui/web/server.rb +1197 -0
- data/lib/{ui → arachni/ui}/web/server/db/placeholder +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/banner.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/bodybg-small.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/bodybg.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/pbar-ani.gif +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/css/smoothness/jquery-ui-1.8.9.custom.css +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/favicon.ico +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/footer.jpg +0 -0
- data/lib/{ui/web/server/public/icons/error.png → arachni/ui/web/server/public/icons/bad.png} +0 -0
- data/lib/arachni/ui/web/server/public/icons/error.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/icons/info.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/icons/ok.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/icons/status.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/js/jquery-1.4.4.min.js +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/js/jquery-ui-1.8.9.custom.min.js +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/js/jquery-ui-timepicker.js +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/logo.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/nav-left.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/nav-right.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/nav-selected-left.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/nav-selected-right.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/plugins/sample/style.css +0 -0
- data/lib/{ui/web/server/tmp → arachni/ui/web/server/public/reports}/placeholder +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/sidebar-bottom.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/sidebar-h4.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/sidebar-top.jpg +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/spider.png +0 -0
- data/lib/{ui → arachni/ui}/web/server/public/style.css +3 -2
- data/lib/arachni/ui/web/server/tmp/placeholder +0 -0
- data/lib/{ui → arachni/ui}/web/server/views/addon.erb +0 -0
- data/lib/{ui → arachni/ui}/web/server/views/addons.erb +0 -0
- data/lib/{ui → arachni/ui}/web/server/views/dispatcher_error.erb +0 -0
- data/lib/arachni/ui/web/server/views/dispatchers.erb +175 -0
- data/lib/arachni/ui/web/server/views/dispatchers_edit.erb +71 -0
- data/lib/arachni/ui/web/server/views/error.erb +22 -0
- data/lib/{ui → arachni/ui}/web/server/views/flash.erb +2 -2
- data/lib/arachni/ui/web/server/views/home.erb +60 -0
- data/lib/{ui → arachni/ui}/web/server/views/instance.erb +55 -75
- data/lib/arachni/ui/web/server/views/js/home.erb +32 -0
- data/lib/{ui → arachni/ui}/web/server/views/layout.erb +2 -2
- data/lib/{ui → arachni/ui}/web/server/views/log.erb +0 -0
- data/lib/arachni/ui/web/server/views/module.erb +30 -0
- data/lib/{ui → arachni/ui}/web/server/views/modules.erb +2 -22
- data/lib/{ui → arachni/ui}/web/server/views/options.erb +0 -0
- data/lib/{ui → arachni/ui}/web/server/views/output_results.erb +4 -4
- data/lib/{ui → arachni/ui}/web/server/views/plugins.erb +23 -12
- data/lib/{ui → arachni/ui}/web/server/views/report_formats.erb +1 -1
- data/lib/{ui → arachni/ui}/web/server/views/reports.erb +1 -1
- data/lib/{ui → arachni/ui}/web/server/views/settings.erb +59 -16
- data/lib/{ui → arachni/ui}/web/server/views/welcome.erb +3 -1
- data/lib/{ui → arachni/ui}/web/utilities.rb +8 -3
- data/lib/arachni/version.rb +16 -0
- data/modules/audit/code_injection.rb +11 -20
- data/modules/audit/code_injection_timing.rb +2 -6
- data/modules/audit/csrf.rb +8 -16
- data/modules/audit/ldapi.rb +5 -11
- data/modules/audit/os_cmd_injection.rb +5 -9
- data/modules/audit/os_cmd_injection_timing.rb +4 -8
- data/modules/audit/path_traversal.rb +7 -13
- data/modules/audit/response_splitting.rb +8 -21
- data/modules/audit/rfi.rb +6 -46
- data/modules/audit/sqli.rb +5 -11
- data/modules/audit/sqli/regexp_ids.txt +0 -6
- data/modules/audit/sqli_blind_rdiff.rb +5 -10
- data/modules/audit/sqli_blind_timing.rb +4 -9
- data/modules/audit/trainer.rb +6 -12
- data/modules/audit/unvalidated_redirect.rb +6 -17
- data/modules/audit/xpath.rb +5 -12
- data/modules/audit/xss.rb +37 -23
- data/modules/audit/xss_event.rb +5 -10
- data/modules/audit/xss_path.rb +47 -41
- data/modules/audit/xss_script_tag.rb +5 -10
- data/modules/audit/xss_tag.rb +5 -10
- data/modules/audit/xss_uri.rb +17 -89
- data/modules/recon/allowed_methods.rb +6 -15
- data/modules/recon/backdoors.rb +12 -52
- data/modules/recon/backup_files.rb +25 -88
- data/modules/recon/common_directories.rb +8 -54
- data/modules/recon/common_files.rb +7 -58
- data/modules/recon/directory_listing.rb +6 -15
- data/modules/recon/grep/captcha.rb +1 -1
- data/modules/recon/grep/credit_card.rb +62 -27
- data/modules/recon/grep/cvs_svn_users.rb +1 -1
- data/modules/recon/grep/emails.rb +1 -1
- data/modules/recon/grep/html_objects.rb +1 -1
- data/modules/recon/grep/private_ip.rb +1 -1
- data/modules/recon/grep/ssn.rb +9 -9
- data/modules/recon/htaccess_limit.rb +6 -14
- data/modules/recon/http_put.rb +7 -15
- data/modules/recon/interesting_responses.rb +7 -13
- data/modules/recon/mixed_resource.rb +100 -0
- data/modules/recon/unencrypted_password_forms.rb +8 -20
- data/modules/recon/webdav.rb +6 -16
- data/modules/recon/xst.rb +7 -13
- data/path_extractors/anchors.rb +1 -1
- data/path_extractors/forms.rb +1 -1
- data/path_extractors/frames.rb +1 -1
- data/path_extractors/generic.rb +47 -3
- data/path_extractors/links.rb +1 -1
- data/path_extractors/meta_refresh.rb +1 -1
- data/path_extractors/scripts.rb +3 -4
- data/path_extractors/sitemap.rb +1 -1
- data/plugins/autologin.rb +9 -18
- data/plugins/beep_notify.rb +51 -0
- data/plugins/cookie_collector.rb +12 -12
- data/plugins/defaults/autothrottle.rb +86 -0
- data/plugins/{content_types.rb → defaults/content_types.rb} +25 -19
- data/plugins/{healthmap.rb → defaults/healthmap.rb} +30 -18
- data/plugins/defaults/metamodules/remedies/discovery.rb +164 -0
- data/plugins/defaults/metamodules/remedies/manual_verification.rb +65 -0
- data/{metamodules/timeout_notice.rb → plugins/defaults/metamodules/remedies/timing_attacks.rb} +26 -22
- data/{metamodules → plugins/defaults/metamodules}/uniformity.rb +15 -14
- data/plugins/{profiler.rb → defaults/profiler.rb} +19 -30
- data/plugins/defaults/resolver.rb +55 -0
- data/plugins/email_notify.rb +108 -0
- data/plugins/form_dicattack.rb +8 -16
- data/plugins/http_dicattack.rb +4 -12
- data/plugins/libnotify.rb +86 -0
- data/plugins/proxy.rb +8 -17
- data/plugins/proxy/server.rb +3 -3
- data/plugins/rescan.rb +60 -0
- data/plugins/waf_detector.rb +5 -16
- data/profiles/full.afp +3 -30
- data/reports/afr.rb +2 -5
- data/reports/ap.rb +3 -1
- data/reports/html.rb +210 -68
- data/reports/html/default.erb +72 -1014
- data/reports/html/default/configuration.erb +126 -0
- data/reports/html/default/css/jquery-ui.css +570 -0
- data/reports/html/default/css/jquery.jqplot.min.css +1 -0
- data/reports/html/default/css/main.css +391 -0
- data/reports/html/default/issue.erb +189 -0
- data/reports/html/default/issues.erb +65 -0
- data/reports/html/default/js/charts.js +146 -0
- data/reports/html/default/js/helpers.js +95 -0
- data/reports/html/default/js/init.js +73 -0
- data/reports/html/default/js/lib/jqplot.barRenderer.min.js +57 -0
- data/reports/html/default/js/lib/jqplot.categoryAxisRenderer.min.js +57 -0
- data/reports/html/default/js/lib/jqplot.cursor.min.js +57 -0
- data/reports/html/default/js/lib/jqplot.pieRenderer.min.js +57 -0
- data/reports/html/default/js/lib/jqplot.pointLabels.min.js +57 -0
- data/reports/html/default/js/lib/jquery-ui.min.js +404 -0
- data/reports/html/default/js/lib/jquery.jqplot.min.js +57 -0
- data/reports/html/default/js/lib/jquery.min.js +167 -0
- data/reports/html/default/plugins.erb +22 -0
- data/reports/html/default/search.erb +8 -0
- data/reports/html/default/sitemap.erb +15 -0
- data/reports/html/default/summary.erb +68 -0
- data/reports/html/default/summary_issue.erb +19 -0
- data/reports/json.rb +51 -0
- data/reports/marshal.rb +49 -0
- data/reports/metareport.rb +4 -6
- data/reports/metareport/arachni_metareport.rb +1 -1
- data/reports/plugin_formatters/html/autologin.rb +30 -41
- data/reports/plugin_formatters/html/content_types.rb +1 -10
- data/reports/plugin_formatters/html/cookie_collector.rb +36 -44
- data/reports/plugin_formatters/html/discovery.rb +50 -0
- data/reports/plugin_formatters/html/form_dicattack.rb +24 -32
- data/reports/plugin_formatters/html/healthmap.rb +45 -54
- data/reports/plugin_formatters/html/http_dicattack.rb +24 -32
- data/reports/plugin_formatters/html/profiler.rb +17 -48
- data/reports/plugin_formatters/html/profiler/template.erb +6 -99
- data/reports/plugin_formatters/html/resolver.rb +63 -0
- data/reports/plugin_formatters/html/{metaformatters/timeout_notice.rb → timing_attacks.rb} +7 -19
- data/reports/plugin_formatters/html/{metaformatters/uniformity.rb → uniformity.rb} +5 -17
- data/reports/plugin_formatters/html/waf_detector.rb +24 -32
- data/reports/plugin_formatters/stdout/autologin.rb +30 -35
- data/reports/plugin_formatters/stdout/content_types.rb +41 -46
- data/reports/plugin_formatters/stdout/cookie_collector.rb +33 -38
- data/reports/plugin_formatters/stdout/discovery.rb +47 -0
- data/reports/plugin_formatters/stdout/form_dicattack.rb +27 -32
- data/reports/plugin_formatters/stdout/healthmap.rb +47 -51
- data/reports/plugin_formatters/stdout/http_dicattack.rb +27 -32
- data/reports/plugin_formatters/stdout/metamodules.rb +48 -55
- data/reports/plugin_formatters/stdout/profiler.rb +60 -65
- data/reports/plugin_formatters/stdout/resolver.rb +45 -0
- data/reports/plugin_formatters/stdout/{metaformatters/timeout_notice.rb → timing_attacks.rb} +6 -14
- data/reports/plugin_formatters/stdout/{metaformatters/uniformity.rb → uniformity.rb} +6 -14
- data/reports/plugin_formatters/stdout/waf_detector.rb +23 -28
- data/reports/plugin_formatters/xml/autologin.rb +36 -41
- data/reports/plugin_formatters/xml/content_types.rb +47 -52
- data/reports/plugin_formatters/xml/cookie_collector.rb +39 -44
- data/reports/plugin_formatters/xml/discovery.rb +54 -0
- data/reports/plugin_formatters/xml/form_dicattack.rb +22 -27
- data/reports/plugin_formatters/xml/healthmap.rb +53 -58
- data/reports/plugin_formatters/xml/http_dicattack.rb +22 -27
- data/reports/plugin_formatters/xml/profiler.rb +61 -77
- data/reports/plugin_formatters/xml/resolver.rb +53 -0
- data/reports/plugin_formatters/xml/{metaformatters/timeout_notice.rb → timing_attacks.rb} +3 -15
- data/reports/plugin_formatters/xml/{metaformatters/uniformity.rb → uniformity.rb} +4 -14
- data/reports/plugin_formatters/xml/waf_detector.rb +23 -28
- data/reports/stdout.rb +1 -1
- data/reports/txt.rb +2 -5
- data/reports/xml.rb +2 -5
- data/reports/xml/buffer.rb +6 -2
- data/reports/yaml.rb +49 -0
- metadata +419 -278
- data/bin/arachni_xmlrpc +0 -21
- data/bin/arachni_xmlrpcd +0 -82
- data/bin/arachni_xmlrpcd_monitor +0 -74
- data/getoptslong.rb +0 -242
- data/lib/anemone.rb +0 -2
- data/lib/framework.rb +0 -673
- data/lib/module/manager.rb +0 -111
- data/lib/options.rb +0 -547
- data/lib/rpc/xml/client/base.rb +0 -76
- data/lib/rpc/xml/client/instance.rb +0 -88
- data/lib/rpc/xml/server/base.rb +0 -112
- data/lib/rpc/xml/server/dispatcher.rb +0 -386
- data/lib/rpc/xml/server/framework.rb +0 -206
- data/lib/rpc/xml/server/instance.rb +0 -191
- data/lib/ruby/xmlrpc/server.rb +0 -27
- data/lib/ui/web/addons/autodeploy.rb +0 -172
- data/lib/ui/web/addons/autodeploy/views/index.erb +0 -124
- data/lib/ui/web/dispatcher_manager.rb +0 -165
- data/lib/ui/web/instance_manager.rb +0 -87
- data/lib/ui/web/output_stream.rb +0 -94
- data/lib/ui/web/server.rb +0 -925
- data/lib/ui/web/server/public/reports/placeholder +0 -1
- data/lib/ui/web/server/views/dispatchers.erb +0 -100
- data/lib/ui/web/server/views/dispatchers_edit.erb +0 -42
- data/lib/ui/web/server/views/error.erb +0 -1
- data/lib/ui/web/server/views/home.erb +0 -25
- data/metamodules/autothrottle.rb +0 -74
- data/plugins/metamodules.rb +0 -118
- data/profiles/comprehensive.afp +0 -74
- data/reports/plugin_formatters/html/metamodules.rb +0 -93
- data/reports/plugin_formatters/xml/metamodules.rb +0 -91
data/lib/module/manager.rb
DELETED
@@ -1,111 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
Arachni
|
3
|
-
Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
4
|
-
|
5
|
-
This is free software; you can copy and distribute and modify
|
6
|
-
this program under the term of the GPL v2.0 License
|
7
|
-
(See LICENSE file for details)
|
8
|
-
|
9
|
-
=end
|
10
|
-
|
11
|
-
module Arachni
|
12
|
-
|
13
|
-
#
|
14
|
-
# The namespace under which all modules exist
|
15
|
-
#
|
16
|
-
module Modules
|
17
|
-
|
18
|
-
#
|
19
|
-
# Resets the namespace unloading all module classes
|
20
|
-
#
|
21
|
-
def self.reset
|
22
|
-
constants.each {
|
23
|
-
|const|
|
24
|
-
remove_const( const )
|
25
|
-
}
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
module Module
|
30
|
-
|
31
|
-
#
|
32
|
-
# Arachni::Module::Manager class
|
33
|
-
#
|
34
|
-
# Holds and manages the modules and their results.
|
35
|
-
#
|
36
|
-
# @author: Tasos "Zapotek" Laskos
|
37
|
-
# <tasos.laskos@gmail.com>
|
38
|
-
# <zapotek@segfault.gr>
|
39
|
-
# @version: 0.1.1
|
40
|
-
#
|
41
|
-
class Manager < Arachni::ComponentManager
|
42
|
-
|
43
|
-
include Arachni::UI::Output
|
44
|
-
|
45
|
-
#
|
46
|
-
# @param [Arachni::Options] opts
|
47
|
-
#
|
48
|
-
def initialize( opts )
|
49
|
-
super( opts.dir['modules'], Arachni::Modules )
|
50
|
-
@opts = opts
|
51
|
-
@@results = []
|
52
|
-
@@issue_set = Set.new
|
53
|
-
end
|
54
|
-
|
55
|
-
#
|
56
|
-
# Class method
|
57
|
-
#
|
58
|
-
# Registers module results with...well..us.
|
59
|
-
#
|
60
|
-
# @param [Array]
|
61
|
-
#
|
62
|
-
def self.register_results( results )
|
63
|
-
@@results |= results
|
64
|
-
results.each { |issue| @@issue_set << self.issue_set_id_from_issue( issue ) }
|
65
|
-
end
|
66
|
-
|
67
|
-
def self.issue_set_id_from_issue( issue )
|
68
|
-
issue_url = URI( issue.url )
|
69
|
-
issue_url_str = issue_url.scheme + "://" + issue_url.host + issue_url.path
|
70
|
-
return "#{issue.mod_name}:#{issue.elem}:#{issue.var}:#{issue_url_str}"
|
71
|
-
end
|
72
|
-
|
73
|
-
def self.issue_set_id_from_elem( mod_name, elem )
|
74
|
-
elem_url = URI( elem.action )
|
75
|
-
elem_url_str = elem_url.scheme + "://" + elem_url.host + elem_url.path
|
76
|
-
|
77
|
-
return "#{mod_name}:#{elem.type}:#{elem.altered}:#{elem_url_str}"
|
78
|
-
end
|
79
|
-
|
80
|
-
def self.issue_set
|
81
|
-
@@issue_set
|
82
|
-
end
|
83
|
-
|
84
|
-
def issue_set
|
85
|
-
@@issue_set
|
86
|
-
end
|
87
|
-
|
88
|
-
|
89
|
-
#
|
90
|
-
# Class method
|
91
|
-
#
|
92
|
-
# Gets module results
|
93
|
-
#
|
94
|
-
# @param [Array]
|
95
|
-
#
|
96
|
-
def self.results( )
|
97
|
-
@@results
|
98
|
-
end
|
99
|
-
|
100
|
-
def results
|
101
|
-
@@results
|
102
|
-
end
|
103
|
-
|
104
|
-
def self.reset
|
105
|
-
@@results.clear
|
106
|
-
Arachni::Modules.reset
|
107
|
-
end
|
108
|
-
|
109
|
-
end
|
110
|
-
end
|
111
|
-
end
|
data/lib/options.rb
DELETED
@@ -1,547 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
Arachni
|
3
|
-
Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
4
|
-
|
5
|
-
This is free software; you can copy and distribute and modify
|
6
|
-
this program under the term of the GPL v2.0 License
|
7
|
-
(See LICENSE file for details)
|
8
|
-
|
9
|
-
=end
|
10
|
-
|
11
|
-
require 'singleton'
|
12
|
-
|
13
|
-
module Arachni
|
14
|
-
|
15
|
-
#
|
16
|
-
# Options class.
|
17
|
-
#
|
18
|
-
# Implements the Singleton pattern and formaly defines
|
19
|
-
# all of Arachni's runtime options.
|
20
|
-
#
|
21
|
-
# @author: Tasos "Zapotek" Laskos
|
22
|
-
# <tasos.laskos@gmail.com>
|
23
|
-
# <zapotek@segfault.gr>
|
24
|
-
# @version: 0.1.1
|
25
|
-
#
|
26
|
-
class Options
|
27
|
-
|
28
|
-
include Singleton
|
29
|
-
|
30
|
-
#
|
31
|
-
# The extension of the profile files.
|
32
|
-
#
|
33
|
-
# @return [String]
|
34
|
-
#
|
35
|
-
PROFILE_EXT = '.afp'
|
36
|
-
|
37
|
-
#
|
38
|
-
# Holds absolute paths for the directory structure of the framework
|
39
|
-
#
|
40
|
-
# @return [Hash]
|
41
|
-
#
|
42
|
-
attr_accessor :dir
|
43
|
-
|
44
|
-
#
|
45
|
-
# The URL to audit
|
46
|
-
#
|
47
|
-
# @return [String,URI]
|
48
|
-
#
|
49
|
-
attr_accessor :url
|
50
|
-
|
51
|
-
#
|
52
|
-
# Show help?
|
53
|
-
#
|
54
|
-
# @return [Bool]
|
55
|
-
#
|
56
|
-
attr_accessor :help
|
57
|
-
|
58
|
-
#
|
59
|
-
# Output only positive results during the audit?
|
60
|
-
#
|
61
|
-
# @return [Bool]
|
62
|
-
#
|
63
|
-
attr_accessor :only_positives
|
64
|
-
|
65
|
-
#
|
66
|
-
# Be verbose?
|
67
|
-
#
|
68
|
-
# @return [Bool]
|
69
|
-
#
|
70
|
-
attr_accessor :arachni_verbose
|
71
|
-
|
72
|
-
#
|
73
|
-
# Output debugging messages?
|
74
|
-
#
|
75
|
-
# @return [Bool]
|
76
|
-
#
|
77
|
-
attr_accessor :debug
|
78
|
-
|
79
|
-
#
|
80
|
-
# Filters for redundant links
|
81
|
-
#
|
82
|
-
# @return [Array]
|
83
|
-
#
|
84
|
-
attr_accessor :redundant
|
85
|
-
|
86
|
-
#
|
87
|
-
# Should the crawler obery robots.txt files?
|
88
|
-
#
|
89
|
-
# @return [Bool]
|
90
|
-
#
|
91
|
-
attr_accessor :obey_robots_txt
|
92
|
-
|
93
|
-
#
|
94
|
-
# How deep to go in the site structure?<br/>
|
95
|
-
# If nil, depth_limit = inf
|
96
|
-
#
|
97
|
-
# @return [Integer]
|
98
|
-
#
|
99
|
-
attr_accessor :depth_limit
|
100
|
-
|
101
|
-
#
|
102
|
-
# How many links to follow?
|
103
|
-
# If nil, link_count_limit = inf
|
104
|
-
#
|
105
|
-
# @return [Integer]
|
106
|
-
#
|
107
|
-
attr_accessor :link_count_limit
|
108
|
-
|
109
|
-
#
|
110
|
-
# How many redirects to follow?
|
111
|
-
# If nil, redirect_limit = inf
|
112
|
-
#
|
113
|
-
# @return [Integer]
|
114
|
-
#
|
115
|
-
attr_accessor :redirect_limit
|
116
|
-
|
117
|
-
#
|
118
|
-
# List modules, based on regexps, and exit?
|
119
|
-
#
|
120
|
-
# @return [Array<Regexp>]
|
121
|
-
#
|
122
|
-
attr_accessor :lsmod
|
123
|
-
|
124
|
-
#
|
125
|
-
# List reports and exit?
|
126
|
-
#
|
127
|
-
# @return [Bool]
|
128
|
-
#
|
129
|
-
attr_accessor :lsrep
|
130
|
-
|
131
|
-
#
|
132
|
-
# How many concurrent HTTP requests?
|
133
|
-
#
|
134
|
-
# @return [Integer]
|
135
|
-
#
|
136
|
-
attr_accessor :http_req_limit
|
137
|
-
|
138
|
-
#
|
139
|
-
# Should Arachni audit links?
|
140
|
-
#
|
141
|
-
# @return [Bool]
|
142
|
-
#
|
143
|
-
attr_accessor :audit_links
|
144
|
-
|
145
|
-
#
|
146
|
-
# Should Arachni audit forms?
|
147
|
-
#
|
148
|
-
# @return [Bool]
|
149
|
-
#
|
150
|
-
attr_accessor :audit_forms
|
151
|
-
|
152
|
-
#
|
153
|
-
# Should Arachni audit cookies?
|
154
|
-
#
|
155
|
-
# @return [Bool]
|
156
|
-
#
|
157
|
-
attr_accessor :audit_cookies
|
158
|
-
|
159
|
-
#
|
160
|
-
# Should Arachni audit HTTP headers?
|
161
|
-
#
|
162
|
-
# @return [Bool]
|
163
|
-
#
|
164
|
-
attr_accessor :audit_headers
|
165
|
-
|
166
|
-
#
|
167
|
-
# Array of modules to load
|
168
|
-
#
|
169
|
-
# @return [Array]
|
170
|
-
#
|
171
|
-
attr_accessor :mods
|
172
|
-
|
173
|
-
#
|
174
|
-
# Array of reports to load
|
175
|
-
#
|
176
|
-
# @return [Array]
|
177
|
-
#
|
178
|
-
attr_accessor :reports
|
179
|
-
|
180
|
-
#
|
181
|
-
# Location of an Arachni Framework Report (.afr) file to load
|
182
|
-
#
|
183
|
-
# @return [String]
|
184
|
-
#
|
185
|
-
attr_accessor :repload
|
186
|
-
|
187
|
-
#
|
188
|
-
# Where to save the Arachni Framework Profile (.afp) file
|
189
|
-
#
|
190
|
-
# @return [String]
|
191
|
-
#
|
192
|
-
attr_accessor :save_profile
|
193
|
-
|
194
|
-
#
|
195
|
-
# Location of Arachni Framework Profile (.afp) files to load
|
196
|
-
#
|
197
|
-
# @return [Array]
|
198
|
-
#
|
199
|
-
attr_accessor :load_profile
|
200
|
-
|
201
|
-
|
202
|
-
attr_accessor :show_profile
|
203
|
-
|
204
|
-
#
|
205
|
-
# The person that authorized the scan<br/>
|
206
|
-
# It will be added to the HTTP "user-agent" and "from" headers.
|
207
|
-
#
|
208
|
-
# @return [String]
|
209
|
-
#
|
210
|
-
attr_accessor :authed_by
|
211
|
-
|
212
|
-
#
|
213
|
-
# The address of the proxy server
|
214
|
-
#
|
215
|
-
# @return [String]
|
216
|
-
#
|
217
|
-
attr_accessor :proxy_addr
|
218
|
-
|
219
|
-
#
|
220
|
-
# The port to connect on the proxy server
|
221
|
-
#
|
222
|
-
# @return [String]
|
223
|
-
#
|
224
|
-
attr_accessor :proxy_port
|
225
|
-
|
226
|
-
#
|
227
|
-
# The proxy password
|
228
|
-
#
|
229
|
-
# @return [String]
|
230
|
-
#
|
231
|
-
attr_accessor :proxy_pass
|
232
|
-
|
233
|
-
#
|
234
|
-
# The proxy user
|
235
|
-
#
|
236
|
-
# @return [String]
|
237
|
-
#
|
238
|
-
attr_accessor :proxy_user
|
239
|
-
|
240
|
-
#
|
241
|
-
# The proxy type
|
242
|
-
#
|
243
|
-
# @return [String] [http, socks]
|
244
|
-
#
|
245
|
-
attr_accessor :proxy_type
|
246
|
-
|
247
|
-
#
|
248
|
-
# To be populated by the framework
|
249
|
-
#
|
250
|
-
# Parsed cookiejar cookies
|
251
|
-
#
|
252
|
-
# @return [Hash] name=>value pairs
|
253
|
-
#
|
254
|
-
attr_accessor :cookies
|
255
|
-
|
256
|
-
#
|
257
|
-
# Location of the cookiejar
|
258
|
-
#
|
259
|
-
# @return [String]
|
260
|
-
#
|
261
|
-
attr_accessor :cookie_jar
|
262
|
-
|
263
|
-
#
|
264
|
-
# The HTTP user-agent to use
|
265
|
-
#
|
266
|
-
# @return [String]
|
267
|
-
#
|
268
|
-
attr_accessor :user_agent
|
269
|
-
|
270
|
-
#
|
271
|
-
# Exclude filters <br/>
|
272
|
-
# URL matching any of these patterns won't be followed
|
273
|
-
#
|
274
|
-
# @return [Array]
|
275
|
-
#
|
276
|
-
attr_accessor :exclude
|
277
|
-
|
278
|
-
#
|
279
|
-
# Cookies to exclude from audit<br/>
|
280
|
-
#
|
281
|
-
# @return [Array]
|
282
|
-
#
|
283
|
-
attr_accessor :exclude_cookies
|
284
|
-
|
285
|
-
#
|
286
|
-
# Include filters <br/>
|
287
|
-
# Only URLs that match any of these patterns will be followed
|
288
|
-
#
|
289
|
-
# @return [Array]
|
290
|
-
#
|
291
|
-
attr_accessor :include
|
292
|
-
|
293
|
-
#
|
294
|
-
# Should the crawler follow subdomains?
|
295
|
-
#
|
296
|
-
# @return [Bool]
|
297
|
-
#
|
298
|
-
attr_accessor :follow_subdomains
|
299
|
-
|
300
|
-
#
|
301
|
-
# Harvest the HTTP responses for the whole site at the end or
|
302
|
-
# for each page?
|
303
|
-
#
|
304
|
-
# @return [Bool]
|
305
|
-
#
|
306
|
-
attr_accessor :http_harvest_last
|
307
|
-
|
308
|
-
# to be populated by the framework
|
309
|
-
attr_accessor :start_datetime
|
310
|
-
# to be populated by the framework
|
311
|
-
attr_accessor :finish_datetime
|
312
|
-
# to be populated by the framework
|
313
|
-
attr_accessor :delta_time
|
314
|
-
|
315
|
-
attr_accessor :lsplug
|
316
|
-
attr_accessor :plugins
|
317
|
-
|
318
|
-
attr_accessor :spider_first
|
319
|
-
|
320
|
-
attr_accessor :rpc_port
|
321
|
-
attr_accessor :ssl
|
322
|
-
attr_accessor :ssl_pkey
|
323
|
-
attr_accessor :ssl_cert
|
324
|
-
attr_accessor :ssl_ca
|
325
|
-
|
326
|
-
attr_accessor :server
|
327
|
-
|
328
|
-
attr_accessor :reroute_to_logfile
|
329
|
-
attr_accessor :pool_size
|
330
|
-
|
331
|
-
|
332
|
-
def initialize( )
|
333
|
-
|
334
|
-
# nil everything out
|
335
|
-
self.instance_variables.each {
|
336
|
-
|var|
|
337
|
-
instance_variable_set( var.to_s, nil )
|
338
|
-
}
|
339
|
-
|
340
|
-
@exclude = []
|
341
|
-
@include = []
|
342
|
-
@redundant = []
|
343
|
-
|
344
|
-
@reports = {}
|
345
|
-
@lsrep = []
|
346
|
-
|
347
|
-
@lsmod = []
|
348
|
-
@dir = Hash.new
|
349
|
-
@exclude_cookies = []
|
350
|
-
@load_profile = []
|
351
|
-
|
352
|
-
@plugins = {}
|
353
|
-
@lsplug = []
|
354
|
-
|
355
|
-
# set some defaults
|
356
|
-
@redirect_limit = 20
|
357
|
-
|
358
|
-
# relatively low but will give good performance without bottleneck
|
359
|
-
# on low bandwidth conections
|
360
|
-
@http_req_limit = 20
|
361
|
-
|
362
|
-
end
|
363
|
-
|
364
|
-
#
|
365
|
-
# Saves 'self' to file
|
366
|
-
#
|
367
|
-
# @param [String] file
|
368
|
-
#
|
369
|
-
def save( file )
|
370
|
-
|
371
|
-
dir = @dir.clone
|
372
|
-
load_profile = @load_profile.clone if @load_profile
|
373
|
-
save_profile = @save_profile.clone if @save_profile
|
374
|
-
authed_by = @authed_by.clone if @authed_by
|
375
|
-
|
376
|
-
@dir = nil
|
377
|
-
@load_profile = nil
|
378
|
-
@save_profile = nil
|
379
|
-
@authed_by = nil
|
380
|
-
|
381
|
-
begin
|
382
|
-
f = File.open( file + PROFILE_EXT, 'w' )
|
383
|
-
YAML.dump( self, f )
|
384
|
-
rescue
|
385
|
-
return
|
386
|
-
ensure
|
387
|
-
f.close
|
388
|
-
|
389
|
-
@dir = dir
|
390
|
-
@load_profile = load_profile
|
391
|
-
@save_profile = save_profile
|
392
|
-
@authed_by = authed_by
|
393
|
-
end
|
394
|
-
|
395
|
-
return f.path
|
396
|
-
end
|
397
|
-
|
398
|
-
def url=( str )
|
399
|
-
return if !str
|
400
|
-
|
401
|
-
require 'uri'
|
402
|
-
require self.dir['lib'] + 'exceptions'
|
403
|
-
require self.dir['lib'] + 'module/utilities'
|
404
|
-
|
405
|
-
begin
|
406
|
-
@url = URI( Arachni::Module::Utilities.normalize_url( str.to_s ) )
|
407
|
-
rescue
|
408
|
-
raise( Arachni::Exceptions::InvalidURL, "Invalid URL argument." )
|
409
|
-
end
|
410
|
-
|
411
|
-
return str
|
412
|
-
end
|
413
|
-
|
414
|
-
#
|
415
|
-
# Converts the Options object to hash
|
416
|
-
#
|
417
|
-
# @return [Hash]
|
418
|
-
#
|
419
|
-
def to_h
|
420
|
-
hash = Hash.new
|
421
|
-
self.instance_variables.each {
|
422
|
-
|var|
|
423
|
-
hash[normalize_name( var )] = self.instance_variable_get( var )
|
424
|
-
}
|
425
|
-
hash
|
426
|
-
end
|
427
|
-
|
428
|
-
#
|
429
|
-
# Merges self with the object in 'options'
|
430
|
-
#
|
431
|
-
# @param [Options]
|
432
|
-
#
|
433
|
-
def merge!( options )
|
434
|
-
options.to_h.each_pair {
|
435
|
-
|k, v|
|
436
|
-
|
437
|
-
next if ( v.is_a?( Array ) || v.is_a?( Hash ) ) && v.empty?
|
438
|
-
send( "#{k}=", v ) if v
|
439
|
-
}
|
440
|
-
end
|
441
|
-
|
442
|
-
def to_args
|
443
|
-
|
444
|
-
cli_args = ''
|
445
|
-
|
446
|
-
self.to_h.keys.each {
|
447
|
-
|key|
|
448
|
-
|
449
|
-
arg = self.to_arg( key )
|
450
|
-
|
451
|
-
cli_args += " #{arg.to_s}" if arg
|
452
|
-
}
|
453
|
-
|
454
|
-
return cli_args += " #{self.url}"
|
455
|
-
end
|
456
|
-
|
457
|
-
def to_arg( key )
|
458
|
-
|
459
|
-
var = self.instance_variable_get( "@#{key}" )
|
460
|
-
|
461
|
-
return if !var
|
462
|
-
return if ( var.is_a?( Array ) || var.is_a?( Hash ) ) && var.empty?
|
463
|
-
return if key == 'show_profile'
|
464
|
-
return if key == 'url'
|
465
|
-
return if key == 'dir'
|
466
|
-
return if key == 'include' && var == [/.*/]
|
467
|
-
return if key == 'reports' && var == ['stdout']
|
468
|
-
|
469
|
-
key = 'exclude_cookie' if key == 'exclude_cookies'
|
470
|
-
key = 'report' if key == 'reports'
|
471
|
-
|
472
|
-
key = key.gsub( '_', '-' )
|
473
|
-
|
474
|
-
arg = ''
|
475
|
-
|
476
|
-
case key
|
477
|
-
|
478
|
-
when 'mods'
|
479
|
-
var = var.join( ',' )
|
480
|
-
|
481
|
-
when 'arachni-verbose'
|
482
|
-
key = 'verbosity'
|
483
|
-
|
484
|
-
when 'redundant'
|
485
|
-
var.each {
|
486
|
-
|rule|
|
487
|
-
arg += " --#{key}=#{rule['regexp'].source}:#{rule['count']}"
|
488
|
-
}
|
489
|
-
return arg
|
490
|
-
|
491
|
-
when 'plugins','report'
|
492
|
-
arg = ''
|
493
|
-
var.each {
|
494
|
-
|opt, val|
|
495
|
-
arg += " --#{key.chomp( 's' )}=#{opt}"
|
496
|
-
arg += ':' if !val.empty?
|
497
|
-
|
498
|
-
val.each {
|
499
|
-
|k, v|
|
500
|
-
arg += "#{k}=#{v},"
|
501
|
-
}
|
502
|
-
|
503
|
-
arg.chomp!( ',' )
|
504
|
-
}
|
505
|
-
return arg
|
506
|
-
|
507
|
-
when 'proxy-port'
|
508
|
-
return
|
509
|
-
|
510
|
-
when 'proxy-addr'
|
511
|
-
return "--proxy=#{self.proxy_addr}:#{self.proxy_port}"
|
512
|
-
|
513
|
-
|
514
|
-
end
|
515
|
-
|
516
|
-
if( var.is_a?( TrueClass ) )
|
517
|
-
arg = "--#{key}"
|
518
|
-
end
|
519
|
-
|
520
|
-
if( var.is_a?( String ) || var.is_a?( Fixnum ) )
|
521
|
-
arg = "--#{key}=#{var.to_s}"
|
522
|
-
end
|
523
|
-
|
524
|
-
if( var.is_a?( Array ) )
|
525
|
-
|
526
|
-
var.each {
|
527
|
-
|i|
|
528
|
-
|
529
|
-
i = i.source if i.is_a?( Regexp )
|
530
|
-
|
531
|
-
arg += " --#{key}=#{i}"
|
532
|
-
}
|
533
|
-
|
534
|
-
end
|
535
|
-
|
536
|
-
return arg
|
537
|
-
end
|
538
|
-
|
539
|
-
private
|
540
|
-
|
541
|
-
def normalize_name( name )
|
542
|
-
name.to_s.gsub( '@', '' )
|
543
|
-
end
|
544
|
-
|
545
|
-
|
546
|
-
end
|
547
|
-
end
|