Skip to content

jakeotte/BadPrintConfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

BadPrintConfig

The PrintNotify Windows service uses unsigned DLLs on most systems. An Administrator-level attacker may overwrite the existing service DLL to execute beacons under svchost.exe without suspicion.

Note that while this approach does result in a clean process tree, it can require starting the RemoteRegistry service which is itself an IOC.

Querying the Service

First query the service and ensure it is not already started. Windows does NOT SUPPORT stopping the PrintNotify service.

services.py domain.com/user@10.10.10.10 status -name 'PrintNotify'

You may then choose to confirm the DLL path. However, this will start the Remote Registry service and surely create alerts. Consider simply replacing known DLL paths.

Known default paths:
C:\WINDOWS\system32\spool\drivers\x64\3\PrintConfig.dll

DANGEROUS:
reg.py domain.com/user@10.10.10.10 query -key "HKLM\SYSTEM\CurrentControlSet\Services\PrintNotify\Parameters"

Generating Payload

  1. Generate your shellcode and host it on a web server.
  2. Update the hardcoded URL in the C++ template.
  3. Compile the service DLL in Visual Studio (use Debug build configuration -> statically linked).

Execution

Replace the DLL (be sure to get a backup of the old DLL):

smbclient.py domain.com/user@10.10.10.10

Execute the service:

services.py domain.com/user@10.10.10.10 start -name 'PrintNotify'

About

The PrintNotify Windows service uses an unsigned DLL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors