
By: Z33MAX
May 31, 2016
Powershell Empire Stagers 1: Phishing with an Office Macro and Evading AVs

By: Z33MAX
May 31, 2016
Welcome Cybrarians,
Phishing is one of the important things that attackers carefully plan for - compromising one device on the network can help attack the whole connected network. It's also stealthy way of gathering more information about certain users or companies
As you know, they are many ways of phishing. Creativity is a key in emulating a real situation scenarios to keep it believable to the victims. In this tutorial, we're going to use a PowerShell tool called Empire to create a malicious Office Macro that can not be filtered by emails or recognized by Anti-Virus software.
Empire PowerShell gives us "the ability to run PowerShell agents without needing powershell.exe." This helps us evade email filters that focus on the exe formats as well as Anti-Virus software.
Let’s begin...
Tutorial Requirements :
1- Empire Powershell at GitHub: https://github.com/PowerShellEmpire/Empire
2- Microsoft Office document
3- Kali Linux on VirtualBox
4- Another system either Mac or windows
Step 1: Install Empire
Start your Kali linux box and clone Empire repository to your machine:>>> git clone https://github.com/PowerShellEmpire/Empire.git
>>> cd Empire/setup
>>>./install.sh
Make sure that Kali box has the right date and time and English set at the language. This step is very important if you want to avoid issues with getting information back when you're running Empire.
Step 2 : Run Empire
Now that the tool is installed on your machine, run Empire by typing:
>>> ./empire
Step 3: Preparing the Listener
Now that Empire is running, type Listeners to switch to listeners mode:
Type Options to list all the options that are related to the listener setting:
In this step, I’ll change the Name of the listener from Test to ProjectData:
Type Execute to change the name:
>> execute
>>options
Step 4: Create Macro
In this step, we're going to use usestager type macro to create the malicious macro:
>>> usestager macro projectData
>> options
>> execute
>>>> cat /tmp/macro
Copy the whole output code.
Step 5:Embed Macro into an Office document
Now that the code is ready, open an MS Office file. For this tutorial, I'm using a Word document. Go to View and click on Macro---------> click on View MacrosType the name of the macro under Macro Name and click Create.
Note: Use an inconspicuous name - preferably something related to the documentation you're sending.
Once the whole code is pasted, save it. Then, save the document as Word 97-2003.
Step 6: Send the File
In this step, to make sure your file looks legitimate, choose a file that contains information that you think would be relevant to the victim. This step depends on how good are you at gathering information about the victim before sending him the file.Step 7: Getting the Connection
After sending the email, wait for the connection. It might take a while…..
Once you get the connection, you'll get a message colored in green that says "agent is active."@Z33MaXX