Closed timwr closed 9 years ago
On android it's a different story:
[*] Started HTTP reverse handler on http://0.0.0.0:4444/
[*] Starting the payload handler...
msf exploit(handler) > [*] 192.168.43.203:33659 Unknown request to /JoWH_LoQuGLDY4Pe27LuD #<Rex::Proto::Http::Request:0x0000000ab05b08 @headers={"User-Agent"=>"Dalvik/1.6.0 (Linux; U; Android 4.0.4; Android SDK built for x86 Build/IMM76D)", "Host"=>"192.168.43.203:4444", "Connection"=>"Keep-Alive", "Accept-Encoding"=>"gzip"}, @auto_cl=true, @state=3, @transfer_chunked=false, @inside_chunk=false, @bufq="", @body="", @method="GET", @raw_uri="/JoWH_LoQuGLDY4Pe27LuD", @uri_parts={"QueryString"=>{}, "Resource"=>"/JoWH_LoQuGLDY4Pe27LuD"}, @proto="1.1", @chunk_min_size=1, @chunk_max_size=10, @uri_encode_mode="hex-normal", @relative_resource="/JoWH_LoQuGLDY4Pe27LuD", @body_bytes_left=0>...
It looks like Android is still using the old URI format, is this a freshly generated payload?
The delay looks like what happens when stdapi is still loading on Windows meterpreter.
It's a freshly generated payload but the URI format in this repository hasn't been changed for a while so it's probably out of date. Any links/specs/pull requests with info would be appreciated. Also it looks like the extension loading process is broken/non-existent on Android:
W/System.err( 1593): Unknown request detected:
W/System.err( 1593): TLV_TYPE_METHOD = core_machine_id
W/System.err( 1593): TLV_TYPE_REQUEST_ID = 13229083941442895921839819037572
W/System.err( 1593): Unknown request detected:
W/System.err( 1593): TLV_TYPE_METHOD = core_enumextcmd
W/System.err( 1593): TLV_TYPE_REQUEST_ID = 23467841292372398553576015459914
W/System.err( 1593): TLV_TYPE_STRING = stdapi
D/dalvikvm( 1593): GC_CONCURRENT freed 389K, 6% free 9051K/9543K, paused 0ms+0ms
W/System.err( 1593): Unknown request detected:
W/System.err( 1593): TLV_TYPE_METHOD = core_enumextcmd
W/System.err( 1593): TLV_TYPE_REQUEST_ID = 50461722444296487041905258754958
W/System.err( 1593): TLV_TYPE_STRING = android
Testing this, it all appears to be working as expected. HTTP is slower to respond than TCP and the lack of "stdapi" early on is because the framework hasn't loaded the stdapi client stubs. It has to wait for the initialization stuff to finish, which requires round-trips for machine_id and other requests. Arguably we should realize stdapi is immediately available for Java, but this currently works just like any other meterpreter.
I can't see any roadblock here for future testing. The android stuff looks normal as well, we want to add those new commands soon, but they dont hurt anything by being unimplemented today.
me too @timwr auxiliary/server/browser_autopwn metasploit v5.0.0-dev-c525bc3c0a is bug
I'm currently noticing some weirdness with java/meterpreter/reverse_http and reverse_https (reverse_tcp works great). e.g:
After the initial weirdness things seem to work, but commands also seem to take a lot longer, so I suspect there is a timeout problem somewhere.
I also noticed this, however I can no longer reproduce:
I'll hopefully fix this with the addition of the set_timeout command, but I thought I'd raise it here for visibility.