FuzzySecurity / DefCon24

DefCon24
120 stars 50 forks source link

Windows Version #1

Open C9H13NO3 opened 2 years ago

C9H13NO3 commented 2 years ago

I have a need to test applocker bypass techniques but limited time to setup an environment and came across this. I know its a few years old, do you know what version of Windows 10 you were using when running this? The link pulls down 1809 and whilst it seems to work, I got errors running the ps1 script.... they were too quick to capture, will rerun and look to update if I can capture them in a log file.

Users have been created, restricted1 and kiosk2 behave as expected by running scripts and logging off once done, just dont know if the errors in running the initial ps1 script will cause me issues further down the line?

C9H13NO3 commented 2 years ago

PS C:\Windows\system32> C:\Users\IEUser\Downloads\DefCon24-master\DefCon24-master\Windows_Breakout_PrivEsc_Setup_v1.2.ps1 [+] Disabling Notification Centre [+] Disabling Windows Defender [+] Disabling SmartScreen [+] Disabling Windows Update [+] Disabling AutoLogin for Admin [+] Disabling Sign-in Animation [+] Setting UI to Best Performance [+] Creating NoApplocker group [+] Fixing Applocker Services [+] Starting AppIDSvc service [+] Applying AppLocker Policy [+] Adding restricted1 and restricted2 users to NoAppLocker group [+] Invoking restricted2 [+] Applying restrictions to restricted2 reg : ERROR: The parameter is incorrect. At C:\Users\IEUser\Downloads\DefCon24-master\DefCon24-master\Windows_Breakout_PrivEsc_Setup_v1.2.ps1:399 char:1 reg add HKU\$RestrictedSID\Software\Microsoft\Windows\CurrentVersion\ ... CategoryInfo : NotSpecified: (ERROR: The parameter is incorrect.:String) [], RemoteException FullyQualifiedErrorId : NativeCommandError reg : ERROR: The parameter is incorrect. At C:\Users\IEUser\Downloads\DefCon24-master\DefCon24-master\Windows_Breakout_PrivEsc_Setup_v1.2.ps1:400 char:1 reg add HKU\$RestrictedSID\Software\Microsoft\Windows\CurrentVersion\ ... CategoryInfo : NotSpecified: (ERROR: The parameter is incorrect.:String) [], RemoteException FullyQualifiedErrorId : NativeCommandError [+] Adding Kiosk1 and Kiosk2 users to NoAppLocker group [+] Invoking Kiosk1 [+] Applying kiosk lockdown to kiosk1 New-Item : The registry key at the specified path does not exist. At C:\Users\IEUser\Downloads\DefCon24-master\DefCon24-master\Windows_Breakout_PrivEsc_Setup_v1.2.ps1:420 char:1 New-Item -Path HKU:\$KioskSID1\Software\Microsoft\Windows\CurrentVers ...

C9H13NO3 commented 2 years ago

Tired a Windows 10 Pro 1607 as that was released same time as script, downloaded an ISO and setup as a new install with the default using being IEUser so the script would work without updating, that actually has more issues; same registry ones plus some wmic ones, so VM looks best option.... just need to figure out the registry key issues

C9H13NO3 commented 2 years ago

Fixed... sort of! The reg add/new-item lines dont work until the SID exists in HKU; which doesnt happen until a user logs on, so ran the setup script, logged on as every user and then reran the lines that failed.