Lateral movements
When you have access to AD credentials, we suggest using RDP as much as possible. If you use PowerShell Remoting and winrm to connect to a machine, you may no longer be able to run domain enumeration tools as you will experience the Kerberos Double Hop issue. To avoid it, the simplest way is to use RDP. Kerberos Double-Hop is discussed in detail in the PEN-300 course material.
Windows
Running as another user
Run as other user in your machine: runas
Run as another user. PIVOTING when you have access to a gui
Pivot to other machine: runas + Enter-PSSession
Step 1 in your machine:
Step 2 Then from that PowerShell session:
Pivot to other machine: RunasCs.exe + Reverse shell
Logged as user1 with evil-winrm we cannot run psexec or any other tool requiring to confirm a modal, since we only have terminal access.
However, the tester can use the binary RunasCs.exe from: https://github.com/antonioCoco/RunasCs/releases. Forked in the tester repo: https://github.com/amandaguglieri/RunasCs
Upload the binary to the machine:
Set a listener in a different terminal from the attacker's machine:
Run a reverse shell:
Remote Desktop Protocol with mimikatz
If the host we want to lateral move to has "RestrictedAdmin" enabled, we can pass the hash using the RDP protocol and get an interactive session without the plaintext password.
Remote Desktop Protocol with xFreeRDP
TRoubleshooting: If Restricted Admin mode is disabled on the remote machine we can connect on the host using another tool/protocol like psexec or winrm and enable it by creating the following registry key and setting it's value zero: "HKLM:\System\CurrentControlSet\Control\Lsa\DisableRestrictedAdmin".
Linux
When you have access to AD credentials, we suggest using RDP as much as possible. If you use PowerShell Remoting and winrm to connect to a machine, you may no longer be able to run domain enumeration tools as you will experience the Kerberos Double Hop issue. To avoid it, the simplest way is to use RDP. Kerberos Double-Hop is discussed in detail in the PEN-300 course material.
Scenario 1
Lateral movement is a technique that adversaries use, after compromising an endpoint, to extend access to other hosts or applications in an organization.

using metasploit
- Get our ip
- Get machine ip
- Enumerate services in the target machine
- Go further on port 80
- Launch metasploit and search for v-cms
- Use the exploit exploit/linux/http/vcms_upload, configure it and run it
- You will get a limited meterpreter. Access to the shell and print the flag
- Map other possible interfaces in the machine. Since ifconfig does not work, spawn the shell and try again
route
- Add tunnel from interface 192.64.166.3 (which is session 1 of meterpreter) and the discovered interface, 192.182.147.2 with the utility route:
- Background the meterpreter session and check if the route is added successfully to the metasploit's routing table.
- Run auxiliary TCP port scanning module to discover any available hosts (From IP .3 to .10). And, if any of ports 80, 8080, 445, 21 and 22 are open on those hosts.
portfwd
- In order to reach the discovered target, we need to fordward remote machine port to the local machine port. We want to target port 21 of that machine so we will forward remote port 21 to the local port 1234. This is done with the utility portfwd from meterpreter
- Run nmap on the forwarded local port to identify the service name
- Search for vsftpd exploit module and exploit the target host using vsftpd backdoor exploit module.
- Print the flag