# Microchoft

<figure><img src="https://2216970731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgI96Zsgdt6Oh2PlOLDwP%2Fuploads%2F1xmZrqiJyhaMKHhK1Qrt%2Fimage.png?alt=media&#x26;token=fcb703b0-7ea0-496f-b0a8-64488f3a49f8" alt=""><figcaption></figcaption></figure>

## Fase de reconocimiento

Primero iniciamos un escaneo de nmap y nos revela que la maquina victima es un Windows 7 Home Basic:

<figure><img src="https://2216970731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgI96Zsgdt6Oh2PlOLDwP%2Fuploads%2FjQZgOXHSN5Y9lBW5ywlB%2Fimage.png?alt=media&#x26;token=f552e65a-4b51-485d-a40a-d8eddbda219e" alt=""><figcaption></figcaption></figure>

```
nmap -sSVC -Pn -open -vvv -min-rate 5000 IP
```

Ahora con nmap otra vez vamos a escanear la misma IP pero en concreto el puerto 445 (smb) en busqueda de la vulnerabilidad llamada eternalblue, esta fue empleada para infectar millones de equipos con el ransomware wannacry.

<figure><img src="https://2216970731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgI96Zsgdt6Oh2PlOLDwP%2Fuploads%2FiKM2S9siLatfj4MD5HdH%2Fimage.png?alt=media&#x26;token=284cc0a1-26d7-40d1-aa18-a6c9287a6995" alt=""><figcaption></figcaption></figure>

```
nmap -p445 --script smb-vuln-ms17-010 IP
```

## Intrusión y escalada de privilegios

Ahora iniciciamos metasploit "msfconsole" y buscamos la dicha vulnerabilidad encontrada "search ms17" y para usar el modulo deseado lo seleccionamos con los numeros:

<figure><img src="https://2216970731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgI96Zsgdt6Oh2PlOLDwP%2Fuploads%2FIU9UWg17spVdTsK3z3xJ%2Fimage.png?alt=media&#x26;token=ce9f024b-d931-4823-85f7-979288443e97" alt=""><figcaption></figcaption></figure>

Para ver la configuración de los modulos tienes que introducir "options", vemos que el parametro RHOSTS esta sin definir

<figure><img src="https://2216970731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgI96Zsgdt6Oh2PlOLDwP%2Fuploads%2F9FWKltBDe3ihBulasDJJ%2Fimage.png?alt=media&#x26;token=5fa0e074-c62a-44c2-a258-1de5e0eb97c3" alt=""><figcaption></figcaption></figure>

Así que definimos con set

<figure><img src="https://2216970731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgI96Zsgdt6Oh2PlOLDwP%2Fuploads%2FbEbl9oYpeTjazREG4vgV%2Fimage.png?alt=media&#x26;token=fe77cb0c-55d4-40a1-ab35-9d9a77be5b42" alt=""><figcaption></figcaption></figure>

Para iniciar el exploit introducimos "exploit"

<figure><img src="https://2216970731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgI96Zsgdt6Oh2PlOLDwP%2Fuploads%2F6cpM1SsmAoi8mautg7xW%2Fimage.png?alt=media&#x26;token=c390d65c-4774-4f60-93dd-c7724bcae27a" alt=""><figcaption></figcaption></figure>

Nos vamos a la ruta de Users y con un dir nos muestra los usuarios, tambien eran visibles en la maquina

<figure><img src="https://2216970731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgI96Zsgdt6Oh2PlOLDwP%2Fuploads%2F3NZ50TBGpFaurY6hzOkK%2Fimage.png?alt=media&#x26;token=912c4fbb-b6a9-4943-9e46-8bc9e66b575d" alt=""><figcaption></figcaption></figure>

Las flags se encuentran en el Desktop de cada usuario

<figure><img src="https://2216970731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgI96Zsgdt6Oh2PlOLDwP%2Fuploads%2FWRfoI4jxDXzZVQd5ledX%2Fimage.png?alt=media&#x26;token=058476b4-cc68-4bf2-8401-eb971c346ee1" 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://burple.gitbook.io/burple/thehackerslabs/facil/microchoft.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.
