Land #7456, add android_hide_app_icon command
commit
67998600e8
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
metasploit-framework (4.12.41)
|
||||
metasploit-framework (4.12.42)
|
||||
actionpack (~> 4.2.6)
|
||||
activerecord (~> 4.2.6)
|
||||
activesupport (~> 4.2.6)
|
||||
|
@ -14,7 +14,7 @@ PATH
|
|||
metasploit-concern
|
||||
metasploit-credential
|
||||
metasploit-model
|
||||
metasploit-payloads (= 1.1.26)
|
||||
metasploit-payloads (= 1.1.28)
|
||||
metasploit_data_models
|
||||
metasploit_payloads-mettle (= 0.0.8)
|
||||
msgpack
|
||||
|
@ -169,7 +169,7 @@ GEM
|
|||
activemodel (~> 4.2.6)
|
||||
activesupport (~> 4.2.6)
|
||||
railties (~> 4.2.6)
|
||||
metasploit-payloads (1.1.26)
|
||||
metasploit-payloads (1.1.28)
|
||||
metasploit_data_models (2.0.6)
|
||||
activerecord (~> 4.2.6)
|
||||
activesupport (~> 4.2.6)
|
||||
|
|
|
@ -248,6 +248,12 @@ class Android < Extension
|
|||
response.get_tlv(TLV_TYPE_CHECK_ROOT_BOOL).value
|
||||
end
|
||||
|
||||
def hide_app_icon
|
||||
request = Packet.create_request('android_hide_app_icon')
|
||||
response = client.send_request(request)
|
||||
response.get_tlv_value(TLV_TYPE_ICON_NAME)
|
||||
end
|
||||
|
||||
def activity_start(uri)
|
||||
request = Packet.create_request('android_activity_start')
|
||||
request.add_tlv(TLV_TYPE_URI_STRING, uri)
|
||||
|
|
|
@ -81,6 +81,8 @@ TLV_TYPE_URI_STRING = TLV_META_TYPE_STRING | (TLV_EXTENSIONS
|
|||
TLV_TYPE_ACTIVITY_START_RESULT = TLV_META_TYPE_BOOL | (TLV_EXTENSIONS + 9102)
|
||||
TLV_TYPE_ACTIVITY_START_ERROR = TLV_META_TYPE_STRING | (TLV_EXTENSIONS + 9103)
|
||||
|
||||
TLV_TYPE_ICON_NAME = TLV_META_TYPE_STRING | (TLV_EXTENSIONS + 9104)
|
||||
|
||||
TLV_TYPE_SQLITE_RESULT_GROUP = TLV_META_TYPE_GROUP | (TLV_EXTENSIONS + 9080)
|
||||
TLV_TYPE_SQLITE_NAME = TLV_META_TYPE_STRING | (TLV_EXTENSIONS + 9081)
|
||||
TLV_TYPE_SQLITE_QUERY = TLV_META_TYPE_STRING | (TLV_EXTENSIONS + 9082)
|
||||
|
|
|
@ -31,6 +31,7 @@ class Console::CommandDispatcher::Android
|
|||
'wlan_geolocate' => 'Get current lat-long using WLAN information',
|
||||
'interval_collect' => 'Manage interval collection capabilities',
|
||||
'activity_start' => 'Start an Android activity from a Uri string',
|
||||
'hide_app_icon' => 'Hide the app icon from the launcher',
|
||||
'sqlite_query' => 'Query a SQLite database from storage',
|
||||
'set_audio_mode' => 'Set Ringer Mode'
|
||||
}
|
||||
|
@ -46,6 +47,7 @@ class Console::CommandDispatcher::Android
|
|||
'wlan_geolocate' => ['android_wlan_geolocate'],
|
||||
'interval_collect' => ['android_interval_collect'],
|
||||
'activity_start' => ['android_activity_start'],
|
||||
'hide_app_icon' => ['android_hide_app_icon'],
|
||||
'sqlite_query' => ['android_sqlite_query'],
|
||||
'set_audio_mode' => ['android_set_audio_mode']
|
||||
}
|
||||
|
@ -580,6 +582,27 @@ class Console::CommandDispatcher::Android
|
|||
end
|
||||
end
|
||||
|
||||
def cmd_hide_app_icon(*args)
|
||||
hide_app_icon_opts = Rex::Parser::Arguments.new(
|
||||
'-h' => [ false, 'Help Banner' ]
|
||||
)
|
||||
|
||||
hide_app_icon_opts.parse(args) do |opt, _idx, _val|
|
||||
case opt
|
||||
when '-h'
|
||||
print_line('Usage: hide_app_icon [options]')
|
||||
print_line('Hide the application icon from the launcher.')
|
||||
print_line(hide_app_icon_opts.usage)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
result = client.android.hide_app_icon
|
||||
if result
|
||||
print_status("Activity #{result} was hidden")
|
||||
end
|
||||
end
|
||||
|
||||
def cmd_sqlite_query(*args)
|
||||
sqlite_query_opts = Rex::Parser::Arguments.new(
|
||||
'-h' => [ false, 'Help Banner' ],
|
||||
|
|
|
@ -65,7 +65,7 @@ Gem::Specification.new do |spec|
|
|||
# are needed when there's no database
|
||||
spec.add_runtime_dependency 'metasploit-model'
|
||||
# Needed for Meterpreter
|
||||
spec.add_runtime_dependency 'metasploit-payloads', '1.1.26'
|
||||
spec.add_runtime_dependency 'metasploit-payloads', '1.1.28'
|
||||
# Needed for the next-generation POSIX Meterpreter
|
||||
spec.add_runtime_dependency 'metasploit_payloads-mettle', '0.0.8'
|
||||
# Needed by msfgui and other rpc components
|
||||
|
|
Loading…
Reference in New Issue