Skip to content

Commit 524bbd7

Browse files
author
dmaloney-r7
authored
Merge pull request rapid7#8261 from dmaloney-r7/bug/disable_smb_login_nbss
Bug/disable smb login nbss
2 parents 3b38d0d + aa9c037 commit 524bbd7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/metasploit/framework/login_scanner/smb.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module AccessLevels
3030

3131
CAN_GET_SESSION = true
3232
DEFAULT_REALM = 'WORKSTATION'
33-
LIKELY_PORTS = [ 139, 445 ]
33+
LIKELY_PORTS = [ 445 ]
3434
LIKELY_SERVICE_NAMES = [ "smb" ]
3535
PRIVATE_TYPES = [ :password, :ntlm_hash ]
3636
REALM_KEY = Metasploit::Model::Realm::Key::ACTIVE_DIRECTORY_DOMAIN

spec/lib/metasploit/framework/login_scanner_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
2424
it { is_expected.not_to include Metasploit::Framework::LoginScanner::HTTP }
2525
end
2626

27-
[ 139, 445 ].each do |foo|
28-
context "with port #{foo}" do
29-
let(:port) { foo }
3027

31-
it { is_expected.to include Metasploit::Framework::LoginScanner::SMB }
32-
it { is_expected.not_to include Metasploit::Framework::LoginScanner::HTTP }
33-
it { is_expected.not_to include Metasploit::Framework::LoginScanner::VNC }
34-
end
28+
context "with port 445" do
29+
let(:port) { 445 }
30+
31+
it { is_expected.to include Metasploit::Framework::LoginScanner::SMB }
32+
it { is_expected.not_to include Metasploit::Framework::LoginScanner::HTTP }
33+
it { is_expected.not_to include Metasploit::Framework::LoginScanner::VNC }
3534
end
3635

36+
3737
context "with name 'http'" do
3838
let(:name) { 'http' }
3939

0 commit comments

Comments
 (0)