{"id":23179331,"url":"https://github.com/sathviknayak123/detection_of_dga_botnets","last_synced_at":"2026-04-28T08:03:06.782Z","repository":{"id":268245779,"uuid":"878953700","full_name":"SathvikNayak123/detection_of_DGA_botnets","owner":"SathvikNayak123","description":"App to Detect of DGA-based botnets using Machine Learning and Deep Learning (CNN+Attention)","archived":false,"fork":false,"pushed_at":"2025-01-22T17:51:30.000Z","size":32063,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T02:17:30.593Z","etag":null,"topics":["binary-classification","cnn-att-models","deep-learning","fastapi","feature-engineering","machine-learning","multiclass-classification"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/SathvikNayak123.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":"2024-10-26T15:08:14.000Z","updated_at":"2025-01-22T17:51:34.000Z","dependencies_parsed_at":"2025-01-16T15:09:06.734Z","dependency_job_id":null,"html_url":"https://github.com/SathvikNayak123/detection_of_DGA_botnets","commit_stats":null,"previous_names":["sathviknayak123/detection_of_dga_botnets"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SathvikNayak123/detection_of_DGA_botnets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SathvikNayak123%2Fdetection_of_DGA_botnets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SathvikNayak123%2Fdetection_of_DGA_botnets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SathvikNayak123%2Fdetection_of_DGA_botnets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SathvikNayak123%2Fdetection_of_DGA_botnets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SathvikNayak123","download_url":"https://codeload.github.com/SathvikNayak123/detection_of_DGA_botnets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SathvikNayak123%2Fdetection_of_DGA_botnets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32371673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["binary-classification","cnn-att-models","deep-learning","fastapi","feature-engineering","machine-learning","multiclass-classification"],"created_at":"2024-12-18T07:14:31.410Z","updated_at":"2026-04-28T08:03:06.763Z","avatar_url":"https://github.com/SathvikNayak123.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DGA-Based Botnet Detection\n\n## Overview\nThis project presents a two-stage system to detect and classify DGA (Domain Generation Algorithm)-based botnets using advanced Machine Learning (ML) and Deep Learning (DL) techniques. \n\n![flowchart](docs/Screenshot%202024-12-15%20192739.png)\n\n## Dataset\n- Binary Classification dataset consisted of 240,000 labelled samples - 120k samples legitimate and 120k botnet-generated web domains(each botnet family consisting 2000 samples).\n- Multi-class Classification dataset consisted og 240,000 labelled samples - each botnet family having 4000 samples each.\n\n## Key Features\n- **Two-Stage Detection System:**\n  - Stage 1: Binary classification to distinguish botnet-generated web domains from legitimate ones.\n  - Stage 2: Multi-class classification to identify the botnet family among **60+ classes**.\n\n- **Feature Engineering and Machine Learning:**\n  - Achieved **91% Accuracy and F1-score** with XGBoostClassifier.\n  - Performed robust feature extraction methods(custom features + features from **N-GRAMS**), **enhancing detection accuracy by 15%**.\n  - **Reduced False-Positives by 20%** by Hyperparameter Tuning XGBoostClassifier\n\n- **Hybrid Deep Learning Model:**\n  - Utilized Deep learning to classify botnet domains to 60 botnet families, achieving **86.5% accuracy and 0.4 loss**.\n  - Developed a custom hybrid **CNN+Attention** architecture, resulting in a **10% boost in accuracy** and a **26% reduction in loss**.\n\n![model](docs/multiclass_classification_model.png)\n\n- **Real-Time Prediction API:**\n  - Developed a predict pipeline to streamline prediction of user input.\n  - Deployed a **FastAPI** application for seamless and efficient real-time predictions.\n\n\n### Installation\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/SathvikNayak123/detection_of_DGA_botnets.git\n   ```\n2. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n3. Start the FastAPI application:\n   ```bash\n   uvicorn app.main:app --reload\n   ```\n## Results\n- Binary Classification : 92% test accuracy and 0.9 F1-score for **XGBoost**\n- Reduced False Positives by 20% with Hyperparameter Tuning\n\n![ROC](docs/output.png)\n\n![cm](docs/output1.png)\n\n- Multi-class Classification : 86.5% test accuracy and 0.4 loss\n\n![loss](docs/output2.png)\n\n\n## API interafce\n\n![api](docs/api_interface.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsathviknayak123%2Fdetection_of_dga_botnets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsathviknayak123%2Fdetection_of_dga_botnets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsathviknayak123%2Fdetection_of_dga_botnets/lists"}