x32x01
ADMINISTRATOR
In a previous tutorial, we used PowerShell Empire v2.3.0 for post exploitation of Windows Operating System. The same can also be done with one of the most popular toolkit named as Social Engineering Toolkit (SETOOLKIT) which is already pre-installed in every Kali Linux flavor.
In order to exploit, the following steps need to occur:
Before to start, make sure that you must have installed latest version of SETOOLKIT in your Kali Linux machine and the command to start SET is “setoolkit“.
Code:
setoolkit
As you press enter, a welcome screen will appear with the following list of options to choose:- 1) Social-Engineering Attacks
- 2) Penetration Testing (Fast-Track)
- 3) Third Party Modules
- 4) Update the Social-Engineer Toolkit
- 5) Update SET Configuration
- 6) Help, Credits, and About
- 99) Exit the Social-Engineer Toolkit

Now As you press 1, new options will show under Social Engineering Attacks that are:
- 1) Spear-Phishing Attack Vectors
- 2) Website Attack Vectors
- 3) Infectious Media Generator
- 4) Create a Payload and Listener
- 5) Mass Mailer Attack
- 6) Arduino-Based Attack Vector
- 7) Wireless Access Point Attack Vector
- 8) QRCode Generator Attack Vector
- 9) Powershell Attack Vectors
- 10) SMS Spoofing Attack Vector
- 11) Third Party Modules
- 99) Return back to main menu.

Next screen will lists out the number of payloads based on the choice of exploit.
Here the best payload is Windows Reverse_TCP Meterpreter i.e. option 2 which instantly opens a meterpreter shell against the target whenever he/she executes your file.

Next, enter your localhost IP Address and the PORT Number (443) as shown below:






To migrate it, simply type the following command:
Code:
migrate <PID>

Also type “shell” command to go into Windows Command Shell Mode where you can run all CMD commands like dir, net user etc.


Fortunately, Metasploit has a Meterpreter script, “getsystem”, that will use a number of different techniques to attempt to gain SYSTEM level privileges on the remote system.
Simply exit from shell and type “use priv” command followed by “getsystem” command.

Within the blink of an eye, your session will get SYSTEM privileges but if not then you need to use Empire Powershell Framework for privilege escalation as explained in this post.
Go back to main directory of Empire and give executable permissions to empire by typing “chmod +x empire” and then run ./empire.

To see available modules, type usemodule [tab]. To search module names/descriptions, use searchmodule privesc and matching module names/descriptions will be output.
The first thing you need to do it set up a local listener. The listeners command will jump you to the listener management menu.
The uselistener command will allow you to select the type of listener. Hitting TAB after this command will show all available listener types. So in this case, we’ll use http listener module which you can use by typing “uselistener http” and then type “execute” for run.

Next you need to generate a powershell script with the help of launcher by typing “launcher powershell http”


The above command will generate a powershell script which you need to execute on your remote target system with the help of meterpreter as shown in previous post.