Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: undefined method `config' for nil:NilClass when loading meterpreter extensions #6778

Closed
honeyfairy opened this issue Apr 13, 2016 · 7 comments
Assignees
Labels
bug meterpreter Stale Marks an issue as stale, to be closed if no action is taken

Comments

@honeyfairy
Copy link

My Environment
Kali Linux 2016 Latest (apt-get and dist upgrade today)
MSF Latest (updated today)
Payload: Veil-Evasion generated reverse_https
Running MSFconsole in a TMUX session, over PuTTy

Error below:



meterpreter > use espia extapi incognito kiwi lanattacks mimikatz powershell priv python sniffer stdapi
Loading extension espia...success.
Loading extension extapi...success.
Loading extension incognito...success.
Loading extension kiwi...

  .#####.   mimikatz 2.0 alpha (x86/win32) release "Kiwi en C"
 .## ^ ##.
 ## / \ ##  /* * *
 ## \ / ##   Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
 '## v ##'   http://blog.gentilkiwi.com/mimikatz             (oe.eo)
  '#####'    Ported to Metasploit by OJ Reeves `TheColonial` * * */


[-] Failed to load extension: undefined method `config' for nil:NilClass
Loading extension lanattacks...success.
Loading extension mimikatz...
[-] Failed to load extension: undefined method `config' for nil:NilClass
Loading extension powershell...success.
[-] The 'priv' extension has already been loaded.
Loading extension python...
[-] Failed to load extension: No response was received to the core_loadlib request.
Loading extension sniffer...[-] Failed to load extension: undefined method `config' for nil:NilClass

[-] Failed to load extension: No response was received to the core_enumextcmd request.
Loading extension stdapi...
[-] Failed to load extension: No response was received to the core_enumextcmd request.
meterpreter > [-] Failed to load extension: undefined method `config' for nil:NilClass
[-] Parse error: Unmatched double quote: "[-] Failed to load extension: undefined method `config' for nil:NilClass"
meterpreter >
@nixawk
Copy link
Contributor

nixawk commented Apr 14, 2016

Could you show the target os information ? I've tried to reproduced it on windows x64, but failed.

@wchen-r7
Copy link
Contributor

In your msfcnosole, please do:

setg LogLevel 3

And then go ahead and trigger then same error again. There should be a backtrace log in ~/.msf4/logs/framework.log, could you please post that?

@wchen-r7
Copy link
Contributor

wchen-r7 commented Apr 19, 2016

We ran into a similar problem internally. Difficult to reproduce.

According to @egypt, this has been a known issue since 2005. If the stdapi extension fails to load (or not quick enough), then session.sys ends up being nil. Although it doesn't kill the session, without stdapi it's pretty much useless.

@wchen-r7 wchen-r7 added the bug label Apr 19, 2016
@bcook-r7
Copy link
Contributor

I have reproduced some of these errors simply by introducing additional delay on the network. In this case, I enabled the OS X "Network Link Conditioner", and set the network to 3G (780KB down, 330KB up). The extension loading requests would then randomly fail:

Loading extension espia...
[-] Failed to load extension: No response was received to the core_enumextcmd request.
Loading extension extapi...success.
Loading extension kiwi...

  .#####.   mimikatz 2.0 alpha (x86/win32) release "Kiwi en C"
 .## ^ ##.
 ## / \ ##  /* * *
 ## \ / ##   Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
 '## v ##'   http://blog.gentilkiwi.com/mimikatz             (oe.eo)
  '#####'    Ported to Metasploit by OJ Reeves `TheColonial` * * */


[!] Loaded x86 Kiwi on an x64 architecture.
success.
Loading extension lanattacks...success.
Loading extension mimikatz...
[!] Loaded x86 Mimikatz on an x64 architecture.
success.
Loading extension powershell...success.
[-] The 'priv' extension has already been loaded.
Loading extension python...
[-] Failed to load extension: No response was received to the core_loadlib request.
Loading extension sniffer...
[-] Failed to load extension: No response was received to the core_enumextcmd request.
[-] The 'stdapi' extension has already been loaded.

Possibly due to fixed timeouts for loading. If that is the case, we should perhaps look at a progressive mechanism where we reset the timer as long as progress continues to be made on the download of the extension.

@bcook-r7 bcook-r7 self-assigned this May 16, 2016
@bcook-r7 bcook-r7 changed the title Error: undefined method `config' for nil:NilClass Error: undefined method `config' for nil:NilClass when loading meterpreter extensions May 16, 2016
@shankara-n
Copy link

Is there any workaround for this?

@github-actions
Copy link

github-actions bot commented Jan 6, 2021

Hi!

This issue has been left open with no activity for a while now.

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 30 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.

@github-actions github-actions bot added the Stale Marks an issue as stale, to be closed if no action is taken label Jan 6, 2021
@github-actions
Copy link

github-actions bot commented Feb 8, 2021

Hi again!

It’s been 60 days since anything happened on this issue, so we are going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error please feel free to reopen this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.

@github-actions github-actions bot closed this as completed Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug meterpreter Stale Marks an issue as stale, to be closed if no action is taken
Projects
None yet
Development

No branches or pull requests

5 participants