`
gaojingsong
  • 浏览: 1181794 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

【Linux中的瑞士军刀--nc】

阅读更多

一、What is Netcat?

Netcat is a featured networking utility which reads and writes data across network connections, using the TCP/IP protocol.

It is designed to be a reliable "back-end" tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities.

 

It provides access to the following main features:

Outbound and inbound connections, TCP or UDP, to or from any ports.

Featured tunneling mode which allows also special tunneling such as UDP to TCP, with the possibility of specifying all network parameters (source port/interface, listening port/interface, and the remote host allowed to connect to the tunnel.

Built-in port-scanning capabilities, with randomizer.

Advanced usage options, such as buffered send-mode (one line every N seconds), and hexdump (to stderr or to a specified file) of trasmitted and received data.

Optional RFC854 telnet codes parser and responder.

 

 

NetCat(简称nc),在网络工具中有“瑞士军刀”美誉,其有Windows和Linux的版本。因为它短小精悍(1.84版本也不过25k,旧版本或缩减版甚至更小)、功能实用,被设计为一个简单、可靠的网络工具,可通过TCP或UDP协议传输读写数据。同时,它还是一个网络应用Debug分析器,因为它可以根据需要创建各种不同类型的网络连接。

 

 

二、Project Goals

Although the project development is marked as beta, GNU Netcat is already enough stable for everyday use.

Goals of this project are full compatibility with the original nc 1.10 that is widely used, and portability. GNU Netcat should compile and work without changes on the following hosts:

Linux (test host: alphaev67-unknown-linux-gnu)

FreeBSD (test host: i386-unknown-freebsd4.9)

NetBSD (test host: i386-unknown-netbsdelf1.6.1)

SunOS/Solaris (test host: sparc-sun-solaris2.9)

MacOS X (test host: powerpc-apple-darwin6.8)

Other operating systems could be supported with minor source modifications, since the code has been written following the GNU coding standard conventions.

If you find a bug or you want to report a successfull build on another OS, use the bug tracking system.

 

Soon the project will split releases between "stable" releases and "development" releases to improve development speed and the introduction of new features without requiring too much testing.

 

For further information, see the README and ChangeLog files in the package. 

If you are courageous enough to try the newest development version or you want to contribute patches, you may want to check out the version in the CVS repository.

 

 

 

三、应用

1、远程拷贝文件

从server1拷贝文件到server2上。需要先在server2上,用nc激活监听

server2上运行:

[root@hatest2 tmp]# nc -lp 1234 > install.log

 

server1上运行:

[root@hatest1 ~]# ll install.log

-rw-r--r--   1 root root 39693 12月 20   2007 install.log

[root@hatest1 ~]# nc hatest2  1234 < install.log

 

 

 

 

四、参数简介

1.84版本参数简介1. nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port]

  [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_protocol] [-x 

  proxy_address[:port]] [hostname] [port[s]] 

 

1. -4 强制使用ipv4 

2. -6 强制使用ipv6 

3. -D 允许socket通信返回debug信息 

4.       -d 不允许从标准输入中读取 

5. -h 显示nc帮助文档 

6. -i interval  

7.    指定每行之间内容延时发送和接受,也可以使多个端口之间的连接延时 

8. -k 当一个连接结束时,强制nc监听另一个连接。必须和-l一起使用 

9. -l 用于监听传入的数据链接,不能与-p -z -s一起使用。-w 参数的超时也会被忽略 

10. -n 不执行任何地址,主机名,端口或DNS查询 

11. -p 指定nc使用的源端口,受权限限制且不能余-l一起使用 

12. -r 指定nc使用的源端口和目的端口,不能使用系统原来就指定的那些端口 

13. -S 允许在RFC 2385的TCP MD5签名选项 

14. -s source_ip_address  

15.    指定用于发包的接口的IP地址,不能和-l一起使用 

16. -T ToS 

17.    指定链接的IP服务类型(TOS) 

18. -C 自动换行 

19. -t 使nc能够与telnet交互 

20. -U 使用UNIX域socket 

21. -u 使用udp代替默认的tcp选项 

22. -v 输出详细报告 

23. -w timeout 

24.     一个链接一段时间无操作,则自动断开,默认无超时 

25. -X proxy_version 

26.     指定nc使用代理时所采用的协议,可选的有socksv4,socks5以及https。默认socks5 

27. -x proxy_address[:port] 

28.     指定nc使用的代理地址和端口。默认设置:1080(SOCKS),3128(HTTPS) 

29. -z 只监听不发送任何包

 

0
2
分享到:
评论

相关推荐

    netcat 瑞士军刀 linux windows netcat 瑞士军刀 linux windows

     win98用户可以在autoexec.bat加入path=nc的路径,win2000用户在环境变量中加入path中,linux含有这个命令(redhat) 1、基本使用  想要连接到某处: nc [-options] hostname port[s] [ports] ...  绑定端口等待...

    centos7.9 nc rpm包及依赖

    nc是netcat的简写,有着网络界的瑞士军刀美誉。因为它短小精悍、功能实用,被设计为一个简单、可靠的网络工具 nc的作用 (1)实现任意TCP/UDP端口的侦听,nc可以作为server以TCP或UDP方式侦听指定端口 (2)端口的...

    NC代码.rar

    瑞士军刀:nc.exe 参数说明: -h 查看帮助信息 -d 后台模式 -e prog程序重定向,一但连接就执行[危险] -i secs延时的间隔 -l 监听模式,用于入站连接 -L 监听模式,连接天闭后仍然继续监听,直到CTR+C -n...

    cmd操作命令和linux命令大全收集

    它在 Windows NT/2000/XP 中均可使用,但在 Windows 98 中却没有集成这一个工具。 4. explorer-------打开资源管理器 5. logoff---------注销命令 6. shutdown-------60秒倒计时关机命令 7. lusrmgr.msc----本机...

    使用nc实现linux与windows互联

    Netcat 是一款非常出名的网络工具,简称“NC”,有渗透测试中的“瑞士军刀”之称。 目前在安全工具排行榜中排名第6 1、电子取证 2、远程文件传输 3、作端口监听 4、端口扫描 5、还可以实现远程 shell 等功能。

    Linux 中的nc命令小结

    NetCat,在网络工具中有“瑞士军刀”美誉,其有Windows和Linux的版本。因为它短小精悍(1.84版本也不过25k,旧版本或缩减版甚至更小)、功能实用,被设计为一个简单、可靠的网络工具,可通过TCP或UDP协议传输读写...

    netcat-win32-1.12.zip

    因其功能十分强大,体积小巧而出名,又被大家称为“瑞士军刀”。nc - TCP/IP swiss army knife nc 常用于溢出、反向链接、上传文本等。其实是一个非标准的 telnet 客户端程序。也是一个 putty.exe 客户端程序。

    nc工具包x86

    netcat被誉为网络安全界的‘瑞士军刀’,相信没有什么人不认识它吧...... 一个简单而有用的工具,透过使用TCP或UDP协议的网络连接去读写数据。它被设计成一个稳定的后门工具,能够直接由其它程序和脚本轻松驱动。...

    Linux常用网络工具:批量主机服务扫描之netcat

    netcat又叫做瑞士军刀,是黑客和系统管理员常用的网络工具,初开发的目的是文件传输,后来发展出很多强大的功能,比如也可以完成批量主机服务扫描。  之前介绍了另一个更常用的批量主机服务扫描工具:nmap。  ...

    32+64位socat,Android版,arm+arm64,android手机可用,android反向shell工具

    Socat 是 Linux 下的一个多功能的网络工具,名字来由是 「Socket CAT」。其功能与有瑞士军刀之称的 Netcat 类似,可以看做是 Netcat 的加强版。 Socat 的主要特点就是在两个数据流之间建立通道,且支持众多协议和...

    netcat_for_liunx (+windows版本)

    netcat for liunx ,瑞士军刀,我一直很纳闷为什么netcat会叫瑞士军刀。在这里我会上传liunx下的netcat,windows版的话由于网上带病毒的比较多,先测试阶段,若实在需要欢迎留言。我后续会把自己真实使用的技巧发我...

    socat-1.7.3.2

    socat,是linux下的一个工具,其功能与有“瑞士军刀”之称的netcat类似,不过据说可以看做netcat的加强版。的确如此,它有一些netcat所不具备却又很有需求的功能,例如ssl连接这种。nc可能是因为比较久没有维护,...

    批处理详细教程

    基本格式 63 附录8下载软件 64 瑞士军刀:nc.exe 64 扫锚工具:xscan.exe 67 命令行方式嗅探器: xsniff.exe 69 终端服务密码破解: tscrack.exe 70 其它 72 附录9 FTP命令详解 75 附录10 ...

Global site tag (gtag.js) - Google Analytics