Welcome to the Linux Command Line Capture The Flag (CTF) lab! This project sets up a learning environment where you can practice your Linux command line skills by solving various challenges.
Before you begin, ensure you have the following installed on your local machine:
Follow these steps to set up and access your CTF lab environment:
-
Clone this repository to your local machine:
git clone https://github.com/learntocloud/ltc-linux-challenge cd ltc-linux-challenge/aws
-
(Optional) Modify the AWS region:
-
Open
main.tf
and change the default value of theaws_region
variable, or -
Create a
terraform.tfvars
file and specify your preferred region:aws_region = "us-east-1"
-
-
Initialize Terraform:
terraform init
-
Apply the Terraform configuration:
terraform apply
When prompted, type
yes
to confirm. -
After the apply completes, note the
ctf_instance_public_ip
output. You'll use this to connect to your lab environment.
To access your lab environment:
-
Use SSH to connect to the EC2 instance:
ssh ctf_user@<ctf_instance_public_ip>
-
When prompted for a password, enter:
CTFpassword123!
-
Once logged in, you'll see a welcome message with instructions for your first challenge.
When you're done with the lab, don't forget to destroy the AWS resources to avoid unnecessary charges:
terraform destroy
Type yes
when prompted to confirm.
This lab is designed for learning purposes and uses a password-based login for simplicity. In real-world scenarios, key-based authentication is recommended for better security.
If you encounter any issues:
- Ensure your AWS CLI is correctly configured with your credentials.
- Check that you're using a compatible Terraform version.
- Verify that you have the necessary AWS permissions to create the required resources.
If problems persist, please open an issue in this repository.
Happy learning, and good luck with your CTF challenges!