2011-12-30 23:03:04 +00:00
|
|
|
##
|
2017-07-24 13:26:21 +00:00
|
|
|
# This module requires Metasploit: https://metasploit.com/download
|
2013-10-15 18:50:46 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2011-12-30 23:03:04 +00:00
|
|
|
##
|
|
|
|
|
2016-03-08 13:02:44 +00:00
|
|
|
class MetasploitModule < Msf::Post
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Post::Windows::Priv
|
|
|
|
include Msf::Post::Windows::ShadowCopy
|
2011-12-30 23:03:04 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def initialize(info={})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => "Windows Manage Set Shadow Copy Storage Space",
|
|
|
|
'Description' => %q{
|
2017-09-17 20:00:04 +00:00
|
|
|
This module will attempt to change the amount of space
|
2013-08-30 21:28:54 +00:00
|
|
|
for volume shadow copy storage. This is based on the
|
|
|
|
VSSOwn Script originally posted by Tim Tomes and
|
|
|
|
Mark Baggett.
|
2012-03-05 20:28:23 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
Works on win2k3 and later.
|
|
|
|
},
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Platform' => ['win'],
|
|
|
|
'SessionTypes' => ['meterpreter'],
|
|
|
|
'Author' => ['theLightCosine'],
|
|
|
|
'References' => [
|
|
|
|
[ 'URL', 'http://pauldotcom.com/2011/11/safely-dumping-hashes-from-liv.html' ]
|
|
|
|
]
|
|
|
|
))
|
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptInt.new('SIZE', [ true, 'Size in bytes to set for Max Storage'])
|
2017-05-03 20:42:21 +00:00
|
|
|
])
|
2011-12-30 23:03:04 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
end
|
2011-12-30 23:03:04 +00:00
|
|
|
|
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def run
|
|
|
|
unless is_admin?
|
|
|
|
print_error("This module requires admin privs to run")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
if is_uac_enabled?
|
|
|
|
print_error("This module requires UAC to be bypassed first")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
unless start_vss
|
|
|
|
return
|
|
|
|
end
|
|
|
|
if vss_set_storage(datastore['SIZE'])
|
|
|
|
print_good("Size upated successfully")
|
|
|
|
else
|
|
|
|
print_error("There was a problem updating the storage size")
|
|
|
|
end
|
|
|
|
end
|
2011-12-30 23:03:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end
|