deepdos
Description
Welcome to deepdos, the python program written to monitor and potentially secure your network from ddos attacks! While not currently utilizing deep learning to classify packets, deepdos currently utilizes logistic regression in order to classify packets and has so far been trained on 200,000 packets from all sorts of DDOS attacks and normal traffic setup. This project couldn't have been done without the help of the Canadian Institute for Cybersecurity with providing both the original flow dataset and tool to create flow csvs from .pcap files. Their site and all resources have been linked at the bottom.
Goals
Short term goals
- Add LR test metrics on startup
- Update LR to use better data for better performance
- Add command line interface
Long term goals
- Convert Logistic regression model to a neural network
- Support both macos and Linux (potentially Windows as well if pcap is easy)
- Add ddos mitigation/firewall rule support
How to run/setup
Running from scratch
deepdos is currently only available on linux, but can simply be run by these two commands:
# clone repo
git clone https://github.com/C3NZ/deepdos
# Install dependencies and setup the projects virtual environment
source bash/setup.sh
# Execute the script (Needs sudo in order to execute both tcpdump and iptables)
python3 main.py -h
This will load you into a virtualenv with all of the dependencies installed and ready to use.
To remove all of the dependencies after you're done using the tool, you can simply run:
source bash/remove.sh
and then remove the folder from your computer :)
This will immediately start creating necessary folders, capturing packets, and then identifying the traffic that is being exchanged in and out of your current computer.
This also assumes that you have java installed for the program to execute the CICFlowMeter jar file.
Installing with pip
Linux
sudo apt install libpcap-dev python3-dev python3-setuptools
pip3 install deepdos
Macos
brew install libpcap
pip3 install deepdos
Usage
usage: main.py [-h] [-i INTERFACE] [-n NAUGHTY_COUNT] [--find-interface]
[--firewall FIREWALL] [--model-type MODEL_TYPE]
Welcome to deepdos, the machine learning/ai based ddos analysis/mitigation
service
optional arguments:
-h, --help show this help message and exit
-i INTERFACE [REQUIRES SUDO] The network interface for deepdos to
listen to (default: None)
-n NAUGHTY_COUNT The amount of malicious flows that can come from a
given address (default: 10)
--find-interface List all of your devices network interfaces. Good if
you don't know what interfaces your device has
(default: False)
--firewall FIREWALL [REQUIRES SUDO] Turn on firewall mode for the given
system. linux for Linux systems and macos for mac (Not
yet supported) (default: None)
--model-type MODEL_TYPE
The model that you would like to use for classifying
the data (default: lr-stable-0.9.0.pickle)
usage: src [-h] [-i INTERFACE] [-n NAUGHTY_COUNT] [--find-interface]
[--firewall FIREWALL] [--model-type MODEL_TYPE]
How to deploy
You can deploy this on your own machine, but production use will come in the future.
Live deployments
This will be on pypi soon :)
How to contribute
Fork the current repository and then make the changes that you'd like to said fork. Upon adding features, fixing bugs, or whatever modifications you've made to the project, issue a pull request to this repository containing the changes that you've made and I will evaluate them before taking further action. This process may take anywhere from 3-7 days depending on the scope of the changes made, my schedule, and any other variable factors.
Resources
Metadata
Release files for deepdos 0.9.95
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deepdos-0.9.95.tar.gz | 16.3 MB | Without provenance | Details for deepdos-0.9.95.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deepdos-0.9.95-py3-none-any.whl | Python 3 | none | any | Details for deepdos-0.9.95-py3-none-any.whl |
Total release size: 32.7 MB
Release files / deepdos-0.9.95.tar.gz
| Download URL | deepdos-0.9.95.tar.gz |
|---|---|
| Size | 16.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c75a676a366e0c1d83fbf227ee268c102335a366f808e24462d12468131a38ee
|
|
BLAKE2b-256 checksum How to use checksums |
cd8861f813ad9c023e980b68b859c7390b5c9301b86d410ce80c9fa03f8eabb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Release files / deepdos-0.9.95-py3-none-any.whl
| Download URL | deepdos-0.9.95-py3-none-any.whl |
|---|---|
| Size | 16.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51abf578b2d85282f7bc653e871349e22df3632c2d276f53a1c6636c53258d10
|
|
BLAKE2b-256 checksum How to use checksums |
d073deaae711db0077a4e27d79eec9ca0ed9643a09867ced6f8c1d1dd8b4522d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Security for deepdos 0.9.95
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.