Skip to content

Commit c4837d0

Browse files
committed
ssh_version module
1 parent 7f6be50 commit c4837d0

File tree

2 files changed

+35
-36
lines changed

2 files changed

+35
-36
lines changed

documentation/modules/auxiliary/scanner/ssh/ssh_version.md

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ CMD ["/usr/sbin/sshd","-D"]
3535

3636
## Options
3737

38-
### ENCRYPTION
38+
### EXTENDED_CHECKS
3939

40-
Check encryption for issues. Defaults to `true`
40+
Check for cryptographic issues. Defaults to `true`
4141

4242
## Scenarios
4343

@@ -49,39 +49,38 @@ msf5 auxiliary(scanner/ssh/ssh_version) > set RHOSTS github.com
4949
RHOSTS => github.com
5050
msf5 auxiliary(scanner/ssh/ssh_version) > run
5151
52-
[*] 140.82.113.3 - Key Fingerprint: 65:96:2d:fc:e8:d5:a9:11:64:0c:0f:ea:00:6e:5b:bd
53-
[+] 140.82.113.3 - Host Key Encryption ecdsa-sha2-nistp256 uses a weak elliptic curve and should not be used.
54-
[*] 140.82.113.3 - SSH server version: SSH-2.0-babeld-8e18a363
55-
[*] 140.82.113.3 - Server Encryption
56-
=================
52+
[*] 140.82.113.4 - Key Fingerprint: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
53+
[*] 140.82.113.4 - SSH server version: SSH-2.0-babeld-8405f9f3
54+
[*] 140.82.113.4 - Server Information and Encryption
55+
=================================
5756
58-
Type Value
59-
---- -----
60-
Compression none
61-
Compression [email protected]
62-
Compression zlib
63-
Encryption [email protected]
64-
Encryption [email protected]
65-
Encryption [email protected]
66-
Encryption aes256-ctr
67-
Encryption aes192-ctr
68-
Encryption aes128-ctr
69-
70-
71-
HMAC hmac-sha2-512
72-
HMAC hmac-sha2-256
73-
Host Key ssh-ed25519
74-
Host Key ecdsa-sha2-nistp256
75-
Host Key rsa-sha2-512
76-
Host Key rsa-sha2-256
77-
Host Key ssh-rsa
78-
Key Exchange (kex) curve25519-sha256
79-
Key Exchange (kex) [email protected]
80-
Key Exchange (kex) ecdh-sha2-nistp256
81-
Key Exchange (kex) ecdh-sha2-nistp384
82-
Key Exchange (kex) ecdh-sha2-nistp521
83-
Key Exchange (kex) diffie-hellman-group-exchange-sha256
84-
Key Exchange (kex) [email protected]
57+
Type Value Note
58+
---- ----- ----
59+
encryption.compression none
60+
encryption.compression [email protected]
61+
encryption.compression zlib
62+
encryption.encryption [email protected]
63+
encryption.encryption [email protected]
64+
encryption.encryption [email protected]
65+
encryption.encryption aes256-ctr
66+
encryption.encryption aes192-ctr
67+
encryption.encryption aes128-ctr
68+
encryption.hmac [email protected]
69+
encryption.hmac [email protected]
70+
encryption.hmac hmac-sha2-512
71+
encryption.hmac hmac-sha2-256
72+
encryption.host_key ssh-ed25519
73+
encryption.host_key ecdsa-sha2-nistp256 Weak elliptic curve
74+
encryption.host_key rsa-sha2-512
75+
encryption.host_key rsa-sha2-256
76+
encryption.host_key ssh-rsa
77+
encryption.key_exchange_(kex) curve25519-sha256
78+
encryption.key_exchange_(kex) [email protected]
79+
encryption.key_exchange_(kex) ecdh-sha2-nistp256
80+
encryption.key_exchange_(kex) ecdh-sha2-nistp384
81+
encryption.key_exchange_(kex) ecdh-sha2-nistp521
82+
encryption.key_exchange_(kex) diffie-hellman-group-exchange-sha256
83+
encryption.key_exchange_(kex) [email protected]
8584
8685
[*] Scanned 1 of 1 hosts (100% complete)
8786
[*] Auxiliary module execution completed

modules/auxiliary/scanner/ssh/ssh_version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def initialize
3333
[
3434
Opt::RPORT(22),
3535
OptInt.new('TIMEOUT', [true, 'Timeout for the SSH probe', 30]),
36-
OptBool.new('ENCRYPTION', [false, 'Check encryption for issues', true])
36+
OptBool.new('EXTENDED_CHECKS', [true, 'Check for cryptographic issues', true])
3737
],
3838
self.class
3939
)
@@ -235,7 +235,7 @@ def run_host(target_host)
235235

236236
report_service(host: target_host, port: rport, name: 'ssh', proto: 'tcp', info: ident)
237237

238-
return unless datastore['ENCRYPTION']
238+
return unless datastore['EXTENDED_CHECKS']
239239

240240
table = Rex::Text::Table.new(
241241
'Header' => 'Server Information and Encryption',

0 commit comments

Comments
 (0)