{"id":159625,"date":"2020-09-24T05:54:21","date_gmt":"2020-09-23T21:54:21","guid":{"rendered":"http:\/\/4563.org\/?p=159625"},"modified":"2020-09-24T05:54:21","modified_gmt":"2020-09-23T21:54:21","slug":"c-%e8%af%ad%e8%a8%80%e6%98%af%e6%80%8e%e4%b9%88%e6%8a%93%e5%8f%96%e7%bd%91%e5%8f%a3%e6%b5%81%e9%87%8f%e7%9a%84%e6%95%b0%e6%8d%ae%e5%8c%85%e5%b9%b6%e8%a7%a3%e6%9e%90%e7%9a%84%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=159625","title":{"rendered":"C \u8bed\u8a00\u662f\u600e\u4e48\u6293\u53d6\u7f51\u53e3\u6d41\u91cf\u7684\u6570\u636e\u5305\u5e76\u89e3\u6790\u7684\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  C \u8bed\u8a00\u662f\u600e\u4e48\u6293\u53d6\u7f51\u53e3\u6d41\u91cf\u7684\u6570\u636e\u5305\u5e76\u89e3\u6790\u7684\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mikywei <\/span>  <span><i><\/i> 1<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        1. \u73b0\u5728\u5f88\u591a\u7684\u786c\u4ef6\u76d2\u5b50(\u8def\u7531\u5668\u3001\u9632\u706b\u5899\u3001WAF \u3001\u7f51\u7edc\u5ba1\u8ba1)\u90fd\u662f php \u7684\u540e\u53f0\uff0c\u8fd9\u4e9b\u786c\u4ef6\u76d2\u5b50\u4e5f\u7b97\u670d\u52a1\u5668\uff0c\u4f46\u6027\u80fd\u4e0d\u9ad8\u4e0d\u5927\u53ef\u80fd\u8fd0\u884c\u5176\u5b83\u540e\u53f0\u8bed\u8a00\uff0c\u4f46\u542c\u8bf4\u53c8\u662f\u7528 C \u8bed\u8a00\u6293\u53d6\u7f51\u53e3\u6d41\u91cf\uff0c\u7136\u540e\u4ea4\u7ed9 php \u5904\u7406\u7684\uff1b<br \/>2. \u5f88\u597d\u5947\u8fd9\u4e9b\u786c\u4ef6\u76d2\u5b50\u662f\u600e\u4e48\u7528 C \u8bed\u8a00\u548c php \u62ff\u5230\u7f51\u53e3\u6d41\u91cf\u7684\u6570\u636e\uff0c\u4e00\u822c\u6211\u4eec\u6293\u5305\u90fd\u662f\u7528 tcpdump \u548c wireshark \u624d\u884c\uff0cphp \u600e\u4e48\u62ff\u5230\u7f51\u5361\u6570\u636e\u7684\u5462\uff1f<br \/>3. C \u8bed\u8a00\u548c php \u662f\u600e\u4e48\u89e3\u6790\u7f51\u53e3\u7684\u6d41\u91cf\u7684\u5462\uff1f\u662f\u5148\u4fdd\u5b58\u6210 pcap \u7684\u6570\u636e\u5305\u7136\u540e\u518d\u7528\u76f8\u5173 php \u51fd\u6570\u8fdb\u884c\u89e3\u6790\uff1f\u8fd8\u662f\u80fd\u5b9e\u65f6\u6293\u5230\u7f51\u53e3\u7684\u6570\u636e\u5b9e\u65f6\u89e3\u6790\u51fa\u6765\u5462\uff1f<br \/>4. \u5173\u4e8e\u89e3\u6790\uff1a\u6211\u8bf4\u7684\u89e3\u6790\u5c31\u662f\u628a\u539f\u672c\u7f51\u53e3\u7684\u6d41\u91cf\u8fd8\u539f\u6210\u4e24\u4e2a ip \u548c\u7aef\u53e3\u76f8\u4e92\u901a\u4fe1\u7684\u4f1a\u8bdd\uff0c\u7136\u540e\u518d\u8bc6\u522b\u51fa\u8fd9\u4e2a\u4f1a\u8bdd\u7684\u534f\u8bae\u662f http \u3001ftp \u3001dns \u3001ssh \u3001telnet \u3001mysql \u3001icmp \u6216\u8005\u5176\u5b83\u7684\u7f51\u7edc\u534f\u8bae\u3002      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>14<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3438135\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ripperdev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5b9e\u65f6\u6293\u53d6\u7f51\u5361\u6570\u636e\u5305\u518d\u89e3\u6790\u7684\uff0cC \u8bed\u8a00\u6709 libpcap \u5e93\uff0cC++\u6709 libtins \u5e93\u3002<br \/>\u53ef\u4ee5\u7528 C\/C++\u89e3\u6790\u6570\u636e\u5305\uff0c\u751f\u6210\u56fe\u8868\u6570\u636e\u518d\u63d0\u4f9b\u7ed9 PHP \u5c55\u793a\u7528\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438136\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Chenamy2017 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6293\u5305\u5904\u7406\u7528 C \uff08 libpcap \uff09\uff0cphp \u53ea\u662f\u540e\u53f0\u800c\u5df2\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438137\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sylar1015 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5de7\u4e86\uff0c\u73b0\u6709\u6e90\u7801\u4e00\u5957\uff0c\u5b9e\u65f6 C \u6293\u5305\u3001IP \u7ec4\u5305\uff0c\u89e3\u6790\u4e0a\u5c42\u5404\u79cd\u534f\u8bae                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438138\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : LANB0 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u539f\u59cb\u5957\u63a5\u5b57\u4e5f\u7b97\u4e00\u4e2a\u9009\u62e9                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438139\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : reus <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             PHP \u7684 web \u670d\u52a1\u5668\u5c31\u76f4\u63a5\u7528 socket api \u554a\uff0c\u6293\u4ec0\u4e48\u6d41\u91cf\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438140\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : w2exzz <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             tcpdump \u548c wireshark \u4e5f\u662f C \u5199\u7684\u554a\u2026\u2026<br \/>\u6240\u4ee5 C \u8bed\u8a00\u4e5f\u80fd\u6293\u5230\u6d41\u91cf\u2026\u2026<br \/>\u81ea\u5df1\u7167\u7740\u7f51\u4e0a\u7684\u6559\u7a0b\u5199\u4e2a demo \u5c31\u660e\u767d\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438141\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mXw <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u81ea\u5df1\u7528 raw socket \u6478\u4e00\u904d\u6d41\u7a0b\u5c31\u61c2\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438142\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nomansky <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1. \u4f7f\u7528 DPI \u6df1\u5ea6\u5305\u68c0\u6d4b\u6280\u672f<br \/>2. \u5e95\u5c42\u4e00\u822c\u90fd\u662f\u8c03\u7528 C \u5e93<br \/>3. \u53ef\u4ee5\u4fdd\u5b58\u6210\u6587\u4ef6\uff0c\u6d41\u91cf\u5927\u7684\u60c5\u51b5\u4f46\u4e00\u822c\u90fd\u662f\u7528\u7f13\u5b58\u505a\u4e34\u65f6\u4fdd\u5b58<br \/>4. \u6839\u636e\u534f\u8bae\u7279\u5f81\u5206\u6790\uff0c\u6bd4\u5982\u534f\u8bae\u5934\u3001\u5b57\u6bb5\uff0c\u63e1\u624b\u7b49\u7279\u5f81\u7136\u540e\u548c\u7279\u5f81\u5e93\u8fdb\u884c\u5339\u914d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438143\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : janxin <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             libpcap \u6293\u53d6\u6d41\u91cf                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438144\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kangsheng9527 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             netfilter \u9700\u8981\u5546\u4e1a\u670d\u52a1\u627e\u6211\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438145\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : no1xsyzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             wireshark \u7684\u7ec8\u7aef\u7248\u672c tshark \u770b &#8211;help\uff0c\u91cc\u9762\u76f4\u63a5\u6307\u660e\u4e86 -f \u9009\u9879\u7528\u7684\u662f libpcap \u7684\u8bed\u6cd5\u3002<br \/>\u6240\u4ee5 libpcap \u5c31\u6210\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438146\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chanchancl <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             3: \u5185\u6838\u5728\u521d\u59cb\u5316\u548c\u542f\u52a8\u7f51\u5361\u7684\u65f6\u5019\uff0c\u4ece\u9a71\u52a8\u5c42\u53d6\u5f97 skb \u4e4b\u540e\uff0c\u5411\u4e0a\u5c42 tcp\/ip \u8f6c\u79fb\u7684\u65f6\u5019\uff0c\u4f1a\u6709 dump \u70b9\uff0c\u5c06\u6536\u5230\u7684\u4fe1\u606f\u4f20\u7ed9\u5916\u90e8\u51fd\u6570\uff0c\u800c tcpdump \u7528\u4e86\u76f8\u5173\u7684\u7cfb\u7edf\u8c03\u7528\uff0c\u5c31\u53ef\u4ee5\u6536\u5230\u8fd9\u4e9b\u5305\u3002<\/p>\n<p>wireshark \u7528 libcap \u53bb\u6293\u5305\uff0c\u800c libcap \u5185\u7684\u5b9e\u73b0\u662f\u5efa\u7acb socket \u65f6\uff0c\u6307\u5b9a\u4e00\u4e9b\u53c2\u6570\uff0c\u8ba9\u6570\u636e\u5305\u8f6c\u53d1\u5230\u81ea\u5df1\u7684\u961f\u5217                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438147\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hasdream <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             c \u5e93 libpcap pfring \u89e3\u6790\u540e\u53d1\u5230 MQ \u6216\u8005 IPC php \u63a5\u6536\u5904\u7406                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3438148\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hasdream <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1. c \u7aef\u4e00\u822c\u505a\u6293\u53d6 \u8fc7\u6ee4\u534f\u8bae <br \/>2.\u7136\u540e\u5c31\u628a packet \u53d1\u7ed9\u4e0b\u5c42\u5904\u7406 \uff08\u5982\u679c\u903b\u8f91\u8017\u65f6\u592a\u957f\u5c31\u51fa\u73b0 kernel drop \u95ee\u9898\uff09<br \/>3.\u4e0b\u5c42 \u6839\u636e\u6536\u5230\u7684 packet \u6839\u636e\u9700\u8981 \u8fdb\u884c\u89e3\u6790\uff08\u6bd4\u5982 ip header \u4e2d\u7684\u534f\u8bae\u4fe1\u606f\u662f\u5728\u90a3\u4e2a\u4f4d\u7f6e rfc \u4e2d\u6709\u8bf4\u660e\uff09<br \/>4.\u5165\u5e93\u5c55\u793a.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>C \u8bed\u8a00\u662f\u600e\u4e48\u6293\u53d6\u7f51\u53e3\u6d41\u91cf\u7684\u6570\u636e\u5305&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/159625"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=159625"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/159625\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=159625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=159625"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=159625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}