From 2bbba9c500977e23b6d109fbae62a925b95a1a03 Mon Sep 17 00:00:00 2001 From: Pearce Barry Date: Wed, 30 Aug 2017 15:18:23 -0500 Subject: [PATCH] Avoid some ActiveRecord validation errors. Per discussion with @bcoles in [PR 8759](https://github.com/rapid7/metasploit-framework/pull/8759#issuecomment-325028479), setting a login data's last_attempted_at value while also setting the status to UNTRIED will cause a validation error when there's a running+connected MSF DB. This PR removes the handful of existing cases we're doing this (thx, @bcoles!). --- modules/auxiliary/admin/http/dlink_dir_645_password_extractor.rb | 1 - modules/auxiliary/admin/http/dlink_dsl320b_password_extractor.rb | 1 - modules/auxiliary/admin/http/nexpose_xxe_file_read.rb | 1 - modules/auxiliary/gather/asterisk_creds.rb | 1 - 4 files changed, 4 deletions(-) diff --git a/modules/auxiliary/admin/http/dlink_dir_645_password_extractor.rb b/modules/auxiliary/admin/http/dlink_dir_645_password_extractor.rb index 63149a522d..d387f35353 100644 --- a/modules/auxiliary/admin/http/dlink_dir_645_password_extractor.rb +++ b/modules/auxiliary/admin/http/dlink_dir_645_password_extractor.rb @@ -49,7 +49,6 @@ class MetasploitModule < Msf::Auxiliary }.merge(service_data) login_data = { - last_attempted_at: DateTime.now, core: create_credential(credential_data), status: Metasploit::Model::Login::Status::UNTRIED, proof: opts[:proof] diff --git a/modules/auxiliary/admin/http/dlink_dsl320b_password_extractor.rb b/modules/auxiliary/admin/http/dlink_dsl320b_password_extractor.rb index ad2a504121..9cbfa6c1bb 100644 --- a/modules/auxiliary/admin/http/dlink_dsl320b_password_extractor.rb +++ b/modules/auxiliary/admin/http/dlink_dsl320b_password_extractor.rb @@ -46,7 +46,6 @@ class MetasploitModule < Msf::Auxiliary }.merge(service_data) login_data = { - last_attempted_at: DateTime.now, core: create_credential(credential_data), status: Metasploit::Model::Login::Status::UNTRIED, proof: opts[:proof] diff --git a/modules/auxiliary/admin/http/nexpose_xxe_file_read.rb b/modules/auxiliary/admin/http/nexpose_xxe_file_read.rb index e2a67a4547..f8f388ef84 100644 --- a/modules/auxiliary/admin/http/nexpose_xxe_file_read.rb +++ b/modules/auxiliary/admin/http/nexpose_xxe_file_read.rb @@ -61,7 +61,6 @@ class MetasploitModule < Msf::Auxiliary }.merge(service_data) login_data = { - last_attempted_at: DateTime.now, core: create_credential(credential_data), status: Metasploit::Model::Login::Status::UNTRIED }.merge(service_data) diff --git a/modules/auxiliary/gather/asterisk_creds.rb b/modules/auxiliary/gather/asterisk_creds.rb index 1604031ea9..b1602a5133 100644 --- a/modules/auxiliary/gather/asterisk_creds.rb +++ b/modules/auxiliary/gather/asterisk_creds.rb @@ -116,7 +116,6 @@ class MetasploitModule < Msf::Auxiliary }.merge service_data login_data = { - last_attempted_at: DateTime.now, core: create_credential(credential_data), status: Metasploit::Model::Login::Status::UNTRIED, proof: opts[:proof]