Skip to content

Commit 6f9d7dd

Browse files
author
Heiko Kiesel
committed
Update SSH examples
Signed-off-by: Heiko Kiesel <heiko.kiesel@iteratec.com>
1 parent 70e5a7c commit 6f9d7dd

7 files changed

Lines changed: 27 additions & 134 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
SPDX-FileCopyrightText: the secureCodeBox authors
3+
SPDX-License-Identifier: Apache-2.0
4+
-->
5+
6+
In this example we execute an kubeaudit scan against the intentional vulnerable [dummy-ssh](https://github.com/secureCodeBox/secureCodeBox/tree/main/demo-targets/dummy-ssh)
7+
8+
#### Initialize dummy-ssh in cluster
9+
10+
Before executing the scan, make sure to setup dummy-ssh
11+
12+
```bash
13+
helm upgrade --install dummy-ssh secureCodeBox/dummy-ssh --wait
14+
```
15+
16+
After that you can execute the scan in this directory:
17+
```bash
18+
kubectl apply -f scan.yaml
19+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"name":"SSH Service","description":"SSH Service Information","identified_at":"2023-08-23T07:50:40.000Z","category":"SSH Service","osi_layer":"APPLICATION","severity":"INFORMATIONAL","reference":{},"mitigation":null,"location":"dummy-ssh","attributes":{"hostname":"dummy-ssh","ip_addresses":["10.96.2.217"],"server_banner":"SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8","ssh_version":2,"os_cpe":"o:canonical:ubuntu:16.04","ssh_lib_cpe":"a:openssh:openssh:7.2p2","compliance_policy":"Mozilla Modern","compliant":false,"grade":"D","references":["https://wiki.mozilla.org/Security/Guidelines/OpenSSH"],"auth_methods":["publickey","password"],"key_algorithms":["curve25519-sha256@libssh.org","ecdh-sha2-nistp256","ecdh-sha2-nistp384","ecdh-sha2-nistp521","diffie-hellman-group-exchange-sha256","diffie-hellman-group14-sha1"],"encryption_algorithms":["chacha20-poly1305@openssh.com","aes128-ctr","aes192-ctr","aes256-ctr","aes128-gcm@openssh.com","aes256-gcm@openssh.com"],"mac_algorithms":["umac-64-etm@openssh.com","umac-128-etm@openssh.com","hmac-sha2-256-etm@openssh.com","hmac-sha2-512-etm@openssh.com","hmac-sha1-etm@openssh.com","umac-64@openssh.com","umac-128@openssh.com","hmac-sha2-256","hmac-sha2-512","hmac-sha1"],"compression_algorithms":["none","zlib@openssh.com"]},"id":"a9534b13-8a2e-4d82-b47b-3481f606caff","parsed_at":"2023-08-23T07:50:52.999Z"},{"name":"Insecure SSH Key Algorithms","description":"Deprecated / discouraged SSH key algorithms are used","category":"SSH Policy Violation","osi_layer":"NETWORK","severity":"MEDIUM","reference":{},"mitigation":"Remove these key exchange algorithms: diffie-hellman-group14-sha1","location":"dummy-ssh","attributes":{"hostname":"dummy-ssh","ip_addresses":["10.96.2.217"],"payload":["diffie-hellman-group14-sha1"]},"id":"4c16901e-2f00-4dd8-a636-5ff490a11327","parsed_at":"2023-08-23T07:50:52.999Z"},{"name":"Insecure SSH MAC Algorithms","description":"Deprecated / discouraged SSH MAC algorithms are used","category":"SSH Policy Violation","osi_layer":"NETWORK","severity":"MEDIUM","reference":{},"mitigation":"Remove these MAC algorithms: umac-64-etm@openssh.com, hmac-sha1-etm@openssh.com, umac-64@openssh.com, hmac-sha1","location":"dummy-ssh","attributes":{"hostname":"dummy-ssh","ip_addresses":["10.96.2.217"],"payload":["umac-64-etm@openssh.com","hmac-sha1-etm@openssh.com","umac-64@openssh.com","hmac-sha1"]},"id":"19e4cfaf-e94f-4f05-a801-422bd1ad7f3c","parsed_at":"2023-08-23T07:50:52.999Z"},{"name":"Discouraged SSH authentication methods","description":"Discouraged SSH authentication methods are used","category":"SSH Policy Violation","osi_layer":"NETWORK","severity":"MEDIUM","reference":{},"mitigation":"Remove these authentication methods: password","location":"dummy-ssh","attributes":{"hostname":"dummy-ssh","ip_addresses":["10.96.2.217"],"payload":["password"]},"id":"909882f1-e2bc-4137-9ff7-20fee5e9dd2f","parsed_at":"2023-08-23T07:50:52.999Z"}]

scanners/ssh-scan/examples/demo-app-ssh/findings.yaml

Lines changed: 0 additions & 120 deletions
This file was deleted.

scanners/ssh-scan/examples/demo-app-ssh/scan.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ spec:
1010
scanType: "ssh-scan"
1111
parameters:
1212
- "-t"
13-
- "dummy-ssh.demo-targets.svc"
13+
- "dummy-ssh"

scanners/ssh-scan/examples/demo-app-ssh/ssh-scan-results.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
{
3-
"ssh_scan_version": "0.0.43",
4-
"ip": "10.102.131.102",
5-
"hostname": "dummy-ssh.demo-targets.svc",
3+
"ssh_scan_version": "0.0.44",
4+
"ip": "10.96.2.217",
5+
"hostname": "dummy-ssh",
66
"port": 22,
77
"server_banner": "SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8",
88
"ssh_version": 2.0,
@@ -124,8 +124,8 @@
124124
],
125125
"grade": "D"
126126
},
127-
"start_time": "2020-06-28 17:55:43 +0000",
128-
"end_time": "2020-06-28 17:55:43 +0000",
129-
"scan_duration_seconds": 0.2357902
127+
"start_time": "2023-08-23 07:50:40 +0000",
128+
"end_time": "2023-08-23 07:50:40 +0000",
129+
"scan_duration_seconds": 0.151072701
130130
}
131131
]

scanners/ssh-scan/examples/demo-app-ssh/ssh-scan-results.json.license

Lines changed: 0 additions & 3 deletions
This file was deleted.

scanners/ssh-scan/examples/localhost/findings.yaml renamed to scanners/ssh-scan/examples/localhost/findings.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# SPDX-FileCopyrightText: the secureCodeBox authors
2-
#
3-
# SPDX-License-Identifier: Apache-2.0
4-
51
[
62
{
73
"ssh_scan_version": "0.0.42",

0 commit comments

Comments
 (0)