rapid7 / metasploit-framework

Metasploit Framework
https://www.metasploit.com/
Other
33.8k stars 13.9k forks source link

NameError uninitialized constant Msf::Exploit::Remote::CheckScanner Call stack: #13563

Closed xxsmile123 closed 4 years ago

xxsmile123 commented 4 years ago

Steps to reproduce

How'd you do it?

  1. Updated metasploit and replaced invalid keys
  2. The above error occurred when downloading and importing the CVE-2019-0708 exploit.

This section should also tell us any relevant information about the environment; for example, if an exploit that used to work is failing, tell us the victim operating system and service versions.

Expected behavior

What should happen?

Current behavior

What happens instead?

You might also want to check the last ~1k lines of /opt/metasploit/apps/pro/engine/config/logs/framework.log or ~/.msf4/logs/framework.log for relevant stack traces

System stuff

Metasploit version

Framework: 5.0.93-dev- Console : 5.0.93-dev-

Get this with the version command in msfconsole (or git log -1 --pretty=oneline for a source install).

I installed Metasploit with:

OS

What OS are you running Metasploit on? ubantu 1804

h00die commented 4 years ago

Downloaded from where? Imported from where, where did you import it to, what commands did you issue to import it, what was the output?

xxsmile123 commented 4 years ago

I downloaded from https://raw.githubusercontent.com/rapid7/metasploit-framework/edb7e20221e2088497d1f61132db3a56f81b8ce9/

The places I imported are as follows: cp rdp.rb /opt/metasploit-framework/embedded/framework/lib/msf/core/exploit/

cp rdp_scanner.rb /opt/metasploit-framework/embedded/framework/modules/auxiliary/scanner/

If there is no rdp directory, use the mkdir command to create an rdp directory cp cve_2019_0708_bluekeep_rce.rb /opt/metasploit-framework/embedded/framework/modules/exploits/rdp/

cp cve_2019_0708_bluekeep.rb /opt/metasploit-framework/embedded/framework/modules/auxiliary/scanner/rdp/

I imported it using reload_all. The output is as follows: msf5 > reload_all [*] Reloading modules from all module paths... [-] WARNING! The following modules could not be loaded! [-] /opt/metasploit-framework/embedded/framework/modules/exploits/rdp/cve_2019_0708_bluekeep_rce.rb [-] Please see /root/.msf4/logs/framework.log for details.

After executing cat /root/.msf4/logs/framework.log, the reason I found was the title of the issue I raised.

h00die commented 4 years ago

cve_2019_0708_bluekeep_rce.rb has been updated 15 times since that commit. Maybe you should try pulling it from master? Also 5.0.93 should have the modules already: https://github.com/rapid7/metasploit-framework/tree/master/modules/auxiliary/scanner/rdp. Maybe you need to check on why it isn't in the default install?

It looks like your paths are also wrong: correct: modules/exploits/windows/rdp/ wrong: modules/exploits/rdp/

I'm also curious, what OS is this on, I haven't seen the 'embedded' folder before

wvu commented 4 years ago

CheckScanner is now CheckModule. Update your Metasploit installation before copying and pasting modules from the Internet - or update normally.

xxsmile123 commented 4 years ago

hi,boys。Thanks for your help, I have solved the problem. It's just that I reinstalled it. Thank you very much for your meticulous help.

xxsmile123 commented 4 years ago

But I encountered a new problem when using this loophole. After setting the payload, the following error popped up during execution. Have you encountered it again? If so, can you help me?

Exploit failed: Msf::Exploit::Remote::RDP::RdpCommunicationError Msf::Exploit::Remote::RDP::RdpCommunicationError

bcoles commented 4 years ago

This module needs a bunch of different files to work. Rather than trying to copy them one by one, why not update Metasploit ?

wvu commented 4 years ago

Original issue resolved. Please file a separate ticket if you have an issue with the module itself. Thank you.