arachni 0.2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ACKNOWLEDGMENTS.md +14 -0
- data/AUTHORS.md +6 -0
- data/CHANGELOG.md +162 -0
- data/CONTRIBUTORS.md +10 -0
- data/EXPLOITATION.md +429 -0
- data/HACKING.md +101 -0
- data/LICENSE.md +341 -0
- data/README.md +350 -0
- data/Rakefile +86 -0
- data/bin/arachni +22 -0
- data/bin/arachni_web +77 -0
- data/bin/arachni_xmlrpc +21 -0
- data/bin/arachni_xmlrpcd +82 -0
- data/bin/arachni_xmlrpcd_monitor +74 -0
- data/conf/README.webui.yaml.txt +44 -0
- data/conf/webui.yaml +11 -0
- data/external/metasploit/LICENSE +24 -0
- data/external/metasploit/modules/exploits/unix/webapp/arachni_exec.rb +142 -0
- data/external/metasploit/modules/exploits/unix/webapp/arachni_path_traversal.rb +113 -0
- data/external/metasploit/modules/exploits/unix/webapp/arachni_php_eval.rb +150 -0
- data/external/metasploit/modules/exploits/unix/webapp/arachni_php_include.rb +141 -0
- data/external/metasploit/modules/exploits/unix/webapp/arachni_sqlmap.rb +92 -0
- data/external/metasploit/plugins/arachni.rb +536 -0
- data/getoptslong.rb +241 -0
- data/lib/anemone.rb +2 -0
- data/lib/anemone/cookie_store.rb +35 -0
- data/lib/anemone/core.rb +371 -0
- data/lib/anemone/exceptions.rb +5 -0
- data/lib/anemone/http.rb +144 -0
- data/lib/anemone/page.rb +337 -0
- data/lib/anemone/page_store.rb +160 -0
- data/lib/anemone/storage.rb +34 -0
- data/lib/anemone/storage/base.rb +75 -0
- data/lib/anemone/storage/exceptions.rb +15 -0
- data/lib/anemone/storage/mongodb.rb +89 -0
- data/lib/anemone/storage/pstore.rb +50 -0
- data/lib/anemone/storage/redis.rb +90 -0
- data/lib/anemone/storage/tokyo_cabinet.rb +57 -0
- data/lib/anemone/tentacle.rb +40 -0
- data/lib/arachni.rb +16 -0
- data/lib/audit_store.rb +346 -0
- data/lib/component_manager.rb +293 -0
- data/lib/component_options.rb +395 -0
- data/lib/exceptions.rb +76 -0
- data/lib/framework.rb +637 -0
- data/lib/http.rb +809 -0
- data/lib/issue.rb +302 -0
- data/lib/module.rb +4 -0
- data/lib/module/auditor.rb +455 -0
- data/lib/module/base.rb +188 -0
- data/lib/module/element_db.rb +158 -0
- data/lib/module/key_filler.rb +87 -0
- data/lib/module/manager.rb +87 -0
- data/lib/module/output.rb +68 -0
- data/lib/module/trainer.rb +240 -0
- data/lib/module/utilities.rb +110 -0
- data/lib/options.rb +547 -0
- data/lib/parser.rb +2 -0
- data/lib/parser/auditable.rb +522 -0
- data/lib/parser/elements.rb +296 -0
- data/lib/parser/page.rb +149 -0
- data/lib/parser/parser.rb +717 -0
- data/lib/plugin.rb +4 -0
- data/lib/plugin/base.rb +110 -0
- data/lib/plugin/manager.rb +162 -0
- data/lib/report.rb +4 -0
- data/lib/report/base.rb +119 -0
- data/lib/report/manager.rb +92 -0
- data/lib/rpc/xml/client/base.rb +71 -0
- data/lib/rpc/xml/client/dispatcher.rb +49 -0
- data/lib/rpc/xml/client/instance.rb +88 -0
- data/lib/rpc/xml/server/base.rb +90 -0
- data/lib/rpc/xml/server/dispatcher.rb +357 -0
- data/lib/rpc/xml/server/framework.rb +206 -0
- data/lib/rpc/xml/server/instance.rb +191 -0
- data/lib/rpc/xml/server/module/manager.rb +46 -0
- data/lib/rpc/xml/server/options.rb +124 -0
- data/lib/rpc/xml/server/output.rb +299 -0
- data/lib/rpc/xml/server/plugin/manager.rb +58 -0
- data/lib/ruby.rb +5 -0
- data/lib/ruby/object.rb +32 -0
- data/lib/ruby/string.rb +74 -0
- data/lib/ruby/xmlrpc/server.rb +27 -0
- data/lib/spider.rb +200 -0
- data/lib/typhoeus/request.rb +91 -0
- data/lib/typhoeus/response.rb +34 -0
- data/lib/ui/cli/cli.rb +744 -0
- data/lib/ui/cli/output.rb +279 -0
- data/lib/ui/web/log.rb +82 -0
- data/lib/ui/web/output_stream.rb +94 -0
- data/lib/ui/web/report_manager.rb +222 -0
- data/lib/ui/web/server.rb +903 -0
- data/lib/ui/web/server/db/placeholder +0 -0
- data/lib/ui/web/server/public/banner.png +0 -0
- data/lib/ui/web/server/public/bodybg-small.png +0 -0
- data/lib/ui/web/server/public/bodybg.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/pbar-ani.gif +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/ui/web/server/public/css/smoothness/jquery-ui-1.8.9.custom.css +573 -0
- data/lib/ui/web/server/public/favicon.ico +0 -0
- data/lib/ui/web/server/public/footer.jpg +0 -0
- data/lib/ui/web/server/public/icons/error.png +0 -0
- data/lib/ui/web/server/public/icons/info.png +0 -0
- data/lib/ui/web/server/public/icons/ok.png +0 -0
- data/lib/ui/web/server/public/icons/status.png +0 -0
- data/lib/ui/web/server/public/js/jquery-1.4.4.min.js +167 -0
- data/lib/ui/web/server/public/js/jquery-ui-1.8.9.custom.min.js +781 -0
- data/lib/ui/web/server/public/logo.png +0 -0
- data/lib/ui/web/server/public/nav-left.jpg +0 -0
- data/lib/ui/web/server/public/nav-right.jpg +0 -0
- data/lib/ui/web/server/public/nav-selected-left.jpg +0 -0
- data/lib/ui/web/server/public/nav-selected-right.jpg +0 -0
- data/lib/ui/web/server/public/reports/placeholder +1 -0
- data/lib/ui/web/server/public/sidebar-bottom.jpg +0 -0
- data/lib/ui/web/server/public/sidebar-h4.jpg +0 -0
- data/lib/ui/web/server/public/sidebar-top.jpg +0 -0
- data/lib/ui/web/server/public/spider.png +0 -0
- data/lib/ui/web/server/public/style.css +604 -0
- data/lib/ui/web/server/tmp/placeholder +0 -0
- data/lib/ui/web/server/views/dispatcher.erb +85 -0
- data/lib/ui/web/server/views/dispatcher_error.erb +14 -0
- data/lib/ui/web/server/views/error.erb +1 -0
- data/lib/ui/web/server/views/flash.erb +18 -0
- data/lib/ui/web/server/views/home.erb +14 -0
- data/lib/ui/web/server/views/instance.erb +213 -0
- data/lib/ui/web/server/views/layout.erb +95 -0
- data/lib/ui/web/server/views/log.erb +40 -0
- data/lib/ui/web/server/views/modules.erb +71 -0
- data/lib/ui/web/server/views/options.erb +23 -0
- data/lib/ui/web/server/views/output_results.erb +51 -0
- data/lib/ui/web/server/views/plugins.erb +42 -0
- data/lib/ui/web/server/views/report_formats.erb +30 -0
- data/lib/ui/web/server/views/reports.erb +55 -0
- data/lib/ui/web/server/views/settings.erb +120 -0
- data/lib/ui/web/server/views/welcome.erb +38 -0
- data/lib/ui/xmlrpc/dispatcher_monitor.rb +204 -0
- data/lib/ui/xmlrpc/xmlrpc.rb +843 -0
- data/logs/placeholder +0 -0
- data/metamodules/autothrottle.rb +74 -0
- data/metamodules/timeout_notice.rb +118 -0
- data/metamodules/uniformity.rb +98 -0
- data/modules/audit/code_injection.rb +136 -0
- data/modules/audit/code_injection_timing.rb +115 -0
- data/modules/audit/code_injection_timing/payloads.txt +4 -0
- data/modules/audit/csrf.rb +301 -0
- data/modules/audit/ldapi.rb +103 -0
- data/modules/audit/ldapi/errors.txt +26 -0
- data/modules/audit/os_cmd_injection.rb +103 -0
- data/modules/audit/os_cmd_injection/payloads.txt +2 -0
- data/modules/audit/os_cmd_injection_timing.rb +104 -0
- data/modules/audit/os_cmd_injection_timing/payloads.txt +3 -0
- data/modules/audit/path_traversal.rb +141 -0
- data/modules/audit/response_splitting.rb +105 -0
- data/modules/audit/rfi.rb +193 -0
- data/modules/audit/sqli.rb +120 -0
- data/modules/audit/sqli/regexp_ids.txt +90 -0
- data/modules/audit/sqli_blind_rdiff.rb +321 -0
- data/modules/audit/sqli_blind_timing.rb +103 -0
- data/modules/audit/sqli_blind_timing/payloads.txt +51 -0
- data/modules/audit/trainer.rb +89 -0
- data/modules/audit/unvalidated_redirect.rb +90 -0
- data/modules/audit/xpath.rb +104 -0
- data/modules/audit/xpath/errors.txt +26 -0
- data/modules/audit/xss.rb +99 -0
- data/modules/audit/xss_event.rb +134 -0
- data/modules/audit/xss_path.rb +125 -0
- data/modules/audit/xss_script_tag.rb +112 -0
- data/modules/audit/xss_tag.rb +112 -0
- data/modules/audit/xss_uri.rb +125 -0
- data/modules/recon/allowed_methods.rb +104 -0
- data/modules/recon/backdoors.rb +131 -0
- data/modules/recon/backdoors/filenames.txt +16 -0
- data/modules/recon/backup_files.rb +177 -0
- data/modules/recon/backup_files/extensions.txt +28 -0
- data/modules/recon/common_directories.rb +138 -0
- data/modules/recon/common_directories/directories.txt +265 -0
- data/modules/recon/common_files.rb +138 -0
- data/modules/recon/common_files/filenames.txt +17 -0
- data/modules/recon/directory_listing.rb +171 -0
- data/modules/recon/grep/captcha.rb +62 -0
- data/modules/recon/grep/credit_card.rb +85 -0
- data/modules/recon/grep/cvs_svn_users.rb +73 -0
- data/modules/recon/grep/emails.rb +59 -0
- data/modules/recon/grep/html_objects.rb +53 -0
- data/modules/recon/grep/private_ip.rb +54 -0
- data/modules/recon/grep/ssn.rb +53 -0
- data/modules/recon/htaccess_limit.rb +82 -0
- data/modules/recon/http_put.rb +95 -0
- data/modules/recon/interesting_responses.rb +118 -0
- data/modules/recon/unencrypted_password_forms.rb +119 -0
- data/modules/recon/webdav.rb +126 -0
- data/modules/recon/xst.rb +107 -0
- data/path_extractors/anchors.rb +35 -0
- data/path_extractors/forms.rb +35 -0
- data/path_extractors/frames.rb +38 -0
- data/path_extractors/generic.rb +39 -0
- data/path_extractors/links.rb +35 -0
- data/path_extractors/meta_refresh.rb +39 -0
- data/path_extractors/scripts.rb +37 -0
- data/path_extractors/sitemap.rb +31 -0
- data/plugins/autologin.rb +137 -0
- data/plugins/content_types.rb +90 -0
- data/plugins/cookie_collector.rb +99 -0
- data/plugins/form_dicattack.rb +185 -0
- data/plugins/healthmap.rb +94 -0
- data/plugins/http_dicattack.rb +133 -0
- data/plugins/metamodules.rb +118 -0
- data/plugins/proxy.rb +248 -0
- data/plugins/proxy/server.rb +66 -0
- data/plugins/waf_detector.rb +184 -0
- data/profiles/comprehensive.afp +74 -0
- data/profiles/full.afp +75 -0
- data/reports/afr.rb +59 -0
- data/reports/ap.rb +55 -0
- data/reports/html.rb +179 -0
- data/reports/html/default.erb +967 -0
- data/reports/metareport.rb +139 -0
- data/reports/metareport/arachni_metareport.rb +174 -0
- data/reports/plugin_formatters/html/content_types.rb +82 -0
- data/reports/plugin_formatters/html/cookie_collector.rb +66 -0
- data/reports/plugin_formatters/html/form_dicattack.rb +54 -0
- data/reports/plugin_formatters/html/healthmap.rb +76 -0
- data/reports/plugin_formatters/html/http_dicattack.rb +54 -0
- data/reports/plugin_formatters/html/metaformatters/timeout_notice.rb +65 -0
- data/reports/plugin_formatters/html/metaformatters/uniformity.rb +71 -0
- data/reports/plugin_formatters/html/metamodules.rb +93 -0
- data/reports/plugin_formatters/html/waf_detector.rb +54 -0
- data/reports/plugin_formatters/stdout/content_types.rb +73 -0
- data/reports/plugin_formatters/stdout/cookie_collector.rb +61 -0
- data/reports/plugin_formatters/stdout/form_dicattack.rb +52 -0
- data/reports/plugin_formatters/stdout/healthmap.rb +72 -0
- data/reports/plugin_formatters/stdout/http_dicattack.rb +53 -0
- data/reports/plugin_formatters/stdout/metaformatters/timeout_notice.rb +55 -0
- data/reports/plugin_formatters/stdout/metaformatters/uniformity.rb +68 -0
- data/reports/plugin_formatters/stdout/metamodules.rb +89 -0
- data/reports/plugin_formatters/stdout/waf_detector.rb +48 -0
- data/reports/plugin_formatters/xml/content_types.rb +91 -0
- data/reports/plugin_formatters/xml/cookie_collector.rb +70 -0
- data/reports/plugin_formatters/xml/form_dicattack.rb +57 -0
- data/reports/plugin_formatters/xml/healthmap.rb +82 -0
- data/reports/plugin_formatters/xml/http_dicattack.rb +57 -0
- data/reports/plugin_formatters/xml/metaformatters/timeout_notice.rb +67 -0
- data/reports/plugin_formatters/xml/metaformatters/uniformity.rb +82 -0
- data/reports/plugin_formatters/xml/metamodules.rb +91 -0
- data/reports/plugin_formatters/xml/waf_detector.rb +58 -0
- data/reports/stdout.rb +182 -0
- data/reports/txt.rb +77 -0
- data/reports/xml.rb +231 -0
- data/reports/xml/buffer.rb +98 -0
- metadata +516 -0
data/Rakefile
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
desc "Generate docs"
|
|
12
|
+
|
|
13
|
+
task :docs do
|
|
14
|
+
|
|
15
|
+
outdir = "../arachni-gh-pages"
|
|
16
|
+
sh "mkdir #{outdir}" if !File.directory?( outdir )
|
|
17
|
+
|
|
18
|
+
sh "inkscape gfx/logo.svg --export-png=#{outdir}/logo.png"
|
|
19
|
+
sh "inkscape gfx/icon.svg --export-png=#{outdir}/icon.png"
|
|
20
|
+
sh "inkscape gfx/icon.svg --export-png=#{outdir}/favicon.ico"
|
|
21
|
+
sh "inkscape gfx/banner.svg --export-png=#{outdir}/banner.png"
|
|
22
|
+
|
|
23
|
+
sh "yardoc --verbose --title \
|
|
24
|
+
\"Arachni - Web Application Security Scanner Framework\" \
|
|
25
|
+
external/* path_extractors/* plugins/* reports/* modules/* metamodules/* lib/* -o #{outdir} \
|
|
26
|
+
- EXPLOITATION.md HACKING.md CHANGELOG.md LICENSE.md AUTHORS.md \
|
|
27
|
+
CONTRIBUTORS.md ACKNOWLEDGMENTS.md"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
sh "rm -rf .yard*"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
#
|
|
35
|
+
# Simple profiler using perftools[1].
|
|
36
|
+
#
|
|
37
|
+
# To install perftools for Ruby:
|
|
38
|
+
# gem install perftools.rb
|
|
39
|
+
#
|
|
40
|
+
# [1] https://github.com/tmm1/perftools.rb
|
|
41
|
+
#
|
|
42
|
+
desc "Profile Arachni"
|
|
43
|
+
task :profile do
|
|
44
|
+
sh "CPUPROFILE_FREQUENCY=500 CPUPROFILE=/tmp/profile.dat " +
|
|
45
|
+
"RUBYOPT=\"-r`gem which perftools | tail -1`\" " +
|
|
46
|
+
" ./bin/arachni http://demo.testfire.net --link-count=5 && " +
|
|
47
|
+
"pprof.rb --gif /tmp/profile.dat > profile.gif"
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
#
|
|
51
|
+
# Cleans reports and logs
|
|
52
|
+
#
|
|
53
|
+
desc "Cleaning report and log files."
|
|
54
|
+
task :clean do
|
|
55
|
+
|
|
56
|
+
sh "rm *.afr || true"
|
|
57
|
+
sh "rm logs/XMLRPC* || true"
|
|
58
|
+
sh "rm lib/ui/web/server/db/log.db || true"
|
|
59
|
+
sh "rm lib/ui/web/server/db/welcomed || true"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
#
|
|
64
|
+
# Installing
|
|
65
|
+
#
|
|
66
|
+
desc "Build and install the arachni gem."
|
|
67
|
+
task :install do
|
|
68
|
+
|
|
69
|
+
require File.expand_path( File.dirname( __FILE__ ) ) + '/lib/arachni'
|
|
70
|
+
|
|
71
|
+
sh "gem build arachni.gemspec"
|
|
72
|
+
sh "gem install arachni-#{Arachni::VERSION}.gem"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
#
|
|
77
|
+
# Publishing
|
|
78
|
+
#
|
|
79
|
+
desc "Push a new version to Gemcutter"
|
|
80
|
+
task :publish do
|
|
81
|
+
|
|
82
|
+
require File.expand_path( File.dirname( __FILE__ ) ) + '/lib/arachni'
|
|
83
|
+
|
|
84
|
+
sh "gem build arachni.gemspec"
|
|
85
|
+
sh "gem push arachni-#{Arachni::VERSION}.gem"
|
|
86
|
+
end
|
data/bin/arachni
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
=begin
|
|
3
|
+
Arachni
|
|
4
|
+
Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
|
5
|
+
|
|
6
|
+
This is free software; you can copy and distribute and modify
|
|
7
|
+
this program under the term of the GPL v2.0 License
|
|
8
|
+
(See LICENSE file for details)
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'pp'
|
|
13
|
+
require 'ap'
|
|
14
|
+
|
|
15
|
+
cwd = File.expand_path( File.dirname( __FILE__ ) )
|
|
16
|
+
$:.unshift( cwd )
|
|
17
|
+
require cwd + '/../getoptslong.rb'
|
|
18
|
+
|
|
19
|
+
require Arachni::Options.instance.dir['lib'] + 'ui/cli/cli'
|
|
20
|
+
|
|
21
|
+
cli = Arachni::UI::CLI.new( Arachni::Options.instance )
|
|
22
|
+
cli.run
|
data/bin/arachni_web
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
=begin
|
|
3
|
+
Arachni
|
|
4
|
+
Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
|
5
|
+
|
|
6
|
+
This is free software; you can copy and distribute and modify
|
|
7
|
+
this program under the term of the GPL v2.0 License
|
|
8
|
+
(See LICENSE file for details)
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'getoptlong'
|
|
13
|
+
require 'pp'
|
|
14
|
+
require 'ap'
|
|
15
|
+
|
|
16
|
+
cwd = File.expand_path( File.dirname( __FILE__ ) )
|
|
17
|
+
$:.unshift( cwd )
|
|
18
|
+
|
|
19
|
+
require cwd + '/../lib/options'
|
|
20
|
+
options = Arachni::Options.instance
|
|
21
|
+
|
|
22
|
+
options.dir = Hash.new
|
|
23
|
+
options.dir['root'] = File.expand_path( cwd + '/../' ) + '/'
|
|
24
|
+
options.dir['modules'] = options.dir['root'] + 'modules/'
|
|
25
|
+
options.dir['reports'] = options.dir['root'] + 'reports/'
|
|
26
|
+
options.dir['plugins'] = options.dir['root'] + 'plugins/'
|
|
27
|
+
options.dir['lib'] = options.dir['root'] + 'lib/'
|
|
28
|
+
|
|
29
|
+
def print_help( root )
|
|
30
|
+
puts <<USAGE
|
|
31
|
+
Usage: arachni_web \[options\]
|
|
32
|
+
|
|
33
|
+
Supported options:
|
|
34
|
+
|
|
35
|
+
-h
|
|
36
|
+
--help output this
|
|
37
|
+
|
|
38
|
+
--port specify port
|
|
39
|
+
|
|
40
|
+
--host specify host
|
|
41
|
+
|
|
42
|
+
For SSL options refer to "webui.yaml" and "README.webui.yaml.txt" under "#{root}conf/".
|
|
43
|
+
|
|
44
|
+
USAGE
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# Construct getops struct
|
|
49
|
+
opts = GetoptLong.new(
|
|
50
|
+
[ '--help', '-h', GetoptLong::NO_ARGUMENT ],
|
|
51
|
+
[ '--port', GetoptLong::REQUIRED_ARGUMENT ],
|
|
52
|
+
[ '--host', GetoptLong::REQUIRED_ARGUMENT ],
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
begin
|
|
56
|
+
opts.each {
|
|
57
|
+
|opt, arg|
|
|
58
|
+
|
|
59
|
+
case opt
|
|
60
|
+
|
|
61
|
+
when '--help'
|
|
62
|
+
print_help( options.dir['root'] )
|
|
63
|
+
exit
|
|
64
|
+
|
|
65
|
+
when '--port'
|
|
66
|
+
# not really used for RPC this time but by create another attr
|
|
67
|
+
options.rpc_port = arg.to_i
|
|
68
|
+
|
|
69
|
+
when '--host'
|
|
70
|
+
# not really used for RPC this time but by create another attr
|
|
71
|
+
options.server = arg.to_s
|
|
72
|
+
end
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Sinatra will run automatically
|
|
77
|
+
require options.dir['lib'] + 'ui/web/server'
|
data/bin/arachni_xmlrpc
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
=begin
|
|
3
|
+
Arachni
|
|
4
|
+
Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
|
5
|
+
|
|
6
|
+
This is free software; you can copy and distribute and modify
|
|
7
|
+
this program under the term of the GPL v2.0 License
|
|
8
|
+
(See LICENSE file for details)
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'pp'
|
|
13
|
+
require 'ap'
|
|
14
|
+
|
|
15
|
+
cwd = File.expand_path( File.dirname( __FILE__ ) )
|
|
16
|
+
$:.unshift( cwd )
|
|
17
|
+
require cwd + '/../getoptslong.rb'
|
|
18
|
+
require Arachni::Options.instance.dir['lib'] + 'ui/xmlrpc/xmlrpc'
|
|
19
|
+
|
|
20
|
+
client = Arachni::UI::XMLRPC.new( Arachni::Options.instance )
|
|
21
|
+
client.run
|
data/bin/arachni_xmlrpcd
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
=begin
|
|
3
|
+
Arachni
|
|
4
|
+
Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
|
5
|
+
|
|
6
|
+
This is free software; you can copy and distribute and modify
|
|
7
|
+
this program under the term of the GPL v2.0 License
|
|
8
|
+
(See LICENSE file for details)
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'getoptlong'
|
|
13
|
+
require 'pp'
|
|
14
|
+
require 'ap'
|
|
15
|
+
|
|
16
|
+
cwd = File.expand_path( File.dirname( __FILE__ ) )
|
|
17
|
+
$:.unshift( cwd )
|
|
18
|
+
|
|
19
|
+
require cwd + '/../lib/options'
|
|
20
|
+
options = Arachni::Options.instance
|
|
21
|
+
|
|
22
|
+
options.dir = Hash.new
|
|
23
|
+
options.dir['root'] = File.expand_path( cwd + '/../' ) + '/'
|
|
24
|
+
options.dir['modules'] = options.dir['root'] + 'modules/'
|
|
25
|
+
options.dir['reports'] = options.dir['root'] + 'reports/'
|
|
26
|
+
options.dir['plugins'] = options.dir['root'] + 'plugins/'
|
|
27
|
+
options.dir['lib'] = options.dir['root'] + 'lib/'
|
|
28
|
+
|
|
29
|
+
# Construct getops struct
|
|
30
|
+
opts = GetoptLong.new(
|
|
31
|
+
[ '--help', '-h', GetoptLong::NO_ARGUMENT ],
|
|
32
|
+
[ '--port', GetoptLong::OPTIONAL_ARGUMENT ],
|
|
33
|
+
[ '--debug', GetoptLong::NO_ARGUMENT ],
|
|
34
|
+
[ '--reroute-to-logfile', GetoptLong::NO_ARGUMENT ],
|
|
35
|
+
[ '--pool-size', GetoptLong::REQUIRED_ARGUMENT ],
|
|
36
|
+
[ '--ssl', GetoptLong::NO_ARGUMENT ],
|
|
37
|
+
[ '--ssl-pkey', GetoptLong::REQUIRED_ARGUMENT ],
|
|
38
|
+
[ '--ssl-cert', GetoptLong::REQUIRED_ARGUMENT ],
|
|
39
|
+
[ '--ssl-ca', GetoptLong::REQUIRED_ARGUMENT ],
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
begin
|
|
43
|
+
opts.each {
|
|
44
|
+
|opt, arg|
|
|
45
|
+
|
|
46
|
+
case opt
|
|
47
|
+
|
|
48
|
+
when '--help'
|
|
49
|
+
options.help = true
|
|
50
|
+
|
|
51
|
+
when '--debug'
|
|
52
|
+
options.debug = true
|
|
53
|
+
|
|
54
|
+
when '--reroute-to-logfile'
|
|
55
|
+
options.reroute_to_logfile = true
|
|
56
|
+
|
|
57
|
+
when '--port'
|
|
58
|
+
options.rpc_port = arg.to_i
|
|
59
|
+
|
|
60
|
+
when '--pool-size'
|
|
61
|
+
options.pool_size = arg.to_i
|
|
62
|
+
|
|
63
|
+
when '--ssl'
|
|
64
|
+
options.ssl = true
|
|
65
|
+
|
|
66
|
+
when '--ssl-pkey'
|
|
67
|
+
options.ssl_pkey = arg.to_s
|
|
68
|
+
|
|
69
|
+
when '--ssl-cert'
|
|
70
|
+
options.ssl_cert = arg.to_s
|
|
71
|
+
|
|
72
|
+
when '--ssl-ca'
|
|
73
|
+
options.ssl_ca = arg.to_s
|
|
74
|
+
|
|
75
|
+
end
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
require options.dir['lib'] + 'rpc/xml/server/dispatcher'
|
|
80
|
+
|
|
81
|
+
dispatcher = Arachni::RPC::XML::Server::Dispatcher.new( Arachni::Options.instance )
|
|
82
|
+
dispatcher.run
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
=begin
|
|
3
|
+
Arachni
|
|
4
|
+
Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
|
5
|
+
|
|
6
|
+
This is free software; you can copy and distribute and modify
|
|
7
|
+
this program under the term of the GPL v2.0 License
|
|
8
|
+
(See LICENSE file for details)
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'getoptlong'
|
|
13
|
+
require 'pp'
|
|
14
|
+
require 'ap'
|
|
15
|
+
|
|
16
|
+
cwd = File.expand_path( File.dirname( __FILE__ ) )
|
|
17
|
+
$:.unshift( cwd )
|
|
18
|
+
|
|
19
|
+
require cwd + '/../lib/options'
|
|
20
|
+
options = Arachni::Options.instance
|
|
21
|
+
|
|
22
|
+
options.dir = Hash.new
|
|
23
|
+
options.dir['root'] = File.expand_path( cwd + '/../' ) + '/'
|
|
24
|
+
options.dir['modules'] = options.dir['root'] + 'modules/'
|
|
25
|
+
options.dir['reports'] = options.dir['root'] + 'reports/'
|
|
26
|
+
options.dir['plugins'] = options.dir['root'] + 'plugins/'
|
|
27
|
+
options.dir['lib'] = options.dir['root'] + 'lib/'
|
|
28
|
+
|
|
29
|
+
# Construct getops struct
|
|
30
|
+
opts = GetoptLong.new(
|
|
31
|
+
[ '--help', '-h', GetoptLong::NO_ARGUMENT ],
|
|
32
|
+
[ '--port', GetoptLong::OPTIONAL_ARGUMENT ],
|
|
33
|
+
[ '--debug', GetoptLong::NO_ARGUMENT ],
|
|
34
|
+
[ '--reroute-to-logfile', GetoptLong::NO_ARGUMENT ],
|
|
35
|
+
[ '--ssl', GetoptLong::NO_ARGUMENT ],
|
|
36
|
+
[ '--ssl-pkey', GetoptLong::REQUIRED_ARGUMENT ],
|
|
37
|
+
[ '--ssl-cert', GetoptLong::REQUIRED_ARGUMENT ],
|
|
38
|
+
[ '--ssl-ca', GetoptLong::REQUIRED_ARGUMENT ],
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
begin
|
|
42
|
+
opts.each {
|
|
43
|
+
|opt, arg|
|
|
44
|
+
|
|
45
|
+
case opt
|
|
46
|
+
|
|
47
|
+
when '--help'
|
|
48
|
+
options.help = true
|
|
49
|
+
|
|
50
|
+
when '--debug'
|
|
51
|
+
options.debug = true
|
|
52
|
+
|
|
53
|
+
when '--ssl'
|
|
54
|
+
options.ssl = true
|
|
55
|
+
|
|
56
|
+
when '--ssl-pkey'
|
|
57
|
+
options.ssl_pkey = arg.to_s
|
|
58
|
+
|
|
59
|
+
when '--ssl-cert'
|
|
60
|
+
options.ssl_cert = arg.to_s
|
|
61
|
+
|
|
62
|
+
when '--ssl-ca'
|
|
63
|
+
options.ssl_ca = arg.to_s
|
|
64
|
+
|
|
65
|
+
end
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
options.url = ARGV.shift
|
|
70
|
+
|
|
71
|
+
require options.dir['lib'] + 'ui/xmlrpc/dispatcher_monitor'
|
|
72
|
+
|
|
73
|
+
dispatcher = Arachni::UI::DispatcherMonitor.new( Arachni::Options.instance )
|
|
74
|
+
dispatcher.run
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
The webui.yaml file holds configuration options for the Arachni WebUI *only*.
|
|
2
|
+
It currently contains only SSL options in the form of:
|
|
3
|
+
-------------------
|
|
4
|
+
ssl:
|
|
5
|
+
server:
|
|
6
|
+
enable:
|
|
7
|
+
key:
|
|
8
|
+
cert:
|
|
9
|
+
ca:
|
|
10
|
+
client:
|
|
11
|
+
enable:
|
|
12
|
+
key:
|
|
13
|
+
cert:
|
|
14
|
+
ca:
|
|
15
|
+
-------------------
|
|
16
|
+
|
|
17
|
+
Options under "server" refer to the WebUI HTTP server.
|
|
18
|
+
Options under "client" refer to the XMLRPC clients controlled by the WebUI
|
|
19
|
+
and used to communicate with the Dispatcher and the servers in its pool.
|
|
20
|
+
|
|
21
|
+
key: private key
|
|
22
|
+
cert: certificate
|
|
23
|
+
ca: CA certificate
|
|
24
|
+
|
|
25
|
+
All the options must be paths to ".pem" files and the keys should *NOT* be encrypted.
|
|
26
|
+
If you use encrypted keys you will cripple the system.
|
|
27
|
+
|
|
28
|
+
You can use the same "server" certificates and key when you start up the Dispatcher and the same
|
|
29
|
+
"client" certificates and key to authenticate your web browser to the WebUI server.
|
|
30
|
+
|
|
31
|
+
In essence, all Arachni servers can share the same credentials and the same goes for all clients.
|
|
32
|
+
This does not represent best practice key management though, which is the reason for the in-existence of
|
|
33
|
+
a global configuration file.
|
|
34
|
+
|
|
35
|
+
You may want to create different keys and certificates (signed by the same CA) for each component but you are not forced to.
|
|
36
|
+
|
|
37
|
+
You can set the "enable" options to "true" and leave the rest empty to use encryption without authentication.
|
|
38
|
+
In this case all Arachni servers will generate their own certificate/key pairs and peer verification will be disabled.
|
|
39
|
+
|
|
40
|
+
In order for client SSL to work the Dispatcher will need to be setup accordingly.
|
|
41
|
+
Run "arachni_xmlrpcd -h" to see the Dispatcher's relevant SSL options.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
Finally, please pay close attention and do not alter the indentation and formatting of the configuration file.
|
data/conf/webui.yaml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
The following BSD license applies to all files under this and all subsequent directories in compliance with Metasploit's license requirements:
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2010, Tasos "Zapotek" Laskos
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
6
|
+
are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
9
|
+
this list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
16
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
17
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
19
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
20
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
21
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
22
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
23
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
24
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|