This repository was archived by the owner on Oct 14, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +36
-7
lines changed Expand file tree Collapse file tree 4 files changed +36
-7
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,28 @@ In this example we execute an ncrack scan against the intentional vulnerable ssh
22
33### Install dummy-ssh
44
5- Before executing the scan, make sure to have dummy-ssh installed:
5+ Before executing the scan, make sure to have dummy-ssh installed, and have the proper username & password lists :
66
77``` bash
8- helm install dummy-ssh ./demo-apps/dummy-ssh/ --wait
9- ```
8+ # Create user & password list files, you can edit them later if you want
9+ echo " root\nadmin" > users.txt
10+ echo " THEPASSWORDYOUCREATED\n123456\npassword" > passwords.txt
1011
12+ # Create a Kubernetes secret containing these files
13+ kubectl create secret generic --from-file users.txt --from-file passwords.txt ncrack-lists
1114
15+ # Install dummy-ssh app. We'll use ncrack to enumerate its ssh username and password
16+ helm install dummy-ssh ./demo-apps/dummy-ssh/ --wait
1217
18+ # Install the ncrack scanType and set mount the files from the ncrack-lists Kubernetes secret
19+ cat << EOF | helm install ncrack ./scanners/ncrack --values -
20+ scannerJob:
21+ extraVolumes:
22+ - name: ncrack-lists
23+ secret:
24+ secretName: ncrack-lists
25+ extraVolumeMounts:
26+ - name: ncrack-lists
27+ mountPath: "/ncrack/"
28+ EOF
29+ ```
Original file line number Diff line number Diff line change @@ -5,8 +5,10 @@ metadata:
55spec :
66 scanType : " ncrack"
77 parameters :
8+ # Enable verbose logging
89 - -v
9- - --user=root,admin
10- - --pass=THEPASSWORDYOUCREATED,12345
10+ - -U
11+ - /ncrack/users.txt
12+ - -P
13+ - /ncrack/passwords.txt
1114 - ssh://dummy-ssh
12-
Original file line number Diff line number Diff line change 1919 command : ["ncrack", "-oX", "/home/securecodebox/ncrack-results.xml"]
2020 resources :
2121 {{- toYaml .Values.scannerJob.resources | nindent 16 }}
22+ volumeMounts :
23+ {{- if .Values.scannerJob.extraVolumeMounts }}
24+ {{- toYaml .Values.scannerJob.extraVolumeMounts | nindent 14 }}
25+ {{- end }}
26+ volumes :
27+ {{- if .Values.scannerJob.extraVolumes }}
28+ {{- toYaml .Values.scannerJob.extraVolumes | nindent 10 }}
29+ {{- end }}
30+
Original file line number Diff line number Diff line change @@ -5,4 +5,5 @@ parserImage:
55
66scannerJob :
77 resources : {}
8-
8+ extraVolumes : []
9+ extraVolumeMounts : []
You can’t perform that action at this time.
0 commit comments