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
@@ -0,0 +1,184 @@
|
|
1
|
+
=begin
|
2
|
+
Arachni
|
3
|
+
Copyright (c) 2010-2012 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
|
+
require Options.instance.dir['lib'] + 'rpc/client/instance'
|
14
|
+
require Options.instance.dir['lib'] + 'rpc/client/dispatcher'
|
15
|
+
|
16
|
+
require Options.instance.dir['lib'] + 'rpc/server/base'
|
17
|
+
require Options.instance.dir['lib'] + 'rpc/server/output'
|
18
|
+
require Options.instance.dir['lib'] + 'rpc/server/options'
|
19
|
+
|
20
|
+
require Options.instance.dir['lib'] + 'rpc/server/framework'
|
21
|
+
|
22
|
+
module RPC
|
23
|
+
class Server
|
24
|
+
|
25
|
+
#
|
26
|
+
# RPC Server class
|
27
|
+
#
|
28
|
+
# Provides an RPC server to assist with general integration and UI development.
|
29
|
+
#
|
30
|
+
# Only instantiated by the Dispatcher to provide support for multiple
|
31
|
+
# and concurent RPC clients/scans.
|
32
|
+
#
|
33
|
+
# @author: Tasos "Zapotek" Laskos
|
34
|
+
# <tasos.laskos@gmail.com>
|
35
|
+
# <zapotek@segfault.gr>
|
36
|
+
# @version: 0.1.5
|
37
|
+
#
|
38
|
+
class Instance
|
39
|
+
|
40
|
+
# the output interface for RPC
|
41
|
+
include Arachni::UI::Output
|
42
|
+
include Arachni::Module::Utilities
|
43
|
+
|
44
|
+
#
|
45
|
+
# Initializes the RPC interface, the HTTP(S) server and the framework.
|
46
|
+
#
|
47
|
+
# @param [Options] opts
|
48
|
+
#
|
49
|
+
def initialize( opts, token )
|
50
|
+
|
51
|
+
prep_framework
|
52
|
+
banner
|
53
|
+
|
54
|
+
@opts = opts
|
55
|
+
@token = token
|
56
|
+
@server = Base.new( @opts, token )
|
57
|
+
|
58
|
+
@opts.datastore[:token] = token
|
59
|
+
|
60
|
+
debug! if @opts.debug
|
61
|
+
|
62
|
+
|
63
|
+
if logfile = @opts.reroute_to_logfile
|
64
|
+
reroute_to_file( @opts.dir['logs'] +
|
65
|
+
"Instance - #{Process.pid}-#{@opts.rpc_port}.log" )
|
66
|
+
else
|
67
|
+
reroute_to_file( false )
|
68
|
+
end
|
69
|
+
|
70
|
+
set_handlers
|
71
|
+
|
72
|
+
# trap interrupts and exit cleanly when required
|
73
|
+
[ 'QUIT', 'INT' ].each {
|
74
|
+
|signal|
|
75
|
+
trap( signal ){ shutdown } if Signal.list.has_key?( signal )
|
76
|
+
}
|
77
|
+
|
78
|
+
run
|
79
|
+
end
|
80
|
+
|
81
|
+
#
|
82
|
+
# Flushes the output buffer and returns all pending system messages.
|
83
|
+
#
|
84
|
+
# All messages are classified based on their type.
|
85
|
+
#
|
86
|
+
# @return [Array<Hash>]
|
87
|
+
#
|
88
|
+
def output( &block )
|
89
|
+
@framework.output( &block )
|
90
|
+
end
|
91
|
+
|
92
|
+
#
|
93
|
+
# Makes the server go bye-bye...Lights out!
|
94
|
+
#
|
95
|
+
def shutdown
|
96
|
+
print_status( 'Shutting down...' )
|
97
|
+
|
98
|
+
t = []
|
99
|
+
@framework.instances.each {
|
100
|
+
|instance|
|
101
|
+
# Don't know why but this works better than EM's stuff
|
102
|
+
t << Thread.new {
|
103
|
+
@framework.instance_eval{
|
104
|
+
connect_to_instance( instance ).service.shutdown!
|
105
|
+
}
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
t.join
|
110
|
+
|
111
|
+
@server.shutdown
|
112
|
+
return true
|
113
|
+
end
|
114
|
+
alias :shutdown! :shutdown
|
115
|
+
|
116
|
+
def alive?
|
117
|
+
@server.alive?
|
118
|
+
end
|
119
|
+
|
120
|
+
private
|
121
|
+
|
122
|
+
#
|
123
|
+
# Starts the HTTPS server and the RPC service.
|
124
|
+
#
|
125
|
+
def run
|
126
|
+
print_status( 'Starting the server...' )
|
127
|
+
# start the show!
|
128
|
+
@server.run
|
129
|
+
end
|
130
|
+
|
131
|
+
def dispatcher
|
132
|
+
@dispatcher ||=
|
133
|
+
Arachni::RPC::Client::Dispatcher.new( @opts, @opts.datastore[:dispatcher_url] )
|
134
|
+
end
|
135
|
+
|
136
|
+
#
|
137
|
+
# Initialises the RPC framework.
|
138
|
+
#
|
139
|
+
def prep_framework
|
140
|
+
@framework = Arachni::RPC::Server::Framework.new( Options.instance )
|
141
|
+
end
|
142
|
+
|
143
|
+
#
|
144
|
+
# Outputs the Arachni banner.<br/>
|
145
|
+
# Displays version number, revision number, author details etc.
|
146
|
+
#
|
147
|
+
def banner
|
148
|
+
|
149
|
+
puts 'Arachni - Web Application Security Scanner Framework v' +
|
150
|
+
@framework.version + ' [' + @framework.revision + ']
|
151
|
+
Author: Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
152
|
+
<zapotek@segfault.gr>
|
153
|
+
(With the support of the community and the Arachni Team.)
|
154
|
+
|
155
|
+
Website: http://github.com/Zapotek/arachni
|
156
|
+
Documentation: http://github.com/Zapotek/arachni/wiki'
|
157
|
+
puts
|
158
|
+
puts
|
159
|
+
|
160
|
+
end
|
161
|
+
|
162
|
+
#
|
163
|
+
# Starts the RPC service and attaches it to the HTTP(S) server.<br/>
|
164
|
+
# It also prepares all the RPC handlers.
|
165
|
+
#
|
166
|
+
def set_handlers
|
167
|
+
@server.add_async_check {
|
168
|
+
|method|
|
169
|
+
# methods that expect a block are async
|
170
|
+
method.parameters.flatten.include?( :block )
|
171
|
+
}
|
172
|
+
|
173
|
+
@server.add_handler( "service", self )
|
174
|
+
@server.add_handler( "framework", @framework )
|
175
|
+
@server.add_handler( "opts", @framework.opts )
|
176
|
+
@server.add_handler( "modules", @framework.modules )
|
177
|
+
@server.add_handler( "plugins", @framework.plugins )
|
178
|
+
end
|
179
|
+
|
180
|
+
end
|
181
|
+
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
=begin
|
2
2
|
Arachni
|
3
|
-
Copyright (c) 2010-
|
3
|
+
Copyright (c) 2010-2012 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
4
4
|
|
5
5
|
This is free software; you can copy and distribute and modify
|
6
6
|
this program under the term of the GPL v2.0 License
|
@@ -13,14 +13,13 @@ module Arachni
|
|
13
13
|
require Options.instance.dir['lib'] + 'module/manager'
|
14
14
|
|
15
15
|
module RPC
|
16
|
-
|
17
|
-
module Server
|
16
|
+
class Server
|
18
17
|
|
19
18
|
module Module
|
20
19
|
|
21
20
|
#
|
22
21
|
# We need to extend the original Manager and redeclare its inherited methods
|
23
|
-
# which are required over
|
22
|
+
# which are required over RPC.
|
24
23
|
#
|
25
24
|
# @author: Tasos "Zapotek" Laskos
|
26
25
|
# <tasos.laskos@gmail.com>
|
@@ -37,9 +36,13 @@ class Manager < ::Arachni::Module::Manager
|
|
37
36
|
super( opts )
|
38
37
|
end
|
39
38
|
|
40
|
-
|
39
|
+
def load( mods )
|
40
|
+
super( mods )
|
41
|
+
@opts.mods = mods
|
42
|
+
end
|
41
43
|
|
42
44
|
end
|
45
|
+
|
43
46
|
end
|
44
47
|
end
|
45
48
|
end
|
@@ -0,0 +1,267 @@
|
|
1
|
+
=begin
|
2
|
+
Arachni
|
3
|
+
Copyright (c) 2010-2012 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
|
+
|
12
|
+
module Arachni
|
13
|
+
|
14
|
+
require Options.instance.dir['lib'] + 'rpc/server/output'
|
15
|
+
|
16
|
+
module RPC
|
17
|
+
class Server
|
18
|
+
|
19
|
+
class Dispatcher
|
20
|
+
|
21
|
+
#
|
22
|
+
# Dispatcher node class, helps maintain a list of all available Dispatchers in the grid
|
23
|
+
# and announce itself to neighbouring Dispatchers.
|
24
|
+
#
|
25
|
+
# As soon as a new Node is fired up it checks-in with its neighbour and grabs
|
26
|
+
# a list of all available peers.
|
27
|
+
#
|
28
|
+
# As soon as it receives the peer list it then announces itself to them.
|
29
|
+
#
|
30
|
+
# Upon convergence there will be a grid of Dispatchers each one with its own copy
|
31
|
+
# of all available Dispatcher URLs.
|
32
|
+
#
|
33
|
+
# @author: Tasos "Zapotek" Laskos
|
34
|
+
# <tasos.laskos@gmail.com>
|
35
|
+
# <zapotek@segfault.gr>
|
36
|
+
# @version: 0.1
|
37
|
+
#
|
38
|
+
class Node
|
39
|
+
|
40
|
+
include Arachni::UI::Output
|
41
|
+
|
42
|
+
#
|
43
|
+
# Initializes the node by:
|
44
|
+
# * Adding the neighbour (if the user has supplied one) to the peer list
|
45
|
+
# * Getting the neighbour's peer list and appending them to its own
|
46
|
+
# * Announces itself to the neighbour and instructs it to propagate our URL to the others
|
47
|
+
#
|
48
|
+
# @param [Arachni::Options] opts
|
49
|
+
# @param [String] logfile were to send the output
|
50
|
+
#
|
51
|
+
def initialize( opts, logfile )
|
52
|
+
@opts = opts
|
53
|
+
|
54
|
+
reroute_to_file( logfile )
|
55
|
+
|
56
|
+
print_status( 'Initing grid node...' )
|
57
|
+
|
58
|
+
@dead_nodes = []
|
59
|
+
@neighbours = Set.new
|
60
|
+
@nodes_info_cache = []
|
61
|
+
|
62
|
+
if neighbour = @opts.neighbour
|
63
|
+
add_neighbour( neighbour )
|
64
|
+
|
65
|
+
peer = connect_to_peer( neighbour )
|
66
|
+
peer.node.neighbours {
|
67
|
+
|urls|
|
68
|
+
urls.each {
|
69
|
+
|url|
|
70
|
+
@neighbours << url if url != @opts.datastore[:dispatcher_url]
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
peer.node.add_neighbour( @opts.datastore[:dispatcher_url], true ){
|
75
|
+
|res|
|
76
|
+
|
77
|
+
if res.rpc_exception?
|
78
|
+
print_info( 'Neighbour seems dead: ' + neighbour )
|
79
|
+
remove_neighbour( neighbour )
|
80
|
+
end
|
81
|
+
}
|
82
|
+
end
|
83
|
+
|
84
|
+
print_status( 'Node ready.' )
|
85
|
+
|
86
|
+
log_updated_neighbours
|
87
|
+
|
88
|
+
::EM.add_periodic_timer( 60 ) {
|
89
|
+
::EM.defer {
|
90
|
+
ping
|
91
|
+
check_for_comebacks
|
92
|
+
}
|
93
|
+
}
|
94
|
+
end
|
95
|
+
|
96
|
+
#
|
97
|
+
# Adds a neighbour to the peer list
|
98
|
+
#
|
99
|
+
# @param [String] node_url URL of a neighbouring node
|
100
|
+
# @param [Boolean] propagate wether or not to announce the new node
|
101
|
+
# to the ones in the peer list
|
102
|
+
#
|
103
|
+
def add_neighbour( node_url, propagate = false )
|
104
|
+
# we don't want ourselves in the Set
|
105
|
+
return false if node_url == @opts.datastore[:dispatcher_url]
|
106
|
+
|
107
|
+
print_status 'Adding neighbour: ' + node_url
|
108
|
+
|
109
|
+
@neighbours << node_url
|
110
|
+
log_updated_neighbours
|
111
|
+
announce( node_url ) if propagate
|
112
|
+
|
113
|
+
return true
|
114
|
+
end
|
115
|
+
|
116
|
+
|
117
|
+
#
|
118
|
+
# Returns all neighbour/node/peer URLs
|
119
|
+
#
|
120
|
+
# @return [Array]
|
121
|
+
#
|
122
|
+
def neighbours
|
123
|
+
@neighbours.to_a
|
124
|
+
end
|
125
|
+
|
126
|
+
def remove_neighbour( node_url )
|
127
|
+
@neighbours -= [node_url]
|
128
|
+
@dead_nodes << node_url
|
129
|
+
end
|
130
|
+
|
131
|
+
def neighbours_with_info( &block )
|
132
|
+
raise( "This method requires a block!" ) if !block_given?
|
133
|
+
|
134
|
+
@neighbours_cmp = ''
|
135
|
+
if @nodes_info_cache.empty? || @neighbours_cmp != neighbours.to_s
|
136
|
+
|
137
|
+
@neighbours_cmp = neighbours.to_s
|
138
|
+
|
139
|
+
::EM::Iterator.new( neighbours ).map( proc {
|
140
|
+
|neighbour, iter|
|
141
|
+
|
142
|
+
connect_to_peer( neighbour ).node.info {
|
143
|
+
|info|
|
144
|
+
|
145
|
+
if info.rpc_exception?
|
146
|
+
print_info( 'Neighbour seems dead: ' + neighbour )
|
147
|
+
remove_neighbour( neighbour )
|
148
|
+
log_updated_neighbours
|
149
|
+
|
150
|
+
iter.return( nil )
|
151
|
+
else
|
152
|
+
iter.return( info )
|
153
|
+
end
|
154
|
+
}
|
155
|
+
}, proc {
|
156
|
+
|nodes|
|
157
|
+
@nodes_info_cache = nodes.compact
|
158
|
+
block.call( @nodes_info_cache )
|
159
|
+
})
|
160
|
+
else
|
161
|
+
block.call( @nodes_info_cache )
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
#
|
166
|
+
# Returns node specific info:
|
167
|
+
# * Bandwidth Pipe ID
|
168
|
+
# * Weight
|
169
|
+
# * Nickname
|
170
|
+
# * Cost
|
171
|
+
#
|
172
|
+
# @return [Hash]
|
173
|
+
#
|
174
|
+
def info
|
175
|
+
return {
|
176
|
+
'url' => @opts.datastore[:dispatcher_url],
|
177
|
+
'pipe_id' => @opts.pipe_id,
|
178
|
+
'weight' => @opts.weight,
|
179
|
+
'nickname' => @opts.nickname,
|
180
|
+
'cost' => @opts.cost
|
181
|
+
}
|
182
|
+
end
|
183
|
+
|
184
|
+
private
|
185
|
+
|
186
|
+
def log_updated_neighbours
|
187
|
+
print_info 'Updated neighbours:'
|
188
|
+
|
189
|
+
if !neighbours.empty?
|
190
|
+
neighbours.each {
|
191
|
+
|node|
|
192
|
+
print_info( '---- ' + node )
|
193
|
+
}
|
194
|
+
else
|
195
|
+
print_info( '<empty>' )
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
def ping
|
200
|
+
neighbours.each {
|
201
|
+
|neighbour|
|
202
|
+
connect_to_peer( neighbour ).alive? {
|
203
|
+
|res|
|
204
|
+
if res.rpc_exception?
|
205
|
+
remove_neighbour( neighbour )
|
206
|
+
print_status( "Found dead neighbour: #{neighbour} " )
|
207
|
+
end
|
208
|
+
}
|
209
|
+
}
|
210
|
+
end
|
211
|
+
|
212
|
+
def check_for_comebacks
|
213
|
+
d_nodes = @dead_nodes.dup
|
214
|
+
d_nodes.each {
|
215
|
+
|url|
|
216
|
+
connect_to_peer( url ).alive? {
|
217
|
+
|res|
|
218
|
+
|
219
|
+
if !res.rpc_exception?
|
220
|
+
print_status( 'Dispatcher came back to life: ' + url )
|
221
|
+
|
222
|
+
([@opts.datastore[:dispatcher_url]] | neighbours ).each {
|
223
|
+
|node|
|
224
|
+
neighbour.node.add_neighbour( node ){}
|
225
|
+
}
|
226
|
+
|
227
|
+
add_neighbour( url )
|
228
|
+
@dead_nodes -= [url]
|
229
|
+
end
|
230
|
+
}
|
231
|
+
}
|
232
|
+
end
|
233
|
+
|
234
|
+
#
|
235
|
+
# Announces the node to the ones in the peer list
|
236
|
+
#
|
237
|
+
# @param [String] node URL
|
238
|
+
#
|
239
|
+
def announce( node )
|
240
|
+
print_status 'Advertising: ' + node
|
241
|
+
|
242
|
+
neighbours.each {
|
243
|
+
|peer|
|
244
|
+
next if peer == node
|
245
|
+
|
246
|
+
print_info '---- to: ' + peer
|
247
|
+
connect_to_peer( peer ).node.add_neighbour( node ) {
|
248
|
+
|res|
|
249
|
+
if res.rpc_exception?
|
250
|
+
remove_neighbour( peer )
|
251
|
+
end
|
252
|
+
}
|
253
|
+
}
|
254
|
+
|
255
|
+
end
|
256
|
+
|
257
|
+
def connect_to_peer( url )
|
258
|
+
Arachni::RPC::Client::Dispatcher.new( @opts, url )
|
259
|
+
end
|
260
|
+
|
261
|
+
end
|
262
|
+
|
263
|
+
end
|
264
|
+
|
265
|
+
end
|
266
|
+
end
|
267
|
+
end
|