arachni 0.2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,139 @@
|
|
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['reports'] + 'metareport/arachni_metareport.rb'
|
14
|
+
|
15
|
+
module Reports
|
16
|
+
|
17
|
+
#
|
18
|
+
# Metareport
|
19
|
+
#
|
20
|
+
# Creates a file to be used with the Arachni MSF plug-in.
|
21
|
+
#
|
22
|
+
# @author: Tasos "Zapotek" Laskos
|
23
|
+
# <tasos.laskos@gmail.com>
|
24
|
+
# <zapotek@segfault.gr>
|
25
|
+
# @version: 0.1
|
26
|
+
#
|
27
|
+
class Metareport < Arachni::Report::Base
|
28
|
+
|
29
|
+
#
|
30
|
+
# @param [AuditStore] audit_store
|
31
|
+
# @param [Hash] options options passed to the report
|
32
|
+
#
|
33
|
+
def initialize( audit_store, options )
|
34
|
+
@audit_store = audit_store
|
35
|
+
@options = options
|
36
|
+
end
|
37
|
+
|
38
|
+
def run( )
|
39
|
+
|
40
|
+
print_line( )
|
41
|
+
print_status( 'Creating file for the Metasploit framework...' )
|
42
|
+
|
43
|
+
msf = []
|
44
|
+
|
45
|
+
@audit_store.issues.each {
|
46
|
+
|issue|
|
47
|
+
next if !issue.metasploitable
|
48
|
+
|
49
|
+
issue.variations.each {
|
50
|
+
|variation|
|
51
|
+
|
52
|
+
if( ( method = issue.method.dup ) != 'post' )
|
53
|
+
url = variation['url'].gsub( /\?.*/, '' )
|
54
|
+
else
|
55
|
+
url = variation['url']
|
56
|
+
end
|
57
|
+
|
58
|
+
if( issue.elem == 'cookie' || issue.elem == 'header' )
|
59
|
+
method = issue.elem
|
60
|
+
end
|
61
|
+
|
62
|
+
# pp issue
|
63
|
+
# pp variation['opts']
|
64
|
+
|
65
|
+
params = variation['opts'][:combo]
|
66
|
+
params[issue.var] = params[issue.var].gsub( variation['opts'][:injected_orig], 'XXinjectionXX' )
|
67
|
+
|
68
|
+
if method == 'cookie'
|
69
|
+
params[issue.var] = URI.encode( params[issue.var], ';' )
|
70
|
+
cookies = sub_cookie( variation['headers']['request']['cookie'], params )
|
71
|
+
variation['headers']['request']['cookie'] = cookies.dup
|
72
|
+
end
|
73
|
+
|
74
|
+
# ap sub_cookie( variation['headers']['request']['cookie'], params )
|
75
|
+
|
76
|
+
msf << ArachniMetareport.new( {
|
77
|
+
:host => URI( url ).host,
|
78
|
+
:port => URI( url ).port,
|
79
|
+
:vhost => '',
|
80
|
+
:ssl => URI( url ).scheme == 'https',
|
81
|
+
:path => URI( url ).path,
|
82
|
+
:query => URI( url ).query,
|
83
|
+
:method => method.upcase,
|
84
|
+
:params => params,
|
85
|
+
:headers=> variation['headers']['request'].dup,
|
86
|
+
:pname => issue.var,
|
87
|
+
:proof => variation['regexp_match'],
|
88
|
+
:risk => '',
|
89
|
+
:name => issue.name,
|
90
|
+
:description => issue.description,
|
91
|
+
:category => 'n/a',
|
92
|
+
:exploit => issue.metasploitable
|
93
|
+
} )
|
94
|
+
}
|
95
|
+
|
96
|
+
}
|
97
|
+
|
98
|
+
# pp msf
|
99
|
+
|
100
|
+
outfile = File.new( @options['outfile'], 'w')
|
101
|
+
YAML.dump( msf, outfile )
|
102
|
+
|
103
|
+
print_status( 'Saved in \'' + @options['outfile'] + '\'.' )
|
104
|
+
end
|
105
|
+
|
106
|
+
def sub_cookie( str, params )
|
107
|
+
hash = {}
|
108
|
+
str.split( ';' ).each {
|
109
|
+
|cookie|
|
110
|
+
k,v = cookie.split( '=', 2 )
|
111
|
+
hash[k] = v
|
112
|
+
}
|
113
|
+
|
114
|
+
return hash.merge( params ).map{ |k,v| "#{k}=#{v}" }.join( ';' )
|
115
|
+
end
|
116
|
+
|
117
|
+
#
|
118
|
+
# REQUIRED
|
119
|
+
#
|
120
|
+
# Do not ommit any of the info.
|
121
|
+
#
|
122
|
+
def self.info
|
123
|
+
{
|
124
|
+
:name => 'Metareport',
|
125
|
+
:description => %q{Creates a file to be used with the Arachni MSF plug-in.},
|
126
|
+
:author => 'Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>',
|
127
|
+
:version => '0.1',
|
128
|
+
:options => [
|
129
|
+
Arachni::OptString.new( 'outfile', [ false, 'Where to save the report.',
|
130
|
+
Time.now.to_s + '.msf' ] ),
|
131
|
+
]
|
132
|
+
|
133
|
+
}
|
134
|
+
end
|
135
|
+
|
136
|
+
end
|
137
|
+
|
138
|
+
end
|
139
|
+
end
|
@@ -0,0 +1,174 @@
|
|
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
|
+
# ArachniMetareport
|
13
|
+
#
|
14
|
+
# This class is used by Arachni to save a report detailing all exploitable
|
15
|
+
# vulnerabilities.
|
16
|
+
#
|
17
|
+
# A serialized array holding instances of this class will be loaded by
|
18
|
+
# the Metasploit Framework.
|
19
|
+
#
|
20
|
+
# @author: Tasos "Zapotek" Laskos
|
21
|
+
# <tasos.laskos@gmail.com>
|
22
|
+
# <zapotek@segfault.gr>
|
23
|
+
# @version: 0.1
|
24
|
+
#
|
25
|
+
class ArachniMetareport
|
26
|
+
|
27
|
+
#
|
28
|
+
# The IP address of the datastore_bak
|
29
|
+
#
|
30
|
+
# @return [String]
|
31
|
+
#
|
32
|
+
attr_accessor :host
|
33
|
+
|
34
|
+
#
|
35
|
+
# The port number of the associated web site
|
36
|
+
#
|
37
|
+
# @return [Integer]
|
38
|
+
#
|
39
|
+
attr_accessor :port
|
40
|
+
|
41
|
+
#
|
42
|
+
# The virtual host for this particular web site
|
43
|
+
#
|
44
|
+
# @return [Integer]
|
45
|
+
#
|
46
|
+
attr_accessor :vhost
|
47
|
+
|
48
|
+
#
|
49
|
+
# Whether or not SSL is in use on this port
|
50
|
+
#
|
51
|
+
# @return [Bool]
|
52
|
+
#
|
53
|
+
attr_accessor :ssl
|
54
|
+
|
55
|
+
#
|
56
|
+
# Path of the vulnerable script
|
57
|
+
#
|
58
|
+
# @return [String]
|
59
|
+
#
|
60
|
+
attr_accessor :path
|
61
|
+
|
62
|
+
#
|
63
|
+
# Query part of the vulnerable URI
|
64
|
+
#
|
65
|
+
# @return [Bool]
|
66
|
+
#
|
67
|
+
attr_accessor :query
|
68
|
+
|
69
|
+
#
|
70
|
+
# HTTP method used for the vulnerability
|
71
|
+
#
|
72
|
+
# The MSF currently supports GET/POST/PATH only, although Arachni will also
|
73
|
+
# provide COOKIE and HEADER if that's the case.
|
74
|
+
#
|
75
|
+
# @return [String]
|
76
|
+
#
|
77
|
+
attr_accessor :method
|
78
|
+
|
79
|
+
#
|
80
|
+
# Parameters used for the vulnerability
|
81
|
+
#
|
82
|
+
# @return [Hash]
|
83
|
+
#
|
84
|
+
attr_accessor :params
|
85
|
+
|
86
|
+
#
|
87
|
+
# Headers used for the vulnerability
|
88
|
+
#
|
89
|
+
# Contains cookies.
|
90
|
+
#
|
91
|
+
# @return [Hash]
|
92
|
+
#
|
93
|
+
attr_accessor :headers
|
94
|
+
|
95
|
+
#
|
96
|
+
# The name of the vulnerable field
|
97
|
+
#
|
98
|
+
# @return [String]
|
99
|
+
#
|
100
|
+
attr_accessor :pname
|
101
|
+
|
102
|
+
#
|
103
|
+
# A string showing proof of the vulnerability
|
104
|
+
#
|
105
|
+
# @return [String]
|
106
|
+
#
|
107
|
+
attr_accessor :proof
|
108
|
+
|
109
|
+
#
|
110
|
+
# An integer value from 0 to 5 indicating the risk (5 is highest)
|
111
|
+
#
|
112
|
+
# @return [Integer]
|
113
|
+
#
|
114
|
+
attr_accessor :risk
|
115
|
+
|
116
|
+
#
|
117
|
+
# A string indicating the type of vulnerability
|
118
|
+
#
|
119
|
+
# @return [String]
|
120
|
+
#
|
121
|
+
attr_accessor :name
|
122
|
+
|
123
|
+
#
|
124
|
+
# Description of the vulnerability
|
125
|
+
#
|
126
|
+
# @return [String]
|
127
|
+
#
|
128
|
+
attr_accessor :description
|
129
|
+
|
130
|
+
#
|
131
|
+
# No idea what this is...
|
132
|
+
#
|
133
|
+
# @return [String]
|
134
|
+
#
|
135
|
+
attr_accessor :category
|
136
|
+
|
137
|
+
#
|
138
|
+
# An arachni_* exploit of the MSF framework that is able to exploit this
|
139
|
+
# type of vulnerability.
|
140
|
+
#
|
141
|
+
# Ex: unix/webapp/arachni_php_eval
|
142
|
+
#
|
143
|
+
# @return [String]
|
144
|
+
#
|
145
|
+
attr_accessor :exploit
|
146
|
+
|
147
|
+
#
|
148
|
+
# From Metasploit's report_web_vuln() in: lib/msf/core/db.rb
|
149
|
+
#
|
150
|
+
# opts MUST contain
|
151
|
+
# :host -- the ip address of the server hosting the web site
|
152
|
+
# :port -- the port number of the associated web site
|
153
|
+
# :vhost -- the virtual host for this particular web site
|
154
|
+
# :ssl -- whether or not SSL is in use on this port
|
155
|
+
# :path -- the virtual host name for this particular web site
|
156
|
+
# :query -- the query string appended to the path (not valid for GET method flaws)
|
157
|
+
# :method -- the form method, one of GET, POST, or PATH
|
158
|
+
# :params -- an ARRAY of all parameters and values specified in the form
|
159
|
+
# :pname -- the specific field where the vulnerability occurs
|
160
|
+
# :proof -- the string showing proof of the vulnerability
|
161
|
+
# :risk -- an INTEGER value from 0 to 5 indicating the risk (5 is highest)
|
162
|
+
# :name -- the string indicating the type of vulnerability
|
163
|
+
#
|
164
|
+
def initialize( opts = {} )
|
165
|
+
opts.each {
|
166
|
+
|k, v|
|
167
|
+
begin
|
168
|
+
send( "#{k.to_s.downcase}=", v )
|
169
|
+
rescue Exception => e
|
170
|
+
end
|
171
|
+
}
|
172
|
+
end
|
173
|
+
|
174
|
+
end
|
@@ -0,0 +1,82 @@
|
|
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
|
+
module Reports
|
14
|
+
|
15
|
+
class HTML
|
16
|
+
module PluginFormatters
|
17
|
+
|
18
|
+
#
|
19
|
+
# HTML formatter for the results of the ContentTypes plugin
|
20
|
+
#
|
21
|
+
# @author: Tasos "Zapotek" Laskos
|
22
|
+
# <tasos.laskos@gmail.com>
|
23
|
+
# <zapotek@segfault.gr>
|
24
|
+
# @version: 0.1
|
25
|
+
#
|
26
|
+
class ContentTypes < Arachni::Plugin::Formatter
|
27
|
+
|
28
|
+
def initialize( plugin_data )
|
29
|
+
@results = plugin_data[:results]
|
30
|
+
@description = plugin_data[:description]
|
31
|
+
end
|
32
|
+
|
33
|
+
def run
|
34
|
+
return ERB.new( tpl ).result( binding )
|
35
|
+
end
|
36
|
+
|
37
|
+
def tpl
|
38
|
+
%q{
|
39
|
+
<h3>Content types</h3>
|
40
|
+
<blockquote><%=@description%></blockquote>
|
41
|
+
|
42
|
+
<h4>Results</h4>
|
43
|
+
<% @results.each_pair do |type, responses| %>
|
44
|
+
<ul>
|
45
|
+
|
46
|
+
<li>
|
47
|
+
<%=type%>
|
48
|
+
<ul>
|
49
|
+
<% responses.each do |res| %>
|
50
|
+
<li>
|
51
|
+
URL: <a href="<%=CGI.escapeHTML(res[:url])%>"><%=CGI.escapeHTML(res[:url])%></a><br/>
|
52
|
+
Method: <%=res[:method]%>
|
53
|
+
|
54
|
+
<% if res[:params] && res[:method].downcase == 'post' %>
|
55
|
+
<ul>
|
56
|
+
<li>Parameters:</li>
|
57
|
+
<%res[:params].each_pair do |name, val|%>
|
58
|
+
<li>
|
59
|
+
<%=name%> = <%=val%>
|
60
|
+
</li>
|
61
|
+
<%end%>
|
62
|
+
<ul>
|
63
|
+
<%end%>
|
64
|
+
</li>
|
65
|
+
<%end%>
|
66
|
+
</ul>
|
67
|
+
</li>
|
68
|
+
|
69
|
+
</ul>
|
70
|
+
|
71
|
+
<%end%>
|
72
|
+
}
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,66 @@
|
|
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
|
+
module Reports
|
14
|
+
|
15
|
+
class HTML
|
16
|
+
module PluginFormatters
|
17
|
+
|
18
|
+
#
|
19
|
+
# HTML formatter for the results of the CookieCollector plugin
|
20
|
+
#
|
21
|
+
# @author: Tasos "Zapotek" Laskos
|
22
|
+
# <tasos.laskos@gmail.com>
|
23
|
+
# <zapotek@segfault.gr>
|
24
|
+
# @version: 0.1
|
25
|
+
#
|
26
|
+
class CookieCollector < Arachni::Plugin::Formatter
|
27
|
+
|
28
|
+
def initialize( plugin_data )
|
29
|
+
@results = plugin_data[:results]
|
30
|
+
@description = plugin_data[:description]
|
31
|
+
end
|
32
|
+
|
33
|
+
def run
|
34
|
+
return ERB.new( tpl ).result( binding )
|
35
|
+
end
|
36
|
+
|
37
|
+
def tpl
|
38
|
+
%q{
|
39
|
+
<h3>Cookie Collector</h3>
|
40
|
+
<blockquote><%=@description%></blockquote>
|
41
|
+
|
42
|
+
<h4>Cookies</h4>
|
43
|
+
<ul>
|
44
|
+
<% @results.each do |entry| %>
|
45
|
+
<li>
|
46
|
+
On <%=entry[:time].to_s%> @ <a href="<%=CGI.escapeHTML(entry[:res]['effective_url'])%>"><%=CGI.escapeHTML(entry[:res]['effective_url'])%></a>
|
47
|
+
<br/>
|
48
|
+
Cookies were forced to:
|
49
|
+
<ul>
|
50
|
+
<% entry[:cookies].each_pair do |name, val| %>
|
51
|
+
<li><%=CGI.escapeHTML(name)%> = <%=CGI.escapeHTML(val)%></li>
|
52
|
+
<%end%>
|
53
|
+
</ul>
|
54
|
+
</li>
|
55
|
+
<%end%>
|
56
|
+
</ul>
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
end
|