{"id":25214061,"url":"https://github.com/labackdoor/ddos-attack-simulation","last_synced_at":"2025-04-05T08:23:54.583Z","repository":{"id":276697351,"uuid":"919204813","full_name":"LaBackDoor/DDos-Attack-Simulation","owner":"LaBackDoor","description":"A research framework for simulating DDoS attacks using infrastructure-as-code with Terraform and Ansible. Built for controlled environments to study attack patterns and test defense mechanisms.","archived":false,"fork":false,"pushed_at":"2025-02-09T22:09:55.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T23:20:13.020Z","etag":null,"topics":["ansible","ddos-attacks","devops","infrastructure-as-code","networking","research","security","terraform","virtualization"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LaBackDoor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-20T00:21:39.000Z","updated_at":"2025-02-09T22:09:58.000Z","dependencies_parsed_at":"2025-02-09T23:33:10.913Z","dependency_job_id":null,"html_url":"https://github.com/LaBackDoor/DDos-Attack-Simulation","commit_stats":null,"previous_names":["labackdoor/ddos-attack-simulation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaBackDoor%2FDDos-Attack-Simulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaBackDoor%2FDDos-Attack-Simulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaBackDoor%2FDDos-Attack-Simulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaBackDoor%2FDDos-Attack-Simulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LaBackDoor","download_url":"https://codeload.github.com/LaBackDoor/DDos-Attack-Simulation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247307925,"owners_count":20917591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ddos-attacks","devops","infrastructure-as-code","networking","research","security","terraform","virtualization"],"created_at":"2025-02-10T16:58:20.487Z","updated_at":"2025-04-05T08:23:54.557Z","avatar_url":"https://github.com/LaBackDoor.png","language":"Shell","readme":"# DDoS Attack Simulation Framework\n\nThis repository contains an automated framework for simulating Distributed Denial of Service (DDoS) attacks in a controlled environment. The framework uses Terraform for infrastructure provisioning and Ansible for orchestrating the simulation.\n\n## Repository Structure\n\n```\nddos-attack/\n├── Orchestration/\n│   └── Ansible/\n│       └── Attack/\n│           ├── tasks/\n│           ├── group_vars/\n│           ├── continuous-ddos-playbook.yml\n│           ├── clear_website.yml\n│           ├── reboot_cleanup_all.yml\n│           └── inventory.ini\n├── terraform/\n│   ├── main.tf\n│   ├── variables.tf\n│   ├── provider.tf\n│   └── terraform.tfvars\n└── scripts/\n    ├── normal.sh\n    ├── syn_flood.sh\n    └── route.sh\n```\n\n## Components\n\n### Infrastructure (Terraform)\n\nThe infrastructure is managed using Terraform with vSphere as the provider. Key components include:\n- VM provisioning from templates\n- Network configuration\n- Resource pool management\n- Customizable deployment parameters\n\n### Orchestration (Ansible)\n\nThe Ansible playbooks handle the simulation orchestration:\n- Role assignment for attacker and normal traffic nodes\n- Traffic generation and attack execution\n- Packet capture and monitoring\n- Cleanup and system maintenance\n\n### Scripts\n\n- `normal.sh`: Generates legitimate traffic patterns\n- `syn_flood.sh`: Executes SYN flood attacks\n- `route.sh`: Manages traffic routing configurations\n\n## Setup and Configuration\n\n1. **Infrastructure Setup**\n```bash\ncd terraform\nterraform init\nterraform plan\nterraform apply\n```\n\n2. **Configure Ansible Vault**\n```bash\ncd Orchestration/Ansible/Attack\nansible-vault create group_vars/all/vault.yml\n```\n\n3. **Update Inventory**\n   Modify `inventory.ini` with your infrastructure details.\n\n## Running Simulations\n\n1. **Start Continuous DDoS Simulation**\n```bash\nansible-playbook continuous-ddos-playbook.yml --ask-vault-pass\n```\n\n2. **Clean Up After Simulation**\n```bash\nansible-playbook reboot_cleanup_all.yml --ask-vault-pass\n```\n\n## Attack Patterns\n\nThe framework supports different attack intensities:\n- Low: 5-35% of nodes as attackers\n- Mid: 35-65% of nodes as attackers\n- High: 65-85% of nodes as attackers\n\n## Monitoring and Logging\n\n- Packet captures are stored in `/var/log/pcap/`\n- Simulation logs are in `/var/log/ddos_sim/`\n- Individual attack logs are maintained on each node\n\n## Security Considerations\n\n- Credentials are stored in Ansible Vault\n- Terraform sensitive variables are marked appropriately\n- Infrastructure credentials are managed via separate provider configuration\n- All script execution is contained within the defined network\n\n## Requirements\n\n- Terraform \u003e= 1.0\n- Ansible \u003e= 2.9\n- vSphere environment\n- Ubuntu-based templates\n- Python 3.x\n\n## Maintenance\n\n- Use `clear_website.yml` for web server maintenance\n- `reboot_cleanup_all.yml` for complete system reset\n- Regular monitoring of log directories to prevent disk space issues\n\n## Best Practices\n\n1. Always use Ansible Vault for sensitive data\n2. Keep Terraform state files secure\n3. Monitor resource usage during simulations\n4. Regular cleanup of log files\n5. Test in isolated network environments\n\n## Important Notes\n\n- This framework is for research and testing purposes only\n- Should only be used in controlled, isolated environments\n- All simulations should comply with relevant policies and regulations\n- Monitor system resources during extended simulations\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Submit a pull request with detailed description\n4. Ensure all tests pass\n5. Update documentation as needed\n\n## License\n\n[Insert your license information here]\n\n## Disclaimer\n\nThis tool is for research and educational purposes only. Users are responsible for ensuring all activities comply with applicable laws and regulations.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabackdoor%2Fddos-attack-simulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabackdoor%2Fddos-attack-simulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabackdoor%2Fddos-attack-simulation/lists"}