Merge #2835, #2836, #2837, #2838, #2839, #2840, #2841, #2842 into one branch

bug/bundler_fix
jvazquez-r7 2014-01-13 10:57:09 -06:00
8 changed files with 14 additions and 14 deletions

View File

@ -166,7 +166,7 @@ module BindTcp
socks[0].extend(Rex::Socket::Tcp)
socks[1].extend(Rex::Socket::Tcp)
m = OpenSSL::Digest::Digest.new('md5')
m = OpenSSL::Digest.new('md5')
m.reset
key = m.digest(datastore["AESPassword"] || "")

View File

@ -172,12 +172,12 @@ module ReverseTcp
socks[0].extend(Rex::Socket::Tcp)
socks[1].extend(Rex::Socket::Tcp)
m = OpenSSL::Digest::Digest.new('md5')
m = OpenSSL::Digest.new('md5')
m.reset
key = m.digest(datastore["AESPassword"] || "")
Rex::ThreadFactory.spawn('AESEncryption', false) {
c1 = OpenSSL::Cipher::Cipher.new('aes-128-cfb8')
c1 = OpenSSL::Cipher.new('aes-128-cfb8')
c1.encrypt
c1.key=key
sock.put([0].pack('N'))
@ -190,7 +190,7 @@ module ReverseTcp
sock.close()
}
Rex::ThreadFactory.spawn('AESEncryption', false) {
c2 = OpenSSL::Cipher::Cipher.new('aes-128-cfb8')
c2 = OpenSSL::Cipher.new('aes-128-cfb8')
c2.decrypt
c2.key=key
iv=""

View File

@ -141,7 +141,7 @@ class Metasploit4 < Msf::Auxiliary
juarray = "a:3:{i:0;s:#{jumpurl_len.to_s()}:\"#{jumpurl_enc}\""
juarray << ";i:1;s:#{locationData.length}:\"#{locationData}\";i:2;"
juarray << "s:0:\"\";}"
juhash = OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new('sha1'), enc_key, juarray)
juhash = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), enc_key, juarray)
end
file_uri = "#{datastore['URI']}/index.php?jumpurl=#{jumpurl}&juSecure=1&locationData=#{locationData}&juHash=#{juhash}"

View File

@ -170,7 +170,7 @@ class Metasploit3 < Msf::Exploit::Remote
keygen = KeyGenerator.new(datastore['SECRET'],{:iterations => 1000})
sigkey = keygen.generate_key(datastore['SALTSIG'])
end
digest == OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new(datastore['DIGEST_NAME']), sigkey, data)
digest == OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new(datastore['DIGEST_NAME']), sigkey, data)
end
def rails_4
@ -184,7 +184,7 @@ class Metasploit3 < Msf::Exploit::Remote
def rails_3
# Sign it with the secret_token
data = build_cookie
digest = OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new("SHA1"), datastore['SECRET'], data)
digest = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new("SHA1"), datastore['SECRET'], data)
marshal_payload = Rex::Text.uri_encode(data)
"#{marshal_payload}--#{digest}"
end

View File

@ -75,7 +75,7 @@ module Metasploit3
def generate_stage
p = super
m = OpenSSL::Digest::Digest.new('sha1')
m = OpenSSL::Digest.new('sha1')
m.reset
key = m.digest(datastore["RC4PASSWORD"] || "")
c1 = OpenSSL::Cipher::Cipher.new('RC4')
@ -87,7 +87,7 @@ module Metasploit3
def internal_generate
p = super
m = OpenSSL::Digest::Digest.new('sha1')
m = OpenSSL::Digest.new('sha1')
m.reset
key = m.digest(datastore["RC4PASSWORD"] || "")
p[offsets['XORKey'][0], 4] = key[0,4]

View File

@ -77,7 +77,7 @@ module Metasploit3
def generate_stage
p = super
m = OpenSSL::Digest::Digest.new('sha1')
m = OpenSSL::Digest.new('sha1')
m.reset
key = m.digest(datastore["RC4PASSWORD"] || "")
c1 = OpenSSL::Cipher::Cipher.new('RC4')
@ -89,7 +89,7 @@ module Metasploit3
def internal_generate
p = super
m = OpenSSL::Digest::Digest.new('sha1')
m = OpenSSL::Digest.new('sha1')
m.reset
key = m.digest(datastore["RC4PASSWORD"] || "")
p[offsets['XORKey'][0], 4] = key[0,4]

View File

@ -89,7 +89,7 @@ module Metasploit3
end
def generate_stage
m = OpenSSL::Digest::Digest.new('sha1')
m = OpenSSL::Digest.new('sha1')
m.reset
key = m.digest(datastore["RC4PASSWORD"] || "")
c1 = OpenSSL::Cipher::Cipher.new('RC4')
@ -102,7 +102,7 @@ module Metasploit3
def internal_generate
p = super
# Write keys into stage
m = OpenSSL::Digest::Digest.new('sha1')
m = OpenSSL::Digest.new('sha1')
m.reset
key = m.digest(datastore["RC4PASSWORD"] || "")
p[offsets['XORKey'][0], 4] = key[0,4]

View File

@ -246,7 +246,7 @@ class Metasploit3 < Msf::Post
end
def decrypt_hash(edata, nlkm, ch)
rc4key = OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('md5'), nlkm, ch)
rc4key = OpenSSL::HMAC.digest(OpenSSL::Digest.new('md5'), nlkm, ch)
rc4 = OpenSSL::Cipher::Cipher.new("rc4")
rc4.key = rc4key
decrypted = rc4.update(edata)