https://github.com/Barriuso/SMBGhost_AutomateExploitation
SMBGhost (CVE-2020-0796) Automate Exploitation and Detection
https://github.com/Barriuso/SMBGhost_AutomateExploitation
Last synced: 2 months ago
JSON representation
SMBGhost (CVE-2020-0796) Automate Exploitation and Detection
- Host: GitHub
- URL: https://github.com/Barriuso/SMBGhost_AutomateExploitation
- Owner: Barriuso
- Created: 2020-06-10T16:44:39.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-30T14:02:04.000Z (about 3 years ago)
- Last Synced: 2025-04-19T11:56:53.922Z (2 months ago)
- Language: Python
- Homepage:
- Size: 77.1 KB
- Stars: 295
- Watchers: 7
- Forks: 51
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-rainmana - Barriuso/SMBGhost_AutomateExploitation - SMBGhost (CVE-2020-0796) Automate Exploitation and Detection (Python)
- awesome-hacking-lists - Barriuso/SMBGhost_AutomateExploitation - SMBGhost (CVE-2020-0796) Automate Exploitation and Detection (Python)
README
# SMBGhost (CVE-2020-0796) Automate Exploitation and Detection
This python program is a wrapper from the RCE SMBGhost vulnerability. All the credits for the working exploit to [chompie1337][1]. All the credits for the scanner to [ioncodes][2].
I just automate these functions in one program. You need to have in mind the architecture of the Windows target when you are going to create the reverse shell.
This exploit is not **stable**, use at your own. Sometimes it doesn't work at the first time, this is why I added a second retry.
If you are going to put your own shellcode, have in mind that the shellcode max size is **600 bytes**.
* Tested on Windows 10 x64 (Microsoft Windows [Versión 10.0.18362.113]. Build 1903.)
* Tested on Win10 Enterprise (Eng) x64 v1903 Build 18362.30 by @tijldeneutWindows ISO (x64) vulnerable to test the exploit: [MEGA DOWNLOAD](https://mega.nz/file/FPxQ2BKa#86Dfq3pfb5iCpC5BK9TxfUm5XJLmJoiNm3Pf7Yv_qCc)
# DEMO
**1º Stageless reverse shell (x64) created from msfvenom.**
**2º Trying custom shellcode to add user "di.security" as Administrator in the target. Credits for the shellcode to [rastating][4]**

# Options
```
usage: Smb_Ghost.py [-h] -i IP [-p PORT] [--check] [-e] [--lhost LHOST]
[--lport LPORT] [--arch ARCH] [--silent] [--shellcode]
[--load-shellcode LOAD_SHELLCODE]SMBGhost Detection and Exploitation
optional arguments:
-h, --help show this help message and exit
-i IP, --ip IP IP address
-p PORT, --port PORT SMB Port
--check Check SMBGhost Vulnerability
-e Directly exploit SMBGhost
--lhost LHOST Lhost for the reverse shell
--lport LPORT Lport for the reverse shell
--arch ARCH Architecture of the target Windows Machine
--silent Silent mode for the scanner
--shellcode Shellcode Menu to import your shell
--load-shellcode LOAD_SHELLCODE
Load shellcode directly from file```
# Author
* Alberto Barriuso ([@_Barriuso](https://twitter.com/_Barriuso))# Disclaimer
Any misuse of this software will not be the responsibility of the author. Use it at your own networks and/or with the network owner's permission.
# TODO
* Add more payloads.
* Test on another Windows versions (x86)
* More accurate the scanner. The scanner only detects if SMBv3.1.1 is being used but if the host is patched, it will give you a false positive.[1]: https://github.com/chompie1337/SMBGhost_RCE_PoC
[2]: https://github.com/ioncodes/SMBGhost
[3]:https://github.com/Veil-Framework/Veil
[4]:https://rastating.github.io/altering-msfvenom-exec-payload-to-work-without-exitfunc/