Skip to content

unknownslayer/Cloud-Security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Cloud-Security

Cloud Security Project: Secure Web Application Hosting on AWS

Overview

The main objective was to host a secure web application using a cloud platform (AWS) with a focus on security implementations. I deployed a WordPress blog website (onedarkyear.tech) using AWS EC2 instances and applied various security features, including AWS security tools and WordPress plugins, to safeguard the application against potential threats. This project also includes comprehensive vulnerability assessments and risk mitigation strategies to ensure the highest level of security.

Project Features

Cloud Infrastructure (AWS)

AWS EC2 (Elastic Compute Cloud):

The project was hosted using Amazon EC2, with a t2.micro instance running Amazon Linux.

AWS Security Features:

AWS WAF (Web Application Firewall):
Used to protect the web application from common web exploits by setting up custom rules.
AWS CloudWatch:
Implemented to monitor the health and performance of the instance, including alarms for high network traffic.
AWS EFS (Elastic File System):
Integrated for scalable storage with backup capabilities.
Elastic IP:
Assigned an Elastic IP address for public access to the instance.

Web Application (WordPress)

WordPress Installation:
Deployed WordPress on the EC2 instance using the LAMP (Linux, Apache, MySQL, PHP) stack.
HTTPS/SSL:
Configured HTTPS using self-signed certificates and later upgraded to a CA-signed certificate via Cloudflare.
Two-Factor Authentication (2FA):
Implemented using the WordFence plugin for enhanced login security.

Security Features

Cloudflare Integration:
Configured Cloudflare for DNS management, SSL/TLS encryption (v1.3), and DDoS protection.

WordPress Security Plugins:

WordFence:
Enabled 2FA, performed real-time traffic analysis, and added firewall protection.
Sucuri Security:
Monitored file integrity, user activity, and login attempts.
Jetpack:
Used for brute-force attack protection and login attempt monitoring.
Security Hardening:
Applied security configurations such as strong password policies, session timeout, and TLS enforcement.

Setup Instructions

Prerequisites

• An AWS account with EC2 access.
• A domain name (optional; used Get.tech for this project).
• Basic knowledge of Linux command line and WordPress.

Steps to Replicate

1. Create an AWS EC2 Instance:

• Select Amazon Linux 2023 AMI and use the t2.micro instance type.
• Configure network settings to allow SSH, HTTP, HTTPS traffic from anywhere.
• Allocate an Elastic IP and associate it with the instance.

2. Install LAMP Stack:

• Update the instance and install the Apache web server, PHP, and MariaDB.
sudo yum update -y
sudo yum install httpd php mariadb-server -y
• Start and enable Apache and MariaDB
sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl start mariadb
sudo systemctl enable mariadb

3. Secure MariaDB:

• Run the secure installation script
sudo mysql_secure_installation

4. Install and Configure WordPress:

• Download and configure WordPress by setting up a database in MariaDB and editing the wp-config.php file.
• Install necessary PHP extensions and libraries.

5. Configure HTTPS and TLS:

• Install SSL using OpenSSL and set up a self-signed certificate. • Later, configure Cloudflare for DNS management and obtain a CA-signed certificate for HTTPS.

6. Implement Security Plugins:

• Install and configure the following WordPress plugins for security:
• WordFence for 2FA and real-time monitoring.
• Sucuri Security for file integrity monitoring.
• Jetpack for brute-force protection.

7. Monitoring and Logging:

• Set up AWS CloudWatch for instance health monitoring.
• Use Datadog for additional instance health insights.

Vulnerability Testing


To ensure the security of the web application, multiple vulnerability testing tools were used:

OWASP ZAP:

• Performed static and dynamic vulnerability scanning of the WordPress website. • Generated reports showing no high or critical vulnerabilities.

Nessus:

• Used advanced scan options to detect 20 medium-risk vulnerabilities related to SSL and outdated software, which were mitigated by updating SSL and server packages.

Burp Suite:

• Assessed the attack surface of the web application, checking for input validation and authentication weaknesses.

Nmap:

• Scanned open ports and checked for unnecessary services running on the server.

WPScan:

• Specifically focused on WordPress vulnerabilities, revealing initial security risks that were resolved with plugin updates and secure configurations.

Findings and Risk Mitigation

Threat Vulnerability Mitigation Technique Tools Used
Unauthorized Access Weak password policies Enforced strong password policies and 2FA WordFence, AWS Cognito
Brute Force Attack Repeated login attempts Implemented captcha and account lockout policies Jetpack, AWS WAF
Data Theft Lack of secure communication Enabled HTTPS with a CA-signed certificate Cloudflare
DDoS Attack Resource overload Deployed AWS WAF and Elastic Load Balancer AWS WAF, Cloudflare

Challenges and Limitations

1. Plugin Conflicts:

Implementing multiple security plugins caused conflicts, breaking some WordPress functionality, which required troubleshooting.

2. AWS Limitations:

AWS student accounts had restrictions, such as no IAM user creation, which limited some automation features.

3. Vulnerability Fixes:

Fixing issues like X-Content-Type-Options and X-Frame-Options required custom configurations in the Apache settings.

Conclusion

This project provided valuable experience in deploying a secure web application on AWS and integrating various security tools to mitigate risks. By following cloud security best practices and leveraging tools like AWS WAF, Cloudflare, and WordPress plugins, I successfully hardened the website against common web threats. This project highlights my ability to plan, deploy, and secure cloud-based applications in real-world scenarios.

Technologies and Tools

Cloud Platform:

AWS EC2, AWS WAF, AWS CloudWatch, AWS EFS, Cloudflare

Web Application:

WordPress (with LAMP stack)

Security Tools:

OWASP ZAP, Nessus, Burp Suite, Nmap, WPScan, WordFence, Sucuri Security, Jetpack

Testing Tools:

UpGuard, Pentest-Tools, ImmuniWeb

Appendix

## Project Screenshots

1. EC2 Instance Setup

EC2 Instance Setup]

2. WordPress Installation

WordPress Installation

3. AWS CloudWatch Setup

AWS CloudWatch Alarm

4. Datadog

Datadog

5. Nmap advance scan

Nmap advance scan

6. Nmap

Nmap

7. Owasp Zap

Owasp zap

8. Wpscan

Wpscan

9. BurpSuite

BurpSuite

10. Overview of Cloud Flare

Cloud Flare

11. Rules Cloud Flare

Rules for Cloud Flare

12. Cloud Flare Setup

Cloud Flare Setup

13. Configuring Cloud Flare to get a CA-Signed Certificate

Ca-Certificate

14. DNS management through Cloud Flare

DNS management through Cloud Flare

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors