Merge branch '17.06'
|
@ -23,7 +23,7 @@ Thank you :smiley:
|
|||
|
||||
|
||||
<a name="info"></a>
|
||||
### Baisc support information
|
||||
### Basic support information
|
||||
|
||||
- What T-Pot version are you currtently using?
|
||||
- Are you running on a Intel NUC or a VM?
|
||||
|
|
288
README.md
|
@ -1,16 +1,16 @@
|
|||
# T-Pot 16.10 Image Creator
|
||||
# T-Pot 17.10 (Alpha)
|
||||
|
||||
This repository contains the necessary files to create the **[T-Pot community honeypot](https://github.com/dtag-dev-sec/tpotce/releases)** ISO image.
|
||||
This repository contains the necessary files to create the **[T-Pot](https://github.com/dtag-dev-sec/tpotce/releases)** ISO image.
|
||||
The image can then be used to install T-Pot on a physical or virtual machine.
|
||||
|
||||
In March 2016 we released
|
||||
[T-Pot 16.03](http://dtag-dev-sec.github.io/mediator/feature/2016/03/11/t-pot-16.03.html)
|
||||
In October 2016 we released
|
||||
[T-Pot 16.10](http://dtag-dev-sec.github.io/mediator/feature/2016/10/31/t-pot-16.10.html)
|
||||
|
||||
# T-Pot 16.10
|
||||
# T-Pot 17.10 (Alpha - be careful there may be dragons!)
|
||||
|
||||
T-Pot 16.10 now uses Ubuntu Server 16.04 LTS and is based on
|
||||
T-Pot 17.10 uses latest 16.04 LTS Ubuntu Server Network Installer image, is based on
|
||||
|
||||
[docker](https://www.docker.com/)
|
||||
[docker](https://www.docker.com/), [docker-compose](https://docs.docker.com/compose/)
|
||||
|
||||
and includes dockerized versions of the following honeypots
|
||||
|
||||
|
@ -19,8 +19,12 @@ and includes dockerized versions of the following honeypots
|
|||
* [dionaea](https://github.com/DinoTools/dionaea),
|
||||
* [elasticpot](https://github.com/schmalle/ElasticPot),
|
||||
* [emobility](https://github.com/dtag-dev-sec/emobility),
|
||||
* [glastopf](http://glastopf.org/) and
|
||||
* [honeytrap](https://github.com/armedpot/honeytrap/)
|
||||
* [glastopf](http://glastopf.org/),
|
||||
* [honeytrap](https://github.com/armedpot/honeytrap/),
|
||||
* [mailoney](https://github.com/awhitehatter/mailoney),
|
||||
* [rdpy](https://github.com/citronneur/rdpy) and
|
||||
* [vnclowpot](https://github.com/magisterquis/vnclowpot)
|
||||
|
||||
|
||||
Furthermore we use the following tools
|
||||
|
||||
|
@ -28,6 +32,7 @@ Furthermore we use the following tools
|
|||
* [Elasticsearch Head](https://mobz.github.io/elasticsearch-head/) a web front end for browsing and interacting with an Elastic Search cluster.
|
||||
* [Netdata](http://my-netdata.io/) for real-time performance monitoring.
|
||||
* [Portainer](http://portainer.io/) a web based UI for docker.
|
||||
* [Spiderfoot](https://github.com/smicallef/spiderfoot) a open source intelligence automation tool.
|
||||
* [Suricata](http://suricata-ids.org/) a Network Security Monitoring engine.
|
||||
* [Wetty](https://github.com/krishnasrinivas/wetty) a web based SSH client.
|
||||
|
||||
|
@ -72,58 +77,62 @@ Seeing is believing :bowtie:
|
|||
|
||||
<a name="background"></a>
|
||||
# Changelog
|
||||
- **Ubuntu 16.04 LTS** is now being used as T-Pot's OS base
|
||||
- **Size does matter** 😅
|
||||
- `tpot.iso` is now based on **Ubuntu's** network installer reducing the image download size by 600MB from 650MB to only **50MB**
|
||||
- All docker images have been rebuilt to reduce the image size at least by 50MB in some cases even 400-600MB
|
||||
- A "Everything" installation takes roughly 2GB less download size (counting from initial image download)
|
||||
- **Introducing** new tools making things a lot easier for new users
|
||||
- [Elasticsearch Head](https://mobz.github.io/elasticsearch-head/) a web front end for browsing and interacting with an Elastic Search cluster.
|
||||
- [Netdata](http://my-netdata.io/) for real-time performance monitoring.
|
||||
- [Portainer](http://portainer.io/) a web based UI for docker.
|
||||
- [Wetty](https://github.com/krishnasrinivas/wetty) a web based SSH client.
|
||||
- **NGINX** implemented as HTTPS reverse proxy
|
||||
- Access Kibana, ES Head plugin, UI-for-Docker, WebSSH and Netdata via browser!
|
||||
- Two factor based SSH tunnel is no longer needed!
|
||||
- **Installation** procedure improved
|
||||
- Set your own password for the *tsec* user
|
||||
- Choose your installation type without the need of building your own image
|
||||
- Setup a remote user / password for secure web access including a self-signed-certificate
|
||||
- Easy to remember hostnames
|
||||
- **First login** easy and secure
|
||||
- Access from console, ssh or web
|
||||
- No two-factor-authentication needed for ssh when logging in from RFC1918 networks
|
||||
- Enforcing public-key authentication for ssh connections other than RFC1918 networks
|
||||
- **Systemd** now supersedes *upstart* as init system. All upstart scripts were ported to systemd along with the following improvements:
|
||||
- Improved start / stop handling of containers
|
||||
- Set persistence individually per container startup scripts (`/etc/systemd/system`)
|
||||
- Set persistence globally (`/usr/bin/clean.sh`)
|
||||
- **Size still matters** 😅
|
||||
- All docker images have been rebuilt as micro containers based on Alpine Linux to even further reduce the image size and leading to image sizes (compressed) below the 50 MB mark. The uncompressed size of eMobility and the ELK stack could each be reduced by a whopping 600 MB!
|
||||
- A "Everything" installation now takes roughly 1.6 GB download size
|
||||
- **docker-compose**
|
||||
- T-Pot containers are now being controlled and monitored through docker-compose and a single configuration file `/opt/tpot/etc/tpot.yml` allowing for greater flexibility and resulting in easier image management (i.e. updated images).
|
||||
- As a benefit only a single `systemd` script `/etc/systemd/system/tpot.service` is needed to start `systemctl start tpot` and stop `systemctl stop tpot` the T-Pot services.
|
||||
- There are four pre-configured compose configurations which do reflect the T-Pot editions `/opt/tpot/etc/compose`. Simply stop the T-Pot services and copy i.e. `cp /opt/tpot/etc/compose/all.yml /opt/tpot/etc/tpot.yml`, restart the T-Pot services and the selcted edition will be running after downloading the required docker images.
|
||||
- **Introducing** [Spiderfoot](https://github.com/smicallef/spiderfoot) a open source intelligence automation tool.
|
||||
- **Installation** procedure simplified
|
||||
- Within the Ubuntu Installer you only have to choose language settings
|
||||
- After the first reboot the T-Pot installer checks if internet and required services are reachable before the installation procedure begins
|
||||
- T-Pot Installer now uses a “dialog” which looks way better than the old text based installer
|
||||
- `tsec` user & password dialog is now part of the T-Pot Installer
|
||||
- The self-signed certificate is now created automatically to reduce unnecessary overhead for novice users
|
||||
- New ASCII logo and login screen pointing to web and ssh logins
|
||||
- Hostnames are now generated using an offline name generator, which still produces funny and collision free hostnames
|
||||
- **CVE IDs for Suricata**
|
||||
- Our very own [Listbot](https://github.com/dtag-dev-sec/listbot) builds translation maps for Logstash. If Logstash registers a match the events' CVE ID will be stored alongside the event within Elasticsearch.
|
||||
- **IP Reputations**
|
||||
- [Listbot](https://github.com/dtag-dev-sec/listbot) also builds translation maps for blacklisted IPs
|
||||
- Based upon 30+ publicly available IP blacklisting sources listbot creates a logstash translation map matching the events' source IP addresses against the IPs reputation
|
||||
- If the source IP is known to a blacklist service a corresponding tag will be stored with the event
|
||||
- Updates occur on every logstash container start; by default every 24h
|
||||
- **Honeypot updates and improvements**
|
||||
- **Conpot** now supports **JSON logging** with many thanks as to making this feature request possible going to:
|
||||
- [Andrea Pasquale](https://github.com/adepasquale),
|
||||
- [Danilo Massa](https://github.com/danilo-massa) &
|
||||
- [Johnny Vestergaard](https://github.com/johnnykv)
|
||||
- **Cowrie** is now supporting **telnet** which is highly appreciated and thank you
|
||||
- [Michel Oosterhof](https://github.com/micheloosterhof)
|
||||
- **Dionaea** now supports **JSON logging** with many thanks as to making this feature request possible going to:
|
||||
- [PhiBo](https://github.com/phibos)
|
||||
- **Elasticpot** now supports **logging all queries and requests** with many thanks as to making this feature request possible going to:
|
||||
- [Markus Schmall](https://github.com/schmalle)
|
||||
- **Honeytrap** now supports **JSON logging** with many thanks as to making this feature request possible going to:
|
||||
- [Andrea Pasquale](https://github.com/adepasquale)
|
||||
- All honeypots were updated to their latest & stable versions.
|
||||
- **New Honeypots** were added ...
|
||||
* [mailoney](https://github.com/awhitehatter/mailoney)
|
||||
- A low interaction SMTP honeypot
|
||||
* [rdpy](https://github.com/citronneur/rdpy)
|
||||
- A low interaction RDP honeypot
|
||||
* [vnclowpot](https://github.com/magisterquis/vnclowpot)
|
||||
- A low interaction VNC honeypot
|
||||
- **Persistence** is now enabled by default and will keep honeypot logs and tools data in `/data/` and its sub-folders by default for 30 days. You may change that behavior in `/opt/tpot/etc/logrotate/logrotate.conf`. ELK data however will be kept for 90 days by default. You may change that behavior in `/opt/tpot/etc/curator/actions.yml`. Scripts will be triggered through `/etc/crontab`.
|
||||
- **Updates**
|
||||
- **Docker** was updated to the latest **1.12.2** release
|
||||
- **ELK** was updated to the latest **Kibana 4.6.2**, **Elasticsearch 2.4.1** and **Logstash 2.4.0** releases.
|
||||
- **Suricata** was updated to the latest **3.1.2** version including the latest **Emerging Threats** community ruleset.
|
||||
- We now have **150 Visualizations** pre-configured and compiled to 14 individual **Kibana Dashboards** for every honeypot. Monitor all *honeypot events* locally on your T-Pot installation. Aside from *honeypot events* you can also view *Suricata NSM, Syslog and NGINX* events for a quick overview of local host events.
|
||||
- **Docker** was updated to the latest **1.12.6** release within Ubuntu 16.04.x LTS
|
||||
- **ELK** was updated to the latest **Kibana 5.6.1**, **Elasticsearch 5.6.1** and **Logstash 5.6.1** releases.
|
||||
- **Suricata** was updated to the latest **4.0.0** version including the latest **Emerging Threats** community ruleset.
|
||||
|
||||
- **Dashboards Makeover**
|
||||
- We now have **160+ Visualizations** pre-configured and compiled to 14 individual **Kibana Dashboards** for every honeypot. Monitor all *honeypot events* locally on your T-Pot installation. Aside from *honeypot events* you can also view *Suricata NSM, Syslog and NGINX* events for a quick overview of local host events.
|
||||
- View available IP reputation of any source IP address
|
||||
- View available CVE ID for events
|
||||
- More **Smart links** are now included.
|
||||
|
||||
- **Update Feature**
|
||||
- For the ones who like to live on the bleeding edge of T-Pot development there is now a update script available in `/opt/tpot/update.sh`. Just run the script and it will get the latest changes from the `master branch`. For now this feature is experimental and the first step to a true rolling release cycle.
|
||||
|
||||
- **Files & Folders**
|
||||
- While the `/data` folder is still in its old place, all T-Pot relevant files and folders have been restructured and will now be installed into `/opt/tpot`. Only a few system relevant files with regard to the installed OS and its services will be copied to locations outside the T-Pot base path.
|
||||
|
||||
<a name="concept"></a>
|
||||
# Technical Concept
|
||||
|
||||
T-Pot is based on the network installer of Ubuntu Server 16.04 LTS.
|
||||
The honeypot daemons as well as other support components being used have been paravirtualized using [docker](http://docker.io).
|
||||
This allows us to run multiple honeypot daemons on the same network interface without problems and thus making the entire system very low maintenance. <br>The encapsulation of the honeypot daemons in docker provides a good isolation of the runtime environments and easy update mechanisms.
|
||||
T-Pot is based on the network installer of Ubuntu Server 16.04.x LTS.
|
||||
The honeypot daemons as well as other support components being used have been containerized using [docker](http://docker.io).
|
||||
This allows us to run multiple honeypot daemons on the same network interface while maintaining a small footprint and constrain each honeypot within its own environment.
|
||||
|
||||
In T-Pot we combine the dockerized honeypots
|
||||
[conpot](http://conpot.org/),
|
||||
|
@ -131,27 +140,34 @@ In T-Pot we combine the dockerized honeypots
|
|||
[dionaea](https://github.com/DinoTools/dionaea),
|
||||
[elasticpot](https://github.com/schmalle/ElasticPot),
|
||||
[emobility](https://github.com/dtag-dev-sec/emobility),
|
||||
[glastopf](http://glastopf.org/) and
|
||||
[honeytrap](https://github.com/armedpot/honeytrap/) with
|
||||
[suricata](http://suricata-ids.org/) a Network Security Monitoring engine and the
|
||||
[ELK stack](https://www.elastic.co/videos) to beautifully visualize all the events captured by T-Pot. Events will be correlated by our own data submission tool [ewsposter](https://github.com/dtag-dev-sec/ews) which also supports Honeynet project hpfeeds honeypot data sharing.
|
||||
[glastopf](http://glastopf.org/),
|
||||
[honeytrap](https://github.com/armedpot/honeytrap/),
|
||||
[mailoney](https://github.com/awhitehatter/mailoney),
|
||||
[rdpy](https://github.com/citronneur/rdpy) and
|
||||
[vnclowpot](https://github.com/magisterquis/vnclowpot) with
|
||||
[ELK stack](https://www.elastic.co/videos) to beautifully visualize all the events captured by T-Pot,
|
||||
[Elasticsearch Head](https://mobz.github.io/elasticsearch-head/) a web front end for browsing and interacting with an Elastic Search cluster,
|
||||
[Netdata](http://my-netdata.io/) for real-time performance monitoring,
|
||||
[Portainer](http://portainer.io/) a web based UI for docker,
|
||||
[Spiderfoot](https://github.com/smicallef/spiderfoot) a open source intelligence automation tool,
|
||||
[Suricata](http://suricata-ids.org/) a Network Security Monitoring engine and
|
||||
[Wetty](https://github.com/krishnasrinivas/wetty) a web based SSH client.
|
||||
|
||||

|
||||

|
||||
|
||||
All data in docker is volatile. Once a docker container crashes, all data produced within its environment is gone and a fresh instance is restarted. Hence, for some data that needs to be persistent, i.e. config files, we have a persistent storage **`/data/`** on the host in order to make it available and persistent across container or system restarts.<br>
|
||||
Important log data is now also stored outside the container in `/data/<container-name>` allowing easy access to logs from within the host and. The **systemd** scripts have been adjusted to support storing data on the host either volatile (*default*) or persistent (adjust individual systemd scripts in `/etc/systemd/system` or use a global setting in `/usr/bin/clear.sh`).
|
||||
While data within docker containers is volatile we do now ensure a default 30 day persistence of all relevant honeypot and tool data in the well known `/data` folder and sub-folders. The persistence configuration may be adjusted in `/opt/tpot/etc/logrotate/logrotate.conf`. Once a docker container crashes, all other data produced within its environment is erased and a fresh instance is started from the corresponding docker image.<br>
|
||||
|
||||
Basically, what happens when the system is booted up is the following:
|
||||
|
||||
- start host system
|
||||
- start all the necessary services (i.e. docker-engine, reverse proxy, etc.)
|
||||
- start all docker containers (honeypots, nms, elk)
|
||||
- start all docker containers via docker-compose (honeypots, nms, elk)
|
||||
|
||||
Within the T-Pot project, we provide all the tools and documentation necessary to build your own honeypot system and contribute to our [community data view](http://sicherheitstacho.eu/?peers=communityPeers), a separate channel on our [Sicherheitstacho](http://sicherheitstacho.eu) that is powered by T-Pot community data.
|
||||
|
||||
The source code and configuration files are stored in individual GitHub repositories, which are linked below. The docker images are tailored to be run in this environment. If you want to run the docker images separately, make sure you study the upstart scripts, as they provide an insight on how we configured them.
|
||||
The source code and configuration files are stored in individual GitHub repositories, which are linked below. The docker images are pre-configured for the T-Pot environment. If you want to run the docker images separately, make sure you study the docker-compose configuration (`/opt/tpot/etc/tpot.yml`) and the T-Pot systemd script (`/etc/systemd/system/tpot.service`), as they provide a good starting point for implementing changes.
|
||||
|
||||
The individual docker configurations etc. we used can be found here:
|
||||
The individual docker configurations are located in the following GitHub repositories:
|
||||
|
||||
- [conpot](https://github.com/dtag-dev-sec/conpot)
|
||||
- [cowrie](https://github.com/dtag-dev-sec/cowrie)
|
||||
|
@ -159,51 +175,56 @@ The individual docker configurations etc. we used can be found here:
|
|||
- [elasticpot](https://github.com/dtag-dev-sec/elasticpot)
|
||||
- [elk-stack](https://github.com/dtag-dev-sec/elk)
|
||||
- [emobility](https://github.com/dtag-dev-sec/emobility)
|
||||
- [ewsposter](https://github.com/dtag-dev-sec/ews)
|
||||
- [glastopf](https://github.com/dtag-dev-sec/glastopf)
|
||||
- [honeytrap](https://github.com/dtag-dev-sec/honeytrap)
|
||||
- [mailoney](https://github.com/dtag-dev-sec/mailoney)
|
||||
- [netdata](https://github.com/dtag-dev-sec/netdata)
|
||||
- [portainer](https://github.com/dtag-dev-sec/ui-for-docker)
|
||||
- [suricata](https://github.com/dtag-dev-sec/suricata)
|
||||
- [rdpy](https://github.com/dtag-dev-sec/rdpy)
|
||||
- [spiderfoot](https://github.com/dtag-dev-sec/spiderfoot)
|
||||
- [suricata & p0f](https://github.com/dtag-dev-sec/suricata)
|
||||
- [vnclowpot](https://github.com/dtag-dev-sec/vnclowpot)
|
||||
|
||||
<a name="requirements"></a>
|
||||
# System Requirements
|
||||
Depending on your installation type, whether you install on [real hardware](#hardware) or in a [virtual machine](#vm), make sure your designated T-Pot system meets the following requirements:
|
||||
|
||||
##### T-Pot Installation (Cowrie, Dionaea, ElasticPot, Glastopf, Honeytrap, ELK, Suricata+P0f & Tools)
|
||||
##### T-Pot Installation (Cowrie, Dionaea, ElasticPot, Glastopf, Honeytrap, Mailoney, Rdpy, Vnclowpot, ELK, Suricata+P0f & Tools)
|
||||
When installing the T-Pot ISO image, make sure the target system (physical/virtual) meets the following minimum requirements:
|
||||
|
||||
- 4 GB RAM (6-8 GB recommended)
|
||||
- 64 GB disk (128 GB SSD recommended)
|
||||
- 64 GB SSD (128 GB SSD recommended)
|
||||
- Network via DHCP
|
||||
- A working internet connection
|
||||
- A working, non-proxied, internet connection
|
||||
|
||||
##### Sensor Installation (Cowrie, Dionaea, ElasticPot, Glastopf, Honeytrap)
|
||||
##### Honeypot Installation (Cowrie, Dionaea, ElasticPot, Glastopf, Honeytrap, Mailoney, Rdpy, Vnclowpot)
|
||||
When installing the T-Pot ISO image, make sure the target system (physical/virtual) meets the following minimum requirements:
|
||||
|
||||
- 3 GB RAM (4-6 GB recommended)
|
||||
- 64 GB disk (64 GB SSD recommended)
|
||||
- 64 GB SSD (64 GB SSD recommended)
|
||||
- Network via DHCP
|
||||
- A working internet connection
|
||||
- A working, non-proxied, internet connection
|
||||
|
||||
##### Industrial Installation (ConPot, eMobility, ELK, Suricata+P0f & Tools)
|
||||
When installing the T-Pot ISO image, make sure the target system (physical/virtual) meets the following minimum requirements:
|
||||
|
||||
- 4 GB RAM (8 GB recommended)
|
||||
- 64 GB disk (128 GB SSD recommended)
|
||||
- 64 GB SSD (128 GB SSD recommended)
|
||||
- Network via DHCP
|
||||
- A working internet connection
|
||||
- A working, non-proxied, internet connection
|
||||
|
||||
##### Everything Installation (Everything, all of the above)
|
||||
When installing the T-Pot ISO image, make sure the target system (physical/virtual) meets the following minimum requirements:
|
||||
|
||||
- 8 GB RAM
|
||||
- 128 GB disk or larger (128 GB SSD or larger recommended)
|
||||
- 8+ GB RAM
|
||||
- 128+ GB SSD
|
||||
- Network via DHCP
|
||||
- A working internet connection
|
||||
- A working, non-proxied, internet connection
|
||||
|
||||
<a name="installation"></a>
|
||||
# Installation
|
||||
The installation of T-Pot is straight forward. Please be advised that you should have an internet connection up and running as all all the docker images for the chosen installation type need to be pulled from docker hub.
|
||||
The installation of T-Pot is straight forward and heavily depends on a working, transparent and non-proxied up and running internet connection. Otherwise the installation **will fail!**
|
||||
|
||||
Firstly, decide if you want to download our prebuilt installation ISO image from [GitHub](https://github.com/dtag-dev-sec/tpotce/releases) ***or*** [create it yourself](#createiso).
|
||||
|
||||
|
@ -227,15 +248,15 @@ For transparency reasons and to give you the ability to customize your install,
|
|||
**How to create the ISO image:**
|
||||
|
||||
1. Clone the repository and enter it.
|
||||
|
||||
git clone https://github.com/dtag-dev-sec/tpotce.git
|
||||
```
|
||||
git clone https://github.com/dtag-dev-sec/tpotce
|
||||
cd tpotce
|
||||
|
||||
```
|
||||
2. Invoke the script that builds the ISO image.
|
||||
The script will download and install dependencies necessary to build the image on the invoking machine. It will further download the ubuntu network installer image (~50MB) which T-Pot is based on.
|
||||
|
||||
```
|
||||
sudo ./makeiso.sh
|
||||
|
||||
```
|
||||
After a successful build, you will find the ISO image `tpot.iso` along with a SHA256 checksum `tpot.sha256` in your directory.
|
||||
|
||||
<a name="vm"></a>
|
||||
|
@ -246,9 +267,9 @@ We successfully tested T-Pot with [VirtualBox](https://www.virtualbox.org) and [
|
|||
|
||||
It is important to make sure you meet the [system requirements](#requirements) and assign a virtual harddisk >=64 GB, >=4 GB RAM and bridged networking to T-Pot.
|
||||
|
||||
You need to enable promiscuous mode for the network interface for suricata to work properly. Make sure you enable it during configuration.
|
||||
You need to enable promiscuous mode for the network interface for suricata and p0f to work properly. Make sure you enable it during configuration.
|
||||
|
||||
If you want to use a wifi card as primary NIC for T-Pot, please remind that not all network interface drivers support all wireless cards. E.g. in VirtualBox, you then have to choose the *"MT SERVER"* model of the NIC.
|
||||
If you want to use a wifi card as primary NIC for T-Pot, please be aware of the fact that not all network interface drivers support all wireless cards. E.g. in VirtualBox, you then have to choose the *"MT SERVER"* model of the NIC.
|
||||
|
||||
Lastly, mount the `tpot.iso` ISO to the VM and continue with the installation.<br>
|
||||
|
||||
|
@ -266,9 +287,9 @@ Whereas most CD burning tools allow you to burn from ISO images, the procedure t
|
|||
|
||||
<a name="firstrun"></a>
|
||||
## First Run
|
||||
The installation requires very little interaction, only some locales and keyboard settings have to be answered. Everything else will be configured automatically. The system will reboot two times. Make sure it can access the internet as it needs to download the updates and the dockerized honeypot components. Depending on your network connection and the chosen installation type, the installation may take some time. During our tests (50Mbit down, 10Mbit up), the installation is usually finished within <=30 minutes.
|
||||
The installation requires very little interaction, only a locale and keyboard setting has to be answered for the basic linux installation. The system will reboot and please maintain an active internet connection. The T-Pot installer will start and ask you for an installation type, password for the **tsec** user and credentials for a **web user**. Everything else will be configured automatically. All docker images and other componenents will be downloaded. Depending on your network connection and the chosen installation type, the installation may take some time. During our tests (50Mbit down, 10Mbit up), the installation is usually finished within a 30 minute timeframe.
|
||||
|
||||
Once the installation is finished, the system will automatically reboot and you will be presented with the T-Pot login screen. The user credentials for the first login are:
|
||||
Once the installation is finished, the system will automatically reboot and you will be presented with the T-Pot login screen. On the console you may login with the **tsec** user:
|
||||
|
||||
- user: **tsec**
|
||||
- pass: **password you chose during the installation**
|
||||
|
@ -283,21 +304,9 @@ You can also login from your browser: ``https://<your.ip>:64297``
|
|||
|
||||
<a name="placement"></a>
|
||||
# System Placement
|
||||
Make sure your system is reachable through the internet. Otherwise it will not capture any attacks, other than the ones from your hostile internal network! We recommend you put it in an unfiltered zone, where all TCP and UDP traffic is forwarded to T-Pot's network interface.
|
||||
|
||||
If you are behind a NAT gateway (e.g. home router), here is a list of ports that should be forwarded to T-Pot.
|
||||
|
||||
| Honeypot|Transport|Forwarded ports|
|
||||
|---|---|---|
|
||||
| conpot | TCP | 1025, 50100 |
|
||||
| cowrie | TCP | 22, 23 |
|
||||
| dionaea | TCP | 21, 42, 135, 443, 445, 1433, 1723, 1883, 1900, 3306, 5060, 5061, 8081, 11211 |
|
||||
| dionaea | UDP | 69, 5060 |
|
||||
| elasticpot | TCP | 9200 |
|
||||
| emobility | TCP | 8080 |
|
||||
| glastopf | TCP | 80 |
|
||||
| honeytrap | TCP | 25, 110, 139, 3389, 4444, 4899, 5900, 21000 |
|
||||
Make sure your system is reachable through the internet. Otherwise it will not capture any attacks, other than the ones from your internal network! We recommend you put it in an unfiltered zone, where all TCP and UDP traffic is forwarded to T-Pot's network interface.
|
||||
|
||||
A list of all relevant ports is available as part of the [Technical Concept](#concept)
|
||||
<br>
|
||||
|
||||
Basically, you can forward as many TCP ports as you want, as honeytrap dynamically binds any TCP port that is not covered by the other honeypot daemons.
|
||||
|
@ -305,8 +314,7 @@ Basically, you can forward as many TCP ports as you want, as honeytrap dynamical
|
|||
In case you need external SSH access, forward TCP port 64295 to T-Pot, see below.
|
||||
In case you need external web access, forward TCP port 64297 to T-Pot, see below.
|
||||
|
||||
T-Pot requires outgoing http and https connections for updates (ubuntu, docker) and attack submission (ewsposter, hpfeeds).
|
||||
|
||||
T-Pot requires outgoing git, http, https connections for updates (Ubuntu, Docker, GitHub, PyPi) and attack submission (ewsposter, hpfeeds). Ports and availability may vary based on your geographical location.
|
||||
|
||||
<a name="options"></a>
|
||||
# Options
|
||||
|
@ -323,9 +331,9 @@ If you do not have a SSH client at hand and still want to access the machine via
|
|||
- user: **user you chose during the installation**
|
||||
- pass: **password you chose during the installation**
|
||||
|
||||
and choose **WebSSH** from the navigation bar. You will be prompted to allow access for this connection and enter the password for the user **tsec**.
|
||||
and choose **WebTTY** from the navigation bar. You will be prompted to allow access for this connection and enter the password for the user **tsec**.
|
||||
|
||||

|
||||

|
||||
|
||||
<a name="kibana"></a>
|
||||
## Kibana Dashboard
|
||||
|
@ -334,47 +342,60 @@ Just open a web browser and access and connect to `https://<your.ip>:64297`, ent
|
|||
- user: **user you chose during the installation**
|
||||
- pass: **password you chose during the installation**
|
||||
|
||||
and the **Kibana dashboard** will automagically load. The Kibana dashboard can be customized to fit your needs. By default, we haven't added any filtering, because the filters depend on your setup. E.g. you might want to filter out your incoming administrative ssh connections and connections to update servers.
|
||||
and **Kibana** will automagically load. The Kibana dashboard can be customized to fit your needs. By default, we haven't added any filtering, because the filters depend on your setup. E.g. you might want to filter out your incoming administrative ssh connections and connections to update servers.
|
||||
|
||||

|
||||

|
||||
|
||||
<a name="tools"></a>
|
||||
## Tools
|
||||
We included some web based management tools to improve and ease up on your daily tasks.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
<a name="maintenance"></a>
|
||||
## Maintenance
|
||||
As mentioned before, the system was designed to be low maintenance. Basically, there is nothing you have to do but let it run. If one of the dockerized daemon fails, it will restart. If this fails, the regarding upstart job will be restarted.
|
||||
As mentioned before, the system was designed to be low maintenance. Basically, there is nothing you have to do but let it run.
|
||||
|
||||
If you run into any problems, a reboot may fix it. ;)
|
||||
If you run into any problems, a reboot may fix it :bowtie:
|
||||
|
||||
If new versions of the components involved appear, we will test them and build new docker images. Those new docker images will be pushed to docker hub and downloaded to T-Pot and activated accordingly.
|
||||
|
||||
<a name="submission"></a>
|
||||
## Community Data Submission
|
||||
We provide T-Pot in order to make it accessible to all parties interested in honeypot deployment. By default, the data captured is submitted to a community backend. This community backend uses the data to feed a [community data view](http://sicherheitstacho.eu/?peers=communityPeers), a separate channel on our own [Sicherheitstacho](http://sicherheitstacho.eu), which is powered by our own set of honeypots.
|
||||
You may opt out the submission to our community server by disabling it in the `[EWS]`-section of the config file `/data/ews/conf/ews.cfg`.
|
||||
|
||||
Further we support [hpfeeds](https://github.com/rep/hpfeeds). It is disabled by default since you need to supply a channel you want to post to and enter your user credentials. To enable hpfeeds, edit the config file `/data/ews/conf/ews.cfg`, section `[HPFEED]` and set it to true.
|
||||
You may opt out the submission to our community server by removing the `# Ewsposter service` from `/opt/tpot/etc/tpot.yml`:
|
||||
1. Stop T-Pot services: `systemctl stop tpot`
|
||||
2. Remove Ewsposter service: `vi /opt/tpot/etc/tpot.yml`
|
||||
3. Remove the following lines, save and exit vi (`:x!`):<br>
|
||||
```
|
||||
# Ewsposter service
|
||||
ewsposter:
|
||||
container_name: ewsposter
|
||||
restart: always
|
||||
networks:
|
||||
- ewsposter_local
|
||||
image: "dtagdevsec/ewsposter:1710"
|
||||
volumes:
|
||||
- /data:/data
|
||||
- /data/ews/conf/ews.ip:/opt/ewsposter/ews.ip
|
||||
```
|
||||
4. Start T-Pot services: `systemctl start tpot`
|
||||
|
||||
Data is submitted in a structured ews-format, a XML stucture. Hence, you can parse out the information that is relevant to you.
|
||||
|
||||
We encourage you not to disable the data submission as it is the main purpose of the community approach - as you all know **sharing is caring** 😍
|
||||
|
||||
The *`/data/ews/conf/ews.cfg`* file contains many configuration parameters required for the system to run. You can - if you want - add an email address, that will be included with your submissions, in order to be able to identify your requests later. Further you can add a proxy.
|
||||
Please do not change anything other than those settings and only if you absolutely need to. Otherwise, the system may not work as expected.
|
||||
|
||||
<a name="roadmap"></a>
|
||||
# Roadmap
|
||||
As with every development there is always room for improvements ...
|
||||
|
||||
- Bump ELK-stack to 5.0
|
||||
- Move from Glastopf to SNARE
|
||||
- Documentation 😎
|
||||
- Bump ELK-stack to 6.x
|
||||
- Introduce new honeypots
|
||||
- Include automatic updates
|
||||
|
||||
Some features may be provided with updated docker images, others may require some hands on from your side.
|
||||
|
||||
|
@ -387,10 +408,6 @@ You are always invited to participate in development on our [GitHub](https://git
|
|||
- You install and you run within your responsibility. Choose your deployment wisely as a system compromise can never be ruled out.
|
||||
- Honeypots should - by design - not host any sensitive data. Make sure you don't add any.
|
||||
- By default, your data is submitted to the community dashboard. You can disable this in the config. But hey, wouldn't it be better to contribute to the community?
|
||||
- By default, hpfeeds submission is disabled. You can enable it in the config section for hpfeeds. This is due to the nature of hpfeeds. We do not want to spam any channel, so you can choose where to post your data and who to share it with.
|
||||
- Malware submission is enabled by default but malware is currently not processed on the submission backend. This may be added later, but can also be disabled in the `ews.cfg` config file.
|
||||
- The system restarts the docker containers every night to avoid clutter and reduce disk consumption. *All data in the container is then reset.* The data displayed in kibana is kept for <=90 days.
|
||||
|
||||
|
||||
<a name="faq"></a>
|
||||
# FAQ
|
||||
|
@ -405,18 +422,20 @@ For general feedback you can write to cert @ telekom.de.
|
|||
|
||||
<a name="licenses"></a>
|
||||
# Licenses
|
||||
The software that T-Pot is built on, uses the following licenses.
|
||||
The software that T-Pot is built on uses the following licenses.
|
||||
<br>GPLv2: [conpot (by Lukas Rist)](https://github.com/mushorg/conpot/blob/master/LICENSE.txt), [dionaea](https://github.com/DinoTools/dionaea/blob/master/LICENSE), [honeytrap (by Tillmann Werner)](https://github.com/armedpot/honeytrap/blob/master/LICENSE), [suricata](http://suricata-ids.org/about/open-source/)
|
||||
<br>GPLv3: [elasticpot (by Markus Schmall)](https://github.com/schmalle/ElasticPot), [emobility (by Mohamad Sbeiti)](https://github.com/dtag-dev-sec/emobility/blob/master/LICENSE), [ewsposter (by Markus Schroer)](https://github.com/dtag-dev-sec/ews/), [glastopf (by Lukas Rist)](https://github.com/glastopf/glastopf/blob/master/GPL), [netdata](https://github.com/firehol/netdata/blob/master/LICENSE.md)
|
||||
<br>GPLv3: [elasticpot (by Markus Schmall)](https://github.com/schmalle/ElasticPot), [emobility (by Mohamad Sbeiti)](https://github.com/dtag-dev-sec/emobility/blob/master/LICENSE), [ewsposter (by Markus Schroer)](https://github.com/dtag-dev-sec/ews/), [glastopf (by Lukas Rist)](https://github.com/glastopf/glastopf/blob/master/GPL), [rdpy](https://github.com/citronneur/rdpy/blob/master/LICENSE), [netdata](https://github.com/firehol/netdata/blob/master/LICENSE.md)
|
||||
<br>Apache 2 License: [elasticsearch](https://github.com/elasticsearch/elasticsearch/blob/master/LICENSE.txt), [logstash](https://github.com/elasticsearch/logstash/blob/master/LICENSE), [kibana](https://github.com/elasticsearch/kibana/blob/master/LICENSE.md), [docker](https://github.com/docker/docker/blob/master/LICENSE), [elasticsearch-head](https://github.com/mobz/elasticsearch-head/blob/master/LICENCE)
|
||||
<br>MIT License: [tagcloud (by Shelby Sturgis)](https://github.com/stormpython/tagcloud/blob/master/LICENSE), [heatmap (by Shelby Sturgis)](https://github.com/stormpython/heatmap/blob/master/LICENSE), [wetty](https://github.com/krishnasrinivas/wetty/blob/master/LICENSE)
|
||||
<br>MIT License: [ctop](https://github.com/bcicen/ctop/blob/master/LICENSE), [wetty](https://github.com/krishnasrinivas/wetty/blob/master/LICENSE)
|
||||
<br>zlib License: [vnclowpot](https://github.com/magisterquis/vnclowpot/blob/master/LICENSE)
|
||||
<br>[cowrie (copyright disclaimer by Upi Tamminen)](https://github.com/micheloosterhof/cowrie/blob/master/doc/COPYRIGHT)
|
||||
<br>[mailoney](https://github.com/awhitehatter/mailoney)
|
||||
<br>[Ubuntu licensing](http://www.ubuntu.com/about/about-ubuntu/licensing)
|
||||
<br>[Portainer](https://github.com/portainer/portainer/blob/develop/LICENSE)
|
||||
|
||||
<a name="credits"></a>
|
||||
# Credits
|
||||
Without open source and the fruitful development community we are proud to be a part of T-Pot would not have been possible. Our thanks are extended but not limited to the following people and organizations:
|
||||
Without open source and the fruitful development community we are proud to be a part of, T-Pot would not have been possible! Our thanks are extended but not limited to the following people and organizations:
|
||||
|
||||
### The developers and development communities of
|
||||
|
||||
|
@ -430,20 +449,22 @@ Without open source and the fruitful development community we are proud to be a
|
|||
* [emobility](https://github.com/dtag-dev-sec/emobility/graphs/contributors)
|
||||
* [ewsposter](https://github.com/armedpot/ewsposter/graphs/contributors)
|
||||
* [glastopf](https://github.com/mushorg/glastopf/graphs/contributors)
|
||||
* [heatmap](https://github.com/stormpython/heatmap/graphs/contributors)
|
||||
* [honeytrap](https://github.com/armedpot/honeytrap/graphs/contributors)
|
||||
* [kibana](https://github.com/elastic/kibana/graphs/contributors)
|
||||
* [logstash](https://github.com/elastic/logstash/graphs/contributors)
|
||||
* [mailoney](https://github.com/awhitehatter/mailoney)
|
||||
* [netdata](https://github.com/firehol/netdata/graphs/contributors)
|
||||
* [p0f](http://lcamtuf.coredump.cx/p0f3/)
|
||||
* [portainer](https://github.com/portainer/portainer/graphs/contributors)
|
||||
* [rdpy](https://github.com/citronneur/rdpy)
|
||||
* [spiderfoot](https://github.com/smicallef/spiderfoot)
|
||||
* [suricata](https://github.com/inliniac/suricata/graphs/contributors)
|
||||
* [tagcloud](https://github.com/stormpython/tagcloud/graphs/contributors)
|
||||
* [ubuntu](http://www.ubuntu.com/)
|
||||
* [vnclowpot](https://github.com/magisterquis/vnclowpot)
|
||||
* [wetty](https://github.com/krishnasrinivas/wetty/graphs/contributors)
|
||||
|
||||
### The following companies and organizations
|
||||
* [cannonical](http://www.canonical.com/)
|
||||
* [canonical](http://www.canonical.com/)
|
||||
* [docker](https://www.docker.com/)
|
||||
* [elastic.io](https://www.elastic.co/)
|
||||
* [honeynet project](https://www.honeynet.org/)
|
||||
|
@ -451,12 +472,11 @@ Without open source and the fruitful development community we are proud to be a
|
|||
|
||||
### ... and of course ***you*** for joining the community!
|
||||
|
||||
|
||||
<a name="staytuned"></a>
|
||||
# Stay tuned ...
|
||||
We will be releasing a new version of T-Pot about every 6 months.
|
||||
We will be releasing a new version of T-Pot about every 6-12 months.
|
||||
|
||||
<a name="funfact"></a>
|
||||
# Fun Fact
|
||||
|
||||
Coffee just does not cut it anymore which is why we needed a different caffeine source and consumed *107* bottles of [Club Mate](https://de.wikipedia.org/wiki/Club-Mate) during the development of T-Pot 16.10 😇
|
||||
Coffee just does not cut it anymore which is why we needed a different caffeine source and consumed *227* bottles of [Club Mate](https://de.wikipedia.org/wiki/Club-Mate) during the development of T-Pot 17.10 😇
|
||||
|
|
38
bin/backup_es_folders.sh
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/bin/bash
|
||||
# Backup all ES relevant folders
|
||||
# Make sure ES is available
|
||||
myES="http://127.0.0.1:64298/"
|
||||
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green)
|
||||
if ! [ "$myESSTATUS" = "1" ]
|
||||
then
|
||||
echo "### Elasticsearch is not available, try starting via 'systemctl start elk'."
|
||||
exit
|
||||
else
|
||||
echo "### Elasticsearch is available, now continuing."
|
||||
echo
|
||||
fi
|
||||
|
||||
# Set vars
|
||||
myCOUNT=1
|
||||
myDATE=$(date +%Y%m%d%H%M)
|
||||
myELKPATH="/data/elk/data"
|
||||
myKIBANAINDEXNAME=$(curl -s -XGET ''$myES'_cat/indices/' | grep .kibana | awk '{ print $4 }')
|
||||
myKIBANAINDEXPATH=$myELKPATH/nodes/0/indices/$myKIBANAINDEXNAME
|
||||
|
||||
# Let's ensure normal operation on exit or if interrupted ...
|
||||
function fuCLEANUP {
|
||||
### Start ELK
|
||||
systemctl start tpot
|
||||
echo "### Now starting T-Pot ..."
|
||||
}
|
||||
trap fuCLEANUP EXIT
|
||||
|
||||
# Stop T-Pot to lift db lock
|
||||
echo "### Now stopping T-Pot"
|
||||
systemctl stop tpot
|
||||
sleep 2
|
||||
|
||||
# Backup DB in 2 flavors
|
||||
echo "### Now backing up Elasticsearch folders ..."
|
||||
tar cvfz "elkall_"$myDATE".tgz" $myELKPATH
|
||||
tar cvfz "elkbase_"$myDATE".tgz" $myKIBANAINDEXPATH
|
219
bin/clean.sh
Executable file
|
@ -0,0 +1,219 @@
|
|||
#!/bin/bash
|
||||
# T-Pot Container Data Cleaner & Log Rotator
|
||||
|
||||
# Set colors
|
||||
myRED="[0;31m"
|
||||
myGREEN="[0;32m"
|
||||
myWHITE="[0;0m"
|
||||
|
||||
# Set persistence
|
||||
myPERSISTENCE=$1
|
||||
|
||||
# Let's create a function to check if folder is empty
|
||||
fuEMPTY () {
|
||||
local myFOLDER=$1
|
||||
|
||||
echo $(ls $myFOLDER | wc -l)
|
||||
}
|
||||
|
||||
# Let's create a function to rotate and compress logs
|
||||
fuLOGROTATE () {
|
||||
local mySTATUS="/opt/tpot/etc/logrotate/status"
|
||||
local myCONF="/opt/tpot/etc/logrotate/logrotate.conf"
|
||||
local myCOWRIETTYLOGS="/data/cowrie/log/tty/"
|
||||
local myCOWRIETTYTGZ="/data/cowrie/log/ttylogs.tgz"
|
||||
local myCOWRIEDL="/data/cowrie/downloads/"
|
||||
local myCOWRIEDLTGZ="/data/cowrie/downloads.tgz"
|
||||
local myDIONAEABI="/data/dionaea/bistreams/"
|
||||
local myDIONAEABITGZ="/data/dionaea/bistreams.tgz"
|
||||
local myDIONAEABIN="/data/dionaea/binaries/"
|
||||
local myDIONAEABINTGZ="/data/dionaea/binaries.tgz"
|
||||
local myHONEYTRAPATTACKS="/data/honeytrap/attacks/"
|
||||
local myHONEYTRAPATTACKSTGZ="/data/honeytrap/attacks.tgz"
|
||||
local myHONEYTRAPDL="/data/honeytrap/downloads/"
|
||||
local myHONEYTRAPDLTGZ="/data/honeytrap/downloads.tgz"
|
||||
|
||||
# Ensure correct permissions and ownerships for logrotate to run without issues
|
||||
chmod 760 /data/ -R
|
||||
chown tpot:tpot /data -R
|
||||
|
||||
# Run logrotate with force (-f) first, so the status file can be written and race conditions (with tar) be avoided
|
||||
logrotate -f -s $mySTATUS $myCONF
|
||||
|
||||
# Compressing some folders first and rotate them later
|
||||
if [ "$(fuEMPTY $myCOWRIETTYLOGS)" != "0" ]; then tar cvfz $myCOWRIETTYTGZ $myCOWRIETTYLOGS; fi
|
||||
if [ "$(fuEMPTY $myCOWRIEDL)" != "0" ]; then tar cvfz $myCOWRIEDLTGZ $myCOWRIEDL; fi
|
||||
if [ "$(fuEMPTY $myDIONAEABI)" != "0" ]; then tar cvfz $myDIONAEABITGZ $myDIONAEABI; fi
|
||||
if [ "$(fuEMPTY $myDIONAEABIN)" != "0" ]; then tar cvfz $myDIONAEABINTGZ $myDIONAEABIN; fi
|
||||
if [ "$(fuEMPTY $myHONEYTRAPATTACKS)" != "0" ]; then tar cvfz $myHONEYTRAPATTACKSTGZ $myHONEYTRAPATTACKS; fi
|
||||
if [ "$(fuEMPTY $myHONEYTRAPDL)" != "0" ]; then tar cvfz $myHONEYTRAPDLTGZ $myHONEYTRAPDL; fi
|
||||
|
||||
# Ensure correct permissions and ownership for previously created archives
|
||||
chmod 760 $myCOWRIETTYTGZ $myCOWRIEDLTGZ $myDIONAEABITGZ $myDIONAEABINTGZ $myHONEYTRAPATTACKSTGZ $myHONEYTRAPDLTGZ
|
||||
chown tpot:tpot $myCOWRIETTYTGZ $myCOWRIEDLTGZ $myDIONAEABITGZ $myDIONAEABINTGZ $myHONEYTRAPATTACKSTGZ $myHONEYTRAPDLTGZ
|
||||
|
||||
# Need to remove subfolders since too many files cause rm to exit with errors
|
||||
rm -rf $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL
|
||||
|
||||
# Recreate subfolders with correct permissions and ownership
|
||||
mkdir -p $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL
|
||||
chmod 760 $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL
|
||||
chown tpot:tpot $myCOWRIETTYLOGS $myCOWRIEDL $myDIONAEABI $myDIONAEABIN $myHONEYTRAPATTACKS $myHONEYTRAPDL
|
||||
|
||||
# Run logrotate again to account for previously created archives - DO NOT FORCE HERE!
|
||||
logrotate -s $mySTATUS $myCONF
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare conpot data
|
||||
fuCONPOT () {
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/conpot/*; fi
|
||||
mkdir -p /data/conpot/log
|
||||
chmod 760 /data/conpot -R
|
||||
chown tpot:tpot /data/conpot -R
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare cowrie data
|
||||
fuCOWRIE () {
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/cowrie/*; fi
|
||||
mkdir -p /data/cowrie/log/tty/ /data/cowrie/downloads/ /data/cowrie/keys/ /data/cowrie/misc/
|
||||
chmod 760 /data/cowrie -R
|
||||
chown tpot:tpot /data/cowrie -R
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare dionaea data
|
||||
fuDIONAEA () {
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/dionaea/*; fi
|
||||
mkdir -p /data/dionaea/log /data/dionaea/bistreams /data/dionaea/binaries /data/dionaea/rtp /data/dionaea/roots/ftp /data/dionaea/roots/tftp /data/dionaea/roots/www /data/dionaea/roots/upnp
|
||||
chmod 760 /data/dionaea -R
|
||||
chown tpot:tpot /data/dionaea -R
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare elasticpot data
|
||||
fuELASTICPOT () {
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/elasticpot/*; fi
|
||||
mkdir -p /data/elasticpot/log
|
||||
chmod 760 /data/elasticpot -R
|
||||
chown tpot:tpot /data/elasticpot -R
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare elk data
|
||||
fuELK () {
|
||||
# ELK data will be kept for <= 90 days, check /etc/crontab for curator modification
|
||||
# ELK daemon log files will be removed
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/elk/log/*; fi
|
||||
mkdir -p /data/elk
|
||||
chmod 760 /data/elk -R
|
||||
chown tpot:tpot /data/elk -R
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare emobility data
|
||||
fuEMOBILITY () {
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/emobility/*; fi
|
||||
mkdir -p /data/emobility/log
|
||||
chmod 760 /data/emobility -R
|
||||
chown tpot:tpot /data/emobility -R
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare glastopf data
|
||||
fuGLASTOPF () {
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/glastopf/*; fi
|
||||
mkdir -p /data/glastopf
|
||||
chmod 760 /data/glastopf -R
|
||||
chown tpot:tpot /data/glastopf -R
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare honeytrap data
|
||||
fuHONEYTRAP () {
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/honeytrap/*; fi
|
||||
mkdir -p /data/honeytrap/log/ /data/honeytrap/attacks/ /data/honeytrap/downloads/
|
||||
chmod 760 /data/honeytrap/ -R
|
||||
chown tpot:tpot /data/honeytrap/ -R
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare mailoney data
|
||||
fuMAILONEY () {
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/mailoney/*; fi
|
||||
mkdir -p /data/mailoney/log/
|
||||
chmod 760 /data/mailoney/ -R
|
||||
chown tpot:tpot /data/mailoney/ -R
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare rdpy data
|
||||
fuRDPY () {
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/rdpy/*; fi
|
||||
mkdir -p /data/rdpy/log/
|
||||
chmod 760 /data/rdpy/ -R
|
||||
chown tpot:tpot /data/rdpy/ -R
|
||||
}
|
||||
|
||||
# Let's create a function to prepare spiderfoot db
|
||||
fuSPIDERFOOT () {
|
||||
mkdir -p /data/spiderfoot
|
||||
touch /data/spiderfoot/spiderfoot.db
|
||||
chmod 760 -R /data/spiderfoot
|
||||
chown tpot:tpot -R /data/spiderfoot
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare suricata data
|
||||
fuSURICATA () {
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/suricata/*; fi
|
||||
mkdir -p /data/suricata/log
|
||||
chmod 760 -R /data/suricata
|
||||
chown tpot:tpot -R /data/suricata
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare p0f data
|
||||
fuP0F () {
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/p0f/*; fi
|
||||
mkdir -p /data/p0f/log
|
||||
chmod 760 -R /data/p0f
|
||||
chown tpot:tpot -R /data/p0f
|
||||
}
|
||||
|
||||
# Let's create a function to clean up and prepare vnclowpot data
|
||||
fuVNCLOWPOT () {
|
||||
if [ "$myPERSISTENCE" != "on" ]; then rm -rf /data/vnclowpot/*; fi
|
||||
mkdir -p /data/vnclowpot/log/
|
||||
chmod 760 /data/vnclowpot/ -R
|
||||
chown tpot:tpot /data/vnclowpot/ -R
|
||||
}
|
||||
|
||||
|
||||
# Avoid unwanted cleaning
|
||||
if [ "$myPERSISTENCE" = "" ];
|
||||
then
|
||||
echo $myRED"!!! WARNING !!! - This will delete ALL honeypot logs. "$myWHITE
|
||||
while [ "$myQST" != "y" ] && [ "$myQST" != "n" ];
|
||||
do
|
||||
read -p "Continue? (y/n) " myQST
|
||||
done
|
||||
if [ "$myQST" = "n" ];
|
||||
then
|
||||
echo $myGREEN"Puuh! That was close! Aborting!"$myWHITE
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check persistence, if enabled compress and rotate logs
|
||||
if [ "$myPERSISTENCE" = "on" ];
|
||||
then
|
||||
echo "Persistence enabled, now rotating and compressing logs."
|
||||
fuLOGROTATE
|
||||
else
|
||||
echo "Cleaning up and preparing data folders."
|
||||
fuCONPOT
|
||||
fuCOWRIE
|
||||
fuDIONAEA
|
||||
fuELASTICPOT
|
||||
fuELK
|
||||
fuEMOBILITY
|
||||
fuGLASTOPF
|
||||
fuHONEYTRAP
|
||||
fuMAILONEY
|
||||
fuRDPY
|
||||
fuSPIDERFOOT
|
||||
fuSURICATA
|
||||
fuP0F
|
||||
fuVNCLOWPOT
|
||||
fi
|
||||
|
71
bin/dps.sh
Executable file
|
@ -0,0 +1,71 @@
|
|||
#/bin/bash
|
||||
# Show current status of all running containers
|
||||
myPARAM="$1"
|
||||
myIMAGES="$(cat /opt/tpot/etc/tpot.yml | grep -v '#' | grep container_name | cut -d: -f2)"
|
||||
myRED="[1;31m"
|
||||
myGREEN="[1;32m"
|
||||
myBLUE="[1;34m"
|
||||
myWHITE="[0;0m"
|
||||
myMAGENTA="[1;35m"
|
||||
|
||||
function fuCONTAINERSTATUS {
|
||||
local myNAME="$1"
|
||||
local mySTATUS="$(/usr/bin/docker ps -f name=$myNAME --format "table {{.Status}}" -f status=running -f status=exited | tail -n 1)"
|
||||
myDOWN="$(echo "$mySTATUS" | grep -o -E "(STATUS|NAMES|Exited)")"
|
||||
|
||||
case "$myDOWN" in
|
||||
STATUS)
|
||||
mySTATUS="$myRED"DOWN"$myWHITE"
|
||||
;;
|
||||
NAMES)
|
||||
mySTATUS="$myRED"DOWN"$myWHITE"
|
||||
;;
|
||||
Exited)
|
||||
mySTATUS="$myRED$mySTATUS$myWHITE"
|
||||
;;
|
||||
*)
|
||||
mySTATUS="$myGREEN$mySTATUS$myWHITE"
|
||||
;;
|
||||
esac
|
||||
|
||||
printf "$mySTATUS"
|
||||
}
|
||||
|
||||
function fuCONTAINERPORTS {
|
||||
local myNAME="$1"
|
||||
local myPORTS="$(/usr/bin/docker ps -f name=$myNAME --format "table {{.Ports}}" -f status=running -f status=exited | tail -n 1 | sed s/","/",\n\t\t\t\t\t\t\t"/g)"
|
||||
|
||||
if [ "$myPORTS" != "PORTS" ];
|
||||
then
|
||||
printf "$myBLUE$myPORTS$myWHITE"
|
||||
fi
|
||||
}
|
||||
|
||||
function fuGETSYS {
|
||||
printf "========| System |========\n"
|
||||
printf "%+10s %-20s\n" "Date: " "$(date)"
|
||||
printf "%+10s %-20s\n" "Uptime: " "$(uptime | cut -b 2-)"
|
||||
printf "%+10s %-20s\n" "CPU temp: " "$(sensors | grep 'Physical' | awk '{ print $4" " }' | tr -d [:cntrl:])"
|
||||
echo
|
||||
}
|
||||
|
||||
while true
|
||||
do
|
||||
fuGETSYS
|
||||
printf "%-19s %-36s %s\n" "NAME" "STATUS" "PORTS"
|
||||
for i in $myIMAGES; do
|
||||
myNAME="$myMAGENTA$i$myWHITE"
|
||||
printf "%-32s %-49s %s" "$myNAME" "$(fuCONTAINERSTATUS $i)" "$(fuCONTAINERPORTS $i)"
|
||||
echo
|
||||
if [ "$myPARAM" = "vv" ];
|
||||
then
|
||||
/usr/bin/docker exec -t "$i" /bin/ps awfuwfxwf | egrep -v -E "awfuwfxwf|/bin/ps"
|
||||
fi
|
||||
done
|
||||
if [[ $myPARAM =~ ^([1-9]|[1-9][0-9]|[1-9][0-9][0-9])$ ]];
|
||||
then
|
||||
sleep "$myPARAM"
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
45
bin/dump_es.sh
Executable file
|
@ -0,0 +1,45 @@
|
|||
#/bin/bash
|
||||
# Dump all ES data
|
||||
# Make sure ES is available
|
||||
myES="http://127.0.0.1:64298/"
|
||||
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green)
|
||||
if ! [ "$myESSTATUS" = "1" ]
|
||||
then
|
||||
echo "### Elasticsearch is not available, try starting via 'systemctl start elk'."
|
||||
exit
|
||||
else
|
||||
echo "### Elasticsearch is available, now continuing."
|
||||
echo
|
||||
fi
|
||||
|
||||
# Let's ensure normal operation on exit or if interrupted ...
|
||||
function fuCLEANUP {
|
||||
rm -rf tmp
|
||||
}
|
||||
trap fuCLEANUP EXIT
|
||||
|
||||
# Set vars
|
||||
myDATE=$(date +%Y%m%d%H%M)
|
||||
myINDICES=$(curl -s -XGET ''$myES'_cat/indices/' | grep logstash | awk '{ print $3 }' | sort | grep -v 1970)
|
||||
myES="http://127.0.0.1:64298/"
|
||||
myCOL1="[0;34m"
|
||||
myCOL0="[0;0m"
|
||||
|
||||
# Dumping all ES data
|
||||
echo $myCOL1"### The following indices will be dumped: "$myCOL0
|
||||
echo $myINDICES
|
||||
echo
|
||||
|
||||
mkdir tmp
|
||||
for i in $myINDICES;
|
||||
do
|
||||
echo $myCOL1"### Now dumping: "$i $myCOL0
|
||||
elasticdump --input=$myES$i --output="tmp/"$i --limit 7500
|
||||
echo $myCOL1"### Now compressing: tmp/$i" $myCOL0
|
||||
gzip -f "tmp/"$i
|
||||
done;
|
||||
|
||||
# Build tar archive
|
||||
echo $myCOL1"### Now building tar archive: es_dump_"$myDATE".tgz" $myCOL0
|
||||
tar cvf es_dump_$myDATE.tar tmp/*
|
||||
echo $myCOL1"### Done."$myCOL0
|
77
bin/export_kibana-objects.sh
Executable file
|
@ -0,0 +1,77 @@
|
|||
#!/bin/bash
|
||||
# Export all Kibana objects
|
||||
# Make sure ES is available
|
||||
myES="http://127.0.0.1:64298/"
|
||||
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green)
|
||||
if ! [ "$myESSTATUS" = "1" ]
|
||||
then
|
||||
echo "### Elasticsearch is not available, try starting via 'systemctl start elk'."
|
||||
exit
|
||||
else
|
||||
echo "### Elasticsearch is available, now continuing."
|
||||
echo
|
||||
fi
|
||||
|
||||
# Set vars
|
||||
myDATE=$(date +%Y%m%d%H%M)
|
||||
myINDEXCOUNT=$(curl -s -XGET ''$myES'.kibana/index-pattern/logstash-*' | tr '\\' '\n' | grep "scripted" | wc -w)
|
||||
myDASHBOARDS=$(curl -s -XGET ''$myES'.kibana/dashboard/_search?filter_path=hits.hits._id&pretty&size=10000' | jq '.hits.hits[] | {_id}' | jq -r '._id')
|
||||
myVISUALIZATIONS=$(curl -s -XGET ''$myES'.kibana/visualization/_search?filter_path=hits.hits._id&pretty&size=10000' | jq '.hits.hits[] | {_id}' | jq -r '._id')
|
||||
mySEARCHES=$(curl -s -XGET ''$myES'.kibana/search/_search?filter_path=hits.hits._id&pretty&size=10000' | jq '.hits.hits[] | {_id}' | jq -r '._id')
|
||||
myCOL1="[0;34m"
|
||||
myCOL0="[0;0m"
|
||||
|
||||
# Let's ensure normal operation on exit or if interrupted ...
|
||||
function fuCLEANUP {
|
||||
rm -rf patterns/ dashboards/ visualizations/ searches/
|
||||
}
|
||||
trap fuCLEANUP EXIT
|
||||
|
||||
# Export index patterns
|
||||
mkdir -p patterns
|
||||
echo $myCOL1"### Now exporting"$myCOL0 $myINDEXCOUNT $myCOL1"index patterns." $myCOL0
|
||||
curl -s -XGET ''$myES'.kibana/index-pattern/logstash-*?' | jq '._source' > patterns/index-patterns.json
|
||||
echo
|
||||
|
||||
# Export dashboards
|
||||
mkdir -p dashboards
|
||||
echo $myCOL1"### Now exporting"$myCOL0 $(echo $myDASHBOARDS | wc -w) $myCOL1"dashboards." $myCOL0
|
||||
for i in $myDASHBOARDS;
|
||||
do
|
||||
echo $myCOL1"###### "$i $myCOL0
|
||||
curl -s -XGET ''$myES'.kibana/dashboard/'$i'' | jq '._source' > dashboards/$i.json
|
||||
done;
|
||||
echo
|
||||
|
||||
# Export visualizations
|
||||
mkdir -p visualizations
|
||||
echo $myCOL1"### Now exporting"$myCOL0 $(echo $myVISUALIZATIONS | wc -w) $myCOL1"visualizations." $myCOL0
|
||||
for i in $myVISUALIZATIONS;
|
||||
do
|
||||
echo $myCOL1"###### "$i $myCOL0
|
||||
curl -s -XGET ''$myES'.kibana/visualization/'$i'' | jq '._source' > visualizations/$i.json
|
||||
done;
|
||||
echo
|
||||
|
||||
# Export searches
|
||||
mkdir -p searches
|
||||
echo $myCOL1"### Now exporting"$myCOL0 $(echo $mySEARCHES | wc -w) $myCOL1"searches." $myCOL0
|
||||
for i in $mySEARCHES;
|
||||
do
|
||||
echo $myCOL1"###### "$i $myCOL0
|
||||
curl -s -XGET ''$myES'.kibana/search/'$i'' | jq '._source' > searches/$i.json
|
||||
done;
|
||||
echo
|
||||
|
||||
# Building tar archive
|
||||
echo $myCOL1"### Now building archive"$myCOL0 "kibana-objects_"$myDATE".tgz"
|
||||
tar cvfz kibana-objects_$myDATE.tgz patterns dashboards visualizations searches > /dev/null
|
||||
|
||||
# Stats
|
||||
echo
|
||||
echo $myCOL1"### Statistics"
|
||||
echo $myCOL1"###### Exported"$myCOL0 $myINDEXCOUNT $myCOL1"index patterns." $myCOL0
|
||||
echo $myCOL1"###### Exported"$myCOL0 $(echo $myDASHBOARDS | wc -w) $myCOL1"dashboards." $myCOL0
|
||||
echo $myCOL1"###### Exported"$myCOL0 $(echo $myVISUALIZATIONS | wc -w) $myCOL1"visualizations." $myCOL0
|
||||
echo $myCOL1"###### Exported"$myCOL0 $(echo $mySEARCHES | wc -w) $myCOL1"searches." $myCOL0
|
||||
echo
|
91
bin/import_kibana-objects.sh
Executable file
|
@ -0,0 +1,91 @@
|
|||
#!/bin/bash
|
||||
# Import Kibana objects
|
||||
# Make sure ES is available
|
||||
myES="http://127.0.0.1:64298/"
|
||||
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green)
|
||||
if ! [ "$myESSTATUS" = "1" ]
|
||||
then
|
||||
echo "### Elasticsearch is not available, try starting via 'systemctl start elk'."
|
||||
exit
|
||||
else
|
||||
echo "### Elasticsearch is available, now continuing."
|
||||
echo
|
||||
fi
|
||||
|
||||
# Set vars
|
||||
myDUMP=$1
|
||||
myCOL1="[0;34m"
|
||||
myCOL0="[0;0m"
|
||||
|
||||
# Let's ensure normal operation on exit or if interrupted ...
|
||||
function fuCLEANUP {
|
||||
rm -rf patterns/ dashboards/ visualizations/ searches/
|
||||
}
|
||||
trap fuCLEANUP EXIT
|
||||
|
||||
# Check if parameter is given and file exists
|
||||
if [ "$myDUMP" = "" ];
|
||||
then
|
||||
echo $myCOL1"### Please provide a backup file name."$myCOL0
|
||||
echo $myCOL1"### restore-kibana-objects.sh <kibana-objects.tgz>"$myCOL0
|
||||
echo
|
||||
exit
|
||||
fi
|
||||
if ! [ -a $myDUMP ];
|
||||
then
|
||||
echo $myCOL1"### File not found."$myCOL0
|
||||
exit
|
||||
fi
|
||||
|
||||
# Unpack tar
|
||||
tar xvfz $myDUMP > /dev/null
|
||||
|
||||
# Restore index patterns
|
||||
myINDEXCOUNT=$(cat patterns/index-patterns.json | tr '\\' '\n' | grep "scripted" | wc -w)
|
||||
echo $myCOL1"### Now importing"$myCOL0 $myINDEXCOUNT $myCOL1"index patterns." $myCOL0
|
||||
curl -s -XDELETE ''$myES'.kibana/index-pattern/logstash-*' > /dev/null
|
||||
curl -s -XPUT ''$myES'.kibana/index-pattern/logstash-*' -T patterns/index-patterns.json > /dev/null
|
||||
echo
|
||||
|
||||
# Restore dashboards
|
||||
myDASHBOARDS=$(ls dashboards/*.json | cut -c 12- | rev | cut -c 6- | rev)
|
||||
echo $myCOL1"### Now importing "$myCOL0$(echo $myDASHBOARDS | wc -w)$myCOL1 "dashboards." $myCOL0
|
||||
for i in $myDASHBOARDS;
|
||||
do
|
||||
echo $myCOL1"###### "$i $myCOL0
|
||||
curl -s -XDELETE ''$myES'.kibana/dashboard/'$i'' > /dev/null
|
||||
curl -s -XPUT ''$myES'.kibana/dashboard/'$i'' -T dashboards/$i.json > /dev/null
|
||||
done;
|
||||
echo
|
||||
|
||||
# Restore visualizations
|
||||
myVISUALIZATIONS=$(ls visualizations/*.json | cut -c 16- | rev | cut -c 6- | rev)
|
||||
echo $myCOL1"### Now importing "$myCOL0$(echo $myVISUALIZATIONS | wc -w)$myCOL1 "visualizations." $myCOL0
|
||||
for i in $myVISUALIZATIONS;
|
||||
do
|
||||
echo $myCOL1"###### "$i $myCOL0
|
||||
curl -s -XDELETE ''$myES'.kibana/visualization/'$i'' > /dev/null
|
||||
curl -s -XPUT ''$myES'.kibana/visualization/'$i'' -T visualizations/$i.json > /dev/null
|
||||
done;
|
||||
echo
|
||||
|
||||
# Restore searches
|
||||
mySEARCHES=$(ls searches/*.json | cut -c 10- | rev | cut -c 6- | rev)
|
||||
echo $myCOL1"### Now importing "$myCOL0$(echo $mySEARCHES | wc -w)$myCOL1 "searches." $myCOL0
|
||||
for i in $mySEARCHES;
|
||||
do
|
||||
echo $myCOL1"###### "$i $myCOL0
|
||||
curl -s -XDELETE ''$myES'.kibana/search/'$i'' > /dev/null
|
||||
curl -s -XPUT ''$myES'.kibana/search/'$i'' -T searches/$i.json > /dev/null
|
||||
done;
|
||||
echo
|
||||
|
||||
# Stats
|
||||
echo
|
||||
echo $myCOL1"### Statistics"
|
||||
echo $myCOL1"###### Imported"$myCOL0 $myINDEXCOUNT $myCOL1"index patterns." $myCOL0
|
||||
echo $myCOL1"###### Imported"$myCOL0 $(echo $myDASHBOARDS | wc -w) $myCOL1"dashboards." $myCOL0
|
||||
echo $myCOL1"###### Imported"$myCOL0 $(echo $myVISUALIZATIONS | wc -w) $myCOL1"visualizations." $myCOL0
|
||||
echo $myCOL1"###### Imported"$myCOL0 $(echo $mySEARCHES | wc -w) $myCOL1"searches." $myCOL0
|
||||
echo
|
||||
|
103
bin/myip.sh
Executable file
|
@ -0,0 +1,103 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Get my external IP
|
||||
|
||||
timeout=2 # seconds to wait for a reply before trying next server
|
||||
verbose=1 # prints which server was used to STDERR
|
||||
|
||||
dnslist=(
|
||||
"dig +short myip.opendns.com @resolver1.opendns.com"
|
||||
"dig +short myip.opendns.com @resolver2.opendns.com"
|
||||
"dig +short myip.opendns.com @resolver3.opendns.com"
|
||||
"dig +short myip.opendns.com @resolver4.opendns.com"
|
||||
"dig +short -4 -t a whoami.akamai.net @ns1-1.akamaitech.net"
|
||||
"dig +short whoami.akamai.net @ns1-1.akamaitech.net"
|
||||
)
|
||||
|
||||
httplist=(
|
||||
alma.ch/myip.cgi
|
||||
api.infoip.io/ip
|
||||
api.ipify.org
|
||||
bot.whatismyipaddress.com
|
||||
canhazip.com
|
||||
checkip.amazonaws.com
|
||||
eth0.me
|
||||
icanhazip.com
|
||||
ident.me
|
||||
ipecho.net/plain
|
||||
ipinfo.io/ip
|
||||
ipof.in/txt
|
||||
ip.tyk.nu
|
||||
l2.io/ip
|
||||
smart-ip.net/myip
|
||||
wgetip.com
|
||||
whatismyip.akamai.com
|
||||
)
|
||||
|
||||
# function to check for valid ip
|
||||
function valid_ip()
|
||||
{
|
||||
local ip=$1
|
||||
local stat=1
|
||||
|
||||
if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
|
||||
OIFS=$IFS
|
||||
IFS='.'
|
||||
ip=($ip)
|
||||
IFS=$OIFS
|
||||
[[ ${ip[0]} -le 255 && ${ip[1]} -le 255 \
|
||||
&& ${ip[2]} -le 255 && ${ip[3]} -le 255 ]]
|
||||
stat=$?
|
||||
fi
|
||||
return $stat
|
||||
}
|
||||
|
||||
# function to shuffle the global array "array"
|
||||
shuffle() {
|
||||
local i tmp size max rand
|
||||
size=${#array[*]}
|
||||
max=$(( 32768 / size * size ))
|
||||
for ((i=size-1; i>0; i--)); do
|
||||
while (( (rand=$RANDOM) >= max )); do :; done
|
||||
rand=$(( rand % (i+1) ))
|
||||
tmp=${array[i]} array[i]=${array[rand]} array[rand]=$tmp
|
||||
done
|
||||
}
|
||||
# if we have dig and a list of dns methods, try that first
|
||||
if hash dig 2>/dev/null && [ ${#dnslist[*]} -gt 0 ]; then
|
||||
eval array=( \"\${dnslist[@]}\" )
|
||||
shuffle
|
||||
for cmd in "${array[@]}"; do
|
||||
[ "$verbose" == 1 ] && echo Trying: $cmd 1>&2
|
||||
ip=$(timeout $timeout $cmd)
|
||||
if [ -n "$ip" ]; then
|
||||
if valid_ip $ip; then
|
||||
echo $ip
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
# if we haven't succeeded with DNS, try HTTP
|
||||
if [ ${#httplist[*]} == 0 ]; then
|
||||
echo "No hosts in httplist array!" >&2
|
||||
exit 1
|
||||
fi
|
||||
# use curl or wget, depending on which one we find
|
||||
curl_or_wget=$(if hash curl 2>/dev/null; then echo "curl -s"; elif hash wget 2>/dev/null; then echo "wget -qO-"; fi);
|
||||
if [ -z "$curl_or_wget" ]; then
|
||||
echo "Neither curl nor wget found. Cannot use http method." >&2
|
||||
exit 1
|
||||
fi
|
||||
eval array=( \"\${httplist[@]}\" )
|
||||
shuffle
|
||||
for url in "${array[@]}"; do
|
||||
[ "$verbose" == 1 ] && echo Trying: $curl_or_wget "$url" 1>&2
|
||||
ip=$(timeout $timeout $curl_or_wget "$url")
|
||||
if [ -n "$ip" ]; then
|
||||
if valid_ip $ip; then
|
||||
echo $ip
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
done
|
61
bin/restore_es.sh
Executable file
|
@ -0,0 +1,61 @@
|
|||
#/bin/bash
|
||||
# Restore folder based ES backup
|
||||
# Make sure ES is available
|
||||
myES="http://127.0.0.1:64298/"
|
||||
myESSTATUS=$(curl -s -XGET ''$myES'_cluster/health' | jq '.' | grep -c green)
|
||||
if ! [ "$myESSTATUS" = "1" ]
|
||||
then
|
||||
echo "### Elasticsearch is not available, try starting via 'systemctl start elk'."
|
||||
exit
|
||||
else
|
||||
echo "### Elasticsearch is available, now continuing."
|
||||
fi
|
||||
|
||||
# Let's ensure normal operation on exit or if interrupted ...
|
||||
function fuCLEANUP {
|
||||
rm -rf tmp
|
||||
}
|
||||
trap fuCLEANUP EXIT
|
||||
|
||||
# Set vars
|
||||
myDUMP=$1
|
||||
myCOL1="[0;34m"
|
||||
myCOL0="[0;0m"
|
||||
|
||||
# Check if parameter is given and file exists
|
||||
if [ "$myDUMP" = "" ];
|
||||
then
|
||||
echo $myCOL1"### Please provide a backup file name."$myCOL0
|
||||
echo $myCOL1"### restore-elk.sh <es_dump.tar>"$myCOL0
|
||||
echo
|
||||
exit
|
||||
fi
|
||||
if ! [ -a $myDUMP ];
|
||||
then
|
||||
echo $myCOL1"### File not found."$myCOL0
|
||||
exit
|
||||
fi
|
||||
|
||||
# Unpack tar archive
|
||||
echo $myCOL1"### Now unpacking tar archive: "$myDUMP $myCOL0
|
||||
tar xvf $myDUMP
|
||||
|
||||
# Build indices list
|
||||
myINDICES=$(ls tmp/logstash*.gz | cut -c 5- | rev | cut -c 4- | rev)
|
||||
echo $myCOL1"### The following indices will be restored: "$myCOL0
|
||||
echo $myINDICES
|
||||
echo
|
||||
|
||||
# Restore indices
|
||||
for i in $myINDICES;
|
||||
do
|
||||
# Delete index if it already exists
|
||||
curl -s -XDELETE $myES$i > /dev/null
|
||||
echo $myCOL1"### Now uncompressing: tmp/$i.gz" $myCOL0
|
||||
gunzip -f tmp/$i.gz
|
||||
# Restore index to ES
|
||||
echo $myCOL1"### Now restoring: "$i $myCOL0
|
||||
elasticdump --input=tmp/$i --output=$myES$i --limit 7500
|
||||
rm tmp/$i
|
||||
done;
|
||||
echo $myCOL1"### Done."$myCOL0
|
24
bin/updateip.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
# Let's add the first local ip to the /etc/issue and external ip to ews.ip file
|
||||
# If the external IP cannot be detected, the internal IP will be inherited.
|
||||
source /etc/environment
|
||||
myLOCALIP=$(hostname -I | awk '{ print $1 }')
|
||||
myEXTIP=$(/opt/tpot/bin/myip.sh)
|
||||
if [ "$myEXTIP" = "" ];
|
||||
then
|
||||
myEXTIP=$myLOCALIP
|
||||
fi
|
||||
sed -i "s#IP:.*#IP: $myLOCALIP ($myEXTIP)[0m#" /etc/issue
|
||||
sed -i "s#SSH:.*#SSH: ssh -l tsec -p 64295 $myLOCALIP[0m#" /etc/issue
|
||||
sed -i "s#WEB:.*#WEB: https://$myLOCALIP:64297[0m#" /etc/issue
|
||||
tee /data/ews/conf/ews.ip << EOF
|
||||
[MAIN]
|
||||
ip = $myEXTIP
|
||||
EOF
|
||||
tee /opt/tpot/etc/compose/elk_environment << EOF
|
||||
MY_EXTIP=$myEXTIP
|
||||
MY_INTIP=$myLOCALIP
|
||||
MY_HOSTNAME=$HOSTNAME
|
||||
EOF
|
||||
chown tpot:tpot /data/ews/conf/ews.ip
|
||||
chmod 760 /data/ews/conf/ews.ip
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 180 KiB |
Before Width: | Height: | Size: 319 KiB After Width: | Height: | Size: 594 KiB |
BIN
doc/dockerui.png
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 52 KiB |
BIN
doc/netdata.png
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 199 KiB |
BIN
doc/spiderfoot.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
doc/webssh.png
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 148 KiB |
54
docker/conpot/Dockerfile
Normal file
|
@ -0,0 +1,54 @@
|
|||
FROM alpine
|
||||
MAINTAINER MO
|
||||
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
|
||||
# Setup apt
|
||||
RUN apk -U add bash \
|
||||
build-base \
|
||||
file \
|
||||
git \
|
||||
libev \
|
||||
libtool \
|
||||
libxslt \
|
||||
libxslt-dev \
|
||||
mariadb-dev \
|
||||
mariadb-client-libs \
|
||||
pkgconfig \
|
||||
python \
|
||||
python-dev \
|
||||
py-cffi && \
|
||||
|
||||
# Setup ConPot
|
||||
git clone https://github.com/mushorg/conpot /opt/conpot/ && \
|
||||
cd /opt/conpot/ && \
|
||||
git checkout d97a68a054e4fe42ff90293188a5702ce8ab09a3 && \
|
||||
cp /root/dist/requirements.txt /opt/conpot/ && \
|
||||
python setup.py install && \
|
||||
cd / && \
|
||||
rm -rf /opt/conpot /tmp/* /var/tmp/* && \
|
||||
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 conpot && \
|
||||
adduser -S -s /bin/bash -u 2000 -D -g 2000 conpot && \
|
||||
mkdir -p /etc/conpot /var/log/conpot && \
|
||||
mv /root/dist/conpot.cfg /etc/conpot/conpot.cfg && \
|
||||
mv /root/dist/kamstrup_382/template.xml /usr/lib/python2.7/site-packages/Conpot-0.5.1-py2.7.egg/conpot/templates/kamstrup_382/ && \
|
||||
|
||||
# Clean up
|
||||
apk del build-base \
|
||||
file \
|
||||
git \
|
||||
libev \
|
||||
libtool \
|
||||
libxslt-dev \
|
||||
mariadb-dev \
|
||||
pkgconfig \
|
||||
python-dev \
|
||||
py-cffi && \
|
||||
rm -rf /root/* && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# Run supervisor upon container start
|
||||
CMD ["/usr/bin/conpot", "--template", "kamstrup_382", "--logfile", "/var/log/conpot/conpot.log", "--config", "/etc/conpot/conpot.cfg"]
|
28
docker/conpot/README.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
[](https://microbadger.com/images/dtagdevsec/conpot:1706 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/conpot:1706 "Get your own image badge on microbadger.com")
|
||||
|
||||
# conpot
|
||||
|
||||
[ConPot](http://conpot.org/) is a low interactive server side Industrial Control Systems honeypot designed to be easy to deploy, modify and extend. By providing a range of common industrial control protocols we created the basics to build your own system, capable to emulate complex infrastructures to convince an adversary that he just found a huge industrial complex. To improve the deceptive capabilities, we also provided the possibility to server a custom human machine interface to increase the honeypots attack surface. The response times of the services can be artificially delayed to mimic the behaviour of a system under constant load. Because we are providing complete stacks of the protocols, Conpot can be accessed with productive HMI's or extended with real hardware. Conpot is developed under the umbrella of the [Honeynet Project](https://www.honeynet.org/) and on the shoulders of a couple of very big giants.
|
||||
|
||||
This repository contains the necessary files to create a *dockerized* version of conpot.
|
||||
|
||||
This dockerized version is part of the **[T-Pot community honeypot](http://dtag-dev-sec.github.io/)** of Deutsche Telekom AG.
|
||||
|
||||
The `Dockerfile` contains the blueprint for the dockerized conpot and will be used to setup the docker image.
|
||||
|
||||
The `supervisord.conf` is used to start conpot under supervision of supervisord.
|
||||
|
||||
Using systemd, copy the `systemd/conpot.service` to `/etc/systemd/system/conpot.service` and start using
|
||||
|
||||
```
|
||||
systemctl enable conpot
|
||||
systemctl start conpot
|
||||
```
|
||||
|
||||
This will make sure that the docker container is started with the appropriate permissions and port mappings. Further, it autostarts during boot.
|
||||
|
||||
By default all data will be stored in `/data/conpot/` until the honeypot service will be restarted which is by default every 24 hours. If you want to keep data persistently simply edit the ``service`` file, find the line that contains ``clean.sh`` and set the option from ``off`` to ``on``. Be advised to establish some sort of log management if you wish to do so.
|
||||
|
||||
# ConPot Dashboard
|
||||
|
||||

|
58
docker/conpot/dist/conpot.cfg
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
[common]
|
||||
sensorid = conpot
|
||||
|
||||
[session]
|
||||
timeout = 30
|
||||
|
||||
[daemon]
|
||||
user = conpot
|
||||
group = conpot
|
||||
|
||||
[json]
|
||||
enabled = True
|
||||
filename = /var/log/conpot/conpot.json
|
||||
|
||||
[sqlite]
|
||||
enabled = False
|
||||
|
||||
[mysql]
|
||||
enabled = False
|
||||
device = /tmp/mysql.sock
|
||||
host = localhost
|
||||
port = 3306
|
||||
db = conpot
|
||||
username = conpot
|
||||
passphrase = conpot
|
||||
socket = tcp ; tcp (sends to host:port), dev (sends to mysql device/socket file)
|
||||
|
||||
[syslog]
|
||||
enabled = False
|
||||
device = /dev/log
|
||||
host = localhost
|
||||
port = 514
|
||||
facility = local0
|
||||
socket = dev ; udp (sends to host:port), dev (sends to device)
|
||||
|
||||
[hpfriends]
|
||||
enabled = False
|
||||
host = hpfriends.honeycloud.net
|
||||
port = 20000
|
||||
ident = 3Ykf9Znv
|
||||
secret = 4nFRhpm44QkG9cvD
|
||||
channels = ["conpot.events", ]
|
||||
|
||||
[taxii]
|
||||
enabled = False
|
||||
host = taxiitest.mitre.org
|
||||
port = 80
|
||||
inbox_path = /services/inbox/default/
|
||||
use_https = False
|
||||
|
||||
[fetch_public_ip]
|
||||
enabled = True
|
||||
urls = ["http://whatismyip.akamai.com/", "http://wgetip.com/"]
|
||||
|
||||
[change_mac_addr]
|
||||
enabled = False
|
||||
iface = eth0
|
||||
addr = 00:de:ad:be:ef:00
|
516
docker/conpot/dist/kamstrup_382/template.xml
vendored
Normal file
|
@ -0,0 +1,516 @@
|
|||
<core>
|
||||
<template>
|
||||
<!-- General information about the template -->
|
||||
<entity name="unit">382</entity>
|
||||
<entity name="vendor">Kamstrup</entity>
|
||||
<entity name="description">Register clone of an existing Kamstrup 382 smart meter</entity>
|
||||
<entity name="protocols">Kamstrup</entity>
|
||||
<entity name="creator">Johnny Vestergaard</entity>
|
||||
</template>
|
||||
<databus>
|
||||
<!-- Core value that can be retrieved from the databus by key -->
|
||||
<key_value_mappings>
|
||||
<key name="power_simulator">
|
||||
<value type="function">conpot.protocols.kamstrup.usage_simulator.UsageSimulator</value>
|
||||
</key>
|
||||
<key name="register_1024">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_2">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_13">
|
||||
<value type="value">71832712</value>
|
||||
</key>
|
||||
<key name="register_14">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1054">
|
||||
<value type="value">228</value>
|
||||
</key>
|
||||
<key name="register_1055">
|
||||
<value type="value">229</value>
|
||||
</key>
|
||||
<key name="register_1056">
|
||||
<value type="value">224</value>
|
||||
</key>
|
||||
<key name="register_1076">
|
||||
<value type="value">511</value>
|
||||
</key>
|
||||
<key name="register_1077">
|
||||
<value type="value">422</value>
|
||||
</key>
|
||||
<key name="register_1078">
|
||||
<value type="value">144</value>
|
||||
</key>
|
||||
<key name="register_1080">
|
||||
<value type="value">1000</value>
|
||||
</key>
|
||||
<key name="register_1081">
|
||||
<value type="value">5499</value>
|
||||
</key>
|
||||
<key name="register_1082">
|
||||
<value type="value">895</value>
|
||||
</key>
|
||||
<key name="register_3">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_4">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_5">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_6">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1025">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1033">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1034">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1035">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1036">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_15">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_16">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_17">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_18">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1027">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_20">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_21">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_22">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_23">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_24">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_25">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_26">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_27">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_28">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_29">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_30">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_31">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_32">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_33">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_34">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_35">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_36">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_37">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_38">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_39">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_40">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_41">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_42">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_43">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_44">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_45">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_46">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1071">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1072">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1073">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_50">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_51">
|
||||
<value type="value">1258679</value>
|
||||
</key>
|
||||
<key name="register_52">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_53">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_54">
|
||||
<value type="value">21000002</value>
|
||||
</key>
|
||||
<key name="register_55">
|
||||
<value type="value">22201011</value>
|
||||
</key>
|
||||
<key name="register_56">
|
||||
<value type="value">1000</value>
|
||||
</key>
|
||||
<key name="register_57">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_58">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1083">
|
||||
<value type="value">34353</value>
|
||||
</key>
|
||||
<key name="register_1084">
|
||||
<value type="value">256</value>
|
||||
</key>
|
||||
<key name="register_1086">
|
||||
<value type="value">101110</value>
|
||||
</key>
|
||||
<key name="register_1205">
|
||||
<value type="value">340282366920938463463374607431768211455</value>
|
||||
</key>
|
||||
<key name="register_1092">
|
||||
<value type="value">1</value>
|
||||
</key>
|
||||
<key name="register_1037">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1038">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1112">
|
||||
<value type="value">30</value>
|
||||
</key>
|
||||
<key name="register_1113">
|
||||
<value type="value">30</value>
|
||||
</key>
|
||||
<key name="register_1114">
|
||||
<value type="value">30</value>
|
||||
</key>
|
||||
<key name="register_1039">
|
||||
<value type="value">99000</value>
|
||||
</key>
|
||||
<key name="register_1121">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1026">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1126">
|
||||
<value type="value">3820031751153221778937193183286</value>
|
||||
</key>
|
||||
<key name="register_19">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1047">
|
||||
<value type="value">9441543881752250126</value>
|
||||
</key>
|
||||
<key name="register_1049">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1050">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1028">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1051">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1189">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1202">
|
||||
<value type="value">340282366920938463463374607431768211455</value>
|
||||
</key>
|
||||
<key name="register_1203">
|
||||
<value type="value">340282366920938463463374607431768211455</value>
|
||||
</key>
|
||||
<key name="register_1204">
|
||||
<value type="value">340282366920938463463374607431768211455</value>
|
||||
</key>
|
||||
<key name="register_1206">
|
||||
<value type="value">340282366920938463463374607431768211455</value>
|
||||
</key>
|
||||
<key name="register_1207">
|
||||
<value type="value">340282366920938463463374607431768211455</value>
|
||||
</key>
|
||||
<key name="register_1208">
|
||||
<value type="value">340282366920938463463374607431768211455</value>
|
||||
</key>
|
||||
<key name="register_1209">
|
||||
<value type="value">340282366920938463463374607431768211455</value>
|
||||
</key>
|
||||
<key name="register_1029">
|
||||
<value type="value">100</value>
|
||||
</key>
|
||||
<key name="register_1058">
|
||||
<value type="value">227691635558201180633139</value>
|
||||
</key>
|
||||
<key name="register_1115">
|
||||
<value type="value">60</value>
|
||||
</key>
|
||||
<key name="register_1059">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1060">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1030">
|
||||
<value type="value">46828625</value>
|
||||
</key>
|
||||
<key name="register_1061">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1062">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1063">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1064">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1065">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1031">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1066">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1067">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1068">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1069">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1070">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1074">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1075">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1079">
|
||||
<value type="value">315</value>
|
||||
</key>
|
||||
<key name="register_1181">
|
||||
<value type="value">433534329705531658</value>
|
||||
</key>
|
||||
<key name="register_1001">
|
||||
<value type="value">15085488</value>
|
||||
</key>
|
||||
<key name="register_1002">
|
||||
<value type="value">203513</value>
|
||||
</key>
|
||||
<key name="register_1003">
|
||||
<value type="value">140727</value>
|
||||
</key>
|
||||
<key name="register_1004">
|
||||
<value type="value">283</value>
|
||||
</key>
|
||||
<key name="register_1005">
|
||||
<value type="value">53011401</value>
|
||||
</key>
|
||||
<key name="register_1010">
|
||||
<value type="value">15085488</value>
|
||||
</key>
|
||||
<key name="register_1021">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="register_1023">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="reboot_signal">
|
||||
<value type="value">0</value>
|
||||
</key>
|
||||
<key name="software_version">
|
||||
<value type="value">'5.5 (E5)'</value>
|
||||
</key>
|
||||
<key name="access_control_status">
|
||||
<value type="value">'DISABLED'</value>
|
||||
</key>
|
||||
<key name="access_control_1">
|
||||
<value type="value">'0.0.0.0'</value>
|
||||
</key>
|
||||
<key name="access_control_2">
|
||||
<value type="value">'0.0.0.0'</value>
|
||||
</key>
|
||||
<key name="access_control_3">
|
||||
<value type="value">'0.0.0.0'</value>
|
||||
</key>
|
||||
<key name="access_control_4">
|
||||
<value type="value">'0.0.0.0'</value>
|
||||
</key>
|
||||
<key name="access_control_5">
|
||||
<value type="value">'0.0.0.0'</value>
|
||||
</key>
|
||||
<key name="device_name">
|
||||
<value type="value">''</value>
|
||||
</key>
|
||||
<key name="nameserver_1">
|
||||
<value type="value">'192.168.254.111'</value>
|
||||
</key>
|
||||
<key name="nameserver_2">
|
||||
<value type="value">'192.168.254.112'</value>
|
||||
</key>
|
||||
<key name="nameserver_3">
|
||||
<value type="value">'0.0.0.0'</value>
|
||||
</key>
|
||||
<key name="mac_address">
|
||||
<value type="value">'00:13:EA:00:72:FA'</value>
|
||||
</key>
|
||||
<key name="use_dhcp">
|
||||
<value type="value">'YES'</value>
|
||||
</key>
|
||||
<key name="ip_addr">
|
||||
<value type="value">'192.168.201.101'</value>
|
||||
</key>
|
||||
<key name="ip_gateway">
|
||||
<value type="value">'192.168.201.254'</value>
|
||||
</key>
|
||||
<key name="ip_subnet">
|
||||
<value type="value">'255.255.255.0'</value>
|
||||
</key>
|
||||
<key name="ip_addr_dhcp">
|
||||
<value type="value">'192.168.200.1'</value>
|
||||
</key>
|
||||
<key name="ip_gateway_dhcp">
|
||||
<value type="value">'192.168.200.254'</value>
|
||||
</key>
|
||||
<key name="ip_subnet_dhcp">
|
||||
<value type="value">'255.255.255.0'</value>
|
||||
</key>
|
||||
<key name="kap_a_server_hostname">
|
||||
<value type="value">'de_fra_lxg00.local.dom'</value>
|
||||
</key>
|
||||
<key name="kap_a_server_ip">
|
||||
<value type="value">'192.168.254.201'</value>
|
||||
</key>
|
||||
<key name="kap_a_server_port">
|
||||
<value type="value">'50'</value>
|
||||
</key>
|
||||
<key name="kap_b_server_ip">
|
||||
<value type="value">'0.0.0.0'</value>
|
||||
</key>
|
||||
<key name="kap_b_server_port">
|
||||
<value type="value">'50'</value>
|
||||
</key>
|
||||
<key name="channel_a_meternumber">
|
||||
<value type="value">'A1 06 A1 02 B7 34 12 00 00 03'</value>
|
||||
</key>
|
||||
<key name="channel_b_meternumber">
|
||||
<value type="value">'A1 06 A1 02 B7 34 12 00 00 03'</value>
|
||||
</key>
|
||||
<key name="channel_a_port">
|
||||
<value type="value">'1025'</value>
|
||||
</key>
|
||||
<key name="channel_b_port">
|
||||
<value type="value">'1027'</value>
|
||||
</key>
|
||||
<key name="kap_ack_server">
|
||||
<value type="value">'NO'</value>
|
||||
</key>
|
||||
<key name="kap_local_port">
|
||||
<value type="value">'800'</value>
|
||||
</key>
|
||||
<key name="alarm_server_status">
|
||||
<value type="value">'DISABLED'</value>
|
||||
</key>
|
||||
<key name="alarm_server_ip">
|
||||
<value type="value">''</value>
|
||||
</key>
|
||||
<key name="alarm_server_port">
|
||||
<value type="value">'4000'</value>
|
||||
</key>
|
||||
<key name="kap_server_lookup">
|
||||
<value type="value">'0 - none'</value>
|
||||
</key>
|
||||
<key name="software_watchdog">
|
||||
<value type="value">'3600'</value>
|
||||
</key>
|
||||
<key name="kap_missing_warning">
|
||||
<value type="value">'60'</value>
|
||||
</key>
|
||||
<key name="keep_alive_timer">
|
||||
<value type="value">'10'</value>
|
||||
</key>
|
||||
<key name="serial_settings_a">
|
||||
<value type="value">'Auto'</value>
|
||||
</key>
|
||||
<key name="serial_settings_b">
|
||||
<value type="value">'115200,8,E,1'</value>
|
||||
</key>
|
||||
<key name="channel_a_connect_socket">
|
||||
<value type="value">'0 - None'</value>
|
||||
</key>
|
||||
<key name="channel_b_connect_socket">
|
||||
<value type="value">'0 - None'</value>
|
||||
</key>
|
||||
</key_value_mappings>
|
||||
</databus>
|
||||
</core>
|
23
docker/conpot/dist/requirements.txt
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
gevent>=1.0
|
||||
pysnmp==4.3.5
|
||||
pysmi==0.1.3
|
||||
lxml
|
||||
bottle
|
||||
jinja2
|
||||
beautifulsoup4
|
||||
requests
|
||||
sphinx==1.5.5
|
||||
libtaxii>=1.1.0
|
||||
MySQL-python
|
||||
xlrd
|
||||
crc16
|
||||
enum
|
||||
hpfeeds
|
||||
modbus-tk
|
||||
stix-validator
|
||||
stix
|
||||
cybox
|
||||
bacpypes==0.13.8
|
||||
pyghmi
|
||||
mixbox
|
||||
modbus-tk
|
BIN
docker/conpot/doc/dashboard.png
Normal file
After Width: | Height: | Size: 490 KiB |
19
docker/conpot/docker-compose.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
version: '2.1'
|
||||
|
||||
networks:
|
||||
conpot_local:
|
||||
|
||||
services:
|
||||
|
||||
# Conpot service
|
||||
conpot:
|
||||
container_name: conpot
|
||||
restart: always
|
||||
networks:
|
||||
- conpot_local
|
||||
ports:
|
||||
- "1025:1025"
|
||||
- "50100:50100"
|
||||
image: "dtagdevsec/conpot:1706"
|
||||
volumes:
|
||||
- /data/conpot/log:/var/log/conpot
|
35
docker/cowrie/Dockerfile
Normal file
|
@ -0,0 +1,35 @@
|
|||
FROM alpine
|
||||
MAINTAINER MO
|
||||
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
|
||||
# Get and install dependencies & packages
|
||||
RUN apk -U upgrade && \
|
||||
apk add git procps py-pip mpfr-dev openssl-dev mpc1-dev libffi-dev build-base python python-dev py-mysqldb py-setuptools gmp-dev && \
|
||||
|
||||
# Setup user
|
||||
addgroup -g 2000 cowrie && \
|
||||
adduser -S -s /bin/bash -u 2000 -D -g 2000 cowrie && \
|
||||
|
||||
# Install cowrie from git
|
||||
git clone https://github.com/micheloosterhof/cowrie.git /home/cowrie/cowrie/ && \
|
||||
cd /home/cowrie/cowrie && \
|
||||
pip install --no-cache-dir --upgrade cffi && \
|
||||
pip install --no-cache-dir -U -r requirements.txt && \
|
||||
|
||||
# Setup user, groups and configs
|
||||
cp /root/dist/cowrie.cfg /home/cowrie/cowrie/cowrie.cfg && \
|
||||
cp /root/dist/userdb.txt /home/cowrie/cowrie/data/userdb.txt && \
|
||||
chown cowrie:cowrie -R /home/cowrie/* && \
|
||||
|
||||
# Clean up
|
||||
rm -rf /root/* && \
|
||||
apk del git py-pip mpfr-dev mpc1-dev libffi-dev build-base py-mysqldb gmp-dev python-dev && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# Start cowrie
|
||||
ENV PYTHONPATH /home/cowrie/cowrie
|
||||
WORKDIR /home/cowrie/cowrie
|
||||
USER cowrie
|
||||
CMD ["/usr/bin/twistd", "--nodaemon", "-y", "cowrie.tac", "--pidfile", "var/run/cowrie.pid", "cowrie"]
|
674
docker/cowrie/LICENSE
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) {year} {name of author}
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
{project} Copyright (C) {year} {fullname}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
32
docker/cowrie/README.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
# dockerized cowrie
|
||||
|
||||
|
||||
[cowrie](http://www.micheloosterhof.com/cowrie/) is an extended fork of the medium interaction honeypot [kippo](https://github.com/desaster/kippo).
|
||||
|
||||
This repository contains the necessary files to create a *dockerized* version of cowrie.
|
||||
|
||||
This dockerized version is part of the **[T-Pot community honeypot](http://dtag-dev-sec.github.io/)** of Deutsche Telekom AG.
|
||||
|
||||
The `Dockerfile` contains the blueprint for the dockerized cowrie and will be used to setup the docker image.
|
||||
|
||||
The `cowrie.cfg` is tailored to fit the T-Pot environment.
|
||||
|
||||
The `setup.sql` is also tailored to fit the T-Pot environment.
|
||||
|
||||
The `supervisord.conf` is used to start cowrie under supervision of supervisord.
|
||||
|
||||
Using systemd, copy the `systemd/cowrie.service` to `/etc/systemd/system/cowrie.service` and start using
|
||||
|
||||
```
|
||||
systemctl enable cowrie
|
||||
systemctl start cowrie
|
||||
```
|
||||
|
||||
This will make sure that the docker container is started with the appropriate permissions and port mappings. Further, it autostarts during boot.
|
||||
|
||||
By default all data will be stored in `/data/cowrie/` until the honeypot service will be restarted which is by default every 24 hours. If you want to keep data persistently simply edit the ``service`` file, find the line that contains ``clean.sh`` and set the option from ``off`` to ``on``. Be advised to establish some sort of log management if you wish to do so.
|
||||
|
||||
|
||||
# Cowrie Dashboard
|
||||
|
||||

|
472
docker/cowrie/dist/cowrie.cfg
vendored
Normal file
|
@ -0,0 +1,472 @@
|
|||
#
|
||||
# Cowrie configuration file (cowrie.cfg)
|
||||
#
|
||||
|
||||
# ============================================================================
|
||||
# General Honeypot Options
|
||||
# ============================================================================
|
||||
[honeypot]
|
||||
|
||||
# Sensor name is used to identify this Cowrie instance. Used by the database
|
||||
# logging modules such as mysql.
|
||||
#
|
||||
# If not specified, the logging modules will instead use the IP address of the
|
||||
# server as the sensor name.
|
||||
#
|
||||
# (default: not specified)
|
||||
#sensor_name=t-pot
|
||||
|
||||
# Hostname for the honeypot. Displayed by the shell prompt of the virtual
|
||||
# environment
|
||||
#
|
||||
# (default: svr04)
|
||||
hostname = ubuntu
|
||||
|
||||
|
||||
# Directory where to save log files in.
|
||||
#
|
||||
# (default: log)
|
||||
log_path = log
|
||||
|
||||
|
||||
# Directory where to save downloaded artifacts in.
|
||||
#
|
||||
# (default: dl)
|
||||
download_path = dl
|
||||
|
||||
|
||||
# Directory for miscellaneous data files, such as the password database.
|
||||
#
|
||||
# (default: data_path)
|
||||
data_path = data
|
||||
|
||||
|
||||
# Directory where virtual file contents are kept in.
|
||||
#
|
||||
# This is only used by commands like 'cat' to display the contents of files.
|
||||
# Adding files here is not enough for them to appear in the honeypot - the
|
||||
# actual virtual filesystem is kept in filesystem_file (see below)
|
||||
#
|
||||
# (default: honeyfs)
|
||||
contents_path = honeyfs
|
||||
|
||||
|
||||
# File in the Python pickle format containing the virtual filesystem.
|
||||
#
|
||||
# This includes the filenames, paths, permissions for the Cowrie filesystem,
|
||||
# but not the file contents. This is created by the bin/createfs utility from
|
||||
# a real template linux installation.
|
||||
#
|
||||
# (default: fs.pickle)
|
||||
filesystem_file = data/fs.pickle
|
||||
|
||||
|
||||
# Directory for creating simple commands that only output text.
|
||||
#
|
||||
# The command must be placed under this directory with the proper path, such
|
||||
# as:
|
||||
# txtcmds/usr/bin/vi
|
||||
# The contents of the file will be the output of the command when run inside
|
||||
# the honeypot.
|
||||
#
|
||||
# In addition to this, the file must exist in the virtual filesystem
|
||||
#
|
||||
# (default: txtcmds)
|
||||
txtcmds_path = txtcmds
|
||||
|
||||
|
||||
# Maximum file size (in bytes) for downloaded files to be stored in 'download_path'.
|
||||
# A value of 0 means no limit. If the file size is known to be too big from the start,
|
||||
# the file will not be stored on disk at all.
|
||||
#
|
||||
# (default: 0)
|
||||
#download_limit_size = 10485760
|
||||
|
||||
|
||||
# TTY logging will log a transcript of the complete terminal interaction in UML
|
||||
# compatible format.
|
||||
# (default: true)
|
||||
ttylog = true
|
||||
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Network Specific Options
|
||||
# ============================================================================
|
||||
|
||||
|
||||
# IP address to bind to when opening outgoing connections. Used by wget and
|
||||
# curl commands.
|
||||
#
|
||||
# (default: not specified)
|
||||
#out_addr = 0.0.0.0
|
||||
|
||||
|
||||
# Fake address displayed as the address of the incoming connection.
|
||||
# This doesn't affect logging, and is only used by honeypot commands such as
|
||||
# 'w' and 'last'
|
||||
#
|
||||
# If not specified, the actual IP address is displayed instead (default
|
||||
# behaviour).
|
||||
#
|
||||
# (default: not specified)
|
||||
#fake_addr = 192.168.66.254
|
||||
|
||||
|
||||
# The IP address on which this machine is reachable on from the internet.
|
||||
# Useful if you use portforwarding or other mechanisms. If empty, Cowrie
|
||||
# will determine by itself. Used in 'netstat' output
|
||||
#
|
||||
#internet_facing_ip = 9.9.9.9
|
||||
|
||||
|
||||
# Enable to log the public IP of the honeypot (useful if listening on 127.0.0.1)
|
||||
# IP address is obtained by querying http://myip.threatstream.com
|
||||
report_public_ip = true
|
||||
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Authentication Specific Options
|
||||
# ============================================================================
|
||||
|
||||
|
||||
# Class that implements the checklogin() method.
|
||||
#
|
||||
# Class must be defined in cowrie/core/auth.py
|
||||
# Default is the 'UserDB' class which uses the password database.
|
||||
#
|
||||
# Alternatively the 'AuthRandom' class can be used, which will let
|
||||
# a user login after a random number of attempts.
|
||||
# It will also cache username/password combinations that allow login.
|
||||
#
|
||||
#auth_class = UserDB
|
||||
|
||||
# When AuthRandom is used also set the
|
||||
# auth_class_parameters: <min try>, <max try>, <maxcache>
|
||||
# for example: 2, 5, 10 = allows access after randint(2,5) attempts
|
||||
# and cache 10 combinations.
|
||||
#
|
||||
auth_class = AuthRandom
|
||||
auth_class_parameters = 2, 5, 10
|
||||
|
||||
|
||||
# No authentication checking at all
|
||||
# enabling 'auth_none' will enable the ssh2 'auth_none' authentication method
|
||||
# this allows the requested user in without any verification at all
|
||||
#
|
||||
# (default: false)
|
||||
#auth_none_enabled = false
|
||||
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Historical SSH Specific Options
|
||||
# historical options in [honeypot] that have not yet been moved to [ssh]
|
||||
# ============================================================================
|
||||
|
||||
# Source Port to report in logs (useful if you use iptables to forward ports to Cowrie)
|
||||
reported_ssh_port = 22
|
||||
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# SSH Specific Options
|
||||
# ============================================================================
|
||||
[ssh]
|
||||
|
||||
# Enable SSH support
|
||||
# (default: true)
|
||||
enabled = true
|
||||
|
||||
|
||||
# Public and private SSH key files. If these don't exist, they are created
|
||||
# automatically.
|
||||
rsa_public_key = etc/ssh_host_rsa_key.pub
|
||||
rsa_private_key = etc/ssh_host_rsa_key
|
||||
dsa_public_key = etc/ssh_host_dsa_key.pub
|
||||
dsa_private_key = etc/ssh_host_dsa_key
|
||||
|
||||
# SSH Version String
|
||||
#
|
||||
# Use these to disguise your honeypot from a simple SSH version scan
|
||||
# Examples:
|
||||
# SSH-2.0-OpenSSH_5.1p1 Debian-5
|
||||
# SSH-1.99-OpenSSH_4.3
|
||||
# SSH-1.99-OpenSSH_4.7
|
||||
# SSH-1.99-Sun_SSH_1.1
|
||||
# SSH-2.0-OpenSSH_4.2p1 Debian-7ubuntu3.1
|
||||
# SSH-2.0-OpenSSH_4.3
|
||||
# SSH-2.0-OpenSSH_4.6
|
||||
# SSH-2.0-OpenSSH_5.1p1 Debian-5
|
||||
# SSH-2.0-OpenSSH_5.1p1 FreeBSD-20080901
|
||||
# SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu5
|
||||
# SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu6
|
||||
# SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu7
|
||||
# SSH-2.0-OpenSSH_5.5p1 Debian-6
|
||||
# SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze1
|
||||
# SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze2
|
||||
# SSH-2.0-OpenSSH_5.8p2_hpn13v11 FreeBSD-20110503
|
||||
# SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1
|
||||
# SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2
|
||||
# SSH-2.0-OpenSSH_5.9
|
||||
#
|
||||
# (default: "SSH-2.0-SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2")
|
||||
version = SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
|
||||
|
||||
|
||||
# IP addresses to listen for incoming SSH connections.
|
||||
#
|
||||
# (default: 0.0.0.0) = any IPv4 address
|
||||
#listen_addr = 0.0.0.0
|
||||
# (use :: for listen to all IPv6 and IPv4 addresses)
|
||||
#listen_addr = ::
|
||||
|
||||
|
||||
# Port to listen for incoming SSH connections.
|
||||
#
|
||||
# (default: 2222)
|
||||
#listen_port = 22
|
||||
|
||||
|
||||
# sftp_enabled enables the sftp subsystem
|
||||
sftp_enabled = true
|
||||
|
||||
|
||||
# Enable SSH direct-tcpip forwarding
|
||||
# (default: true)
|
||||
forwarding = true
|
||||
|
||||
|
||||
# This enables redirecting forwarding requests to another address
|
||||
# Useful for forwarding protocols to other honeypots
|
||||
# (default: false)
|
||||
forward_redirect = false
|
||||
|
||||
|
||||
# Configure where to forward the data to.
|
||||
# forward_redirect_<portnumber> = <redirect ip>:<redirect port>
|
||||
|
||||
# Redirect http/https
|
||||
forward_redirect_80 = 127.0.0.1:8000
|
||||
forward_redirect_443 = 127.0.0.1:8443
|
||||
|
||||
# To record SMTP traffic, install an SMTP honeypoint.
|
||||
# (e.g https://github.com/awhitehatter/mailoney), run
|
||||
# python mailoney.py -s yahoo.com -t schizo_open_relay -p 12525
|
||||
forward_redirect_25 = 127.0.0.1:12525
|
||||
forward_redirect_587 = 127.0.0.1:12525
|
||||
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Telnet Specific Options
|
||||
# ============================================================================
|
||||
[telnet]
|
||||
|
||||
# Enable Telnet support, disabled by default
|
||||
enabled = true
|
||||
|
||||
# IP addresses to listen for incoming Telnet connections.
|
||||
#
|
||||
# (default: 0.0.0.0) = any IPv4 address
|
||||
#listen_addr = 0.0.0.0
|
||||
# (use :: for listen to all IPv6 and IPv4 addresses)
|
||||
#listen_addr = ::
|
||||
|
||||
|
||||
# Port to listen for incoming Telnet connections.
|
||||
#
|
||||
# (default: 2223)
|
||||
#listen_port = 23
|
||||
|
||||
# Source Port to report in logs (useful if you use iptables to forward ports to Cowrie)
|
||||
reported_port = 23
|
||||
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Database logging Specific Options
|
||||
# ============================================================================
|
||||
|
||||
# XMPP Logging
|
||||
# Log to an xmpp server.
|
||||
#
|
||||
#[database_xmpp]
|
||||
#server = sensors.carnivore.it
|
||||
#user = anonymous@sensors.carnivore.it
|
||||
#password = anonymous
|
||||
#muc = dionaea.sensors.carnivore.it
|
||||
#signal_createsession = cowrie-events
|
||||
#signal_connectionlost = cowrie-events
|
||||
#signal_loginfailed = cowrie-events
|
||||
#signal_loginsucceeded = cowrie-events
|
||||
#signal_command = cowrie-events
|
||||
#signal_clientversion = cowrie-events
|
||||
#debug=true
|
||||
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Output Plugins
|
||||
# These provide an extensible mechanism to send audit log entries to third
|
||||
# parties. The audit entries contain information on clients connecting to
|
||||
# the honeypot.
|
||||
# ============================================================================
|
||||
|
||||
|
||||
# JSON based logging module
|
||||
#
|
||||
[output_jsonlog]
|
||||
logfile = log/cowrie.json
|
||||
|
||||
|
||||
# Supports logging to Elasticsearch
|
||||
# This is a simple early release
|
||||
#
|
||||
#[output_elasticsearch]
|
||||
#host = localhost
|
||||
#port = 9200
|
||||
#index = cowrie
|
||||
#type = cowrie
|
||||
|
||||
|
||||
# Send login attemp information to SANS DShield
|
||||
# See https://isc.sans.edu/ssh.html
|
||||
# You must signup for an api key.
|
||||
# Once registered, find your details at: https://isc.sans.edu/myaccount.html
|
||||
#
|
||||
#[output_dshield]
|
||||
#userid = userid_here
|
||||
#auth_key = auth_key_here
|
||||
#batch_size = 100
|
||||
|
||||
|
||||
# Local Syslog output module
|
||||
#
|
||||
# This sends log messages to the local syslog daemon.
|
||||
# Facility can be:
|
||||
# KERN, USER, MAIL, DAEMON, AUTH, LPR, NEWS, UUCP, CRON, SYSLOG and LOCAL0 to LOCAL7.
|
||||
#
|
||||
# Format can be:
|
||||
# text, cef
|
||||
#
|
||||
#[output_localsyslog]
|
||||
#facility = USER
|
||||
#format = text
|
||||
|
||||
|
||||
# Text output
|
||||
# This writes audit log entries to a text file
|
||||
#
|
||||
# Format can be:
|
||||
# text, cef
|
||||
#
|
||||
[output_textlog]
|
||||
logfile = log/cowrie-textlog.log
|
||||
format = text
|
||||
|
||||
|
||||
# MySQL logging module
|
||||
# Database structure for this module is supplied in doc/sql/mysql.sql
|
||||
#
|
||||
# MySQL logging requires extra software: sudo apt-get install libmysqlclient-dev
|
||||
# MySQL logging requires an extra Python module: pip install mysql-python
|
||||
#
|
||||
#[output_mysql]
|
||||
#host = localhost
|
||||
#database = cowrie
|
||||
#username = cowrie
|
||||
#password = secret
|
||||
#port = 3306
|
||||
#debug = false
|
||||
|
||||
# Rethinkdb output module
|
||||
# Rethinkdb output module requires extra Python module: pip install rethinkdb
|
||||
|
||||
#[output_rethinkdblog]
|
||||
#host = 127.0.0.1
|
||||
#port = 28015
|
||||
#table = output
|
||||
#password =
|
||||
#db = cowrie
|
||||
|
||||
# SQLite3 logging module
|
||||
#
|
||||
# Logging to SQLite3 database. To init the database, use the script
|
||||
# doc/sql/sqlite3.sql:
|
||||
# sqlite3 <db_file> < doc/sql/sqlite3.sql
|
||||
#
|
||||
#[output_sqlite]
|
||||
#db_file = cowrie.db
|
||||
|
||||
# MongoDB logging module
|
||||
#
|
||||
# MongoDB logging requires an extra Python module: pip install pymongo
|
||||
#
|
||||
#[output_mongodb]
|
||||
#connection_string = mongodb://username:password@host:port/database
|
||||
#database = dbname
|
||||
|
||||
|
||||
# Splunk SDK output module - Legacy. Requires Splunk API installed
|
||||
# This sends logs directly to Splunk using the Python REST SDK
|
||||
#
|
||||
#[output_splunklegacy]
|
||||
#host = localhost
|
||||
#port = 8889
|
||||
#username = admin
|
||||
#password = password
|
||||
#index = cowrie
|
||||
|
||||
|
||||
# Splunk HTTP Event Collector (HEC) output module
|
||||
# Sends JSON directly to Splunk over HTTPS
|
||||
# mandatory fields: url, token
|
||||
# optional fields: index, source, sourcetype, host
|
||||
#
|
||||
#[output_splunk]
|
||||
#url = https://localhost:8088/services/collector/event
|
||||
#token = 6A0EA6C6-8006-4E39-FC44-C35FF6E561A8
|
||||
#index = cowrie
|
||||
#sourcetype = cowrie
|
||||
#source = cowrie
|
||||
|
||||
|
||||
# HPFeeds
|
||||
#
|
||||
#[output_hpfeeds]
|
||||
#server = hpfeeds.mysite.org
|
||||
#port = 10000
|
||||
#identifier = abc123
|
||||
#secret = secret
|
||||
#debug=false
|
||||
|
||||
|
||||
# VirusTotal output module
|
||||
# You must signup for an api key.
|
||||
#
|
||||
#[output_virustotal]
|
||||
#api_key = 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
||||
#
|
||||
|
||||
#[output_slack]
|
||||
# This will produce a _lot_ of messages - you have been warned....
|
||||
#channel = channel_that_events_should_be_posted_in
|
||||
#token = slack_token_for_your_bot
|
||||
##debug=true
|
||||
|
||||
|
||||
# https://csirtg.io
|
||||
# You must signup for an api key.
|
||||
#
|
||||
#[output_csirtg]
|
||||
#username=wes
|
||||
#feed=scanners
|
||||
#description=random scanning activity
|
||||
#token=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
||||
|
||||
|
||||
#[output_socketlog]
|
||||
#address = 127.0.0.1:9000
|
||||
#timeout = 5
|
1
docker/cowrie/dist/userdb.txt
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
root:0:password
|
BIN
docker/cowrie/doc/dashboard.png
Normal file
After Width: | Height: | Size: 847 KiB |
26
docker/cowrie/docker-compose.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
# T-Pot (Standard)
|
||||
# For docker-compose ...
|
||||
version: '2.1'
|
||||
|
||||
networks:
|
||||
cowrie_local:
|
||||
|
||||
services:
|
||||
|
||||
# Cowrie service
|
||||
cowrie:
|
||||
container_name: cowrie
|
||||
restart: always
|
||||
networks:
|
||||
- cowrie_local
|
||||
cap_add:
|
||||
- NET_BIND_SERVICE
|
||||
ports:
|
||||
- "22:2222"
|
||||
- "23:2223"
|
||||
image: "dtagdevsec/cowrie:1706"
|
||||
volumes:
|
||||
- /data/cowrie/downloads:/home/cowrie/cowrie/dl
|
||||
- /data/cowrie/keys:/home/cowrie/cowrie/etc
|
||||
- /data/cowrie/log:/home/cowrie/cowrie/log
|
||||
- /data/cowrie/log/tty:/home/cowrie/cowrie/log/tty
|
110
docker/dionaea/Dockerfile
Normal file
|
@ -0,0 +1,110 @@
|
|||
FROM debian:stretch-slim
|
||||
MAINTAINER MO
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
|
||||
# Install dependencies and packages
|
||||
RUN apt-get update -y && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
autoconf \
|
||||
automake \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
check \
|
||||
cython3 \
|
||||
git \
|
||||
libcurl4-openssl-dev \
|
||||
libemu-dev \
|
||||
libev-dev \
|
||||
libglib2.0-dev \
|
||||
libloudmouth1-dev \
|
||||
libnetfilter-queue-dev \
|
||||
libnl-3-dev \
|
||||
libpcap-dev \
|
||||
libssl-dev \
|
||||
libtool \
|
||||
libudns-dev \
|
||||
procps \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-bson \
|
||||
python3-yaml && \
|
||||
|
||||
# Get and install dionaea
|
||||
git clone https://github.com/dinotools/dionaea /root/dionaea/ && \
|
||||
cd /root/dionaea && \
|
||||
# git checkout 99e9cfc88cfa8f3715813b18ec7006bca2622d76 && \
|
||||
autoreconf -vi && \
|
||||
./configure \
|
||||
--prefix=/opt/dionaea \
|
||||
--with-python=/usr/bin/python3 \
|
||||
--with-cython-dir=/usr/bin \
|
||||
--enable-ev \
|
||||
--with-ev-include=/usr/include \
|
||||
--with-ev-lib=/usr/lib \
|
||||
--with-emu-lib=/usr/lib/libemu \
|
||||
--with-emu-include=/usr/include \
|
||||
--with-nl-include=/usr/include/libnl3 \
|
||||
--with-nl-lib=/usr/lib \
|
||||
--enable-static && \
|
||||
make && \
|
||||
make install && \
|
||||
|
||||
# Setup user and groups
|
||||
addgroup --gid 2000 dionaea && \
|
||||
adduser --system --no-create-home --shell /bin/bash --uid 2000 --disabled-password --disabled-login --gid 2000 dionaea && \
|
||||
|
||||
# Supply configs and set permissions
|
||||
chown -R dionaea:dionaea /opt/dionaea/var && \
|
||||
rm -rf /opt/dionaea/etc/dionaea/* && \
|
||||
mv /root/dist/etc/* /opt/dionaea/etc/dionaea/ && \
|
||||
|
||||
# Setup runtime and clean up
|
||||
apt-get purge -y \
|
||||
autoconf \
|
||||
automake \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
check \
|
||||
cython3 \
|
||||
git \
|
||||
libcurl4-openssl-dev \
|
||||
libemu-dev \
|
||||
libev-dev \
|
||||
libglib2.0-dev \
|
||||
libloudmouth1-dev \
|
||||
libnetfilter-queue-dev \
|
||||
libnl-3-dev \
|
||||
libpcap-dev \
|
||||
libssl-dev \
|
||||
libtool \
|
||||
libudns-dev \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-bson \
|
||||
python3-yaml && \
|
||||
|
||||
apt-get install -y \
|
||||
ca-certificates \
|
||||
python3 \
|
||||
python3-bson \
|
||||
python3-yaml \
|
||||
libcurl3 \
|
||||
libemu2 \
|
||||
libev4 \
|
||||
libglib2.0-0 \
|
||||
libnetfilter-queue1 \
|
||||
libnl-3-200 \
|
||||
libpcap0.8 \
|
||||
libpython3.5 \
|
||||
libudns0 && \
|
||||
|
||||
apt-get autoremove --purge -y && \
|
||||
apt-get clean && \
|
||||
rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Start dionaea
|
||||
CMD ["/opt/dionaea/bin/dionaea", "-u", "dionaea", "-g", "dionaea", "-c", "/opt/dionaea/etc/dionaea/dionaea.cfg"]
|
674
docker/dionaea/LICENSE
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) {year} {name of author}
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
{project} Copyright (C) {year} {fullname}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
29
docker/dionaea/README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
# dockerized dionaea
|
||||
|
||||
|
||||
[dionaea](https://github.com/DinoTools/dionaea) is a low interaction honeypot with focus on capturing malware.
|
||||
|
||||
This repository contains the necessary files to create a *dockerized* version of dionaea.
|
||||
|
||||
This dockerized version is part of the **[T-Pot community honeypot](http://dtag-dev-sec.github.io/)** of Deutsche Telekom AG.
|
||||
|
||||
The `Dockerfile` contains the blueprint for the dockerized dionaea and will be used to setup the docker image.
|
||||
|
||||
The `dionaea.conf` is tailored to fit the T-Pot environment.
|
||||
|
||||
The `supervisord.conf` is used to start dionaea under supervision of supervisord.
|
||||
|
||||
Using systemd, copy the `systemd/dionaea.service` to `/etc/systemd/system/dionaea.service` and start using
|
||||
|
||||
```
|
||||
systemctl enable dionaea
|
||||
systemctl start dionaea
|
||||
```
|
||||
|
||||
This will make sure that the docker container is started with the appropriate permissions and port mappings. Further, it autostarts during boot.
|
||||
|
||||
By default all data will be stored in `/data/dionaea/` until the honeypot service will be restarted which is by default every 24 hours. If you want to keep data persistently simply edit the ``service`` file, find the line that contains ``clean.sh`` and set the option from ``off`` to ``on``. Be advised to establish some sort of log management if you wish to do so.
|
||||
|
||||
# Dionaea Dashboard
|
||||
|
||||

|
66
docker/dionaea/dist/etc/dionaea.cfg
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
[dionaea]
|
||||
download.dir=/opt/dionaea/var/dionaea/binaries/
|
||||
modules=curl,python,emu
|
||||
processors=filter_streamdumper,filter_emu
|
||||
|
||||
listen.mode=getifaddrs
|
||||
# listen.addresses=127.0.0.1
|
||||
# listen.interfaces=eth0,tap0
|
||||
|
||||
# Country
|
||||
ssl.default.c=CN
|
||||
# Common Name/domain name
|
||||
ssl.default.cn=
|
||||
# Organization
|
||||
ssl.default.o=
|
||||
# Organizational Unit
|
||||
ssl.default.ou=
|
||||
|
||||
[logging]
|
||||
#default.filename=/opt/dionaea/var/dionaea/dionaea.log
|
||||
#default.levels=all
|
||||
#default.domains=*
|
||||
|
||||
errors.filename=/opt/dionaea/var/dionaea/dionaea-errors.log
|
||||
errors.levels=warning,error
|
||||
errors.domains=*
|
||||
|
||||
[processor.filter_streamdumper]
|
||||
name=filter
|
||||
config.allow.0.types=accept
|
||||
config.allow.1.types=connect
|
||||
config.allow.1.protocols=ftpctrl
|
||||
config.deny.0.protocols=ftpdata,ftpdatacon,xmppclient
|
||||
next=streamdumper
|
||||
|
||||
[processor.streamdumper]
|
||||
name=streamdumper
|
||||
config.path=/opt/dionaea/var/dionaea/bistreams/%Y-%m-%d/
|
||||
|
||||
[processor.filter_emu]
|
||||
name=filter
|
||||
config.allow.0.protocols=smbd,epmapper,nfqmirrord,mssqld
|
||||
next=emu
|
||||
|
||||
[processor.emu]
|
||||
name=emu
|
||||
config.limits.files=3
|
||||
#512 * 1024
|
||||
config.limits.filesize=524288
|
||||
config.limits.sockets=3
|
||||
config.limits.sustain=120
|
||||
config.limits.idle=30
|
||||
config.limits.listen=30
|
||||
config.limits.cpu=120
|
||||
#// 1024 * 1024 * 1024
|
||||
config.limits.steps=1073741824
|
||||
|
||||
[module.nl]
|
||||
# set to yes in case you are interested in the mac address of the remote (only works for lan)
|
||||
lookup_ethernet_addr=yes
|
||||
|
||||
[module.python]
|
||||
imports=dionaea.log,dionaea.services,dionaea.ihandlers
|
||||
sys_paths=default
|
||||
service_configs=/opt/dionaea/etc/dionaea/services/*.yaml
|
||||
ihandler_configs=/opt/dionaea/etc/dionaea/ihandlers/*.yaml
|
1
docker/dionaea/dist/etc/ihandlers/cmdshell.yaml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
- name: cmdshell
|
1
docker/dionaea/dist/etc/ihandlers/emuprofile.yaml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
- name: emuprofile
|
10
docker/dionaea/dist/etc/ihandlers/ftp.yaml
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
# ftp client section
|
||||
- name: ftp
|
||||
config:
|
||||
# host for active ftp via NAT
|
||||
# * 0.0.0.0 - the initiating connection ip is used for active ftp
|
||||
# * not 0.0.0.0 - gets resolved as hostname and used
|
||||
active_host: "0.0.0.0"
|
||||
|
||||
# ports for active ftp; string indicating a range
|
||||
active_ports: 63001-64000
|
7
docker/dionaea/dist/etc/ihandlers/log_json.yaml
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
- name: log_json
|
||||
config:
|
||||
# Uncomment next line to flatten object lists to work with ELK
|
||||
flat_data: true
|
||||
handlers:
|
||||
#- http://127.0.0.1:8080/
|
||||
- file:///opt/dionaea/var/log/dionaea.json
|
3
docker/dionaea/dist/etc/ihandlers/log_sqlite.yaml
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
- name: log_sqlite
|
||||
config:
|
||||
file: /opt/dionaea/var/log/dionaea.sqlite
|
1
docker/dionaea/dist/etc/ihandlers/store.yaml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
- name: store
|
1
docker/dionaea/dist/etc/ihandlers/tftp_download.yaml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
- name: tftp_download
|
1
docker/dionaea/dist/etc/services/epmap.yaml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
- name: epmap
|
5
docker/dionaea/dist/etc/services/ftp.yaml
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
- name: ftp
|
||||
config:
|
||||
root: /opt/dionaea/var/dionaea/roots/ftp
|
||||
response_messages:
|
||||
welcome_msg: 220 FTP server ready.
|
17
docker/dionaea/dist/etc/services/http.yaml
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
- name: http
|
||||
config:
|
||||
root: "/opt/dionaea/var/dionaea/roots/www"
|
||||
ports:
|
||||
- 80
|
||||
ssl_ports:
|
||||
- 443
|
||||
max_request_size: 32768 # maximum size in kbytes of the request (32MB)
|
||||
global_headers:
|
||||
- ["Server", "nginx"]
|
||||
headers:
|
||||
- filename_pattern: ".*\\.php"
|
||||
headers:
|
||||
- ["Content-Type", "text/html; charset=utf-8"]
|
||||
- ["Content-Length", "{content_length}"]
|
||||
- ["Connection", "{connection}"]
|
||||
- ["X-Powered-By", "PHP/5.6"]
|
1
docker/dionaea/dist/etc/services/mirror.yaml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
- name: mirror
|
1
docker/dionaea/dist/etc/services/mongo.yaml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
- name: mongo
|
1
docker/dionaea/dist/etc/services/mqtt.yaml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
- name: mqtt
|
1
docker/dionaea/dist/etc/services/mssql.yaml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
- name: mssql
|
10
docker/dionaea/dist/etc/services/mysql.yaml
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
- name: mysql
|
||||
config:
|
||||
databases:
|
||||
information_schema:
|
||||
path: ":memory:"
|
||||
# example how to extend this
|
||||
# just provide a databasename and path to the database
|
||||
# the database can be altered by attackers, so ... better use a copy
|
||||
# psn:
|
||||
# path: "/path/to/cc_info.sqlite"
|
26
docker/dionaea/dist/etc/services/pptp.yaml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
- name: pptp
|
||||
config:
|
||||
# Cisco PIX
|
||||
# firmware_revision: 4608
|
||||
# hostname:
|
||||
# vendor_name: Cisco Systems
|
||||
|
||||
# DrayTek
|
||||
# firmware: 1
|
||||
# hostname: Vigor
|
||||
# vendor_name: DrayTek
|
||||
|
||||
# Linux
|
||||
firmware: 1
|
||||
hostname: local
|
||||
vendor_name: linux
|
||||
|
||||
# Windows
|
||||
# firmware_revision: 0
|
||||
# hostname:
|
||||
# vendor_name: Microsoft
|
||||
|
||||
# MikroTik router
|
||||
# firmware_revision: 1
|
||||
# hostname: MikroTik
|
||||
# vendor_name: MikroTik
|
40
docker/dionaea/dist/etc/services/sip.yaml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
- name: sip
|
||||
config:
|
||||
udp_ports:
|
||||
- 5060
|
||||
tcp_ports:
|
||||
- 5060
|
||||
tls_ports:
|
||||
- 5061
|
||||
users: "/opt/dionaea/var/dionaea/sipaccounts.sqlite"
|
||||
rtp:
|
||||
enable: true
|
||||
# how to dump the rtp stream
|
||||
# bistream = dump as bistream
|
||||
modes:
|
||||
- bistream
|
||||
- pcap
|
||||
pcap:
|
||||
path: "var/dionaea/rtp/{personality}/%Y-%m-%d/"
|
||||
filename: "%H:%M:%S_{remote_host}_{remote_port}_in.pcap"
|
||||
personalities:
|
||||
default:
|
||||
domain: "localhost"
|
||||
name: "softphone"
|
||||
personality: "generic"
|
||||
# next-server:
|
||||
# domain: "my-domain"
|
||||
# name: "my server"
|
||||
# personality: "generic"
|
||||
# serve: ["10.0.0.1"]
|
||||
# default_sdp: "default"
|
||||
# handle: ["REGISTER", "INVITE", "BYE", "CANCEL", "ACK"]
|
||||
|
||||
actions:
|
||||
bank-redirect:
|
||||
do: "redirect"
|
||||
params:
|
||||
play-hello:
|
||||
do: "play"
|
||||
params:
|
||||
file: "var/dionaea/.../file.ext"
|
57
docker/dionaea/dist/etc/services/smb.yaml
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
- name: smb
|
||||
config:
|
||||
|
||||
## Generic setting ##
|
||||
|
||||
# 1:"Windows XP Service Pack 0/1",
|
||||
# 2:"Windows XP Service Pack 2",
|
||||
# 3:"Windows XP Service Pack 3",
|
||||
# 4:"Windows 7 Service Pack 1",
|
||||
# 5:"Linux Samba 4.3.11"
|
||||
os_type: 4
|
||||
|
||||
# Additional config
|
||||
primary_domain: WORKGROUP
|
||||
oem_domain_name: WORKGROUP
|
||||
server_name: WIN_SRV
|
||||
|
||||
## Windows 7 ##
|
||||
native_os: Windows 7 Professional 7600
|
||||
native_lan_manager: Windows 7 Professional 6.1
|
||||
shares:
|
||||
ADMIN$:
|
||||
comment: Remote Admin
|
||||
path: C:\\Windows
|
||||
type: disktree
|
||||
C$:
|
||||
coment: Default Share
|
||||
path: C:\\
|
||||
type:
|
||||
- disktree
|
||||
- special
|
||||
IPC$:
|
||||
comment: Remote IPC
|
||||
type: ipc
|
||||
Printer:
|
||||
comment: Microsoft XPS Document Writer
|
||||
type: printq
|
||||
|
||||
## Samba ##
|
||||
# native_os: Windows 6.1
|
||||
# native_lan_manager: Samba 4.3.11
|
||||
# shares:
|
||||
# admin:
|
||||
# comment: Remote Admin
|
||||
# path: \\home\\admin
|
||||
# type: disktree
|
||||
# share:
|
||||
# coment: Default Share
|
||||
# path: \\share
|
||||
# type: disktree
|
||||
# IPC$:
|
||||
# comment: Remote IPC
|
||||
# path: IPC Service
|
||||
# type: ipc
|
||||
# Printer:
|
||||
# comment: Printer Drivers
|
||||
# type: printq
|
3
docker/dionaea/dist/etc/services/tftp.yaml
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
- name: tftp
|
||||
config:
|
||||
root: /opt/dionaea/var/dionaea/roots/tftp
|
28
docker/dionaea/dist/etc/services/upnp.yaml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
- name: upnp
|
||||
config:
|
||||
root: /opt/dionaea/var/dionaea/roots/upnp
|
||||
# maximum size in kbytes of the request (32MB)
|
||||
max_request_size: 32768
|
||||
personality:
|
||||
# default
|
||||
cache: "CACHE-CONTROL: max-age=120\r\n"
|
||||
st: "ST: upnp:rootdevice\r\n"
|
||||
usn: "USN: uuid:Upnp-IPMI-1_0-1234567890001::upnp:rootdevice\r\n"
|
||||
server: "SERVER: Linux/2.6.17.WB_WPCM450.1.3 UPnP/1.0, Intel SDK for UPnP devices/1.3.1\r\n"
|
||||
location: "LOCATION: http://192.168.0.1:49152/IPMIdevicedesc.xml\r\n"
|
||||
opt: "OPT: http://schemas.upnp.org/upnp/1/0/\r\n"
|
||||
# # Samsung TV
|
||||
# cache: "CACHE-CONTROL: max-age=900\r\n"
|
||||
# st: "ST: uuid:c1fd12b2-d954-4dba-9e92-a697e1558fb4\r\n"
|
||||
# usn: "USN: uuid:c1fd12b2-d954-4dba-9e92-a697e1558fb4\r\n"
|
||||
# server: "SERVER: SHP, UPnP/1.0, Samsung UPnP SDK/1.0\r\n"
|
||||
# location: "LOCATION: http://192.168.0.10:7677/MainTVServer2\r\n"
|
||||
# opt: "OPT: http://schemas.upnp.org/upnp/1/0/\r\n"
|
||||
#
|
||||
# # XBOX 360
|
||||
# cache: "CACHE-CONTROL: max-age=1800\r\n"
|
||||
# st: "ST: urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1\r\n"
|
||||
# usn: "USN: uuid:531c567a-8c46-4201-bcd4-09afa554d859::urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1\r\n"
|
||||
# server: "SERVER: Microsoft-Windows/6.3 UPnP/1.0 UPnP-Device-Host/1.0\r\n"
|
||||
# location: "LOCATION: http://192.168.0.10:1055/upnphost/udhisapi.dll?content=uuid:531c567a-8c46-4201-bcd4-09afa554d859\r\n"
|
||||
# opt: "OPT: http://schemas.upnp.org/upnp/1/0/\r\n"
|
BIN
docker/dionaea/doc/dashboard.png
Normal file
After Width: | Height: | Size: 621 KiB |
46
docker/dionaea/docker-compose.yml
Normal file
|
@ -0,0 +1,46 @@
|
|||
# T-Pot (Standard)
|
||||
# For docker-compose ...
|
||||
version: '2.1'
|
||||
|
||||
networks:
|
||||
dionaea_local:
|
||||
|
||||
services:
|
||||
|
||||
# Dionaea service
|
||||
dionaea:
|
||||
container_name: dionaea
|
||||
stdin_open: true
|
||||
restart: always
|
||||
networks:
|
||||
- dionaea_local
|
||||
cap_add:
|
||||
- NET_BIND_SERVICE
|
||||
ports:
|
||||
- "20:20"
|
||||
- "21:21"
|
||||
- "42:42"
|
||||
- "69:69/udp"
|
||||
- "8081:80"
|
||||
- "135:135"
|
||||
- "443:443"
|
||||
- "445:445"
|
||||
- "1433:1433"
|
||||
- "1723:1723"
|
||||
- "1883:1883"
|
||||
- "1900:1900/udp"
|
||||
- "3306:3306"
|
||||
- "5060:5060"
|
||||
- "5060:5060/udp"
|
||||
- "5061:5061"
|
||||
- "27017:27017"
|
||||
image: "dtagdevsec/dionaea:1706"
|
||||
volumes:
|
||||
- /data/dionaea/roots/ftp:/opt/dionaea/var/dionaea/roots/ftp
|
||||
- /data/dionaea/roots/tftp:/opt/dionaea/var/dionaea/roots/tftp
|
||||
- /data/dionaea/roots/www:/opt/dionaea/var/dionaea/roots/www
|
||||
- /data/dionaea/roots/upnp:/opt/dionaea/var/dionaea/roots/upnp
|
||||
- /data/dionaea:/opt/dionaea/var/dionaea
|
||||
- /data/dionaea/binaries:/opt/dionaea/var/dionaea/binaries
|
||||
- /data/dionaea/log:/opt/dionaea/var/log
|
||||
- /data/dionaea/rtp:/opt/dionaea/var/dionaea/rtp
|
30
docker/elasticpot/Dockerfile
Normal file
|
@ -0,0 +1,30 @@
|
|||
FROM alpine
|
||||
MAINTAINER MS/MO
|
||||
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
|
||||
# Install packages
|
||||
RUN apk -U upgrade && \
|
||||
apk add bash python3 git && \
|
||||
pip3 install --upgrade pip && \
|
||||
pip3 install bottle requests configparser datetime && \
|
||||
mkdir -p /opt && \
|
||||
cd /opt/ && \
|
||||
git clone https://github.com/schmalle/ElasticpotPY.git && \
|
||||
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 elasticpot && \
|
||||
adduser -S -H -s /bin/bash -u 2000 -D -g 2000 elasticpot && \
|
||||
mv /root/dist/elasticpot.cfg /opt/ElasticpotPY/ && \
|
||||
mkdir /opt/ElasticpotPY/log && \
|
||||
|
||||
# Clean up
|
||||
apk del git && \
|
||||
rm -rf /root/* && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# Start elasticpot
|
||||
USER elasticpot
|
||||
WORKDIR /opt/ElasticpotPY/
|
||||
CMD ["/usr/bin/python3","main.py"]
|
27
docker/elasticpot/README.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# dockerized elasticpot
|
||||
|
||||
|
||||
[elasticpot](https://github.com/schmalle/ElasticPot) elasticpot is a simple elastic search honeypot.
|
||||
|
||||
This repository contains the necessary files to create a *dockerized* version of elasticpot.
|
||||
|
||||
This dockerized version is part of the **[T-Pot community honeypot](http://dtag-dev-sec.github.io/)** of Deutsche Telekom AG.
|
||||
|
||||
The `Dockerfile` contains the blueprint for the dockerized elasticpot and will be used to setup the docker image.
|
||||
|
||||
The `supervisord.conf` is used to start elasticpot under supervision of supervisord.
|
||||
|
||||
Using systemd, copy the `systemd/elasticpot.service` to `/etc/systemd/system/elasticpot.service` and start using
|
||||
|
||||
```
|
||||
systemctl enable elasticpot
|
||||
systemctl start elasticpot
|
||||
```
|
||||
|
||||
This will make sure that the docker container is started with the appropriate permissions and port mappings. Further, it autostarts during boot.
|
||||
|
||||
By default all data will be stored in `/data/elasticpot/` until the honeypot service will be restarted which is by default every 24 hours. If you want to keep data persistently simply edit the ``service`` file, find the line that contains ``clean.sh`` and set the option from ``off`` to ``on``. Be advised to establish some sort of log management if you wish to do so.
|
||||
|
||||
# ElasticPot Dashboard
|
||||
|
||||

|
31
docker/elasticpot/dist/elasticpot.cfg
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
# ElasticPot Config
|
||||
|
||||
[MAIN]
|
||||
# Manually set the externally accessible IP of the honeypot
|
||||
ip = 192.168.1.1
|
||||
|
||||
|
||||
[ELASTICPOT]
|
||||
# ID pf the elasticpot instance
|
||||
nodeid = elasticpot-community-01
|
||||
|
||||
# Location of the json logfile
|
||||
logfile = log/elasticpot.log
|
||||
|
||||
# Set elasticpot = False to disable json logging and enable automatic attack submission to ews backend (soap)
|
||||
elasticpot = True
|
||||
|
||||
|
||||
[EWS]
|
||||
# Note: Only relevant if "elasticpot = False"
|
||||
# Username for ews submission
|
||||
username = community-01-user
|
||||
|
||||
# Token for ews submission
|
||||
token = foth{a5maiCee8fineu7
|
||||
|
||||
# API endpoint for ews submission
|
||||
rhost_first = https://community.sicherheitstacho.eu/ews-0.1/alert/postSimpleMessage
|
||||
|
||||
# Ignore certificate warnings
|
||||
ignorecert = false
|
BIN
docker/elasticpot/doc/dashboard.png
Normal file
After Width: | Height: | Size: 472 KiB |
18
docker/elasticpot/docker-compose.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
version: '2.1'
|
||||
|
||||
networks:
|
||||
elasticpot_local:
|
||||
|
||||
services:
|
||||
|
||||
# Elasticpot service
|
||||
elasticpot:
|
||||
container_name: elasticpot
|
||||
restart: always
|
||||
networks:
|
||||
- elasticpot_local
|
||||
ports:
|
||||
- "9200:9200"
|
||||
image: "dtagdevsec/elasticpot:1706"
|
||||
volumes:
|
||||
- /data/elasticpot/log:/opt/ElasticpotPY/log
|
674
docker/elk/LICENSE
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) {year} {name of author}
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
{project} Copyright (C) {year} {fullname}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
33
docker/elk/README.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# dockerized elk stack
|
||||
|
||||
|
||||
[elk](http://www.elasticsearch.org/overview/) is a stack combining elasticsearch, logstash and the kibana dashboard. It is used to structure and vizualize data in realtime.
|
||||
|
||||
This repository contains the necessary files to create a *dockerized* version of the elk stack.
|
||||
|
||||
This dockerized version is part of the **[T-Pot community honeypot](http://dtag-dev-sec.github.io/)** of Deutsche Telekom AG.
|
||||
|
||||
The `Dockerfile` contains the blueprint for the dockerized elk stack and will be used to setup the docker image.
|
||||
|
||||
Further, `elasticsearch.yml`, `logstash.conf`, `elkbase.tar.gz`, `elk.ico` and `kibana.svg`, are all tailored to fit the T-Pot environment.
|
||||
|
||||
The `supervisord.conf` is used to start elk under supervision of supervisord.
|
||||
|
||||
Using systemd, copy the `systemd/elk.service` to `/etc/systemd/system/elk.service` and start using
|
||||
|
||||
```
|
||||
systemctl enable elk
|
||||
systemctl start elk
|
||||
```
|
||||
|
||||
This will make sure that the docker container is started with the appropriate permissions and port mappings. Further, it autostarts during boot.
|
||||
|
||||
Starting with T-Pot 16.10 you can simply access the kibana dashboard by browsing to ``https://<your.ip>:64297`` and enter your web user credentials.
|
||||
|
||||
Note: The kibana dashboard can be customized to fit your needs.
|
||||
|
||||
By default all data will be persistently stored in `/data/elk/`. Indexed events older than 90 days will be deleted. You can adjust this behavior in `/etc/crontab` to fit your needs, but be advised to provide enough RAM and free disk-space if you wish to do so.
|
||||
|
||||
# T-Pot Dashboard
|
||||
|
||||

|
BIN
docker/elk/doc/dashboard.png
Normal file
After Width: | Height: | Size: 910 KiB |
36
docker/elk/elasticsearch/Dockerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
FROM alpine
|
||||
MAINTAINER MO
|
||||
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
|
||||
# Setup env and apt
|
||||
RUN apk -U upgrade && \
|
||||
apk add bash curl openjdk8-jre procps wget && \
|
||||
|
||||
# Get and install packages
|
||||
cd /root/dist/ && \
|
||||
mkdir -p /usr/share/elasticsearch/ && \
|
||||
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.1.tar.gz && \
|
||||
tar xvfz elasticsearch-5.6.1.tar.gz --strip-components=1 -C /usr/share/elasticsearch/ && \
|
||||
|
||||
# Add and move files
|
||||
cd /root/dist/ && \
|
||||
mkdir -p /usr/share/elasticsearch/config && \
|
||||
cp elasticsearch.yml /usr/share/elasticsearch/config/ && \
|
||||
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 elasticsearch && \
|
||||
adduser -S -H -s /bin/bash -u 2000 -D -g 2000 elasticsearch && \
|
||||
chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/ && \
|
||||
|
||||
# Clean up
|
||||
apk del wget && \
|
||||
rm -rf /root/*
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9200/_cat/health'
|
||||
|
||||
# Start ELK
|
||||
USER elasticsearch
|
||||
CMD ["/usr/share/elasticsearch/bin/elasticsearch"]
|
8
docker/elk/elasticsearch/dist/elasticsearch.yml
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
cluster.name: tpotcluster
|
||||
node.name: "tpotcluster-node-01"
|
||||
path:
|
||||
logs: /data/elk/log
|
||||
data: /data/elk/data
|
||||
http.host: 0.0.0.0
|
||||
http.cors.enabled: true
|
||||
http.cors.allow-origin: "*"
|
32
docker/elk/head/Dockerfile
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Elasticsearch-head Dockerfile by MO
|
||||
#
|
||||
# VERSION 17.06
|
||||
FROM alpine
|
||||
MAINTAINER MO
|
||||
|
||||
# Setup env and apt
|
||||
RUN apk -U upgrade && \
|
||||
apk add bash curl nodejs nodejs-npm git procps && \
|
||||
|
||||
# Get and install packages
|
||||
mkdir -p /usr/src/app/ && \
|
||||
cd /usr/src/app/ && \
|
||||
git clone https://github.com/mobz/elasticsearch-head . && \
|
||||
npm install http-server && \
|
||||
sed -i 's/\"http\:\/\/localhost\:9200\"/\"https\:\/\/\<FQDN\>\:64297\/es\/\"/' /usr/src/app/_site/app.js && \
|
||||
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 head && \
|
||||
adduser -S -H -s /bin/bash -u 2000 -D -g 2000 head && \
|
||||
chown -R head:head /usr/src/app/ && \
|
||||
|
||||
# Clean up
|
||||
apk del git
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9100'
|
||||
|
||||
# Start elasticsearch-head
|
||||
USER head
|
||||
WORKDIR /usr/src/app
|
||||
CMD ["node_modules/http-server/bin/http-server", "_site", "-p", "9100"]
|
52
docker/elk/kibana/Dockerfile
Normal file
|
@ -0,0 +1,52 @@
|
|||
FROM alpine
|
||||
MAINTAINER MO
|
||||
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
|
||||
# Setup env and apt
|
||||
RUN apk -U upgrade && \
|
||||
apk add bash curl nodejs procps wget && \
|
||||
|
||||
# Get and install packages
|
||||
cd /root/dist/ && \
|
||||
mkdir -p /usr/share/kibana/ && \
|
||||
wget https://artifacts.elastic.co/downloads/kibana/kibana-5.6.1-linux-x86_64.tar.gz && \
|
||||
tar xvfz kibana-5.6.1-linux-x86_64.tar.gz --strip-components=1 -C /usr/share/kibana/ && \
|
||||
|
||||
# Kibana's bundled node does not work in alpine
|
||||
rm /usr/share/kibana/node/bin/node && \
|
||||
rm /usr/share/kibana/node/bin/npm && \
|
||||
ln -s /usr/bin/node /usr/share/kibana/node/bin/node && \
|
||||
ln -s /usr/bin/npm /usr/share/kibana/node/bin/npm && \
|
||||
|
||||
# Add and move files
|
||||
cd /root/dist/ && \
|
||||
cp kibana.svg /usr/share/kibana/src/ui/public/images/kibana.svg && \
|
||||
cp kibana.svg /usr/share/kibana/src/ui/public/icons/kibana.svg && \
|
||||
cp elk.ico /usr/share/kibana/src/ui/public/assets/favicons/favicon.ico && \
|
||||
cp elk.ico /usr/share/kibana/src/ui/public/assets/favicons/favicon-16x16.png && \
|
||||
cp elk.ico /usr/share/kibana/src/ui/public/assets/favicons/favicon-32x32.png && \
|
||||
cp create_kibana_index.js /usr/share/kibana/src/core_plugins/elasticsearch/lib/ && \
|
||||
cd / && \
|
||||
|
||||
# Setup user, groups and configs
|
||||
sed -i 's/#server.basePath: ""/server.basePath: "\/kibana"/' /usr/share/kibana/config/kibana.yml && \
|
||||
sed -i 's/#kibana.defaultAppId: "discover"/kibana.defaultAppId: "dashboards"/' /usr/share/kibana/config/kibana.yml && \
|
||||
sed -i 's/#server.host: "localhost"/server.host: "0.0.0.0"/' /usr/share/kibana/config/kibana.yml && \
|
||||
sed -i 's/#elasticsearch.url: "http:\/\/localhost:9200"/elasticsearch.url: "http:\/\/elasticsearch:9200"/' /usr/share/kibana/config/kibana.yml && \
|
||||
/usr/share/kibana/bin/kibana 2>&1 | grep -m 1 "Optimization of bundles" && \
|
||||
addgroup -g 2000 kibana && \
|
||||
adduser -S -H -s /bin/bash -u 2000 -D -g 2000 kibana && \
|
||||
chown -R kibana:kibana /usr/share/kibana/ && \
|
||||
|
||||
# Clean up
|
||||
apk del wget && \
|
||||
rm -rf /root/*
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:5601'
|
||||
|
||||
# Start kibana
|
||||
USER kibana
|
||||
CMD ["/usr/share/kibana/bin/kibana"]
|
176
docker/elk/kibana/dashboard/es_kibana.json
Normal file
1
docker/elk/kibana/dashboard/kibana-patterns.json
Normal file
38
docker/elk/kibana/dist/create_kibana_index.js
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
'use strict';
|
||||
|
||||
var _setup_error = require('./setup_error');
|
||||
|
||||
var _setup_error2 = _interopRequireDefault(_setup_error);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
module.exports = function (server, mappings) {
|
||||
var _server$plugins$elast = server.plugins.elasticsearch.getCluster('admin');
|
||||
|
||||
const callWithInternalUser = _server$plugins$elast.callWithInternalUser;
|
||||
|
||||
const index = server.config().get('kibana.index');
|
||||
|
||||
function handleError(message) {
|
||||
return function (err) {
|
||||
throw new _setup_error2.default(server, message, err);
|
||||
};
|
||||
}
|
||||
|
||||
return callWithInternalUser('indices.create', {
|
||||
index: index,
|
||||
body: {
|
||||
settings: {
|
||||
number_of_shards: 1,
|
||||
number_of_replicas: 0,
|
||||
'index.mapper.dynamic': false
|
||||
},
|
||||
mappings
|
||||
}
|
||||
}).catch(handleError('Unable to create Kibana index "<%= kibana.index %>"')).then(function () {
|
||||
return callWithInternalUser('cluster.health', {
|
||||
waitForStatus: 'yellow',
|
||||
index: index
|
||||
}).catch(handleError('Waiting for Kibana index "<%= kibana.index %>" to come online failed.'));
|
||||
});
|
||||
};
|
Before Width: | Height: | Size: 805 B After Width: | Height: | Size: 805 B |
64
docker/elk/kibana/dist/kibana.svg
vendored
Normal file
After Width: | Height: | Size: 7 KiB |
BIN
docker/elk/kibana/elkbase.tgz
Normal file
38
docker/elk/logstash/Dockerfile
Normal file
|
@ -0,0 +1,38 @@
|
|||
FROM alpine
|
||||
MAINTAINER MO
|
||||
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
|
||||
# Setup env and apt
|
||||
RUN apk -U upgrade && \
|
||||
apk add bash curl git libc6-compat libzmq openjdk8-jre procps wget && \
|
||||
|
||||
# Get and install packages
|
||||
git clone https://github.com/dtag-dev-sec/listbot /etc/listbot && \
|
||||
cd /root/dist/ && \
|
||||
mkdir -p /usr/share/logstash/ && \
|
||||
wget https://artifacts.elastic.co/downloads/logstash/logstash-5.6.1.tar.gz && \
|
||||
wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz && \
|
||||
tar xvfz logstash-5.6.1.tar.gz --strip-components=1 -C /usr/share/logstash/ && \
|
||||
/usr/share/logstash/bin/logstash-plugin install logstash-filter-translate && \
|
||||
/usr/share/logstash/bin/logstash-plugin install logstash-output-syslog && \
|
||||
tar xvfz GeoLite2-ASN.tar.gz --strip-components=1 -C /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-geoip-4.3.1-java/vendor/ && \
|
||||
|
||||
# Add and move files
|
||||
cd /root/dist/ && \
|
||||
cp update.sh /usr/bin/ && \
|
||||
chmod u+x /usr/bin/update.sh && \
|
||||
mkdir -p /etc/logstash/conf.d && \
|
||||
cp logstash.conf /etc/logstash/conf.d/ && \
|
||||
cp elasticsearch-template-es5x.json /usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-7.4.0-java/lib/logstash/outputs/elasticsearch/ && \
|
||||
|
||||
# Clean up
|
||||
apk del wget && \
|
||||
rm -rf /root/*
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9600'
|
||||
|
||||
# Start logstash
|
||||
CMD update.sh && /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf
|
48
docker/elk/logstash/dist/elasticsearch-template-es5x.json
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"template" : "logstash-*",
|
||||
"version" : 50001,
|
||||
"settings" : {
|
||||
"index.refresh_interval" : "5s",
|
||||
"index.number_of_shards" : "1",
|
||||
"index.number_of_replicas" : "0"
|
||||
},
|
||||
"mappings" : {
|
||||
"_default_" : {
|
||||
"_all" : {"enabled" : true, "norms" : false},
|
||||
"dynamic_templates" : [ {
|
||||
"message_field" : {
|
||||
"path_match" : "message",
|
||||
"match_mapping_type" : "string",
|
||||
"mapping" : {
|
||||
"type" : "text",
|
||||
"norms" : false
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"string_fields" : {
|
||||
"match" : "*",
|
||||
"match_mapping_type" : "string",
|
||||
"mapping" : {
|
||||
"type" : "text", "norms" : false,
|
||||
"fields" : {
|
||||
"keyword" : { "type": "keyword", "ignore_above": 256 }
|
||||
}
|
||||
}
|
||||
}
|
||||
} ],
|
||||
"properties" : {
|
||||
"@timestamp": { "type": "date", "include_in_all": false },
|
||||
"@version": { "type": "keyword", "include_in_all": false },
|
||||
"geoip" : {
|
||||
"dynamic": true,
|
||||
"properties" : {
|
||||
"ip": { "type": "ip" },
|
||||
"location" : { "type" : "geo_point" },
|
||||
"latitude" : { "type" : "half_float" },
|
||||
"longitude" : { "type" : "half_float" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
32
docker/elk/logstash/dist/gen_cve_map.sh
vendored
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
myURL="https://rules.emergingthreats.net/open/suricata-4.0/rules/sid-msg.map"
|
||||
myRULESFILE="sid-msg.map"
|
||||
myCVEMAP="cve.yaml"
|
||||
|
||||
# Clear cve map
|
||||
rm $myCVEMAP
|
||||
|
||||
# Download SID map from ET if server offers newer file
|
||||
wget -N $myURL
|
||||
myRULESCOUNT=$(wc -l < $myRULESFILE)
|
||||
|
||||
# Just extract rules with CVE ID, for proper matching we also need SID
|
||||
let i=0
|
||||
let j=0
|
||||
while read -r myRULE
|
||||
do
|
||||
(( ++i ))
|
||||
echo -ne "Processing rules, please be patient ($i / $myRULESCOUNT)\r"
|
||||
myCVE=$(echo $myRULE | grep -o -E "(cve,|CVE-|CAN-)([0-9]{4}-([0-9]{4}|[0-9]{5}))" | tr a-z A-Z | tr ",|-" " " | awk '{ print $1"-"$2"-"$3 }')
|
||||
if [ "$myCVE" != "" ]
|
||||
then
|
||||
mySID=$(echo $myRULE | awk '{ print $1 }')
|
||||
echo \"$mySID\": \"$myCVE\" >> $myCVEMAP
|
||||
(( ++j ))
|
||||
fi
|
||||
done < "$myRULESFILE"
|
||||
echo
|
||||
echo "Done. $j CVE IDs have been mapped."
|
||||
|
||||
# Clean up
|
||||
rm $myRULESFILE
|
127
docker/elk/logstash/dist/gen_iprep_map.sh
vendored
Executable file
|
@ -0,0 +1,127 @@
|
|||
#!/bin/bash
|
||||
myIPREPMAP="iprep.yaml"
|
||||
myRED="[0;31m"
|
||||
myGREEN="[0;32m"
|
||||
myBLUE="[0;34m"
|
||||
myWHITE="[0;0m"
|
||||
|
||||
# Prepare for new files
|
||||
rm -rf *.raw *.yaml.tmp iprep.yaml
|
||||
|
||||
### Define repeating commands as functions
|
||||
# Download only if host is up, file is newer and follow redirects
|
||||
fuCURL () {
|
||||
local myFILE=$1
|
||||
local myURL=$2
|
||||
local myHOST=$(echo $2 | cut -d "/" -f3)
|
||||
|
||||
echo -n "[ Now checking host ] [$myBLUE $myHOST $myWHITE] "
|
||||
curl --connect-timeout 5 -IsS $myHOST 2>&1>/dev/null
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "[$myGREEN OK $myWHITE]"
|
||||
echo -n "[ Now downloading ] [$myBLUE $myURL $myWHITE] "
|
||||
curl -fLso $myFILE -z $myFILE $myURL
|
||||
if [ $? -eq 0 ];
|
||||
then
|
||||
echo "[$myGREEN OK $myWHITE]"
|
||||
else
|
||||
echo "[$myRED ERROR $myWHITE]"
|
||||
fi
|
||||
else
|
||||
echo "[$myRED ERROR $myWHITE]"
|
||||
fi
|
||||
}
|
||||
|
||||
# Only match lines with CIDR addresses, unzip if necessary
|
||||
# Duplicates will be eliminated for the final translation map!
|
||||
fuMATCHCIDR () {
|
||||
local myFILE=$1
|
||||
|
||||
if [ -f $myFILE ];
|
||||
then
|
||||
myZIP=$(file $myFILE | grep -c "Zip")
|
||||
if [ "$myZIP" == "1" ]
|
||||
then
|
||||
unzip -p $myFILE | grep -o -P "\b(?:\d{1,3}\.){3}\d{1,3}/\d{1,2}\b" | xargs -I '{}' prips '{}'
|
||||
else
|
||||
grep -o -P "\b(?:\d{1,3}\.){3}\d{1,3}/\d{1,2}\b" $myFILE | xargs -I '{}' prips '{}'
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Only match lines with IPv4 addresses, unzip if necessary
|
||||
# Duplicates will be eliminated for the final translation map!
|
||||
fuMATCHIP () {
|
||||
local myFILE=$1
|
||||
|
||||
if [ -f $myFILE ];
|
||||
then
|
||||
myZIP=$(file $myFILE | grep -c "Zip")
|
||||
if [ "$myZIP" == "1" ]
|
||||
then
|
||||
unzip -p $myFILE | grep -o -P "\b(?:\d{1,3}\.){3}\d{1,3}\b"
|
||||
else
|
||||
grep -o -P "\b(?:\d{1,3}\.){3}\d{1,3}\b" $myFILE
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
### Define download function
|
||||
fuDOWNLOAD () {
|
||||
local myURL=$1
|
||||
local myTAG=$2
|
||||
local myTMPFILE="$3.tmp"
|
||||
local myYAMLFILE="$3.raw"
|
||||
|
||||
fuCURL $myTMPFILE $myURL
|
||||
fuMATCHCIDR $myTMPFILE | awk '{ print "\""$1"\": \"" "'"$myTAG"'" "\"" }' > $myYAMLFILE
|
||||
fuMATCHIP $myTMPFILE | awk '{ print "\""$1"\": \"" "'"$myTAG"'" "\"" }' >> $myYAMLFILE
|
||||
mySIZE=$(wc -l < $myYAMLFILE)
|
||||
if [ "$mySIZE" != "0" ]
|
||||
then
|
||||
echo "[ Control output ] [$myBLUE $(head -n 1 $myYAMLFILE) $myWHITE]"
|
||||
else
|
||||
echo "[ Control output ] [$myRED EMPTY FILE $myWHITE]"
|
||||
fi
|
||||
}
|
||||
|
||||
# Download reputation lists
|
||||
fuDOWNLOAD "https://reputation.alienvault.com/reputation.generic" "bad reputation" "alienvault"
|
||||
fuDOWNLOAD "https://www.badips.com/get/list/any/2" "known attacker" "badips"
|
||||
fuDOWNLOAD "http://osint.bambenekconsulting.com/feeds/c2-ipmasterlist.txt" "C2 server" "bambenek"
|
||||
fuDOWNLOAD "https://lists.blocklist.de/lists/all.txt" "known attacker" "blocklist"
|
||||
fuDOWNLOAD "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/botscout_1d.ipset" "form spammer" "firehol_botscout"
|
||||
fuDOWNLOAD "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/cruzit_web_attacks.ipset" "known attacker" "firehol_cruzit"
|
||||
fuDOWNLOAD "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/malwaredomainlist.ipset" "known atttacker" "firehol_mwdomainlist"
|
||||
fuDOWNLOAD "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/proxylists_1d.ipset" "anonymizer" "firehol_proxylists"
|
||||
fuDOWNLOAD "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/proxyrss_1d.ipset" "anonymizer" "firehol_proxyrss"
|
||||
fuDOWNLOAD "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/proxyspy_1d.ipset" "anonymizer" "firehol_proxyspy"
|
||||
fuDOWNLOAD "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/ri_web_proxies_30d.ipset" "anonymizer" "firehol_web_proxies"
|
||||
fuDOWNLOAD "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/socks_proxy_7d.ipset" "anonymizer" "firehol_socks_proxy"
|
||||
fuDOWNLOAD "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/sslproxies_1d.ipset" "anonymizer" "firehol_sslproxies"
|
||||
fuDOWNLOAD "http://danger.rulez.sk/projects/bruteforceblocker/blist.php" "known attacker" "rulez"
|
||||
fuDOWNLOAD "http://cinsscore.com/list/ci-badguys.txt" "known attacker" "cinsscore"
|
||||
fuDOWNLOAD "https://rules.emergingthreats.net/open/suricata/rules/compromised-ips.txt" "compromised" "et_compromised"
|
||||
fuDOWNLOAD "http://blocklist.greensnow.co/greensnow.txt" "known attacker" "greensnow"
|
||||
fuDOWNLOAD "http://www.nothink.org/blacklist/blacklist_malware_irc.txt" "malware" "nothink"
|
||||
fuDOWNLOAD "http://cybersweat.shop/iprep/iprep_ramnode.txt" "known attacker" "cybersweat"
|
||||
fuDOWNLOAD "http://spys.me/proxy.txt" "anonymizer" "spys"
|
||||
fuDOWNLOAD "http://ransomwaretracker.abuse.ch/downloads/RW_IPBL.txt" "ransomware" "ransomwaretracker"
|
||||
fuDOWNLOAD "https://report.cs.rutgers.edu/DROP/attackers" "known attacker" "rutgers"
|
||||
fuDOWNLOAD "http://sblam.com/blacklist.txt" "form spammer" "sblam"
|
||||
fuDOWNLOAD "https://sslbl.abuse.ch/blacklist/sslipblacklist.csv" "C2 server" "sslbl"
|
||||
fuDOWNLOAD "http://www.talosintelligence.com/feeds/ip-filter.blf" "bad reputation" "talos"
|
||||
fuDOWNLOAD "https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=1.1.1.1" "tor exit node" "torexit"
|
||||
fuDOWNLOAD "https://torstatus.blutmagie.de/ip_list_all.php/Tor_ip_list_ALL.csv" "tor exit node" "torip"
|
||||
fuDOWNLOAD "https://www.turris.cz/greylist-data/greylist-latest.csv" "bad reputation" "turris"
|
||||
fuDOWNLOAD "https://zeustracker.abuse.ch/blocklist.php?download=badips" "malware" "zeustracker"
|
||||
fuDOWNLOAD "https://raw.githubusercontent.com/stamparm/maltrail/master/trails/static/mass_scanner.txt" "mass scanner" "maltrail_mass_scanner"
|
||||
fuDOWNLOAD "https://myip.ms/files/blacklist/general/full_blacklist_database.zip" "bot, crawler" "myip"
|
||||
|
||||
# Generate logstash translation map for ip reputation lookup
|
||||
echo -n "[ Building translation map ] "
|
||||
cat *.raw > $myIPREPMAP.tmp
|
||||
# Remove duplicates
|
||||
sort -u $myIPREPMAP.tmp > $myIPREPMAP
|
||||
echo "[$myGREEN DONE $myWHITE]"
|
416
docker/elk/logstash/dist/logstash.conf
vendored
Normal file
|
@ -0,0 +1,416 @@
|
|||
# Input section
|
||||
input {
|
||||
|
||||
# Suricata
|
||||
file {
|
||||
path => ["/data/suricata/log/eve.json"]
|
||||
codec => json
|
||||
type => "Suricata"
|
||||
}
|
||||
|
||||
# P0f
|
||||
file {
|
||||
path => ["/data/p0f/log/p0f.json"]
|
||||
codec => json
|
||||
type => "P0f"
|
||||
}
|
||||
|
||||
# Conpot
|
||||
file {
|
||||
path => ["/data/conpot/log/conpot.json"]
|
||||
codec => json
|
||||
type => "ConPot"
|
||||
}
|
||||
|
||||
# Cowrie
|
||||
file {
|
||||
path => ["/data/cowrie/log/cowrie.json"]
|
||||
codec => json
|
||||
type => "Cowrie"
|
||||
}
|
||||
|
||||
# Dionaea
|
||||
file {
|
||||
path => ["/data/dionaea/log/dionaea.json"]
|
||||
codec => json
|
||||
type => "Dionaea"
|
||||
}
|
||||
|
||||
# Elasticpot
|
||||
file {
|
||||
path => ["/data/elasticpot/log/elasticpot.log"]
|
||||
codec => json
|
||||
type => "ElasticPot"
|
||||
}
|
||||
|
||||
# eMobility
|
||||
file {
|
||||
path => ["/data/emobility/log/centralsystemEWS.log"]
|
||||
type => "eMobility"
|
||||
}
|
||||
|
||||
# Glastopf
|
||||
file {
|
||||
path => ["/data/glastopf/log/glastopf.log"]
|
||||
type => "Glastopf"
|
||||
}
|
||||
|
||||
# Honeytrap
|
||||
file {
|
||||
path => ["/data/honeytrap/log/attackers.json"]
|
||||
codec => json
|
||||
type => "Honeytrap"
|
||||
}
|
||||
|
||||
# Mailoney
|
||||
file {
|
||||
path => ["/data/mailoney/log/commands.log"]
|
||||
type => "Mailoney"
|
||||
}
|
||||
|
||||
# Rdpy
|
||||
file {
|
||||
path => ["/data/rdpy/log/rdpy.log"]
|
||||
type => "Rdpy"
|
||||
}
|
||||
|
||||
# Host Syslog
|
||||
file {
|
||||
path => ["/data/host/log/auth.log"]
|
||||
codec => plain
|
||||
type => "Syslog"
|
||||
}
|
||||
|
||||
# Host NGINX
|
||||
file {
|
||||
path => ["/data/host/log/nginx/access.log"]
|
||||
codec => json
|
||||
type => "NGINX"
|
||||
}
|
||||
|
||||
# Vnclowpot
|
||||
file {
|
||||
path => ["/data/vnclowpot/log/vnclowpot.log"]
|
||||
type => "Vnclowpot"
|
||||
}
|
||||
}
|
||||
|
||||
# Filter Section
|
||||
filter {
|
||||
|
||||
# Suricata
|
||||
if [type] == "Suricata" {
|
||||
date {
|
||||
match => [ "timestamp", "ISO8601" ]
|
||||
}
|
||||
translate {
|
||||
refresh_interval => 86400
|
||||
field => "[alert][signature_id]"
|
||||
destination => "[alert][cve_id]"
|
||||
dictionary_path => "/etc/listbot/cve.yaml"
|
||||
}
|
||||
}
|
||||
|
||||
# P0f
|
||||
if [type] == "P0f" {
|
||||
date {
|
||||
match => [ "timestamp", "yyyy'/'MM'/'dd HH:mm:ss" ]
|
||||
remove_field => ["timestamp"]
|
||||
}
|
||||
mutate {
|
||||
rename => {
|
||||
"server_port" => "dest_port"
|
||||
"server_ip" => "dest_ip"
|
||||
"client_port" => "src_port"
|
||||
"client_ip" => "src_ip"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Conpot
|
||||
if [type] == "ConPot" {
|
||||
date {
|
||||
match => [ "timestamp", "ISO8601" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Cowrie
|
||||
if [type] == "Cowrie" {
|
||||
date {
|
||||
match => [ "timestamp", "ISO8601" ]
|
||||
}
|
||||
mutate {
|
||||
rename => {
|
||||
"dst_port" => "dest_port"
|
||||
"dst_ip" => "dest_ip"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Dionaea
|
||||
if [type] == "Dionaea" {
|
||||
date {
|
||||
match => [ "timestamp", "ISO8601" ]
|
||||
}
|
||||
mutate {
|
||||
rename => {
|
||||
"dst_port" => "dest_port"
|
||||
"dst_ip" => "dest_ip"
|
||||
}
|
||||
gsub => [
|
||||
"src_ip", "::ffff:", "",
|
||||
"dest_ip", "::ffff:", ""
|
||||
]
|
||||
}
|
||||
if [credentials] {
|
||||
mutate {
|
||||
add_field => {
|
||||
"login.username" => "%{[credentials][username]}"
|
||||
"login.password" => "%{[credentials][password]}"
|
||||
}
|
||||
remove_field => "[credentials]"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# ElasticPot
|
||||
if [type] == "ElasticPot" {
|
||||
date {
|
||||
match => [ "timestamp", "ISO8601" ]
|
||||
}
|
||||
}
|
||||
|
||||
# eMobility
|
||||
if [type] == "eMobility" {
|
||||
grok {
|
||||
match => [ "message", "\A%{IP:src_ip}\.%{POSINT:src_port:integer}\|%{IP:dest_ip}\.%{POSINT:dest_port:integer}:%{SPACE}%{SYSLOG5424PRINTASCII}%{SPACE}%{SYSLOG5424PRINTASCII}%{SPACE}%{SYSLOG5424PRINTASCII}%{SPACE}%{SYSLOG5424PRINTASCII}%{SPACE}%{SYSLOG5424PRINTASCII}%{SPACE}%{SYSLOG5424PRINTASCII}%{SPACE}%{SYSLOG5424PRINTASCII}%{SPACE}%{SYSLOG5424PRINTASCII}%{SPACE}%{SYSLOG5424PRINTASCII}%{SPACE}%{SYSLOG5424SD}%{SYSLOG5424PRINTASCII}%{SPACE}%{SYSLOG5424PRINTASCII}%{SPACE}%{SYSLOG5424PRINTASCII}%{SPACE}%{URIPROTO:http_method}\|%{URIPATH:http_uri}\|%{TIMESTAMP_ISO8601:timestamp}" ]
|
||||
}
|
||||
date {
|
||||
match => [ "timestamp", "ISO8601" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Glastopf
|
||||
if [type] == "Glastopf" {
|
||||
grok {
|
||||
match => [ "message", "\A%{TIMESTAMP_ISO8601:timestamp}%{SPACE}%{NOTSPACE}%{SPACE}%{IP:src_ip}%{SPACE}%{WORD}%{SPACE}%{URIPROTO:http_method}%{SPACE}%{NOTSPACE:http_uri}%{SPACE}%{NOTSPACE}%{SPACE}%{HOSTNAME}:%{NUMBER:dest_port:integer}" ]
|
||||
}
|
||||
date {
|
||||
match => [ "timestamp", "yyyy-MM-dd HH:mm:ss,SSS" ]
|
||||
remove_field => ["timestamp"]
|
||||
}
|
||||
}
|
||||
|
||||
# Honeytrap
|
||||
if [type] == "Honeytrap" {
|
||||
date {
|
||||
match => [ "timestamp", "ISO8601" ]
|
||||
}
|
||||
mutate {
|
||||
rename => {
|
||||
"[attack_connection][local_port]" => "dest_port"
|
||||
"[attack_connection][local_ip]" => "dest_ip"
|
||||
"[attack_connection][remote_port]" => "src_port"
|
||||
"[attack_connection][remote_ip]" => "src_ip"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Mailoney
|
||||
if [type] == "Mailoney" {
|
||||
grok {
|
||||
match => [ "message", "\A%{NAGIOSTIME}\[%{IPV4:src_ip}:%{INT:src_port:integer}] %{GREEDYDATA:smtp_input}" ]
|
||||
}
|
||||
mutate {
|
||||
add_field => {
|
||||
"dest_port" => "25"
|
||||
}
|
||||
}
|
||||
date {
|
||||
match => [ "nagios_epoch", "UNIX" ]
|
||||
remove_field => ["nagios_epoch"]
|
||||
}
|
||||
}
|
||||
|
||||
# Rdpy
|
||||
if [type] == "Rdpy" {
|
||||
grok { match => { "message" => [ "\A%{TIMESTAMP_ISO8601:timestamp},domain:%{CISCO_REASON:domain},username:%{CISCO_REASON:username},password:%{CISCO_REASON:password},hostname:%{GREEDYDATA:hostname}", "\A%{TIMESTAMP_ISO8601:timestamp},Connection from %{IPV4:src_ip}:%{INT:src_port:integer}" ] } }
|
||||
date {
|
||||
match => [ "timestamp", "ISO8601" ]
|
||||
remove_field => ["timestamp"]
|
||||
}
|
||||
mutate {
|
||||
add_field => {
|
||||
"dest_port" => "3389"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Syslog
|
||||
if [type] == "Syslog" {
|
||||
grok {
|
||||
match => {
|
||||
"message" => ["%{SYSLOGPAMSESSION}", "%{CRONLOG}", "%{SYSLOGLINE}"]
|
||||
}
|
||||
overwrite => "message"
|
||||
}
|
||||
date {
|
||||
match => [ "timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
|
||||
remove_field => ["timestamp"]
|
||||
}
|
||||
date {
|
||||
match => ["timestamp8601", "ISO8601"]
|
||||
remove_field => ["timestamp8601"]
|
||||
}
|
||||
grok {
|
||||
match => { "message" => "Connection closed by %{IP:src_ip}" }
|
||||
add_tag => [ "ssh_connection_closed" ]
|
||||
tag_on_failure => []
|
||||
}
|
||||
grok {
|
||||
match => { "message" => "Received disconnect from %{IP:src_ip}" }
|
||||
add_tag => [ "ssh_connection_disconnect" ]
|
||||
tag_on_failure => []
|
||||
}
|
||||
grok {
|
||||
match => { "message" => "Failed password for invalid user %{USERNAME:username} from %{IP:src_ip} port %{BASE10NUM:port} ssh2" }
|
||||
add_tag => [ "ssh_failed_password" ]
|
||||
tag_on_failure => []
|
||||
}
|
||||
grok {
|
||||
match => { "message" => "Did not receive identification string from %{IP:src_ip}" }
|
||||
add_tag => [ "ssh_no_id" ]
|
||||
tag_on_failure => []
|
||||
}
|
||||
grok {
|
||||
match => { "message" => "User %{USERNAME:username} from %{IP:src_ip} not allowed because not listed in AllowUsers" }
|
||||
add_tag => [ "ssh_user_not_allowed" ]
|
||||
tag_on_failure => []
|
||||
}
|
||||
grok {
|
||||
match => { "message" => "authentication failure; logname=%{USERNAME:logname} uid=%{BASE10NUM:uid} euid=%{BASE10NUM:euid} tty=%{TTY:tty} ruser=%{USERNAME:ruser} rhost=(?:%{HOSTNAME:remote_host}|\s*) user=%{USERNAME:user}"}
|
||||
add_tag => [ "ssh_auth_failure" ]
|
||||
tag_on_failure => []
|
||||
}
|
||||
grok {
|
||||
match => { "message" => "pam_unix\(sshd:auth\): authentication failure; logname= uid=0 euid=0 tty=%{NOTSPACE:tty} ruser= rhost=(?:%{HOSTNAME:remote_host}|\s*) user=%{USERNAME:user}"}
|
||||
add_tag => [ "ssh_auth_failure" ]
|
||||
tag_on_failure => []
|
||||
}
|
||||
grok {
|
||||
match => { "message" => "Failed password for %{USERNAME:username} from %{IP:src_ip} port %{BASE10NUM:port} ssh2"}
|
||||
add_tag => [ "ssh_failed_password" ]
|
||||
tag_on_failure => []
|
||||
}
|
||||
grok {
|
||||
match => { "message" => "Accepted password for %{USERNAME:username} from %{IP:src_ip} port %{BASE10NUM:port} ssh2"}
|
||||
add_tag => [ "ssh_accepted_password" ]
|
||||
tag_on_failure => []
|
||||
}
|
||||
grok {
|
||||
match => { "message" => "Accepted publickey for %{USERNAME:username} from %{IP:src_ip} port %{BASE10NUM:port} ssh2"}
|
||||
add_tag => [ "ssh_accepted_pubkey" ]
|
||||
tag_on_failure => []
|
||||
}
|
||||
grok {
|
||||
match => { "message" => "Accepted keyboard-interactive/pam for %{USERNAME:username} from %{IP:src_ip} port %{BASE10NUM:port} ssh2"}
|
||||
add_tag => [ "ssh_accepted_interactive" ]
|
||||
tag_on_failure => []
|
||||
}
|
||||
}
|
||||
|
||||
# NGINX
|
||||
if [type] == "NGINX" {
|
||||
date {
|
||||
match => [ "timestamp", "ISO8601" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Vnclowpot
|
||||
if [type] == "Vnclowpot" {
|
||||
grok {
|
||||
match => [ "message", "\A%{NOTSPACE}%{SPACE}%{TIME}%{SPACE}%{IPV4:src_ip}:%{INT:src_port}%{SPACE}%{NOTSPACE:vnc_handshake}" ]
|
||||
}
|
||||
date {
|
||||
match => [ "timestamp", "yyyy/MM/dd HH:mm:ss" ]
|
||||
remove_field => ["timestamp"]
|
||||
}
|
||||
mutate {
|
||||
add_field => {
|
||||
"dest_port" => "5900"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Drop if parse fails
|
||||
if "_grokparsefailure" in [tags] { drop {} }
|
||||
|
||||
# Add geo coordinates / ASN info / IP rep.
|
||||
if [src_ip] {
|
||||
geoip {
|
||||
cache_size => 10000
|
||||
source => "src_ip"
|
||||
database => "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-geoip-4.3.1-java/vendor/GeoLite2-City.mmdb"
|
||||
}
|
||||
geoip {
|
||||
cache_size => 10000
|
||||
source => "src_ip"
|
||||
database => "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-geoip-4.3.1-java/vendor/GeoLite2-ASN.mmdb"
|
||||
}
|
||||
translate {
|
||||
refresh_interval => 86400
|
||||
field => "src_ip"
|
||||
destination => "ip_rep"
|
||||
dictionary_path => "/etc/listbot/iprep.yaml"
|
||||
}
|
||||
}
|
||||
|
||||
# In some rare conditions dest_port, src_port is indexed as string, forcing integer for now
|
||||
if [dest_port] {
|
||||
mutate {
|
||||
convert => { "dest_port" => "integer" }
|
||||
}
|
||||
}
|
||||
if [src_port] {
|
||||
mutate {
|
||||
convert => { "src_port" => "integer" }
|
||||
}
|
||||
}
|
||||
|
||||
# Add T-Pot hostname and external IP
|
||||
if [type] == "ConPot" or [type] == "Cowrie" or [type] == "Dionaea" or [type] == "ElasticPot" or [type] == "eMobility" or [type] == "Glastopf" or [type] == "Honeytrap" or [type] == "Mailoney" or [type] == "Rdpy" or [type] == "Suricata" or [type] == "Vnclowpot" {
|
||||
mutate {
|
||||
add_field => {
|
||||
"t-pot_ip_ext" => "${MY_EXTIP}"
|
||||
"t-pot_ip_int" => "${MY_INTIP}"
|
||||
"t-pot_hostname" => "${MY_HOSTNAME}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Output section
|
||||
output {
|
||||
elasticsearch {
|
||||
hosts => ["elasticsearch:9200"]
|
||||
}
|
||||
|
||||
if [type] == "Suricata" {
|
||||
file {
|
||||
file_mode => 0760
|
||||
path => "/data/suricata/log/suricata_ews.log"
|
||||
}
|
||||
}
|
||||
# Debug output
|
||||
#if [type] == "XYZ" {
|
||||
# stdout {
|
||||
# codec => rubydebug
|
||||
# }
|
||||
#}
|
||||
# Debug output
|
||||
#stdout {
|
||||
# codec => rubydebug
|
||||
#}
|
||||
|
||||
}
|
12
docker/elk/logstash/dist/update.sh
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Let's ensure normal operation on exit or if interrupted ...
|
||||
function fuCLEANUP {
|
||||
exit 0
|
||||
}
|
||||
trap fuCLEANUP EXIT
|
||||
|
||||
# Download updated translation maps
|
||||
cd /etc/listbot
|
||||
git pull
|
||||
cd /
|
32
docker/ews/Dockerfile
Normal file
|
@ -0,0 +1,32 @@
|
|||
FROM alpine
|
||||
MAINTAINER MO
|
||||
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
|
||||
# Install packages
|
||||
RUN apk -U upgrade && \
|
||||
apk add build-base git libssl1.0 openssl-dev python-dev py-cffi py-ipaddress py-lxml py-mysqldb py-pip py-pysqlite py-requests py-setuptools && \
|
||||
pip install pyOpenSSL==16.2.0 && \
|
||||
|
||||
# Setup ewsposter
|
||||
git clone https://github.com/rep/hpfeeds /opt/hpfeeds && \
|
||||
cd /opt/hpfeeds && \
|
||||
python setup.py install && \
|
||||
git clone https://github.com/vorband/ewsposter /opt/ewsposter && \
|
||||
mkdir -p /opt/ewsposter/spool /opt/ewsposter/log && \
|
||||
|
||||
# Setup user and groups
|
||||
addgroup -g 2000 ews && \
|
||||
adduser -S -H -u 2000 -D -g 2000 ews && \
|
||||
|
||||
# Supply configs
|
||||
mv /root/dist/ews.cfg /opt/ewsposter/ && \
|
||||
|
||||
# Clean up
|
||||
apk del build-base git openssl-dev python-dev py-pip py-setuptools && \
|
||||
rm -rf /root/* && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# Run ewsposter
|
||||
CMD sleep 10 && /usr/bin/python /opt/ewsposter/ews.py -l 60
|
14
docker/ews/README.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
[](https://microbadger.com/images/dtagdevsec/ewsposter:1706 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/ewsposter:1706 "Get your own image badge on microbadger.com")
|
||||
|
||||
# dockerized ewsposter
|
||||
|
||||
|
||||
[ewsposter](https://github.com/dtag-dev-sec/ews) is a python application that collects information from multiple honeypot sources and posts it to central collection services like the DTAG early warning system and hpfeeds.
|
||||
|
||||
This dockerized version is part of the **[T-Pot community honeypot](http://github.com/dtag-dev-sec/tpotce)** of Deutsche Telekom AG.
|
||||
|
||||
The `Dockerfile` contains the blueprint for the dockerized ewsposter and will be used to setup the docker image.
|
||||
|
||||
The `ews.cfg` is tailored to fit the T-Pot environment.
|
||||
|
||||
The `supervisord.conf` is used to start ewsposter under supervision of supervisord.
|
|
@ -3,8 +3,8 @@ homedir = /opt/ewsposter/
|
|||
spooldir = /opt/ewsposter/spool/
|
||||
logdir = /opt/ewsposter/log/
|
||||
del_malware_after_send = false
|
||||
send_malware = true
|
||||
sendlimit = 400
|
||||
send_malware = false
|
||||
sendlimit = 500
|
||||
contact = your_email_address
|
||||
proxy =
|
||||
ip =
|
||||
|
@ -27,7 +27,7 @@ secret= 0
|
|||
|
||||
[EWSJSON]
|
||||
json = false
|
||||
jsondir = /data/ews/
|
||||
jsondir = /data/ews/json/
|
||||
|
||||
[GLASTOPFV3]
|
||||
glastopfv3 = true
|
||||
|
@ -45,13 +45,18 @@ mysqlpw =
|
|||
malwaredir =
|
||||
|
||||
[KIPPO]
|
||||
kippo = true
|
||||
nodeid = kippo-community-01
|
||||
mysqlhost = localhost
|
||||
mysqldb = cowrie
|
||||
mysqluser = cowrie
|
||||
mysqlpw = s0m3Secr3T!
|
||||
malwaredir = /data/cowrie/downloads/
|
||||
kippo = false
|
||||
nodeid =
|
||||
mysqlhost =
|
||||
mysqldb =
|
||||
mysqluser =
|
||||
mysqlpw =
|
||||
malwaredir =
|
||||
|
||||
[COWRIE]
|
||||
cowrie = true
|
||||
nodeid = cowrie-community-01
|
||||
logfile = /data/cowrie/log/cowrie.json
|
||||
|
||||
[DIONAEA]
|
||||
dionaea = true
|
||||
|
@ -75,9 +80,19 @@ targetip =
|
|||
[EMOBILITY]
|
||||
eMobility = true
|
||||
nodeid = emobility-community-01
|
||||
logfile = /data/eMobility/log/centralsystemEWS.log
|
||||
logfile = /data/emobility/log/centralsystemEWS.log
|
||||
|
||||
[CONPOT]
|
||||
conpot = true
|
||||
nodeid = conpot-community-01
|
||||
logfile = /data/conpot/log/conpot.json
|
||||
|
||||
[ELASTICPOT]
|
||||
elasticpot = true
|
||||
nodeid = elasticpot-community-01
|
||||
logfile = /data/elasticpot/log/elasticpot.log
|
||||
|
||||
[SURICATA]
|
||||
suricata = true
|
||||
nodeid = suricata-community-01
|
||||
logfile = /data/suricata/log/suricata_ews.log
|
50
docker/glastopf/Dockerfile
Normal file
|
@ -0,0 +1,50 @@
|
|||
FROM alpine
|
||||
MAINTAINER MO
|
||||
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
|
||||
# Install packages
|
||||
RUN apk -U upgrade && \
|
||||
apk add autoconf bash bind-tools build-base cython git libffi libffi-dev make py-asn1 \
|
||||
py-cffi py-chardet py-chardet py-cparser py-cryptography py-dateutil \
|
||||
py-enum34 py-idna py-ipaddress py-jinja2 py-lxml py-mysqldb py-openssl \
|
||||
py-pip py-requests py-setuptools python python-dev && \
|
||||
apk -U add --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
|
||||
py-beautifulsoup4 php7 php7-dev py-cssselect py-gevent py-greenlet py-mongo \
|
||||
py-sqlalchemy py-webob && \
|
||||
|
||||
# Install php sandbox from git
|
||||
git clone https://github.com/glastopf/BFR.git /opt/BFR && \
|
||||
cd /opt/BFR && \
|
||||
phpize7 && \
|
||||
./configure \
|
||||
--with-php-config=/usr/bin/php-config7 \
|
||||
--enable-bfr && \
|
||||
make && \
|
||||
make install && \
|
||||
cd / && \
|
||||
rm -rf /opt/BFR /tmp/* /var/tmp/* && \
|
||||
echo "zend_extension = "$(find /usr -name bfr.so) >> /etc/php7/php.ini && \
|
||||
|
||||
# Install glastopf from git
|
||||
git clone https://github.com/mushorg/glastopf.git /opt/glastopf && \
|
||||
cd /opt/glastopf && \
|
||||
python setup.py install && \
|
||||
cd / && \
|
||||
rm -rf /opt/glastopf /tmp/* /var/tmp/* && \
|
||||
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 glastopf && \
|
||||
adduser -S -H -u 2000 -D -g 2000 glastopf && \
|
||||
mkdir -p /opt/glastopf && \
|
||||
mv /root/dist/glastopf.cfg /opt/glastopf/ && \
|
||||
|
||||
# Clean up
|
||||
apk del autoconf build-base git libffi-dev php7-dev python-dev && \
|
||||
rm -rf /root/* && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# Set workdir and start glastopf
|
||||
WORKDIR /opt/glastopf/
|
||||
CMD ["glastopf-runner"]
|
31
docker/glastopf/README.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
[](https://microbadger.com/images/dtagdevsec/glastopf:1706 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/glastopf:1706 "Get your own image badge on microbadger.com")
|
||||
|
||||
# dockerized glastopf v3
|
||||
|
||||
|
||||
[glastopf](https://github.com/glastopf/glastopf) is a python web application honeypot.
|
||||
|
||||
This repository contains the necessary files to create a *dockerized* version of glastopf v3.
|
||||
|
||||
This dockerized version is part of the **[T-Pot community honeypot](http://dtag-dev-sec.github.io/)** of Deutsche Telekom AG.
|
||||
|
||||
The `Dockerfile` contains the blueprint for the dockerized glastopf and will be used to setup the docker image.
|
||||
|
||||
The `glastopf.cfg` is tailored to fit the T-Pot environment.
|
||||
|
||||
The `supervisord.conf` is used to start glastopf under supervision of supervisord.
|
||||
|
||||
Using systemd, copy the `systemd/glastopf.service` to `/etc/systemd/system/glastopf.service` and start using
|
||||
|
||||
```
|
||||
systemctl enable glastopf
|
||||
systemctl start glastopf
|
||||
```
|
||||
|
||||
This will make sure that the docker container is started with the appropriate permissions and port mappings. Further, it autostarts during boot.
|
||||
|
||||
By default all data will be stored in `/data/glastopf/` until the honeypot service will be restarted which is by default every 24 hours. If you want to keep data persistently simply edit the ``service`` file, find the line that contains ``clean.sh`` and set the option from ``off`` to ``on``. Be advised to establish some sort of log management if you wish to do so.
|
||||
|
||||
# Glastopf Dashboard
|
||||
|
||||

|
106
docker/glastopf/dist/glastopf.cfg
vendored
Normal file
|
@ -0,0 +1,106 @@
|
|||
[webserver]
|
||||
host = 0.0.0.0
|
||||
port = 80
|
||||
uid = glastopf
|
||||
gid = glastopf
|
||||
proxy_enabled = False
|
||||
|
||||
[ssl]
|
||||
enabled = False
|
||||
certfile =
|
||||
keyfile =
|
||||
|
||||
#Generic logging for general monitoring
|
||||
[logging]
|
||||
consolelog_enabled = True
|
||||
filelog_enabled = True
|
||||
logfile = log/glastopf.log
|
||||
|
||||
[dork-db]
|
||||
enabled = True
|
||||
pattern = rfi
|
||||
# Extracts dorks from a online dorks service operated by The Honeynet Project
|
||||
# This service is down until further notice!
|
||||
mnem_service = False
|
||||
|
||||
[hpfeed]
|
||||
enabled = False
|
||||
host = hpfriends.honeycloud.net
|
||||
port = 20000
|
||||
secret = 3wis3l2u5l7r3cew
|
||||
# channels comma separated
|
||||
chan_events = glastopf.events
|
||||
chan_files = glastopf.files
|
||||
ident = x8yer@hp1
|
||||
|
||||
[main-database]
|
||||
#If disabled a sqlite database will be created (db/glastopf.db)
|
||||
#to be used as dork storage.
|
||||
enabled = True
|
||||
#mongodb or sqlalchemy connection string, ex:
|
||||
#mongodb://localhost:27017/glastopf
|
||||
#mongodb://james:bond@localhost:27017/glastopf
|
||||
#mysql://james:bond@somehost.com/glastopf
|
||||
connection_string = sqlite:///db/glastopf.db
|
||||
|
||||
[surfcertids]
|
||||
enabled = False
|
||||
host = localhost
|
||||
port = 5432
|
||||
user =
|
||||
password =
|
||||
database = idsserver
|
||||
|
||||
[syslog]
|
||||
enabled = False
|
||||
socket = /dev/log
|
||||
|
||||
[mail]
|
||||
enabled = False
|
||||
# an email notification will be sent only if a specified matched pattern is identified.
|
||||
# Use the wildcard char *, to be notified every time
|
||||
patterns = rfi,lfi
|
||||
user =
|
||||
pwd =
|
||||
mail_from =
|
||||
mail_to =
|
||||
smtp_host = smtp.gmail.com
|
||||
smtp_port = 587
|
||||
|
||||
[taxii]
|
||||
enabled = False
|
||||
host = taxiitest.mitre.org
|
||||
port = 80
|
||||
inbox_path = /services/inbox/default/
|
||||
use_https = False
|
||||
use_auth_basic = False
|
||||
auth_basic_username = your_username
|
||||
auth_basic_password = your_password
|
||||
use_auth_certificate = False
|
||||
auth_certificate_keyfile = full_path_to_keyfile
|
||||
auth_certificate_certfile = full_path_to_certfile
|
||||
include_contact_info = False
|
||||
contact_name = ...
|
||||
contact_email = ...
|
||||
|
||||
[logstash]
|
||||
enabled = False
|
||||
host = localhost
|
||||
port = 5659
|
||||
handler = AMQP/TCP/UDP
|
||||
|
||||
[misc]
|
||||
# set webserver banner
|
||||
banner = Apache/2.0.48
|
||||
|
||||
[surface]
|
||||
#https://www.google.com/webmasters/
|
||||
google_meta =
|
||||
#http://www.bing.com/toolbox/webmaster
|
||||
bing_meta =
|
||||
|
||||
[sensor]
|
||||
sensorid = None
|
||||
|
||||
[profiler]
|
||||
enabled = False
|
BIN
docker/glastopf/doc/dashboard.png
Normal file
After Width: | Height: | Size: 502 KiB |
19
docker/glastopf/docker-compose.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
version: '2.1'
|
||||
|
||||
networks:
|
||||
glastopf_local:
|
||||
|
||||
services:
|
||||
|
||||
# Glastopf service
|
||||
glastopf:
|
||||
container_name: glastopf
|
||||
restart: always
|
||||
networks:
|
||||
- glastopf_local
|
||||
ports:
|
||||
- "80:80"
|
||||
image: "dtagdevsec/glastopf:1706"
|
||||
volumes:
|
||||
- /data/glastopf/db:/opt/glastopf/db
|
||||
- /data/glastopf/log:/opt/glastopf/log
|
44
docker/honeytrap/Dockerfile
Normal file
|
@ -0,0 +1,44 @@
|
|||
FROM debian:stretch-slim
|
||||
MAINTAINER MO
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
|
||||
# Setup apt
|
||||
RUN apt-get update -y && \
|
||||
apt-get dist-upgrade -y && \
|
||||
|
||||
# Install packages
|
||||
apt-get install -y autoconf build-essential git iptables libnetfilter-queue1 libnetfilter-queue-dev \
|
||||
libjson-c-dev libtool libpq5 libpq-dev netbase procps wget && \
|
||||
|
||||
# Install honeytrap from source
|
||||
cd /root/ && \
|
||||
git clone https://github.com/armedpot/honeytrap && \
|
||||
cd /root/honeytrap/ && \
|
||||
autoreconf -vfi && \
|
||||
./configure \
|
||||
--with-stream-mon=nfq \
|
||||
--with-logattacker \
|
||||
--with-logjson \
|
||||
--prefix=/opt/honeytrap && \
|
||||
make && \
|
||||
make install && \
|
||||
make clean && \
|
||||
|
||||
# Setup user, groups and configs
|
||||
addgroup --gid 2000 honeytrap && \
|
||||
adduser --system --no-create-home --shell /bin/bash --uid 2000 --disabled-password --disabled-login --gid 2000 honeytrap && \
|
||||
mkdir -p /opt/honeytrap/etc/honeytrap/ /opt/honeytrap/var/attacks /opt/honeytrap/var/downloads /opt/honeytrap/var/log && \
|
||||
mv /root/dist/honeytrap.conf /opt/honeytrap/etc/honeytrap/ && \
|
||||
|
||||
# Clean up
|
||||
rm -rf /root/* && \
|
||||
apt-get purge -y autoconf build-essential git libnetfilter-queue-dev libpq-dev && \
|
||||
apt-get autoremove -y --purge && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Start honeytrap
|
||||
CMD ["/opt/honeytrap/sbin/honeytrap", "-D", "-C", "/opt/honeytrap/etc/honeytrap/honeytrap.conf", "-t", "5", "-u", "honeytrap", "-g", "honeytrap"]
|
674
docker/honeytrap/LICENSE
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) {year} {name of author}
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
{project} Copyright (C) {year} {fullname}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
35
docker/honeytrap/README.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
[](https://microbadger.com/images/dtagdevsec/honeytrap:1706 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/honeytrap:1706 "Get your own image badge on microbadger.com")
|
||||
|
||||
# dockerized honeytrap
|
||||
|
||||
|
||||
[honeytrap](https://github.com/armedpot/honeytrap) is a low-interaction honeypot daemon for observing attacks against network services. In contrast to other honeypots, which often focus on malware collection, honeytrap aims for catching the initial exploit – It collects and further processes attack traces.
|
||||
|
||||
This repository contains the necessary files to create a *dockerized* version of honeytrap.
|
||||
|
||||
This dockerized version is part of the **[T-Pot community honeypot](http://dtag-dev-sec.github.io/)** of Deutsche Telekom AG.
|
||||
For this setup, honeytrap is configured to use the logattacker module only.
|
||||
|
||||
The `Dockerfile` contains the blueprint for the dockerized honeytrap and will be used to setup the docker image.
|
||||
|
||||
The `honeytrap.conf` is tailored to fit the T-Pot environment.
|
||||
|
||||
The `supervisord.conf` is used to start honeytrap under supervision of supervisord.
|
||||
|
||||
In case you want to run the dockerized honeytrap independently, you must modify the config files to match your environment and rebuild the docker image.
|
||||
|
||||
Using systemd, copy the `systemd/honeytrap.service` to `/etc/systemd/system/honeytrap.service` and start using
|
||||
|
||||
```
|
||||
systemctl enable honeytrap
|
||||
systemctl start honeytrap
|
||||
```
|
||||
|
||||
This will make sure that the docker container is started with the appropriate rights and iptables forwards are implemented. Further, it autostarts during boot.
|
||||
In the T-Pot setup, some ports are excluded as they need to be reserved for other honeypot daemons running in parallel.
|
||||
|
||||
By default all data will be stored in `/data/honeytrap/` until the honeypot service will be restarted which is by default every 24 hours. If you want to keep data persistently simply edit the ``service`` file, find the line that contains ``clean.sh`` and set the option from ``off`` to ``on``. Be advised to establish some sort of log management if you wish to do so.
|
||||
|
||||
# Honeytrap Dashboard
|
||||
|
||||

|
143
docker/honeytrap/dist/honeytrap.conf
vendored
Normal file
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
* honeytrap 1.0.1 configuration file template -- please adjust
|
||||
* (c) Tillmann Werner <tillmann.werner@gmx.de>
|
||||
*/
|
||||
|
||||
// log to this file
|
||||
logfile = "/opt/honeytrap/var/log/honeytrap.log"
|
||||
|
||||
// store process ID in this file
|
||||
pidfile = "/var/run/honeytrap.pid"
|
||||
|
||||
/* where to look for default responses
|
||||
* these are sent for connections handled in "normal mode" */
|
||||
response_dir = "/opt/honeytrap/etc/honeytrap/responses"
|
||||
|
||||
// replace rfc1918 IP addresses with attacking IP address
|
||||
replace_private_ips = "no"
|
||||
|
||||
// bind dynamic servers to a specific address
|
||||
//bind_address = "127.0.0.1"
|
||||
|
||||
/* put network interface into promiscuous mode
|
||||
* (only availabel when compiled with --with-stream-mon=pcap) */
|
||||
//promisc = "on"
|
||||
|
||||
/* the user and group under which honeytrap should run
|
||||
* should be set to non-root */
|
||||
user = "honeytrap"
|
||||
group = "honeytrap"
|
||||
|
||||
// do not read more than 20 MB - used to prevent DoS attacks
|
||||
read_limit = "20971520"
|
||||
|
||||
|
||||
/* ----- plugin stuff below ----- */
|
||||
|
||||
/* where to look for plugins
|
||||
needs to be set before loading plugins */
|
||||
plugin_dir = "/opt/honeytrap/etc/honeytrap/plugins"
|
||||
|
||||
|
||||
// include a plugin via plugin-[ModuleName] = ""
|
||||
|
||||
// plugin-magicPE = ""
|
||||
plugin-ftpDownload = ""
|
||||
plugin-tftpDownload = ""
|
||||
plugin-b64Decode = ""
|
||||
plugin-deUnicode = ""
|
||||
plugin-vncDownload = ""
|
||||
|
||||
|
||||
// store attacks on disk
|
||||
plugin-SaveFile = {
|
||||
attacks_dir = "/opt/honeytrap/var/attacks"
|
||||
downloads_dir = "/opt/honeytrap/var/downloads"
|
||||
}
|
||||
|
||||
|
||||
// plugin for shellcode detection and emulation
|
||||
/*
|
||||
plugin-cpuEmu = {
|
||||
execute_shellcode = "no"
|
||||
createprocess_cmd = "/bin/sh -c \"cd /opt/honeytrap-libemu/.wine/drive_c/windows/system32; WINEPREFIX='/opt/honeytrap-libemu/.wine/' WINEDEBUG='-all' wine 'c:\\windows\\system32\\cmd_orig.exe'\""
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// scan downloaded samples with ClamAV engine
|
||||
/*
|
||||
plugin-ClamAV = {
|
||||
temp_dir = "/tmp"
|
||||
clamdb_path = "/var/lib/clamav"
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// calculate locality sensitive hashes
|
||||
/*
|
||||
plugin-SpamSum = {
|
||||
md5sum_sigfile = "/opt/honeytrap/md5sum.sigs"
|
||||
spamsum_sigfile = "/opt/honeytrap/spamsum.sigs"
|
||||
}
|
||||
*/
|
||||
|
||||
plugin-logAttacker = { logfile = "/opt/honeytrap/var/log/attacker.log" }
|
||||
|
||||
// log attack details in JSON format
|
||||
plugin-logJSON = { logfile = "/opt/honeytrap/var/log/attackers.json" }
|
||||
|
||||
|
||||
// store attacks in PostgeSQL database
|
||||
/*
|
||||
plugin-SavePostgres = {
|
||||
db_host = "localhost"
|
||||
db_name = "some_db"
|
||||
db_user = "some_user"
|
||||
db_pass = "some_pass"
|
||||
// db_port = "some_port" // defaults to 5432/tcp if not set
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// invoke an external program (f.e. wget) to download files via http
|
||||
/*
|
||||
plugin-httpDownload = {
|
||||
http_program = "/usr/bin/wget"
|
||||
http_options = "-q -t1 -T1 -O-"
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// submit downloaded malware samples to the mwcollect alliance
|
||||
/*
|
||||
plugin-submitMWserv = {
|
||||
mwserv_url = "https://submission-url/"
|
||||
guid = "your-guid"
|
||||
maintainer = "your-maintainer"
|
||||
secret = "your-secret"
|
||||
timeout = "120"
|
||||
}
|
||||
*/
|
||||
|
||||
/* ----- port mode configuration below ----- */
|
||||
|
||||
// default port configuration (ignore, normal or mirror)
|
||||
// ignore: just ignore connection attempts
|
||||
// normal: send a default response
|
||||
// mirror: mirror connections back to the initiator (use with caution!)
|
||||
portconf_default = "normal"
|
||||
|
||||
// explicit port configuration
|
||||
/* portconf = {
|
||||
// ignore connection requests on these ports
|
||||
ignore = {
|
||||
protocol = "tcp"
|
||||
port = "22"
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// include a file
|
||||
//include = "ports.conf"
|
BIN
docker/honeytrap/doc/dashboard.png
Normal file
After Width: | Height: | Size: 690 KiB |
19
docker/honeytrap/docker-compose.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
version: '2.1'
|
||||
|
||||
networks:
|
||||
honeytrap_local:
|
||||
|
||||
services:
|
||||
|
||||
# Honeytrap service
|
||||
honeytrap:
|
||||
container_name: honeytrap
|
||||
restart: always
|
||||
network_mode: "host"
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
image: "dtagdevsec/honeytrap:1706"
|
||||
volumes:
|
||||
- /data/honeytrap/attacks:/opt/honeytrap/var/attacks
|
||||
- /data/honeytrap/downloads:/opt/honeytrap/var/downloads
|
||||
- /data/honeytrap/log:/opt/honeytrap/var/log
|
35
docker/mailoney/Dockerfile
Normal file
|
@ -0,0 +1,35 @@
|
|||
FROM alpine
|
||||
MAINTAINER MO
|
||||
|
||||
# Install packages
|
||||
RUN apk -U upgrade && \
|
||||
apk add autoconf automake bash build-base git libtool procps py-pip python python-dev && \
|
||||
|
||||
# Install libemu
|
||||
git clone https://github.com/buffer/libemu /root/libemu/ && \
|
||||
cd /root/libemu/ && \
|
||||
autoreconf -vi && \
|
||||
./configure && \
|
||||
make && \
|
||||
make install && \
|
||||
|
||||
# Install libemu python wrapper
|
||||
pip install pylibemu && \
|
||||
|
||||
# Install mailoney from git
|
||||
git clone https://github.com/awhitehatter/mailoney /opt/mailoney && \
|
||||
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 mailoney && \
|
||||
adduser -S -H -s /bin/bash -u 2000 -D -g 2000 mailoney && \
|
||||
chown -R mailoney:mailoney /opt/mailoney && \
|
||||
|
||||
# Clean up
|
||||
apk del autoconf automake build-base git py-pip python-dev && \
|
||||
rm -rf /root/* && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# Set workdir and start glastopf
|
||||
USER mailoney
|
||||
WORKDIR /opt/mailoney/
|
||||
CMD ["/usr/bin/python","mailoney.py","-i","0.0.0.0","-p","2525","-s","mailserver","-t","schizo_open_relay"]
|
4
docker/mailoney/README.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
[](https://microbadger.com/images/dtagdevsec/mailoney:1706 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/mailoney:1706 "Get your own image badge on microbadger.com")
|
||||
|
||||
# mailoney
|
||||
Dockerized mailoney for use in T-Pot
|
18
docker/mailoney/docker-compose.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
version: '2.1'
|
||||
|
||||
networks:
|
||||
mailoney_local:
|
||||
|
||||
services:
|
||||
|
||||
# Mailoney service
|
||||
mailoney:
|
||||
container_name: mailoney
|
||||
restart: always
|
||||
networks:
|
||||
- mailoney_local
|
||||
ports:
|
||||
- "25:2525"
|
||||
image: "dtagdevsec/mailoney:1706"
|
||||
# volumes:
|
||||
# - /data/mailoney/log:/opt/mailoney/logs
|
32
docker/netdata/Dockerfile
Normal file
|
@ -0,0 +1,32 @@
|
|||
FROM alpine
|
||||
MAINTAINER MO
|
||||
|
||||
# Install packages
|
||||
RUN apk -U upgrade && \
|
||||
apk add alpine-sdk autoconf automake bash curl gawk gcc iw jq libmnl-dev libuuid linux-headers lm_sensors make musl-dev netcat-openbsd util-linux-dev pkgconf python py-requests py-yaml zlib-dev && \
|
||||
|
||||
# Install netdata
|
||||
cd /root && \
|
||||
git clone https://github.com/firehol/netdata && \
|
||||
cd netdata && \
|
||||
./netdata-installer.sh --dont-wait --dont-start-it && \
|
||||
sed -i "s/#local:/local:/" /etc/netdata/python.d/elasticsearch.conf && \
|
||||
sed -i "s/# host: '127.0.0.1'/host: '127.0.0.1'/" /etc/netdata/python.d/elasticsearch.conf && \
|
||||
sed -i "s/port: '9200'/port: '64298'/" /etc/netdata/python.d/elasticsearch.conf && \
|
||||
sed -i "s/# cluster_health: True/cluster_health: True/" /etc/netdata/python.d/elasticsearch.conf && \
|
||||
sed -i "s/# cluster_stats: True/cluster_stats: True/" /etc/netdata/python.d/elasticsearch.conf && \
|
||||
sed -i 's/SEND_EMAIL="YES"/SEND_EMAIL="NO"/' /etc/netdata/health_alarm_notify.conf && \
|
||||
echo 0 > /usr/share/netdata/web/version.txt && \
|
||||
cd / && \
|
||||
|
||||
# Clean up
|
||||
apk del alpine-sdk autoconf automake gcc libmnl-dev linux-headers make musl-dev pkgconf util-linux-dev zlib-dev && \
|
||||
rm -rf /root/* && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:64301'
|
||||
|
||||
# Start netdata
|
||||
WORKDIR /
|
||||
CMD ["/usr/sbin/netdata","-D","-s","/host","-i","127.0.0.1","-p","64301"]
|