Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 36c168a

Browse files
committed
Added scanner integration readme files and example files for each scanner
1 parent da7984f commit 36c168a

File tree

23 files changed

+29917
-10
lines changed

23 files changed

+29917
-10
lines changed

integrations/amass/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: "Amass"
3+
path: "scanner/Amass"
4+
category: "scanner"
5+
usecase: "Subdomain Enumeration Scanner"
6+
---
7+
8+
![owasp logo](https://owasp.org/assets/images/logo.png)
9+
10+
The OWASP Amass Project has developed a tool to help information security professionals perform network mapping of attack surfaces and perform external asset discovery using open source information gathering and active reconnaissance techniques. To learn more about the Amass scanner itself visit [OWASP_Amass_Project] or [Amass GitHub].
11+
12+
<!-- end -->
13+
14+
## Deployment
15+
16+
The AMASS scanType can be deployed via helm.
17+
18+
```bash
19+
helm upgrade --install amass ./integrations/amass/
20+
```
21+
22+
## Examples
23+
24+
A set of examples can be found in the [examples](./examples) folder.
25+
* Example *secureCodeBox.io* [scan](./examples/secureCodeBox.io/scan.yaml) and [findings](./examples/secureCodeBox.io/findings.yaml)
26+
* Example *example.com* [scan](./examples/secureCodeBox.io/scan.yaml) and [findings](./examples/secureCodeBox.io/findings.yaml)
27+
28+
## Configuration
29+
30+
The follwing security scan configuration example are based on the [Amass User Guide], please take a look at the original documentation for more configuration examples.
31+
32+
* The most basic use of the tool for subdomain enumeration: `amass enum -d example.com`
33+
* Typical parameters for DNS enumeration: `amass enum -v -src -ip -brute -min-for-recursive 2 -d example.com`
34+
35+
Special command line options:
36+
* Disable generation of altered names `amass enum -noalts -d example.com`
37+
* Turn off recursive brute forcing `amass enum -brute -norecursive -d example.com`
38+
* Disable saving data into a local database `amass enum -nolocaldb -d example.com`
39+
* Domain names separated by commas (can be used multiple times) `amass enum -d example.com`
40+
41+
42+
## Development
43+
44+
### Local setup
45+
1. Clone the repository `git clone git@github.com:secureCodeBox/secureCodeBox-v2-alpha.git`
46+
2. Ensure you have node.js installed
47+
* On MacOs with brew package manager: `brew install node`
48+
49+
### Parser Development
50+
51+
1. Install the dependencies `npm install`
52+
2. Update the parser function here: `./parser/parser.js`
53+
3. Update the parser tests here: `./parser/parser.test.js`
54+
4. Run the testsuite: `npm test`
55+
56+
[OWASP_Amass_Project]: https://owasp.org/www-project-amass/
57+
[Amass GitHub]: https://github.com/OWASP/Amass
58+
[Amass User Guide]: https://github.com/OWASP/Amass/blob/master/doc/user_guide.md
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: "execution.experimental.securecodebox.io/v1"
2+
kind: Scan
3+
metadata:
4+
name: "amass-example.com"
5+
spec:
6+
scanType: "amass"
7+
parameters:
8+
- "-noalts"
9+
- "-norecursive"
10+
- "-nolocaldb"
11+
- "-d"
12+
- "example.com"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: "execution.experimental.securecodebox.io/v1"
2+
kind: Scan
3+
metadata:
4+
name: "amass-securecodebox.io"
5+
labels:
6+
organization: "secureCodeBox"
7+
spec:
8+
scanType: "amass"
9+
parameters:
10+
- "-noalts"
11+
- "-norecursive"
12+
- "-d"
13+
- "securecodebox.io"

integrations/kube-hunter/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "kube-hunter"
3+
path: "scanner/kube-hunter"
4+
category: "scanner"
5+
usecase: "Kubernetes Vulnerability Scanner"
6+
---
7+
8+
kube-hunter hunts for security weaknesses in Kubernetes clusters. The tool was developed to increase awareness and visibility for security issues in Kubernetes environments. You should NOT run kube-hunter on a Kubernetes cluster that you don't own!
9+
10+
To learn more about the kube-hunter scanner itself visit [kube-hunter GitHub] or [kube-hunter Website].
11+
12+
<!-- end -->
13+
14+
## Deployment
15+
16+
The kube-hunter ScanType can be deployed via helm.
17+
18+
```bash
19+
helm upgrade --install kube-hunter ./integrations/kube-hunter/
20+
```
21+
22+
## Examples
23+
24+
A set of examples can be found in the [examples](./examples) folder.
25+
* Example *in-cluster* [scan](./examples/in-cluster/scan.yaml) and [findings](./examples/in-cluster/findings.yaml)
26+
27+
## Configuration
28+
29+
The follwing security scan configuration example are based on the [kube-hunter Documentation], please take a look at the original documentation for more configuration examples.
30+
31+
* To specify remote machines for hunting, select option 1 or use the --remote option. Example: `kube-hunter --remote some.node.com`
32+
* To specify interface scanning, you can use the --interface option (this will scan all of the machine's network interfaces). Example: `kube-hunter --interface`
33+
* To specify a specific CIDR to scan, use the --cidr option. Example: `kube-hunter --cidr 192.168.0.0/24`
34+
35+
## Development
36+
37+
### Local setup
38+
1. Clone the repository `git clone git@github.com:secureCodeBox/secureCodeBox-v2-alpha.git`
39+
2. Ensure you have node.js installed
40+
* On MacOs with brew package manager: `brew install node`
41+
42+
### Parser Development
43+
44+
1. Install the dependencies `npm install`
45+
2. Update the parser function here: `./parser/parser.js`
46+
3. Update the parser tests here: `./parser/parser.test.js`
47+
4. Run the testsuite: `npm test`
48+
49+
[kube-hunter Website]: https://kube-hunter.aquasec.com/
50+
[kube-hunter GitHub]: https://github.com/aquasecurity/kube-hunter
51+
[kube-hunter Documentation]: https://github.com/aquasecurity/kube-hunter#scanning-options
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"nodes": [
3+
{
4+
"type": "Node/Master",
5+
"location": "10.0.0.1"
6+
},
7+
{
8+
"type": "Node/Master",
9+
"location": "10.96.0.1"
10+
}
11+
],
12+
"services": [
13+
{
14+
"service": "Kubelet API",
15+
"location": "10.0.0.1:10250",
16+
"description": "The Kubelet is the main component in every Node, all pod operations goes through the kubelet"
17+
},
18+
{
19+
"service": "Metrics Server",
20+
"location": "10.0.0.1:6443",
21+
"description": "The Metrics server is in charge of providing resource usage metrics for pods and nodes to the API server."
22+
},
23+
{
24+
"service": "API Server",
25+
"location": "10.96.0.1:443",
26+
"description": "The API server is in charge of all operations on the cluster."
27+
}
28+
],
29+
"vulnerabilities": [
30+
{
31+
"location": "Local to Pod(scan-kube-hunter-in-cluster-4rfff)",
32+
"vid": "KHV050",
33+
"category": "Access Risk",
34+
"severity": "low",
35+
"vulnerability": "Read access to pod's service account token",
36+
"description": " Accessing the pod service account token gives an attacker the option to use the server API ",
37+
"evidence": "eyJhbGciOiJSUzI1NiIsImtpZCI6IkNabmY2NVgxUmR1ZnQzbHJVQVAzZFFUNjBiR0hUVE9SRDNPcURyenlkODgifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJkZWZhdWx0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6Imx1cmNoZXItdG9rZW4tcGpmNGIiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoibHVyY2hlciIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjUzOGVhYjdmLTY1YjAtNDE4Yy04MGI2LTI1NGQxNDQ4ODU3NiIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDpkZWZhdWx0Omx1cmNoZXIifQ.cGtQHagQ2xxlAFnWwFRNgGJIkaeZIKnqoYYb8GmxN94ry0wwxCbgBm4Kg33A903wDBxd8iuITTk-r8UPZyYJHoxlVu0pHt-3SAc4NT0ob50R2acVXQ2qj_yJOOQHurCWeOJMkGqtCyUoZ8Xcnc6z32Ao-NWzKD-0wV7ndpKm-ytHP0YpHb9bLUPcQGvFoh_UF132yjeJqzwLPRX6hStMYOa8LNhJGyhdejW3BIOylzVPNkKE5lEjWv9f853qnTKG-TzXHBbth7qV8UHwSoY8YFoMezK3zazQt4dN1VG_wYmZ0ujikTC7TRTGr500kFxfpACKwdQ1M1fXgKJhNv9UgA",
38+
"hunter": "Access Secrets"
39+
},
40+
{
41+
"location": "Local to Pod(scan-kube-hunter-in-cluster-4rfff)",
42+
"vid": "None",
43+
"category": "Access Risk",
44+
"severity": "low",
45+
"vulnerability": "CAP_NET_RAW Enabled",
46+
"description": "CAP_NET_RAW is enabled by default for pods. If an attacker manages to compromise a pod, they could potentially take advantage of this capability to perform network attacks on other pods running on the same node",
47+
"evidence": "",
48+
"hunter": "Pod Capabilities Hunter"
49+
},
50+
{
51+
"location": "Local to Pod(scan-kube-hunter-in-cluster-4rfff)",
52+
"vid": "None",
53+
"category": "Access Risk",
54+
"severity": "low",
55+
"vulnerability": "Access to pod's secrets",
56+
"description": " Accessing the pod's secrets within a compromised pod might disclose valuable data to a potential attacker",
57+
"evidence": "['/var/run/secrets/kubernetes.io/serviceaccount/namespace', '/var/run/secrets/kubernetes.io/serviceaccount/ca.crt', '/var/run/secrets/kubernetes.io/serviceaccount/token', '/var/run/secrets/kubernetes.io/serviceaccount/..2020_04_03_14_52_24.460746409/ca.crt', '/var/run/secrets/kubernetes.io/serviceaccount/..2020_04_03_14_52_24.460746409/token', '/var/run/secrets/kubernetes.io/serviceaccount/..2020_04_03_14_52_24.460746409/namespace']",
58+
"hunter": "Access Secrets"
59+
},
60+
{
61+
"location": "10.96.0.1:443",
62+
"vid": "KHV002",
63+
"category": "Information Disclosure",
64+
"severity": "medium",
65+
"vulnerability": "K8s Version Disclosure",
66+
"description": "The kubernetes version could be obtained from the /version endpoint ",
67+
"evidence": "v1.18.0",
68+
"hunter": "Api Version Hunter"
69+
},
70+
{
71+
"location": "10.96.0.1:443",
72+
"vid": "KHV005",
73+
"category": "Information Disclosure",
74+
"severity": "medium",
75+
"vulnerability": "Access to API using service account token",
76+
"description": " The API Server port is accessible. Depending on your RBAC settings this could expose access to or control of your cluster. ",
77+
"evidence": "b'{\"kind\":\"APIVersions\",\"versions\":[\"v1\"],\"serverAddressByClientCIDRs\":[{\"clientCIDR\":\"0.0.0.0/0\",\"serverAddress\":\"172.17.0.2:6443\"}]}\\n'",
78+
"hunter": "API Server Hunter"
79+
}
80+
],
81+
"kburl": "https://aquasecurity.github.io/kube-hunter/kb/{vid}"
82+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: "execution.experimental.securecodebox.io/v1"
2+
kind: Scan
3+
metadata:
4+
name: "kube-hunter-in-cluster"
5+
spec:
6+
scanType: "kube-hunter"
7+
parameters:
8+
- "--pod"

integrations/nikto/README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: "Nikto"
3+
path: "scanner/Nikto"
4+
category: "scanner"
5+
usecase: "Webserver Vulnerability Scanner"
6+
---
7+
8+
![nikto logo](https://cirt.net/files/alienlogo_3.gif)
9+
10+
Nikto is a free software command-line vulnerability scanner that scans webservers for dangerous files/CGIs, outdated server software and other problems. It performs generic and server type specific checks. It also captures and prints any cookies received. To learn more about the Nikto scanner itself visit [cirt.net] or [Nikto GitHub].
11+
12+
<!-- end -->
13+
14+
## Deployment
15+
16+
The Nikto ScanType can be deployed via helm.
17+
18+
```bash
19+
helm upgrade --install nikto ./integrations/nikto/
20+
```
21+
22+
## Examples
23+
24+
A set of examples can be found in the [examples](./examples) folder.
25+
* Example *secureCodeBox.io* [scan](./examples/secureCodeBox.io/scan.yaml) and [findings](./examples/secureCodeBox.io/findings.yaml)
26+
27+
## Configuration
28+
29+
The follwing security scan configuration example are based on the [Nikto Documentation](https://cirt.net/nikto2-docs/usage.html#id2780332), please take a look at the original documentation for more configuration examples.
30+
31+
* The most basic Nikto scan requires simply a host to target, since port 80 is assumed if none is specified. The host can either be an IP or a hostname of a machine, and is specified using the -h (-host) option. This will scan the IP 192.168.0.1 on TCP port 80: `-h 192.168.0.1`
32+
* To check on a different port, specify the port number with the -p (-port) option. This will scan the IP 192.168.0.1 on TCP port 443: `-h 192.168.0.1 -p 443`
33+
* Hosts, ports and protocols may also be specified by using a full URL syntax, and it will be scanned: `-h https://192.168.0.1:443/`
34+
* Nikto can scan multiple ports in the same scanning session. To test more than one port on the same host, specify the list of ports in the -p (-port) option. Ports can be specified as a range (i.e., 80-90), or as a comma-delimited list, (i.e., 80,88,90). This will scan the host on ports 80, 88 and 443: `-h 192.168.0.1 -p 80,88,443`
35+
36+
Nikto also has a comprehensive list of [command line options documented](https://cirt.net/nikto2-docs/options.html) which maybe useful to use.
37+
38+
* Scan tuning can be used to decrease the number of tests performed against a target. By specifying the type of test to include or exclude, faster, focused testing can be completed. This is useful in situations where the presence of certain file types are undesired -- such as XSS or simply "interesting" files. Test types can be controlled at an individual level by specifying their identifier to the -T (-Tuning) option. In the default mode, if -T is invoked only the test type(s) specified will be executed. For example, only the tests for "Remote file retrieval" and "Command execution" can performed against the target: `192.168.0.1 -T 58`
39+
* 0 - File Upload. Exploits which allow a file to be uploaded to the target server.
40+
* 1 - Interesting File / Seen in logs. An unknown but suspicious file or attack that has been seen in web server logs (note: if you have information regarding any of these attacks, please contact CIRT, Inc.).
41+
* 2 - Misconfiguration / Default File. Default files or files which have been misconfigured in some manner. This could be documentation, or a resource which should be password protected.
42+
* 3 - Information Disclosure. A resource which reveals information about the target. This could be a file system path or account name.
43+
* 4 - Injection (XSS/Script/HTML). Any manner of injection, including cross site scripting (XSS) or content (HTML). This does not include command injection.
44+
* 5 - Remote File Retrieval - Inside Web Root. Resource allows remote users to retrieve unauthorized files from within the web server's root directory.
45+
* 6 - Denial of Service. Resource allows a denial of service against the target application, web server or host (note: no intentional DoS attacks are attempted).
46+
* 7 - Remote File Retrieval - Server Wide. Resource allows remote users to retrieve unauthorized files from anywhere on the target.
47+
* 8 - Command Execution / Remote Shell. Resource allows the user to execute a system command or spawn a remote shell.
48+
* 9 - SQL Injection. Any type of attack which allows SQL to be executed against a database.
49+
* a - Authentication Bypass. Allows client to access a resource it should not be allowed to access.
50+
* b - Software Identification. Installed software or program could be positively identified.
51+
* c - Remote source inclusion. Software allows remote inclusion of source code.
52+
* x - Reverse Tuning Options. Perform exclusion of the specified tuning type instead of inclusion of the specified tuning type
53+
54+
## Development
55+
56+
### Local setup
57+
1. Clone the repository `git clone git@github.com:secureCodeBox/secureCodeBox-v2-alpha.git`
58+
2. Ensure you have node.js installed
59+
* On MacOs with brew package manager: `brew install node`
60+
61+
### Parser Development
62+
63+
1. Install the dependencies `npm install`
64+
2. Update the parser function here: `./parser/parser.js`
65+
3. Update the parser tests here: `./parser/parser.test.js`
66+
4. Run the testsuite: `npm test`
67+
68+
[cirt.net]: https://cirt.net/
69+
[nikto github]: https://github.com/sullo/nikto
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: 'execution.experimental.securecodebox.io/v1'
2+
kind: Scan
3+
metadata:
4+
name: 'nikto-www.securecodebox.io'
5+
labels:
6+
organization: 'secureCodeBox'
7+
spec:
8+
scanType: 'nikto'
9+
parameters:
10+
- '-h'
11+
- 'https://www.securecodebox.io'
12+
- '-Tuning'
13+
# Only enable fast (ish) Scan Options, remove attack option like SQLi and RCE. We will leave those to ZAP
14+
- '1,2,3,5,7,b'

integrations/nmap/readme.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: "Nmap"
33
path: "scanner/Nmap"
44
category: "scanner"
55
usecase: "Network Scanner"
6-
release: "https://img.shields.io/github/release/secureCodeBox/scanner-infrastructure-nmap.svg"
76
---
87

98
![Nmap logo](https://nmap.org/images/sitelogo.png)
@@ -25,6 +24,9 @@ helm install nmap ./integrations/nmap/
2524
## Examples
2625

2726
A set of examples can be found in the [examples](./examples) folder.
27+
* Example *local-network* [scan](./examples/local-network/scan.yaml) and [findings](./examples/local-network/findings.yaml)
28+
* Example *localhost* [scan](./examples/local-network/scan.yaml) and [findings](./examples/local-network/findings.yaml)
29+
* Example *scan.nmap.org* [scan](./examples/local-network/scan.yaml) and [findings](./examples/local-network/findings.yaml)
2830

2931
## Nmap Configuration
3032

@@ -47,14 +49,13 @@ Some useful example parameters listed below:
4749
## Development
4850

4951
### Local setup
52+
1. Clone the repository `git clone git@github.com:secureCodeBox/secureCodeBox-v2-alpha.git`
53+
2. Ensure you have node.js installed
54+
* On MacOs with brew package manager: `brew install node`
5055

51-
1. Clone the repository
52-
2. Install the dependencies `npm install`
56+
### Parser Development
5357

54-
### Test
55-
56-
To run the testsuite run:
57-
58-
```bash
59-
npm test
60-
```
58+
1. Install the dependencies `npm install`
59+
2. Update the parser function here: `./parser/parser.js`
60+
3. Update the parser tests here: `./parser/parser.test.js`
61+
4. Run the testsuite: `npm test`

0 commit comments

Comments
 (0)