Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkst-marco committed Jul 30, 2015
0 parents commit 1cd7d9f
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 0 deletions.
12 changes: 12 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Copyright (c) 2015, Thinkst Applied Research
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Dockerized Canarytokens
=======================
by Thinkst Applied Research

Overview
--------
Canarytokens helps track activity and actions on your network.

Prerequisites
-------------
* At least one domain name. If you want to enabled PDF-opening tracking, at least two domains.
* Internet-facing Docker host.

Setup
-----
* Boot your Docker host, and take note of the public IP.
* Configure your domains so that their nameservers point to the public IP of the Docker host. This involves more than simply changing NS records in the zonefile, it requires a change at the registrar. Most DNS providers support this. Check with ```whois```.
* Clone the Docker setup:
```
$ git clone https://github.com/thinkst/canarytokens-docker
```
* Install Docker compose (if not already present):
```
$ sudo pip install -U docker-compose
```
* Configuration is held in the two .env files. Edit these. Here's example files for a setup that generates tokens on example1.com, example2.com and example3.com (PDFs), running on a host with public IP 1.1.1.1, using the Mandril API key 'xxxxxxxxxx':
* frontend.ev
```
#These domains are used for general purpose tokens
CANARY_DOMAINS=example1.com,example2.com
#These domains are only used for PDF tokens
CANARY_NXDOMAINS=example3.com
```
* switchboard.ev
```
CANARY_MANDRILL_API_KEY=xxxxxxxxxx
CANARY_PUBLIC_IP=1.1.1.1
[email protected]
CANARY_ALERT_EMAIL_FROM_DISPLAY="Example Canarytokens"
CANARY_ALERT_EMAIL_SUBJECT="Canarytoken"
```
* Finally, download and instatiate the images:
```
$ docker-compose up
* Access the interface on http://example1.com/generate
27 changes: 27 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
frontend:
image: thinkst/canarytokens_frontend
links:
- redis
env_file:
- frontend.env
switchboard:
image: thinkst/canarytokens_switchboard
ports:
- "53:53"
- "53:53/udp"
- "25:25"
links:
- redis
env_file:
- switchboard.env
nginx:
image: thinkst/canarytokens_nginx
ports:
- "5080:80"
links:
- frontend
- switchboard
redis:
image: redis
# volumes:
# - .:/data
2 changes: 2 additions & 0 deletions frontend.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CANARY_DOMAINS=
CANARY_NXDOMAINS=
5 changes: 5 additions & 0 deletions switchboard.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CANARY_MANDRILL_API_KEY=
CANARY_PUBLIC_IP=
CANARY_ALERT_EMAIL_FROM_ADDRESS=
CANARY_ALERT_EMAIL_FROM_DISPLAY=
CANARY_ALERT_EMAIL_SUBJECT=

0 comments on commit 1cd7d9f

Please sign in to comment.