|
1 |
| -# IT_Infrastructure_Security |
2 |
| -IT Infrastructure Security Project aimed at analyzing and protecting against various attacks on servers, applications, and websites, we would need to combine several technologies and implement multiple layers of security. |
| 1 | +# IT Infrastructure Security Project |
| 2 | + |
| 3 | +This project provides a multi-layered defense strategy to protect servers, applications, and websites from various types of cyber attacks. It includes firewall setup, real-time monitoring, vulnerability scanning, DDoS protection, and more. By leveraging tools like Nuclei, Nmap, Fail2Ban, and custom Python/Bash scripts, this project offers a complete solution to securing your IT infrastructure. |
| 4 | + |
| 5 | + |
| 6 | +## Features |
| 7 | + |
| 8 | +1. **Firewall and Intrusion Detection**: Configure iptables firewall rules. |
| 9 | +2. **Real-Time Monitoring and Alerts**: Monitor CPU, memory, and disk usage and send alerts. |
| 10 | +3. **Web Application Firewall (WAF)**: Protect against SQL injection and XSS attacks. |
| 11 | +4. **Brute Force Protection**: Use Fail2Ban to block IPs showing signs of brute force. |
| 12 | +5. **Vulnerability Scanning**: Automated vulnerability scanning using Nmap. |
| 13 | +6. **DDoS Protection**: NGINX rate limiting to prevent DDoS attacks. |
| 14 | +7. **Incident Response**: Automatically block IPs when suspicious activity is detected. |
| 15 | +8. **Encrypted Backups**: Secure and encrypt backups automatically. |
| 16 | + |
| 17 | +## How to Set Up |
| 18 | + |
| 19 | +1. Run the `firewall/firewall_setup.sh` to configure the basic firewall. |
| 20 | +2. Use `monitoring/real_time_monitor.py` to enable real-time monitoring and alerts. |
| 21 | +3. Configure and run the Web Application Firewall (WAF) using `waf/waf.py`. |
| 22 | +4. Set up brute force protection with `brute_force_protection/fail2ban_setup.sh`. |
| 23 | +5. Automate vulnerability scans with [projectdiscovery](https://github.com/projectdiscovery/nuclei-templates/graphs/contributors) `vulnerability_scanner/vulnerability_scan.py`. |
| 24 | +6. Apply DDoS protection using the `ddos_protection/ddos_protection.conf` with your NGINX setup. |
| 25 | +7. Enable automated incident response using `incident_response/incident_response.py`. |
| 26 | +8. Backup and encrypt important files with `backups/backup_script.sh`. |
| 27 | + |
| 28 | +## Installation |
| 29 | +**Prerequisites** |
| 30 | + * Linux (Ubuntu/Debian preferred) |
| 31 | + * Python 3.6+ |
| 32 | + * Nuclei by ProjectDiscovery |
| 33 | + * Nmap |
| 34 | + * NGINX (for DDoS protection) |
| 35 | + * Fail2Ban |
| 36 | + * iptables and gpg for encryption |
| 37 | + |
| 38 | +### Step-by-Step Installation |
| 39 | +1. Clone the Repository |
| 40 | +Clone the repository to your local machine: |
| 41 | +``` |
| 42 | +git clone https://github.com/lamcodeofpwnosec/IT_Infrastructure_Security.git |
| 43 | +``` |
| 44 | +2. Install Dependencies |
| 45 | +Install required packages and tools using the following commands: |
| 46 | +``` |
| 47 | +sudo apt update |
| 48 | +sudo apt install python3-pip fail2ban nmap iptables gpg nginx -y |
| 49 | +pip3 install psutil requests |
| 50 | +``` |
| 51 | +3. Install Nuclei |
| 52 | +Install Nuclei by running the following commands: |
| 53 | + |
| 54 | +``` |
| 55 | +curl -s https://api.github.com/repos/projectdiscovery/nuclei/releases/latest | grep "browser_download_url.*nuclei-linux-amd64.zip" | cut -d '"' -f 4 | wget -qi - |
| 56 | +unzip nuclei-linux-amd64.zip |
| 57 | +sudo mv nuclei /usr/local/bin/ |
| 58 | +``` |
| 59 | +Ensure that Nuclei is correctly installed by running: |
| 60 | +``` |
| 61 | +nuclei -version |
| 62 | +``` |
| 63 | +4. Set Up Firewall Rules |
| 64 | +Navigate to the `firewall/`` directory and run the firewall setup script: |
| 65 | +``` |
| 66 | +cd firewall |
| 67 | +sudo bash firewall_setup.sh |
| 68 | +``` |
| 69 | +5. Set Up Brute Force Protection |
| 70 | +Set up Fail2Ban to block brute force attacks: |
| 71 | +``` |
| 72 | +cd ../brute_force_protection |
| 73 | +sudo bash fail2ban_setup.sh |
| 74 | +``` |
| 75 | +6. Configure DDoS Protection |
| 76 | +Copy the NGINX rate limiting configuration to your NGINX configuration file: |
| 77 | +``` |
| 78 | +sudo cp ../ddos_protection/ddos_protection.conf /etc/nginx/nginx.conf |
| 79 | +sudo systemctl restart nginx |
| 80 | +``` |
| 81 | +### Usage |
| 82 | +1. **Real-Time Monitoring** |
| 83 | +To monitor your system's CPU, memory, and disk usage in real-time and send alerts, run the Python script: |
| 84 | +``` |
| 85 | +cd monitoring |
| 86 | +python3 real_time_monitor.py |
| 87 | +``` |
| 88 | +2. Vulnerability Scanning |
| 89 | +You can run vulnerability scans using either Nmap or Nuclei by following the steps below: |
| 90 | + * Nmap Scan: |
| 91 | +``` |
| 92 | +cd ../vulnerability_scanner |
| 93 | +python3 vulnerability_scan.py |
| 94 | +``` |
| 95 | +Choose option 1 for Nmap and enter the target IP. |
| 96 | + |
| 97 | +3. Block Suspicious IP |
| 98 | +If you detect suspicious activity, you can block an IP by running the following script: |
| 99 | +``` |
| 100 | +cd ../firewall |
| 101 | +sudo bash block_ip.sh <IP_ADDRESS> |
| 102 | +``` |
| 103 | +4. Backup and Encrypt Data |
| 104 | +To back up and encrypt sensitive data, use the following backup script: |
| 105 | +``` |
| 106 | +cd ../backups |
| 107 | +sudo bash backup_script.sh |
| 108 | +``` |
| 109 | +### Author |
| 110 | +IT Infrastructure Security Project was created by [@lamcodeofpwnosec](https://github.com/lamcodeofpwnosec/). |
0 commit comments