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
@@ -1,206 +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
|
-
require Options.instance.dir['lib'] + 'framework'
|
14
|
-
require Options.instance.dir['lib'] + 'rpc/xml/server/module/manager'
|
15
|
-
require Options.instance.dir['lib'] + 'rpc/xml/server/plugin/manager'
|
16
|
-
|
17
|
-
module RPC
|
18
|
-
module XML
|
19
|
-
module Server
|
20
|
-
|
21
|
-
#
|
22
|
-
# Extends the Framework adding XML-RPC specific functionality
|
23
|
-
#
|
24
|
-
# @author: Tasos "Zapotek" Laskos
|
25
|
-
# <tasos.laskos@gmail.com>
|
26
|
-
# <zapotek@segfault.gr>
|
27
|
-
# @version: 0.1.1
|
28
|
-
#
|
29
|
-
class Framework < Arachni::Framework
|
30
|
-
|
31
|
-
#
|
32
|
-
# Our run() method needs to run the parent's run() method in
|
33
|
-
# a separate thread.
|
34
|
-
#
|
35
|
-
alias :old_run :run
|
36
|
-
|
37
|
-
# make this inherited methods visible again
|
38
|
-
private :old_run, :stats, :pause!, :paused?, :resume!, :lsmod, :modules, :lsplug, :clean_up!
|
39
|
-
public :stats, :pause!, :paused?, :resume!, :lsmod, :modules, :lsplug, :clean_up!
|
40
|
-
|
41
|
-
#
|
42
|
-
# Aborts the running audit.
|
43
|
-
#
|
44
|
-
def abort!
|
45
|
-
@job.kill
|
46
|
-
return true
|
47
|
-
end
|
48
|
-
|
49
|
-
#
|
50
|
-
# Checks to see if an audit is running.
|
51
|
-
#
|
52
|
-
# @return [Bool]
|
53
|
-
#
|
54
|
-
def busy?
|
55
|
-
return false if !@job
|
56
|
-
return @job.alive?
|
57
|
-
end
|
58
|
-
|
59
|
-
#
|
60
|
-
# Checks whether the framework is in debug mode
|
61
|
-
#
|
62
|
-
def debug?
|
63
|
-
@@debug
|
64
|
-
end
|
65
|
-
|
66
|
-
#
|
67
|
-
# Checks whether the framework is in debug mode
|
68
|
-
#
|
69
|
-
def verbose?
|
70
|
-
@@verbose
|
71
|
-
end
|
72
|
-
|
73
|
-
|
74
|
-
#
|
75
|
-
# some XMLRPC libraries of other languages map remote objects to local objects
|
76
|
-
# creating an invalid syntax situation since the aforementioned languages
|
77
|
-
# may not allow "?" or "!" in method names.
|
78
|
-
#
|
79
|
-
# so we alias these methods to make it easier on 3rd party developers.
|
80
|
-
#
|
81
|
-
alias :pause :pause!
|
82
|
-
alias :is_paused :paused?
|
83
|
-
alias :resume :resume!
|
84
|
-
alias :clean_up :clean_up!
|
85
|
-
alias :is_busy :busy?
|
86
|
-
alias :is_debug :debug?
|
87
|
-
alias :is_verbose :verbose?
|
88
|
-
|
89
|
-
def initialize( opts )
|
90
|
-
super( opts )
|
91
|
-
@modules = Arachni::RPC::XML::Server::Module::Manager.new( opts )
|
92
|
-
@plugins = Arachni::RPC::XML::Server::Plugin::Manager.new( self )
|
93
|
-
end
|
94
|
-
|
95
|
-
#
|
96
|
-
# Returns an array of hashes with information
|
97
|
-
# about all available reports
|
98
|
-
#
|
99
|
-
# @return [Array<Hash>]
|
100
|
-
#
|
101
|
-
def lsplug
|
102
|
-
|
103
|
-
plug_info = []
|
104
|
-
|
105
|
-
@plugins.available( ).each {
|
106
|
-
|plugin|
|
107
|
-
|
108
|
-
info = @plugins[plugin].info
|
109
|
-
|
110
|
-
info[:plug_name] = plugin
|
111
|
-
info[:path] = @plugins.name_to_path( plugin )
|
112
|
-
|
113
|
-
info[:options] = [info[:options]].flatten.compact.map {
|
114
|
-
|opt|
|
115
|
-
opt_h = opt.to_h
|
116
|
-
opt_h['default'] = '' if opt_h['default'].nil?
|
117
|
-
opt_h['type'] = opt.type
|
118
|
-
opt_h
|
119
|
-
}
|
120
|
-
|
121
|
-
plug_info << info
|
122
|
-
}
|
123
|
-
|
124
|
-
@plugins.clear( )
|
125
|
-
|
126
|
-
return plug_info
|
127
|
-
end
|
128
|
-
|
129
|
-
|
130
|
-
#
|
131
|
-
# Starts the audit.
|
132
|
-
#
|
133
|
-
# The audit is started in a new thread to avoid service blocking.
|
134
|
-
#
|
135
|
-
def run
|
136
|
-
@job = Thread.new {
|
137
|
-
exception_jail { old_run }
|
138
|
-
}
|
139
|
-
return true
|
140
|
-
end
|
141
|
-
|
142
|
-
#
|
143
|
-
# Returns the results of the audit.
|
144
|
-
#
|
145
|
-
# @return [YAML] YAML dump of the results hash
|
146
|
-
#
|
147
|
-
def report
|
148
|
-
exception_jail {
|
149
|
-
return false if !@job
|
150
|
-
|
151
|
-
store = audit_store( true )
|
152
|
-
store.framework = ''
|
153
|
-
return YAML.dump( store.to_h.dup )
|
154
|
-
}
|
155
|
-
end
|
156
|
-
|
157
|
-
#
|
158
|
-
# Returns the results of the audit as a serialized AuditStore object.
|
159
|
-
#
|
160
|
-
# @return [YAML] YAML dump of the AuditStore
|
161
|
-
#
|
162
|
-
def auditstore
|
163
|
-
exception_jail {
|
164
|
-
return false if !@job
|
165
|
-
|
166
|
-
store = audit_store( true )
|
167
|
-
store.framework = nil
|
168
|
-
|
169
|
-
return YAML.dump( store )
|
170
|
-
}
|
171
|
-
end
|
172
|
-
|
173
|
-
#
|
174
|
-
# Enables debugging output
|
175
|
-
#
|
176
|
-
def debug_on
|
177
|
-
@@debug = true
|
178
|
-
end
|
179
|
-
|
180
|
-
#
|
181
|
-
# Disables debugging output
|
182
|
-
#
|
183
|
-
def debug_off
|
184
|
-
@@debug = false
|
185
|
-
end
|
186
|
-
|
187
|
-
#
|
188
|
-
# Enables debugging output
|
189
|
-
#
|
190
|
-
def verbose_on
|
191
|
-
@@verbose = true
|
192
|
-
end
|
193
|
-
|
194
|
-
#
|
195
|
-
# Disables debugging output
|
196
|
-
#
|
197
|
-
def verbose_off
|
198
|
-
@@verbose = false
|
199
|
-
end
|
200
|
-
|
201
|
-
end
|
202
|
-
|
203
|
-
end
|
204
|
-
end
|
205
|
-
end
|
206
|
-
end
|
@@ -1,191 +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 'webrick'
|
12
|
-
require 'webrick/https'
|
13
|
-
require 'xmlrpc/server'
|
14
|
-
require 'openssl'
|
15
|
-
|
16
|
-
module Arachni
|
17
|
-
|
18
|
-
require Options.instance.dir['lib'] + 'rpc/xml/server/base'
|
19
|
-
require Options.instance.dir['lib'] + 'rpc/xml/server/output'
|
20
|
-
require Options.instance.dir['lib'] + 'rpc/xml/server/framework'
|
21
|
-
require Options.instance.dir['lib'] + 'rpc/xml/server/options'
|
22
|
-
|
23
|
-
module RPC
|
24
|
-
module XML
|
25
|
-
module Server
|
26
|
-
|
27
|
-
#
|
28
|
-
# XMLRPC Server class
|
29
|
-
#
|
30
|
-
# Provides an XML-RPC server to assist with general integration and UI development.
|
31
|
-
#
|
32
|
-
# Only instantiated by the Dispatcher to provide support for multiple
|
33
|
-
# and concurent XMLRPC clients/scans.
|
34
|
-
#
|
35
|
-
# @author: Tasos "Zapotek" Laskos
|
36
|
-
# <tasos.laskos@gmail.com>
|
37
|
-
# <zapotek@segfault.gr>
|
38
|
-
# @version: 0.1.4
|
39
|
-
#
|
40
|
-
class Instance < Base
|
41
|
-
|
42
|
-
# the output interface for XML-RPC
|
43
|
-
include Arachni::UI::Output
|
44
|
-
include Arachni::Module::Utilities
|
45
|
-
|
46
|
-
private :shutdown, :alive?
|
47
|
-
public :shutdown, :alive?
|
48
|
-
|
49
|
-
|
50
|
-
#
|
51
|
-
# Initializes the XML-RPC interface, the HTTP(S) server and the framework.
|
52
|
-
#
|
53
|
-
# @param [Options] opts
|
54
|
-
#
|
55
|
-
def initialize( opts, token )
|
56
|
-
|
57
|
-
prep_framework
|
58
|
-
banner
|
59
|
-
|
60
|
-
@opts = opts
|
61
|
-
super( @opts, token )
|
62
|
-
|
63
|
-
if @opts.debug
|
64
|
-
debug!
|
65
|
-
end
|
66
|
-
|
67
|
-
|
68
|
-
if @opts.reroute_to_logfile
|
69
|
-
reroute_to_file( @opts.dir['root'] +
|
70
|
-
"logs/XMLRPC-Server - #{Process.pid}:#{@opts.rpc_port} - #{Time.now.asctime}.log" )
|
71
|
-
else
|
72
|
-
reroute_to_file( false )
|
73
|
-
end
|
74
|
-
|
75
|
-
set_handlers
|
76
|
-
|
77
|
-
# trap interupts and exit cleanly when required
|
78
|
-
trap( 'HUP' ) { shutdown }
|
79
|
-
trap( 'INT' ) { shutdown }
|
80
|
-
|
81
|
-
end
|
82
|
-
|
83
|
-
#
|
84
|
-
# Resets the framework leaving it lemon fresh for the next scan.
|
85
|
-
#
|
86
|
-
# If you reuse without reseting, Arachni will eat your kitten!<br/>
|
87
|
-
# (And I don't mean sexually...)
|
88
|
-
#
|
89
|
-
def reset
|
90
|
-
|
91
|
-
print_status( 'Resetting...' )
|
92
|
-
|
93
|
-
exception_jail {
|
94
|
-
@framework.modules.clear
|
95
|
-
Arachni.reset
|
96
|
-
Arachni::Options.instance.reset
|
97
|
-
prep_framework
|
98
|
-
set_handlers
|
99
|
-
output
|
100
|
-
}
|
101
|
-
|
102
|
-
print_status( 'Done.' )
|
103
|
-
|
104
|
-
return true
|
105
|
-
end
|
106
|
-
|
107
|
-
#
|
108
|
-
# Flushes the output buffer and returns all pending system messages.
|
109
|
-
#
|
110
|
-
# All messages are classified based on their type.
|
111
|
-
#
|
112
|
-
# @return [Array<Hash>]
|
113
|
-
#
|
114
|
-
def output
|
115
|
-
flush_buffer( )
|
116
|
-
end
|
117
|
-
|
118
|
-
#
|
119
|
-
# Makes the HTTP(S) server go bye-bye...Lights out!
|
120
|
-
#
|
121
|
-
def shutdown
|
122
|
-
print_status( 'Shutting down...' )
|
123
|
-
super
|
124
|
-
print_status( 'Done.' )
|
125
|
-
return true
|
126
|
-
end
|
127
|
-
alias :shutdown! :shutdown
|
128
|
-
|
129
|
-
#
|
130
|
-
# Starts the HTTP(S) server and the XML-RPC service.
|
131
|
-
#
|
132
|
-
def run
|
133
|
-
|
134
|
-
begin
|
135
|
-
print_status( 'Starting the server...' )
|
136
|
-
# start the show!
|
137
|
-
super
|
138
|
-
rescue Exception => e
|
139
|
-
exception_jail{ raise e }
|
140
|
-
exit 0
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
|
-
private
|
145
|
-
|
146
|
-
#
|
147
|
-
# Initialises the RPC framework.
|
148
|
-
#
|
149
|
-
def prep_framework
|
150
|
-
@framework = nil
|
151
|
-
@framework = Arachni::RPC::XML::Server::Framework.new( Options.instance )
|
152
|
-
end
|
153
|
-
|
154
|
-
#
|
155
|
-
# Outputs the Arachni banner.<br/>
|
156
|
-
# Displays version number, revision number, author details etc.
|
157
|
-
#
|
158
|
-
def banner
|
159
|
-
|
160
|
-
puts 'Arachni - Web Application Security Scanner Framework v' +
|
161
|
-
@framework.version + ' [' + @framework.revision + ']
|
162
|
-
Author: Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
163
|
-
<zapotek@segfault.gr>
|
164
|
-
(With the support of the community and the Arachni Team.)
|
165
|
-
|
166
|
-
Website: http://github.com/Zapotek/arachni
|
167
|
-
Documentation: http://github.com/Zapotek/arachni/wiki'
|
168
|
-
puts
|
169
|
-
puts
|
170
|
-
|
171
|
-
end
|
172
|
-
|
173
|
-
#
|
174
|
-
# Starts the XML-RPC service and attaches it to the HTTP(S) server.<br/>
|
175
|
-
# It also prepares all the RPC handlers.
|
176
|
-
#
|
177
|
-
def set_handlers
|
178
|
-
@service.clear_handlers
|
179
|
-
add_handler( "service", self )
|
180
|
-
add_handler( "framework", @framework )
|
181
|
-
add_handler( "opts", @framework.opts )
|
182
|
-
add_handler( "modules", @framework.modules )
|
183
|
-
add_handler( "plugins", @framework.plugins )
|
184
|
-
end
|
185
|
-
|
186
|
-
end
|
187
|
-
|
188
|
-
end
|
189
|
-
end
|
190
|
-
end
|
191
|
-
end
|
data/lib/ruby/xmlrpc/server.rb
DELETED
@@ -1,27 +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
|
-
#
|
12
|
-
# Overloads the {XMLRPC::BasicServer} class with a clear_handlers() method.
|
13
|
-
#
|
14
|
-
# @author: Tasos "Zapotek" Laskos
|
15
|
-
# <tasos.laskos@gmail.com>
|
16
|
-
# <zapotek@segfault.gr>
|
17
|
-
# @version: 0.1
|
18
|
-
#
|
19
|
-
module XMLRPC
|
20
|
-
class BasicServer
|
21
|
-
|
22
|
-
def clear_handlers
|
23
|
-
@handler.clear
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
end
|
@@ -1,172 +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
|
-
module UI
|
13
|
-
module Web
|
14
|
-
module Addons
|
15
|
-
|
16
|
-
#
|
17
|
-
#
|
18
|
-
# Auto-deploy add-on.
|
19
|
-
#
|
20
|
-
# Allows users to automatically convert any SSH enabled Linux box into an Arachni Dispatcher.
|
21
|
-
#
|
22
|
-
# @author: Tasos "Zapotek" Laskos
|
23
|
-
# <tasos.laskos@gmail.com>
|
24
|
-
# <zapotek@segfault.gr>
|
25
|
-
#
|
26
|
-
# @version: 0.1
|
27
|
-
#
|
28
|
-
class AutoDeploy < Base
|
29
|
-
|
30
|
-
def run
|
31
|
-
|
32
|
-
settings.helpers do
|
33
|
-
require File.dirname( __FILE__ ) + '/autodeploy/lib/manager'
|
34
|
-
|
35
|
-
def autodeploy
|
36
|
-
@@autodeploy ||= Manager.new( Options.instance, settings )
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
get "/" do
|
42
|
-
present :index, :deployments => autodeploy.list,
|
43
|
-
:root => current_addon.path_root, :show_output => false, :ret => {}
|
44
|
-
|
45
|
-
end
|
46
|
-
|
47
|
-
post "/" do
|
48
|
-
|
49
|
-
if !params[:host] || params[:host].empty? || !params[:username] ||
|
50
|
-
params[:username].empty? || !params[:password] || params[:password].empty? ||
|
51
|
-
!params[:port] || params[:port].empty? ||
|
52
|
-
!params[:dispatcher_port] || params[:dispatcher_port].empty?
|
53
|
-
|
54
|
-
flash[:err] = "Please fill in all the fields."
|
55
|
-
|
56
|
-
present :index, :deployments => autodeploy.list,
|
57
|
-
:root => current_addon.path_root, :show_output => false,
|
58
|
-
:ret => {}
|
59
|
-
else
|
60
|
-
deployment = Manager::Deployment.new( :host => params[:host],
|
61
|
-
:port => params[:port], :user => params[:username],
|
62
|
-
:dispatcher_port => params[:dispatcher_port] )
|
63
|
-
|
64
|
-
settings.log.autodeploy_setup_started( env, autodeploy.get_url( deployment ) )
|
65
|
-
channel = autodeploy.setup( deployment, params[:password] )
|
66
|
-
|
67
|
-
present :index, :deployments => autodeploy.list,
|
68
|
-
:root => current_addon.path_root, :channel => channel,
|
69
|
-
:show_output => true, :ret => {}
|
70
|
-
end
|
71
|
-
|
72
|
-
end
|
73
|
-
|
74
|
-
get '/channel/:channel' do
|
75
|
-
content_type :json
|
76
|
-
autodeploy.output( params[:channel] ).to_json
|
77
|
-
end
|
78
|
-
|
79
|
-
get '/channel/:channel/finalize' do
|
80
|
-
|
81
|
-
deployment = autodeploy.finalize_setup( params[:channel] )
|
82
|
-
log.autodeploy_deployment_saved( env,
|
83
|
-
"ID: #{deployment.id} [#{autodeploy.get_url( deployment )}]" )
|
84
|
-
|
85
|
-
flash[:ok] = "Deployment was successful."
|
86
|
-
|
87
|
-
present :index, :deployments => autodeploy.list, :ret => {},
|
88
|
-
:root => current_addon.path_root, :show_output => false
|
89
|
-
end
|
90
|
-
|
91
|
-
|
92
|
-
post '/:id' do
|
93
|
-
|
94
|
-
ret = {}
|
95
|
-
if !params[:password] || params[:password].empty?
|
96
|
-
flash[:err] = "The password field is required."
|
97
|
-
else
|
98
|
-
if params[:action] == 'delete'
|
99
|
-
|
100
|
-
ret = autodeploy.delete( params[:id], params[:password] )
|
101
|
-
|
102
|
-
if ret[:code]
|
103
|
-
flash[:err] = "Uninstall process aborted because the last command failed.<br/>" +
|
104
|
-
" Please ensure that the password is correct and the network is up."
|
105
|
-
else
|
106
|
-
log.autodeploy_deployment_deleted( env, params[:id] )
|
107
|
-
flash[:ok] = "Uninstall process was successful."
|
108
|
-
end
|
109
|
-
|
110
|
-
elsif params[:action] == 'run'
|
111
|
-
deployment = autodeploy.get( params[:id] )
|
112
|
-
ret = autodeploy.run( deployment, params[:password] )
|
113
|
-
|
114
|
-
url = 'https://' + deployment.host + ':' + deployment.dispatcher_port
|
115
|
-
|
116
|
-
if settings.dispatchers.alive?( url )
|
117
|
-
flash[:ok] = "Dispatcher is up and running."
|
118
|
-
DispatcherManager::Dispatcher.first_or_create( :url => url )
|
119
|
-
settings.log.autodeploy_dispatcher_enabled( env,
|
120
|
-
"ID: #{deployment.id} [#{autodeploy.get_url( deployment )}]" )
|
121
|
-
|
122
|
-
ret = {}
|
123
|
-
else
|
124
|
-
flash[:err] = "Could not run the Dispatcher.<br/>" +
|
125
|
-
" Please ensure that the password is correct and the network is up."
|
126
|
-
end
|
127
|
-
elsif params[:action] == 'shutdown'
|
128
|
-
deployment = autodeploy.get( params[:id] )
|
129
|
-
ret = autodeploy.shutdown( deployment, params[:password] )
|
130
|
-
|
131
|
-
if ret[:code] == 0 && !settings.dispatchers.alive?( url )
|
132
|
-
flash[:ok] = "Dispatcher has been shutdown."
|
133
|
-
settings.log.autodeploy_dispatcher_shutdown( env,
|
134
|
-
"ID: #{deployment.id} [#{autodeploy.get_url( deployment )}]" )
|
135
|
-
|
136
|
-
ret = {}
|
137
|
-
else
|
138
|
-
flash[:err] = "Could not shutdown the Dispatcher.<br/>" +
|
139
|
-
" Please ensure that the password is correct and the network is up."
|
140
|
-
end
|
141
|
-
|
142
|
-
|
143
|
-
end
|
144
|
-
end
|
145
|
-
|
146
|
-
present :index, :deployments => autodeploy.list,
|
147
|
-
:root => current_addon.path_root, :ret => ret, :show_output => false
|
148
|
-
end
|
149
|
-
|
150
|
-
|
151
|
-
end
|
152
|
-
|
153
|
-
def title
|
154
|
-
"Auto-deploy [#{Manager.new( Options.instance, settings ).list.size}]"
|
155
|
-
end
|
156
|
-
|
157
|
-
def self.info
|
158
|
-
{
|
159
|
-
:name => 'Auto-deploy',
|
160
|
-
:description => %q{Enables you to automatically convert any SSH enabled Linux box into an Arachni Dispatcher.},
|
161
|
-
:author => 'Tasos "Zapotek" Laskos <tasos.laskos@gmail.com> ',
|
162
|
-
:version => '0.1'
|
163
|
-
}
|
164
|
-
end
|
165
|
-
|
166
|
-
|
167
|
-
end
|
168
|
-
|
169
|
-
end
|
170
|
-
end
|
171
|
-
end
|
172
|
-
end
|