Skip to content

Commit

Permalink
Try 445/tcp before 139/tcp when scanning smb
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroSteiner committed May 7, 2024
1 parent 88efba7 commit 0863700
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/auxiliary/scanner/smb/smb_enumusers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def run_host(_ip)

if datastore['RPORT'].blank? || datastore['RPORT'] == 0
smb_services = [
{ port: 139, direct: false },
{ port: 445, direct: true }
{ port: 445, direct: true },
{ port: 139, direct: false }
]
else
smb_services = [
Expand Down
4 changes: 2 additions & 2 deletions modules/auxiliary/scanner/smb/smb_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ def smb_os_description(res, nd_smb_fingerprint)
def run_host(ip)
if datastore['RPORT'].blank? || datastore['RPORT'] == 0
smb_services = [
{ port: 139, direct: false },
{ port: 445, direct: true }
{ port: 445, direct: true },
{ port: 139, direct: false }
]
else
smb_services = [
Expand Down

0 comments on commit 0863700

Please sign in to comment.