articulos - b0ySie7e
  • 👋Bienvenido
  • Write up
    • 📕DockerLabs
      • QueueMedic
    • 📕Tryhackme
      • VulnneTroasted
      • Relevant
      • Bufferoverflowprep
      • Eavesdropper
      • Kitty
      • Borderlands
      • Willow
      • Gatekeeper
      • Web Strike Blue Team
      • Splunkps Eclipse
      • Sustah
      • Battery
      • The Server From Hell
      • Biteme
      • Zeno
      • Olymus
      • Mastermind
      • Cyber Crafted
      • Ollie
      • Red
      • Opacity
      • Tony The Tiger
      • B3dr0ck
      • Valley
      • Hacker vs Hacker
      • Flatine
      • Glitch
      • Smag Grotto
      • Ninja Skills
      • Corridor
      • TechSupport
      • Kiba
      • Fowsniff CTF
      • Blueprint
      • Anonymous
      • Bookstore
      • Bounty
      • Cmspit
      • Mustacchio
    • 📕Hackthebox
      • Inject
      • Busqueda
      • Monitors Two
      • PC
      • Topology
      • Wifinetic
      • Pilgrimage
      • Keeper
      • Headless
      • Devvortex
      • Codify
      • Perfection
      • Broker
      • Pov
      • Resolute
      • Monteverde
      • Intelligence
      • StreamIO
      • Scrambled
      • Escape
      • Authority
      • Return
      • Timelapse
      • Support
      • Cap
      • Doctor
      • Validation
      • Twomillion
    • 📕PortSwigger
      • SQL Injection
        • Lab: SQL injection vulnerability in WHERE clause allowing retrieval of hidden data
        • Lab: SQL injection vulnerability allowing login bypass
        • Lab: SQL injection attack, querying the database type and version on Oracle
        • Lab: SQL injection attack, querying the database type and version on MySQL and Microsoft
        • Lab: SQL injection attack, listing the database contents on non-Oracle databases
        • Lab: SQL injection UNION attack, determining the number of columns returned by the query
        • Lab: SQL injection UNION attack, retrieving data from other tables
        • Lab: SQL injection UNION attack, retrieving multiple values in a single column
        • Lab: Blind SQL injection with conditional responses
        • Lab: Blind SQL injection with conditional errors
        • Lab: Visible error-based SQL injection
        • Lab: Blind SQL injection with time delays
        • Lab: Blind SQL injection with time delays and information retrieval
        • Lab: Blind SQL injection with out-of-band interaction
        • Lab: Blind SQL injection with out-of-band data exfiltration
        • Lab: SQL injection with filter bypass via XML encoding
  • Articulos
    • 🛠️Proyectos
      • 📝Host Port Discovery
    • 🛠️Laboratorio
      • 📝Hacking Wireles
  • Vulnerabilidaes
    • 🖥️Explotacion
      • CVE-2023-38831
Powered by GitBook
On this page
  • Primera Pregunta
  • Segunda pregunta
  • Tercera pregunta
  • Cuarta Pregunta
  • Quinta pregunta
  • Sexta pregunta
  • Septima pregunta
  • Octava pregunta
  • Decima pregunta
  1. Write up
  2. Tryhackme

Splunkps Eclipse

PreviousWeb Strike Blue TeamNextSustah

Last updated 1 year ago

En esta sala aprenderemos a analizar las actividades de ransomware con la herramienta de splunk en donde realizaremos búsquedas y filtros para encontrar diversas cosas en un dispositivo.

El escenario que nos ponen es: que somos un analista de SOC en el cual un cliente envió un correo electrónico solicitando un analista para investigar los eventos ocurridos en la máquina de Keegan el lunes 16 de mayo de 2022 . El cliente notó que la máquina está operativa, pero algunos archivos tienen una extensión extraña. Al cliente le preocupa que haya habido un intento de ransomware en el dispositivo de Keegan.

  • Link

  • Created by and and

Primera Pregunta

A suspicious binary was downloaded to the endpoint. What was the name of the binary?

Para iniciar las pruebas ingresaremos un * para que nos filtre todos los eventos.

Filtrando todos los eventos, agregaremos a este el EventCode=3 para obtener conexiones de red que se realizaron.

Ahora, procederemos a buscar en Image en donde encontraremos un powershell.exe que se hace uso.

En la búsqueda ahora realizaremos la búsqueda de commandline y Image ...

Luego de realizar el filtro nos encontraremos con una linea de comandos en la que tenemos un texto en base64.

Segunda pregunta

_What is the address the binary was downloaded from? Add http://to your answer & defang the URL. _

La respuesta que obtenemos es : hxxp[://]886e-181-215-214-32[.]ngrok[.]io

Tercera pregunta

What Windows executable was used to download the suspicious binary? Enter full path.

Desplegando el evento que encontramos antes encontraremos el binario con el que se ejecuto

Cuarta Pregunta

What command was executed to configure the suspicious binary to run with elevated privileges?

Para encontrar el comando que nos piden, tendremos que hacer uso del nombre del binario que descubrimos al tener el texto plano del base64.

Teniendo en cuenta el binario y el el programa de schtasks.exe lo que ejecuta el binario malicioso.

"OUTSTANDING_GUTTER.exe" "C:\\Windows\\system32\\schtasks.exe" 
|  table CommandLine
  1. "OUTSTANDING_GUTTER.exe" "C:\\Windows\\system32\\schtasks.exe":

    • Filtra los eventos donde el campo CommandLine contiene las cadenas "OUTSTANDING_GUTTER.exe" y "C:\Windows\system32\schtasks.exe".

  2. |:

    • El operador de tubería (|) toma el resultado de la búsqueda anterior y lo pasa a la siguiente operación.

  3. table CommandLine:

    • Utiliza el comando table para mostrar en forma de tabla los valores del campo CommandLine en los resultados de la búsqueda anterior.

Ingresando los filtros obtenemos el anterior resultado resaltado em el recuadro. Este será nuestra respuesta.

"C:\Windows\system32\schtasks.exe" /Create /TN OUTSTANDING_GUTTER.exe /TR C:\Windows\Temp\COUTSTANDING_GUTTER.exe /SC ONEVENT /EC Application /MO *[System/EventID=777] /RU SYSTEM /f

Quinta pregunta

What permissions will the suspicious binary run as? What was the command to run the binary with elevated privileges? (Format: User + ; + CommandLine)

Ya se tiene el usuario que es SYSTEM, este usuario lo encontramos al decodear el texto en base64.

NT AUTHORITY/SYSTEM; "C:\Windows\system32\schtasks.exe" /Run /TN OUTSTANDING_GUTTER.exe

Sexta pregunta

The suspicious binary connected to a remote server. What address did it connect to? Add http:// to your answer & defang the URL

Para este ejercicio usaremos el siguiente comando:

* Image="C:\\Windows\\Temp\\OUTSTANDING_GUTTER.exe" TaskCategory="Dns query (rule: DnsQuery)" QueryName="*" 
|  table QueryName
  1. Image="C:\\Windows\\Temp\\OUTSTANDING_GUTTER.exe":

    • Filtra los eventos donde el campo Image es igual a C:\\Windows\\Temp\\OUTSTANDING_GUTTER.exe.

  2. TaskCategory="Dns query (rule: DnsQuery)":

    • Filtra los eventos donde el campo TaskCategory es igual a "Dns query (rule: DnsQuery)".

  3. QueryName="*":

    • Filtra los eventos donde el campo QueryName es igual a cualquier valor (* es un comodín que coincide con cualquier cadena).

  4. |:

    • El operador de tubería (|) toma el resultado de la búsqueda anterior y lo pasa a la siguiente operación.

  5. table QueryName:

    • Utiliza el comando table para mostrar en forma de tabla los valores únicos del campo QueryName en los resultados de la búsqueda anterior.

Luego de ejecutar el filtro obtendremos nuestra respuesta:

hxxps[://]9030-181-215-214-32[.]ngrok[.]io

Septima pregunta

A PowerShell script was downloaded to the same location as the suspicious binary. What was the name of the file?

* .ps1 
| table TargetFilename
  1. * .ps1:

    • Filtra eventos donde el campo TargetFilename contiene la extensión de archivo .ps1.

  2. |:

    • El operador de tubería (|) toma el resultado de la búsqueda anterior y lo pasa a la siguiente operación.

  3. table TargetFilename:

    • Utiliza el comando table para mostrar en forma de tabla los valores del campo TargetFilename en los resultados de la búsqueda anterior.

Octava pregunta

The malicious script was flagged as malicious. What do you think was the actual name of the malicious script?

Haciendo su el anterior filtro encontraremos un hash en md5 el cual debemos copiar

En detalles tendremos mas información acerca de este hash y del binario malicioso.

BlackSun.ps1

Novena pregunta

A ransomware note was saved to disk, which can serve as an IOC. What is the full path to which the ransom note was saved?

Ahora filtraremos por BlackSun

Obtenemos algunos archivos que dejo el ransonware

C:\Users\keegan\Downloads\vasg6b0wmw029hd\BlackSun_README.txt

Decima pregunta

The script saved an image file to disk to replace the user's desktop wallpaper, which can also serve as an IOC. What is the full path of the image?

Del anterior filtro podemos ver en el primer evento obtendremos nuestra respuesta.

C:\Users\Public\Pictures\blacksun.jpg

Happy Hacking :)

Para poder tener el texto en formato legible usaremos

Del anterior texto podremos ver que tenemos una url que es http://886e-181-215-214-32.ngrok.io al cual pasaremos a defang the URL haciendo uso de

Ahora copiado el hash, ingresaremos a y ingresaremos el hash

📕
CyberChef
CyberChef
virus total
Splunk PS Eclipse
tryhackme
Dex01
MartaStrzelec
20240109160232.png
20240107224059.png
20240108000633.png
20240108000701.png
20240108000848.png
20240108000930.png
20240108001123.png
20240108002129.png
20240108002439.png
20240108174842.png
20240108175541.png
20240108190157.png
20240108212807.png
20240108214333.png
20240108214435.png
20240108214627.png
20240108215022.png
20240108215106.png
20240108215443.png
20240108215508.png