Ir al contenido

Step-by-Step Guide: Forensic Process in AWS (Challenge)

This guide details the technical steps to complete the challenge using the AWS console (Learner Lab).

0views

This guide details the technical steps to complete the challenge using the AWS console (Learner Lab).

  1. We will access AWS Academy -> Learner Lab -> Start Lab.
  2. We will wait for the wheel to turn green and click on AWS (green dot) to open the console.
  3. We will ensure we are in the us-east-1 (N. Virginia) region in the top right corner.

Step 1: Prepare the Environment (Instance Creation)

Sección titulada «Paso 1: Preparar el Entorno (Creación de Instancias)»

1.1 Create “Forensic Workstation” (Forensic Workstation)

Sección titulada «1.1 Crear “Estación Forense” (Forensic Workstation)»

Recommendation: We will use Linux to easily have tools like dd, dc3dd, hashdeep.

  1. We will go to EC2 -> Launch Instances.
  2. Name: Estacion-Forense.
  3. OS Image: Amazon Linux 2023 or Ubuntu.
  4. Instance Type: t2.micro (free tier).
  5. Key Pair: We will create a new one (for example, vkey.pem) and download it.
  6. Network Configuration:
    • Subnet: IMPORTANT. We will choose us-east-1a (or whichever we want, but we will remember it for the victim).
    • Security Group: We will create a new group (SG-Forense) allowing SSH (port 22) from Mi IP.
  7. Launch Instance.

According to the prompt, it must be Windows.

  1. Launch Instances.
  2. Name: Victima-Windows.
  3. OS Image: Microsoft Windows Server (Base).
  4. Instance Type: t2.micro.
  5. Key Pair: The same as before (vkey.pem).
  6. Network Configuration:
    • Subnet: THE SAME as the Forensic Station (for example, us-east-1a).
    • Security Group: We will create a new group (SG-Victima) allowing RDP (port 3389) from Anywhere (to simulate it is vulnerable) or Mi IP.
  7. Launch Instance.
  1. In the left EC2 menu -> Volumes -> Create Volume.
  2. Size: 10 GB (enough for tools).
  3. Availability Zone: The same as the instances (for example, us-east-1a).
  4. Label: Key=Nombre, Value=herramientas-forenses.
  5. Create.
  1. Connect the tool volume to the Forensic Station:
    • We will select the volume herramientas-forenses -> Actions -> Attach Volume -> We will choose Estacion-Forense.
  2. Enter the Forensic Station (SSH):
    • We will format and mount the volume. We will download tools (even though it is a Linux, we can download FTK Imager Portable or Belkasoft RAM Capturer for Windows and save them on this volume for when we connect it to the victim).
    • Note: If this is too complex for the lab time, we can skip the formatting step and simply download the tools directly from the victim Windows machine, but the “purist” procedure is to carry them on an external volume.
  3. Disconnect volume:
    • We will unmount within the OS -> AWS Console -> Detach Volume.
  1. We will connect to the Victima-Windows via RDP (We will need “Get Password” using the .pem file).
  2. We will change the wallpaper (“Hacked!”).
  3. We will create a text file on the desktop with “sensitive” data.
  1. In the AWS console: We will connect the volume eines-forenses to Victima-Windows.
  2. Inside Windows (RDP):
    • We will open “Disk Management”, set the disk to “Online”, and assign a drive letter (for example, E:).
    • We will run the RAM capture tool (for example, FTK Imager Portable or DumpIt) from drive E:.
    • We will save the file .mem to drive E: (the external volume).
    • Important: This will slightly alter the RAM, but it is necessary in cloud environments if we do not have Live Response tools available.
  1. We will go to EC2 -> Instances -> Victima-Windows.
  2. Actions -> Security -> Change security groups.
  3. We will delete the current group and add a new group (SG-Aillat) that only allows RDP (3389) from our IP (My IP), blocking all other inbound/outbound traffic (at the Network ACL level if we wanted to be stricter, but SG is sufficient for the lab).
  1. EC2 -> Instances -> Victima-Windows -> Storage tab.
  2. Click on the ID de volumen of the root disk (Root device).
  3. Actions -> Create snapshot.
  4. Description: Instantánea-Victima-Comprometida.
  5. This step is critical to ensure disk integrity at that precise moment.
  1. We will go to Snapshots in the left menu.
  2. We will select Instantánea-Victima-Comprometida -> Actions -> Create volume from snapshot.
  3. Availability Zone: The same as Estacio-Forense (for example, us-east-1a).
  4. Tag: Name=copia-disco-comprometido.

5.2 Connect to the Forensic Workstation

Sección titulada «5.2 Conectar a la Estación Forense»
  1. We will go to Volumes.
  2. We will select copia-disco-comprometido.
  3. Actions -> Attach volume -> We will select Estacio-Forense.
  4. Note: AWS does not easily allow physical mounting in "Read-only" mode at the virtual hardware level, so we must mount it within the Linux OS as Read-only.

5.3 Cloning/Analysis (inside the Forensic Workstation)

Sección titulada «5.3 Clonación/Análisis (dentro de la Estación Forense)»
  1. We will connect via SSH to Estacio-Forense.
  2. We will list disks: lsblk. We will see the new disk (for example, /dev/xvdf).
  3. Mount RO: mount -o ro /dev/xvdf1 /mnt/analisis (or similar).
  4. Clone (optional): We will create an image to our testing volume. dc3dd if=/dev/xvdf of=/mnt/proves/imagen_victima.img hash=sha256

We will have:

  1. Windows Instance (Stopped or Isolated).
  2. Linux Instance (Analyst).
  3. Tools Volume (connected to one or the other).
  4. Windows disk snapshot.
  5. Volume created from the snapshot (connected to Linux).