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

Commit 669aba8

Browse files
committed
Refactored the readme and added some documentations for users developers.
1 parent d69bb15 commit 669aba8

File tree

7 files changed

+274
-29
lines changed

7 files changed

+274
-29
lines changed

README.md

Lines changed: 163 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,173 @@
1-
# Running secureCodeBox
2-
3-
### Cloning
1+
# Continuous Secure Delivery - Out of the Box
2+
3+
![secureCodeBox](docs/resources/logo.png "secureCodeBox")
4+
5+
> _secureCodeBox_ is a docker based, modularized toolchain for continuous security scans of your software project.
6+
7+
## Overview
8+
9+
<!-- toc -->
10+
- [Purpose of this Project](#purpose-of-this-project)
11+
- [Quickstart](#quickstart)
12+
- [How Does it Work?](#how-does-it-work)
13+
- [Architecture](#architecture)
14+
- [Roadmap](#roadmap)
15+
16+
For additional documentation aspects please have a look at our:
17+
- [Developer Guide](docs/developer-guide/README.md)
18+
- [User Guide](docs/developer-guide/README.md)
19+
20+
<!-- tocstop -->
21+
22+
## Purpose of this Project
23+
24+
The typical way to ensure application security is to hire a security specialist (aka penetration tester) at some point in your project to check the application for security bugs and vulnerabilities. Usually, this happens very late in the project and has various drawbacks:
25+
26+
1. Nowadays, a lot of projects do continuous delivery, which means the developers deploy new versions multiple times each day. The penetration tester is only able to check a single snapshot, but some further commits could introduce new security issues. To ensure ongoing application security, the penetration tester should also repeatedly test the application. Unfortunately, such approach is rarely financially feasible.
27+
2. In the typically time boxed analysis, the penetration tester may be engaged in finding trivial security issues (low-hanging fruits) and therefore will never reach the serious, non-obvious ones.
28+
29+
With the _secureCodeBox_ we provide a toolchain for continuous scanning of applications to find the low-hanging fruit issues early in the development process and free the resources of the penetration tester to concentrate on the major security issues.
30+
31+
The purpose of *secureCodeBox* **is not** to replace the penetration testers or make them obsolete. We strongly recommend to run extensive tests by experienced penetration testers on all your applications.
32+
33+
**Important note**: The _secureCodeBox_ is no simple one-button-click-solution! You must have a deep understanding of security and how to configure the scanners. Furthermore, an understanding of the scan results and how to interpret them is also necessary.
34+
35+
There is a german article about [Security DevOps – Angreifern (immer) einen Schritt voraus][secdevops-objspec] in the software engineering journal [OBJEKTSpektrum][objspec].
36+
37+
## Quickstart
38+
39+
### Prerequisites
40+
* Minimal Docker version 18.03.0 is required
41+
* Docker-Compose is required.
42+
43+
For a quick start checkout this repository and start the complete secureCodeBox stack with docker-compse:
44+
445
```bash
546
git clone https://github.com/secureCodeBox/secureCodeBox
647
cd secureCodeBox
748
```
8-
### Prerequisites
9-
* Minimal Docker version 18.03.0 is required.
10-
* Docker-Compose is required.
1149

12-
### Docker-Compose
13-
The docker-compose file can be used to launch a secureCodeBox instance. It starts the following components:
14-
15-
#### Engine
16-
* The engine itself
17-
* NMAP example process
18-
* ZAP example process
19-
* Nikto example process
20-
* ElasticSearch persistence connector
21-
#### Scanner / Spider
22-
* [NMAP scanner](https://github.com/secureCodeBox/scanner-infrastructure-nmap)
23-
* [Zap scanner & spider](https://github.com/secureCodeBox/scanner-webapplication-zap)
24-
* [Nikto scanner](https://github.com/secureCodeBox/scanner-webserver-nikto)
25-
#### Infrastructure
26-
* ElasticSearch
27-
* Kibana
28-
* MySQL
29-
30-
It also mounts the `./plugins` folder as a volume for your custom processes or storage providers. Just pass your custom-processes.jar to that directory.
31-
```
50+
### Start with Docker-Compose
51+
The docker-compose.yml file can be used to launch a secureCodeBox instance.
52+
```bash
3253
docker-compose up
3354
```
3455

35-
# Providing own processes
36-
Just put your `custom-process.jar` to the `./plugins` folder.
56+
### Run your first security scan
57+
There are several ways to start a security scan with the secureCodeBox. As a first shot try the WebUI of the engine and start one manually.
58+
59+
[http://your-docker-host:8080/](http://localhost:8080)
60+
61+
1. Create a local user account
62+
2. Open the "Tasklist"
63+
3. Click on "start security scan" in the menu
64+
4. Select one of the implemented scan process (e.g. NMAP)
65+
5. Configure the Scanner and hit "complete"
66+
6. Wait for the result and have fun
67+
68+
## How Does it Work?
69+
70+
The core of the _secureCodeBox_ is a process engine (based on the camunda platform), which allows the user to define the whole scan process. The following image shows an example of a scan process:
71+
72+
![An example scan process.](docs/resources/scan_process.png "An example scan process.")
73+
74+
The scan itself may be triggered via the WebUI, an REST-API call or via webhooks. The system allows continous integration software such as Jenkins, Travis CI, Bamboo etc. to trigger a scan automatically. The scan itself will be handed over to the scanners and the results will be aggregated for review in the control center or the CI environment. For a detailed description of the components and how they work together see the [architecture](#architecture) section.
75+
76+
## Architecture
77+
78+
The base architecture is a [Docker][docker] based [Microservices Architecture][microservices] as shown in the picture below.
79+
80+
![Overview of the architecture.](docs/resources/architecture_overview.png "Overview of the architecture.")
81+
82+
### Design Goal
83+
84+
The most important goal of the architecture is to build the whole toolchain highly modularized, extensible, and scalable. Therefore, we decided to provision the various parts in a microservice architecture style combined with [Docker][docker] as infrastructure. This design gives us the possibility to add new components very easily by adding a new container as independent microservice and integrating it with the core engine via a well defined REST interface.
85+
86+
### Components
87+
88+
#### Process Engine – the Core
89+
90+
The main component of the _secureCodeBox_ is the [Camunda][camunda] [BPMN][bpmn] engine, which allows the engineer to build the whole scan process as a [BPMN][bpmn] model. This component also provides the main web UI: The _secureCodeBox_ control center. In this UI you can see the available scan process definitions as [BPMN][bpmn] diagrams, start them (Tasklist), and manually review the results. Furthermore, the core provides a possibility to listen on webhooks and integrate the exposed process API, allowing us to trigger the scan processes by a continuous integration component, such as [Jenkins][jenkins], in our example, or any other which can deal with webhooks.
91+
92+
#### Scanners
93+
94+
The scanners are individual tools such as [nmap][nmap], [Nikto][nikto], [Arcachni][arcachni] and such. Every scanner tool runs in its own [Docker][docker] container. This has two main reasons:
95+
96+
1. You can easily add and integrate a new tool as a scanner, based on a language or technology of your choice, given that it can run inside [Docker][docker].
97+
1. You can scale up the numbers of running scanners for massive parallel scanning
98+
99+
Each scanner needs a small adapter, usually written in Java, Ruby, Python, or JavaScript. The goal of the adapter is twofold. Firstly, it needs to translate the configuration data, defining what to do, from the engine format into a format usable by the particular scanning tool. Secondly, it will transform the results of the scan into a format usable by the data collection component.
100+
101+
Also the scanners are responsible for polling the engine to check wether something needs to be done by using the [external service task pattern][exteralServiceTask]. The reason for polling instead of pushing the scan orders from the engine to the scanners is an easier and more fail tolerant implementation, otherwise the engine has to determine wether each scanner instance is still running. Also, it must recognize if a scanner dies. Thanks to the current polling implementation a scanner might die and just start polling for work after a restart.
102+
103+
Currently, we have severals scanners available out of the box:
104+
105+
- [Nmap][nmap] for IP and port scans
106+
- [Nikto][nikto] for web server scans
107+
- [SSLyze][sslyze] for SSL/TLS scans
108+
- [SQLMap][sqlmap] for SQL injection scans
109+
- [Arachni][arachni] web vulnerability scans
110+
- [WPScan][wpscan] black box [WordPress][wordpress] vulnerability scans
111+
112+
But our architecture lets you also add your own non-free or commercial tools, like
113+
- [Burp Suite][burp] web vulnerability scanner.
114+
115+
#### Data Collection
116+
117+
The collection of the scanner results is done by an ELK stack ([Elasticsearch][elasticsearch], [Kibana][kibana], and [Logstash][logstash]).
118+
119+
#### Example Targets
120+
121+
For demonstration purposes, we added some example targets to scan:
122+
123+
- [Damn Vulnerable Web Application][dvwa]
124+
- [BodgeIT Store][bodgeit]
125+
- [Juice Shop][juiceshop]
126+
127+
[nginx]: https://nginx.org/en/
128+
[camunda]: https://camunda.com/de/
129+
[exteralServiceTask]: https://docs.camunda.org/manual/latest/user-guide/process-engine/external-tasks/
130+
[bpmn]: https://en.wikipedia.org/wiki/Business_Process_Model_and_Notation
131+
[docker]: https://www.docker.com/
132+
[consul]: https://www.consul.io/
133+
[microservices]: https://martinfowler.com/articles/microservices.html
134+
[beta-testers]: https://www.securecodebox.io/
135+
[owasp]: https://www.owasp.org/index.php/Main_Page
136+
[objspec]: https://www.sigs-datacom.de/fachzeitschriften/objektspektrum.html
137+
[secdevops-objspec]: http://www.sigs.de/public/ots/2017/OTS_DevOps_2017/Seedorff_Pfaender_OTS_%20DevOps_2017.pdf
138+
[jenkins]: https://jenkins.io/
139+
[nmap]: https://nmap.org/
140+
[nikto]: https://cirt.net/Nikto2
141+
[arcachni]: http://www.arachni-scanner.com/
142+
[sslyze]: https://github.com/nabla-c0d3/sslyze
143+
[sqlmap]: http://sqlmap.org/
144+
[burp]: https://portswigger.net/burp
145+
[arachni]: http://www.arachni-scanner.com/
146+
[wpscan]: https://wpscan.org/
147+
[wordpress]: https://wordpress.com/
148+
[consul]: https://www.consul.io/
149+
[resty]: https://openresty.org/en/
150+
[keycloak]: http://www.keycloak.org/
151+
[openid]: https://de.wikipedia.org/wiki/OpenID
152+
[elasticsearch]: https://www.elastic.co/products/elasticsearch
153+
[kibana]: https://www.elastic.co/de/products/kibana
154+
[logstash]: https://www.elastic.co/products/logstash
155+
[dvwa]: http://www.dvwa.co.uk/
156+
[bodgeit]: https://github.com/psiinon/bodgeit
157+
[juiceshop]: https://www.owasp.org/index.php/OWASP_Juice_Shop_Project
158+
159+
## Roadmap
160+
161+
At the moment, the _secureCodeBox_ is in a stable *beta state*. We are working hard on polishing and documenting and integrating new security scanner. Also we wish to become an official [OWASP][owasp] project.
162+
163+
## License
164+
Code of OpenSpeedMonitor is licensed under Apache License 2.0.
37165

38-
# Developing own processes
166+
## Community
167+
You are welcome, please join us on... 👋
168+
- GitHub
169+
- Slack
170+
- Twitter
39171

172+
## Contributing
173+
Contributions are welcome and extremely helpful 🙌

docs/developer-guide/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Running secureCodeBox
2+
3+
### Cloning
4+
```bash
5+
git clone https://github.com/secureCodeBox/secureCodeBox
6+
cd secureCodeBox
7+
```
8+
### Prerequisites
9+
* Minimal Docker version 18.03.0 is required.
10+
* Docker-Compose is required.
11+
12+
### Docker-Compose
13+
The docker-compose file can be used to launch a secureCodeBox instance. It starts the following components:
14+
15+
#### Engine
16+
* The engine itself
17+
* NMAP example process
18+
* ZAP example process
19+
* Nikto example process
20+
* ElasticSearch persistence connector
21+
#### Scanner / Spider
22+
* [NMAP scanner](https://github.com/secureCodeBox/scanner-infrastructure-nmap)
23+
* [Zap scanner & spider](https://github.com/secureCodeBox/scanner-webapplication-zap)
24+
* [Nikto scanner](https://github.com/secureCodeBox/scanner-webserver-nikto)
25+
#### Infrastructure
26+
* ElasticSearch
27+
* Kibana
28+
* MySQL
29+
30+
It also mounts the `./plugins` folder as a volume for your custom processes or storage providers. Just pass your custom-processes.jar to that directory.
31+
```
32+
docker-compose up
33+
```
34+
35+
# Providing own processes
36+
Just put your `custom-process.jar` to the `./plugins` folder.
37+
38+
# Developing own processes
39+
40+
## Implementing your first scanner as microservice
41+
42+
### Use the scanner API
43+
44+
45+
## Develop a process model
46+
47+
## SDK to the rescue
566 KB
Loading

docs/resources/logo.png

21.8 KB
Loading

docs/resources/logo.svg

Lines changed: 28 additions & 0 deletions
Loading

docs/resources/scan_process.png

295 KB
Loading

docs/user-guide/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Running secureCodeBox
2+
3+
### Cloning
4+
```bash
5+
git clone https://github.com/secureCodeBox/secureCodeBox
6+
cd secureCodeBox
7+
```
8+
### Prerequisites
9+
* Minimal Docker version 18.03.0 is required.
10+
* Docker-Compose is required.
11+
12+
### Docker-Compose
13+
The docker-compose file can be used to launch a secureCodeBox instance. It starts the following components:
14+
15+
#### Engine
16+
* The engine itself
17+
* NMAP example process
18+
* ZAP example process
19+
* Nikto example process
20+
* ElasticSearch persistence connector
21+
#### Scanner / Spider
22+
* [NMAP scanner](https://github.com/secureCodeBox/scanner-infrastructure-nmap)
23+
* [Zap scanner & spider](https://github.com/secureCodeBox/scanner-webapplication-zap)
24+
* [Nikto scanner](https://github.com/secureCodeBox/scanner-webserver-nikto)
25+
#### Infrastructure
26+
* ElasticSearch
27+
* Kibana
28+
* MySQL
29+
30+
It also mounts the `./plugins` folder as a volume for your custom processes or storage providers. Just pass your custom-processes.jar to that directory.
31+
```
32+
docker-compose up
33+
```
34+
35+
# Providing own processes
36+
Just put your `custom-process.jar` to the `./plugins` folder.

0 commit comments

Comments
 (0)