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

Enable Metasploit Payloads file warning messages by default #18610

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/msf/core/feature_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class FeatureManager
name: METASPLOIT_PAYLOAD_WARNINGS,
description: 'When enabled Metasploit will output warnings about missing Metasploit payloads, for instance if they were removed by antivirus etc',
requires_restart: true,
default_value: false,
default_value: true,
developer_notes: 'Planned for default enablement in: Metasploit 6.4.x'
}.freeze,
{
Expand Down
8 changes: 7 additions & 1 deletion lib/msf/ui/console/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,13 @@ def on_startup(opts = {})

run_single("banner") unless opts['DisableBanner']

payloads_manifest_errors = framework.features.enabled?(::Msf::FeatureManager::METASPLOIT_PAYLOAD_WARNINGS) ? ::MetasploitPayloads.manifest_errors : []
payloads_manifest_errors = []
begin
payloads_manifest_errors = ::MetasploitPayloads.manifest_errors if framework.features.enabled?(::Msf::FeatureManager::METASPLOIT_PAYLOAD_WARNINGS)
rescue ::StandardError => e
$stderr.print('Could not verify the integrity of the Metasploit Payloads manifest')
elog(e)
end

av_warning_message if (framework.eicar_corrupted? || payloads_manifest_errors.any?)

Expand Down