Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- '10'
- "12"
notifications:
email:
recipients:
Expand All @@ -14,7 +14,7 @@ env:
- DEFAULT_TAG=unstable
script:
- cp test/.env.test .env
- docker-compose -f docker-compose.yml -f docker-compose.demo.yml up -d engine camundadb bodgeit juice-shop nginx unsafe-https scanner-infrastructure-nmap scanner-webapplication-arachni scanner-webapplication-zap scanner-infrastructure-amass scanner-infrastructure-sslyze scanner-webserver-nikto scanner-infrastructure-ssh ssh-service
- docker-compose -f docker-compose.yml -f docker-compose.demo.yml up -d engine camundadb bodgeit juice-shop nginx unsafe-https old-wordpress ssh-service scanner-infrastructure-nmap scanner-webapplication-arachni scanner-webapplication-zap scanner-infrastructure-amass scanner-infrastructure-sslyze scanner-webserver-nikto scanner-infrastructure-ssh scanner-cms-wpscan
- cd test
- npm ci
- npm test -- --verbose --forceExit
Expand All @@ -28,3 +28,4 @@ after_failure:
- docker-compose logs scanner-infrastructure-sslyze
- docker-compose logs scanner-infrastructure-ssh
- docker-compose logs scanner-webserver-nikto
- docker-compose logs scanner-cms-wpscan
4 changes: 4 additions & 0 deletions demo/old-wordpress/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM dorwardv/wordpress-sqlite-nginx-docker@sha256:72cc94ef4f80e0d6d83c5f23eab5f056c74b207bd8a9722570260cde56d28b6e
COPY ./wp.db /usr/share/nginx/html/wp-content/database/.ht.sqlite
RUN chmod +rxw /usr/share/nginx/html/wp-content/database/.ht.sqlite
RUN chown -R www-data.www-data /usr/share/nginx/html/wp-content/database/
Binary file added demo/old-wordpress/wp.db
Binary file not shown.
2 changes: 2 additions & 0 deletions demo/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This folder contains the data for a example config of a vulnerable wordpress instances.
This instance can be used for demo.
9 changes: 8 additions & 1 deletion docker-compose.demo.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '2.1'
version: "2.1"
services:
juice-shop:
image: bkimminich/juice-shop
Expand All @@ -18,6 +18,13 @@ services:
- 8111:80
networks:
- frontend
old-wordpress:
image: securecodebox/old-wordpress:4.0
restart: always
ports:
- 8000:80
networks:
- frontend
ssh-service:
image: securecodebox/dummy-ssh
networks:
Expand Down
140 changes: 77 additions & 63 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '2.1'
version: "2.1"
services:
engine:
image: securecodebox/engine:${DEFAULT_TAG}
Expand Down Expand Up @@ -40,25 +40,25 @@ services:
restart: on-failure:3

camundadb:
image: mysql:5.7
networks:
- frontend
volumes:
- camundadb-datastore:/var/lib/mysql
labels:
container_group: infrastructure
command: --max_allowed_packet=65011712 # 512M
environment:
- MYSQL_ROOT_PASSWORD=${CAMUNDADB_ROOT_PW}
- MYSQL_DATABASE=${CAMUNDADB_DATABASE}
- MYSQL_USER=${CAMUNDADB_USER}
- MYSQL_PASSWORD=${CAMUNDADB_PW}
image: mysql:5.7
networks:
- frontend
volumes:
- camundadb-datastore:/var/lib/mysql
labels:
container_group: infrastructure
command: --max_allowed_packet=65011712 # 512M
environment:
- MYSQL_ROOT_PASSWORD=${CAMUNDADB_ROOT_PW}
- MYSQL_DATABASE=${CAMUNDADB_DATABASE}
- MYSQL_USER=${CAMUNDADB_USER}
- MYSQL_PASSWORD=${CAMUNDADB_PW}

scanner-infrastructure-nmap:
image: securecodebox/nmap:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
condition: service_healthy
networks:
- frontend
labels:
Expand All @@ -72,7 +72,7 @@ services:
image: securecodebox/nikto:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
condition: service_healthy
networks:
- frontend
labels:
Expand All @@ -83,74 +83,88 @@ services:
- ENGINE_BASIC_AUTH_PASSWORD=${ENGINE_SCANNERSERVICES_PASSWORD}

scanner-webapplication-zap:
image: securecodebox/zap:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
networks:
- frontend
labels:
container_group: scanner
environment:
image: securecodebox/zap:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
networks:
- frontend
labels:
container_group: scanner
environment:
- ENGINE_ADDRESS=http://engine:8080
- ENGINE_BASIC_AUTH_USER=${ENGINE_SCANNERSERVICES_USER}
- ENGINE_BASIC_AUTH_PASSWORD=${ENGINE_SCANNERSERVICES_PASSWORD}
- SECURECODEBOX_ZAP_JOBSSCHEDULERCRON=* * * * * *

scanner-infrastructure-sslyze:
image: securecodebox/sslyze:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
networks:
- frontend
labels:
container_group: scanner
environment:
image: securecodebox/sslyze:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
networks:
- frontend
labels:
container_group: scanner
environment:
- ENGINE_ADDRESS=http://engine:8080
- ENGINE_BASIC_AUTH_USER=${ENGINE_SCANNERSERVICES_USER}
- ENGINE_BASIC_AUTH_PASSWORD=${ENGINE_SCANNERSERVICES_PASSWORD}

scanner-webapplication-arachni:
image: securecodebox/arachni:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
networks:
- frontend
labels:
container_group: scanner
environment:
image: securecodebox/arachni:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
networks:
- frontend
labels:
container_group: scanner
environment:
- ENGINE_ADDRESS=http://engine:8080
- ENGINE_BASIC_AUTH_USER=${ENGINE_SCANNERSERVICES_USER}
- ENGINE_BASIC_AUTH_PASSWORD=${ENGINE_SCANNERSERVICES_PASSWORD}
volumes:
volumes:
- "./plugins/arachni-login-scripts:/securecodebox/static/"

scanner-infrastructure-amass:
image: securecodebox/amass:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
networks:
- frontend
labels:
container_group: scanner
environment:
image: securecodebox/amass:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
networks:
- frontend
labels:
container_group: scanner
environment:
- ENGINE_ADDRESS=http://engine:8080
- ENGINE_BASIC_AUTH_USER=${ENGINE_SCANNERSERVICES_USER}
- ENGINE_BASIC_AUTH_PASSWORD=${ENGINE_SCANNERSERVICES_PASSWORD}

scanner-infrastructure-ssh:
image: securecodebox/ssh:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
networks:
- frontend
labels:
container_group: scanner
environment:
image: securecodebox/ssh:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
networks:
- frontend
labels:
container_group: scanner
environment:
- ENGINE_ADDRESS=http://engine:8080
- ENGINE_BASIC_AUTH_USER=${ENGINE_SCANNERSERVICES_USER}
- ENGINE_BASIC_AUTH_PASSWORD=${ENGINE_SCANNERSERVICES_PASSWORD}

scanner-cms-wpscan:
image: securecodebox/wpscan:${DEFAULT_TAG}
depends_on:
engine:
condition: service_healthy
networks:
- frontend
labels:
container_group: scanner
environment:
- ENGINE_ADDRESS=http://engine:8080
- ENGINE_BASIC_AUTH_USER=${ENGINE_SCANNERSERVICES_USER}
- ENGINE_BASIC_AUTH_PASSWORD=${ENGINE_SCANNERSERVICES_PASSWORD}
Expand Down
106 changes: 106 additions & 0 deletions docs/user-guide/usage-examples/wordpress-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Scanning Server Side Rendered Apps using wpscan

Scanning for Vulnerabilities in old-wordpress using wpscan and the secureCodeBox.

## Introduction

Old-wordpress uses an outdated Wordpress image (`wordpress/4.7.5-php7.1-fpm`).

In this example we'll be using wpscan controlled by the secureCodeBox to scan for vulnarabilties in the old-wordpress.

## Testing the setup

This is a straight forward configuration by simply configuring the target.

### Start the scan via HTTP API

`PUT http://localhost:8080/box/securityTests`

### Start the scan via CLI

`run_scanner.sh --payload payloadFile.json`

### Test Payload

```json
[
{
"context": "old-wordpress example",
"name": "wpscan",
"target": {
"name": "old-wordpress",
"location": "http://old-wordpress:8000/"
}
}
]
```

This scan should finish in about two minutes and should return a couple of findings.

## Full Scan

The following example contains a fully configured Wordpress Scan for the old-wordpress.

### Start the scan via HTTP API

`PUT http://localhost:8080/box/securityTests`

### Start the scan via CLI

`run_scanner.sh --payload payloadFile.json arachni`

### Full Payload

```json
[
{
"context": "old-wordpress example",
"name": "wpscan",
"target": {
"name": "old-wordpress",
"location": "http://old-wordpress:8000/",
"attributes": {
"WP_STEALTHY": "true",
"WP_ENUMERATE": "[Options]",
"WP_MAX_DURATION": "[Seconds]",
"WP_THROTTLE": "[Milliseconds]",
"WP_REQUEST_TIMEOUT": "[Seconds]",
"WP_DETECTION_MODE": "[Options]",
"WP_USER_AGENT": "[userAgent]",
"WP_HEADERS": "[headers]"
}
}
}
]
```
Options for enumerate attribute:

```txt
Enumeration Process
Available Choices:
vp | Vulnerable plugins
ap | All plugins
p | Plugins
vt | Vulnerable themes
at | All themes
t | Themes
tt | Timthumbs
cb | Config backups
dbe | Db exports
u | User IDs range. e.g: u1-5
Range separator to use: '-'
Value if no argument supplied: 1-10
m | Media IDs range. e.g m1-15
Note: Permalink setting must be set to "Plain" for those to be detected
Range separator to use: '-'
Value if no argument supplied: 1-100

Separator to use between the values: ','
Default: All Plugins, Config Backups
Value if no argument supplied: vp,vt,tt,cb,dbe,u,m
Incompatible choices (only one of each group/s can be used):
- vp, ap, p
- vt, at, t
```

This scan should finish in about two minutes and should return a couple of findings.
Loading