Skip to main content

Trapster Community

License Python Status

Trapster Community is a low-interaction honeypot designed to be deployed on internal networks. It is built to monitor and detect suspicious activities, providing a deceptive layer to network security.

Visit the Trapster website to learn more about our commercial product, which includes advanced features like pre-configured hardened OS, automatic deployment, webhook, and SIEM integration.

Features

  • Deceptive Security: Mimics network services to lure and detect potential intruders.
  • Asynchronous Framework: Utilizes Python's asyncio for efficient, non-blocking operations.
  • Configuration Management: Easily configurable through trapster.conf.
  • Expandable Services: Add and configure as many services as needed with minimal effort.

Usage

Configuration

Trapster uses a configuration file located at data/trapster.conf. Ensure the configuration file is correctly set up before running the daemon. You can add as many services as you want, even multiple services of the same type.

You should also change the interface name, Trapster uses that to discover the IP address it should bind to. On linux, you can type ifconfig or ip a.

Running as a script

To install Trapster, clone the repository and use setup.py to install the dependencies:

git clone https://github.com/0xBallpoint/trapster-community/
cd trapster-community
python -m venv venv
source ./venv/bin/activate
python setup.py install

python3 main.py -h
python3 main.py

Running as a Service

To create & start a Trapster service, you need to run the following commands. It will download the project in /opt/trapster-community, and create a config directory in /etc/trapster-community. You can then start and stop the service using the service command.

git clone https://github.com/0xBallpoint/trapster-community/ /opt/trapster-community
cd /opt/trapster-community
python -m venv venv
source venv/bin/activate
python3 setup.py install

mkdir /etc/trapster-community/
cp /opt/trapster-community/trapster/data/trapster.conf /etc/trapster-community/

echo '[Unit]
Description=Trapster Community
After=network-online.target

[Service]
Type=simple
ExecStart=/opt/trapster-community/venv/bin/python3 /opt/trapster-community/main.py -c /etc/trapster-community/trapster.conf
Restart=always
RestartSec=20

StandardOutput=append:/var/log/trapster.log
StandardError=append:/var/log/trapster.log

[Install]
WantedBy=multi-user.target' > /etc/systemd/system/trapster-community.service

service trapster-community start
service trapster-community status

Running as Docker

You can also use docker compose to run and start trapster. It will use you host network.

git clone https://github.com/0xBallpoint/trapster-community/
cd trapster-community
docker compose up --build

Logs

Format

Each module can generate up to four types of logs: connection, data, login, and query.

  • connection: Indicates that a connection has been made to the module.
  • data: Represents raw data that has been sent, logged in HEX format. This data is unprocessed.
  • login: Captures login attempts to the module. The data field is in JSON format and contains processed information.
  • query: Logs data that has been processed and does not correspond to an authentication attempt. The data field is in JSON format and contains processed information.

Log to file

By default, each log entry is printed on the standard output, in JSON format. You can change the way logs are generated by changing the logger name in the config file.

For example, to log entries to a file, you can use the FileLogger class:

{
  ...
  "logger":{
    "name": "FileLogger",
    "kwargs":{
        "logfile": "/var/log/trapster-community.log"
    }
  }
  ...
}

You can then run an ELK (Elasticsearch, Logstash, Kibana) stack to explore them efficiently.

It is also possible to send the logs to an API using

{
  ...
  "logger":{
    "name": "ApiLogger",
    "kwargs":{
        "url": "http://1.2.3.4:8000/api/v1/log",
        "headers": {
            "SpecialHeader1": "header value"
        }
    }
  }
  ...
}

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add new feature').
  5. Push to the branch (git push origin feature-branch).
  6. Create a pull request.

License

Trapster is licensed under the GNU Affero General Public License v3 or later (AGPLv3+). See the LICENSE file for more details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trapster-1.0.14.tar.gz (147.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trapster-1.0.14-py3-none-any.whl (152.7 kB view details)

Uploaded Python 3

File details

Details for the file trapster-1.0.14.tar.gz.

File metadata

  • Download URL: trapster-1.0.14.tar.gz
  • Upload date:
  • Size: 147.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for trapster-1.0.14.tar.gz
Algorithm Hash digest
SHA256 e6a547c42927d09ab6a798abb948012c0d0029709d747f8126e5ed05bd999edb
MD5 b32d77ed18b5e1cc3fdfe26ce666685d
BLAKE2b-256 db767e7bad265e6dacd355b6fb004641e3b33f19ae968f36b9fa7c2dcf72e8cd

See more details on using hashes here.

File details

Details for the file trapster-1.0.14-py3-none-any.whl.

File metadata

  • Download URL: trapster-1.0.14-py3-none-any.whl
  • Upload date:
  • Size: 152.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for trapster-1.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 b0b21ab3b8a72bdb852130031f2cd1b4348f05909b59778a293bca41ed11b325
MD5 798386a5c5e2833c4f5d8bac17307609
BLAKE2b-256 9fef5c903a45c2ce1a741f5f45ac9da137aa96313757e7501f730af5ac49cbc5

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.2

2 files

1.2.0

2 files

1.1.8

2 files

1.1.7

2 files

1.1.6

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.26

2 files

1.0.25

2 files

1.0.24

2 files

1.0.23

2 files

1.0.22

2 files

1.0.21

2 files

1.0.20

2 files

1.0.19

2 files

1.0.17

2 files

1.0.16

2 files

1.0.15

2 files

This release

1.0.14 This release

2 files

1.0.13

2 files

1.0.12

2 files

1.0.10

2 files

1.0.9

2 files

1.0.8

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page