• Stars
    star
    247
  • Rank 158,726 (Top 4 %)
  • Language
    C++
  • Created almost 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Windows Local Privilege Escalation via CdpSvc service (Writeable SYSTEM path Dll Hijacking)

CdpSvcLPE

Windows Local Privilege Escalation via CdpSvc service (Writeable SYSTEM path Dll Hijacking)

Short Description:

Connected Devices Platform Service (or CDPSvc) is a service which runs as NT AUTHORITY\LOCAL SERVICE and tries to load the missing cdpsgshims.dll DLL on startup with a call to LoadLibrary(), without specifying its absolute path. So, it can be hijack dll in the folder of Dll Search Order flow and we will get process or shell access with NT AUTHORITY\LOCAL SERVICE if we hijack the dll in SYSTEM PATH writable place such as C:\python27. Then, I just combine it with @itm4n's PrintSpoofer technique to get NT AUTHORITY\SYSTEM access.

Usage:

  1. Find Writable SYSTEM PATH with acltest.ps1 (such as C:\python27)
    C:\CdpSvcLPE> powershell -ep bypass ". .\acltest.ps1"
  2. Copy cdpsgshims.dll to C:\python27
  3. make C:\temp folder and copy impersonate.bin to C:\temp
    C:\CdpSvcLPE> mkdir C:\temp
    C:\CdpSvcLPE> copy impersonate.bin C:\temp
  4. Reboot (or stop/start CDPSvc as an administrator)
  5. cmd wil prompt up with nt authority\system.

Youtube: https://youtu.be/Jfxfsc04H5o

test1

\m/ Note: when you got system cmd prompt, stop the cdpsvc service and delete dll file and bin file.

by @404death

Ref:

http://zeifan.my/security/eop/2019/11/05/windows-service-host-process-eop.html
https://itm4n.github.io/cdpsvc-dll-hijacking/
https://itm4n.github.io/printspoofer-abusing-impersonate-privileges/
https://github.com/itm4n/PrintSpoofer
https://gist.github.com/wdormann/eb714d1d935bf454eb419a34be266f6f

More Repositories

1

UAC_Bypass_In_The_Wild

Windows 10 UAC bypass for all executable files which are autoelevate true .
C
621
star
2

awesome_windows_logical_bugs

collect for learning cases
VBScript
544
star
3

UAC_bypass_windows_store

Windows 10 LPE (UAC Bypass) in Windows Store (WSReset.exe)
C
263
star
4

cve-2020-1337-poc

poc for CVE-2020-1337 (Windows Print Spooler Elevation of Privilege)
PowerShell
174
star
5

RpcSsImpersonator

Privilege Escalation Via RpcSs svc
C
166
star
6

WerTrigger

Weaponizing for privileged file writes bugs with windows problem reporting
C++
150
star
7

magnifier0day

Windows 10 Privilege Escalation (magnifier.exe) via Dll Search Order Hijacking
C
135
star
8

SpoolTrigger

Weaponizing for privileged file writes bugs with PrintNotify Service
PowerShell
126
star
9

Fileless_UAC_bypass_WSReset

I created the python script to bypass UAC to get system shell .
Python
115
star
10

delete2SYSTEM

Weaponizing for Arbitrary Files/Directories Delete bugs to Get NT AUTHORITY\SYSTEM
C
111
star
11

PrintNightmare-LPE

CVE-2021-1675 (PrintNightmare)
C++
75
star
12

tokenx_privEsc

with metasploit
Python
63
star
13

GUI_UAC_bypassX

gui uac bypass (netplwiz.exe)
62
star
14

eternal-pulsar

Eternalblue-Doublepulsar without Metasploit or python
Python
49
star
15

cve-2022-21882-poc

lpe poc for cve-2022-21882
C++
48
star
16

offsec_WE

learning case to prepare OSWE
40
star
17

SECOMN_EoP

Sound Research SECOMN service Privilege Escalation (windows 10)
Batchfile
40
star
18

amd_eop_poc

CVE-2020-8950 AMD User Experience Program Launcher from Radeon Software Privilege Escalation ( FileWrite eop)
Batchfile
29
star
19

windows-stuff

my learning case about windows
20
star
20

FileWrite2system

File Write Weapon for Privilege Escalation To get SYSTEM
PowerShell
20
star
21

misc-bin

testing123
PowerShell
11
star
22

origin_client_LPE

Ea's Origin Client LPE
PowerShell
9
star
23

JustFunctions

Dangerous Functions of Programming Languages
4
star
24

app-sec-checklist

checklist for Application penetration Testing
4
star
25

Windows_System_Programming

my learning journey of windows system programmings
C
4
star
26

wp_app_dllhijack_poc

C
3
star
27

NP_impersonate

priv esc for SeImpersonatePrivilege
C
3
star
28

sec_checklist_bag

Security Checklist for Industry
3
star
29

playing-with-privileged-tokens

just my learning cases
C++
3
star
30

offsecWE-prepare

my learning case for OSWE prepare
PHP
3
star
31

pyauthy

Script for Twilio Authy Two-Factor Authentication (2FA)
Python
2
star
32

xApp

Shell
2
star
33

trash-bin

test123
2
star
34

MyNotes

Notes
2
star
35

awe-win-expx

noted
1
star
36

mozilla-security-checklist

Mozilla - Security Checklist #noted
1
star
37

assem

my learning case for assembly
C
1
star