You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bunch of users have reported issues with a missing .dex file causing Metasploit msfconsole to fail to start. Instead msfconsole dies with a long backtrace.
Here's one example issue I can be bothered to track down (there are many):
This issue is due to anti-virus eating the .dex file. In theory, corruption of Metasploit files by anti-virus was meant to have been detected by the is_eicar_corrupted? canary.
Some time latter, cmd_banner gets called to display the banner, version and help tips. Only then does msfconsole bother to check if the canary is happy.
I believe the main problem here has been unintentionally fixed by landing the zeitwerk PR #14202
But I'm still going to address the rest of the issues here
A bunch of users have reported issues with a missing
.dex
file causing Metasploitmsfconsole
to fail to start. Insteadmsfconsole
dies with a long backtrace.Here's one example issue I can be bothered to track down (there are many):
This issue is due to anti-virus eating the
.dex
file. In theory, corruption of Metasploit files by anti-virus was meant to have been detected by theis_eicar_corrupted?
canary.metasploit-framework/lib/msf/util/exe.rb
Lines 2179 to 2196 in 025950e
(Also, this
is_eicar_corrupted?
method is poorly written. It checks if the file exists twice.)The problem is that this method is called here:
metasploit-framework/lib/msf/core/framework.rb
Line 42 in 025950e
But the canary warning is ignored. This proves to be fatal.
A few lines later
module_manager
is loaded. The crash due to missing.dex
file occurs somewhere in here while iterating through module paths.metasploit-framework/lib/msf/core/framework.rb
Line 58 in 025950e
Some time latter,
cmd_banner
gets called to display the banner, version and help tips. Only then doesmsfconsole
bother to check if the canary is happy.metasploit-framework/lib/msf/ui/console/command_dispatcher/core.rb
Lines 258 to 265 in 025950e
This sequence of events needs to be reworked.
The text was updated successfully, but these errors were encountered: