{"id":872,"date":"2018-04-26T10:14:13","date_gmt":"2018-04-26T02:14:13","guid":{"rendered":"https:\/\/blog.freesilo.com\/?p=872"},"modified":"2018-04-26T10:14:13","modified_gmt":"2018-04-26T02:14:13","slug":"wireshark-%e6%8a%93%e5%8c%85-%e8%bf%87%e6%bb%a4%e8%a7%84%e5%88%99%e5%a4%a7%e5%85%a8","status":"publish","type":"post","link":"https:\/\/freesilo.com\/?p=872","title":{"rendered":"Wireshark \u6293\u5305 \u8fc7\u6ee4\u89c4\u5219\u5927\u5168"},"content":{"rendered":"<p>**http.host==6san.com<br \/>\nhttp.host contains 6san.com<br \/>\n\/\/\u8fc7\u6ee4\u7ecf\u8fc7\u6307\u5b9a\u57df\u540d\u7684http\u6570\u636e\u5305\uff0c\u8fd9\u91cc\u7684host\u503c\u4e0d\u4e00\u5b9a\u662f\u8bf7\u6c42\u4e2d\u7684\u57df\u540d<br \/>\nhttp.response.code==302<br \/>\n\/\/\u8fc7\u6ee4http\u54cd\u5e94\u72b6\u6001\u7801\u4e3a302\u7684\u6570\u636e\u5305<br \/>\nhttp.response==1<br \/>\n\/\/\u8fc7\u6ee4\u6240\u6709\u7684http\u54cd\u5e94\u5305<br \/>\nhttp.request==1<br \/>\n\/\/\u8fc7\u6ee4\u6240\u6709\u7684http\u8bf7\u6c42\uff0c\u8c8c\u4f3c\u4e5f\u53ef\u4ee5\u4f7f\u7528http.request<br \/>\nhttp.request.method==POST<br \/>\n\/\/wireshark\u8fc7\u6ee4\u6240\u6709\u8bf7\u6c42\u65b9\u5f0f\u4e3aPOST\u7684http\u8bf7\u6c42\u5305\uff0c\u6ce8\u610fPOST\u4e3a\u5927\u5199<br \/>\nhttp.cookie contains guid<br \/>\n\/\/\u8fc7\u6ee4\u542b\u6709\u6307\u5b9acookie\u7684http\u6570\u636e\u5305<br \/>\nhttp.request.uri==\u201d\/online\/setpoint\u201d<br \/>\n\/\/\u8fc7\u6ee4\u8bf7\u6c42\u7684uri\uff0c\u53d6\u503c\u662f\u57df\u540d\u540e\u7684\u90e8\u5206<br \/>\nhttp.request.full_uri==\u201d http:\/\/task.browser.360.cn\/online\/setpoint\u201d<br \/>\n\/\/\u8fc7\u6ee4\u542b\u57df\u540d\u7684\u6574\u4e2aurl\u5219\u9700\u8981\u4f7f\u7528http.request.full_uri<br \/>\nhttp.server contains \u201cnginx\u201d<br \/>\n\/\/\u8fc7\u6ee4http\u5934\u4e2dserver\u5b57\u6bb5\u542b\u6709nginx\u5b57\u7b26\u7684\u6570\u636e\u5305<br \/>\nhttp.content_type == \u201ctext\/html\u201d<br \/>\n\/\/\u8fc7\u6ee4content_type\u662ftext\/html\u7684http\u54cd\u5e94\u3001post\u5305\uff0c\u5373\u6839\u636e\u6587\u4ef6\u7c7b\u578b\u8fc7\u6ee4http\u6570\u636e\u5305<br \/>\nhttp.content_encoding == \u201cgzip\u201d<br \/>\n\/\/\u8fc7\u6ee4content_encoding\u662fgzip\u7684http\u5305<br \/>\nhttp.transfer_encoding == \u201cchunked\u201d<br \/>\n\/\/\u6839\u636etransfer_encoding\u8fc7\u6ee4<br \/>\nhttp.content_length == 279<br \/>\nhttp.content_length_header == \u201c279\u201d<br \/>\n\/\/\u6839\u636econtent_length\u7684\u6570\u503c\u8fc7\u6ee4<br \/>\nhttp.server<br \/>\n\/\/\u8fc7\u6ee4\u6240\u6709\u542b\u6709http\u5934\u4e2d\u542b\u6709server\u5b57\u6bb5\u7684\u6570\u636e\u5305<br \/>\nhttp.request.version == \u201cHTTP\/1.1\u2033<br \/>\n\/\/\u8fc7\u6ee4HTTP\/1.1\u7248\u672c\u7684http\u5305\uff0c\u5305\u62ec\u8bf7\u6c42\u548c\u54cd\u5e94<br \/>\nhttp.response.phrase == \u201cOK\u201d<br \/>\n\/\/\u8fc7\u6ee4http\u54cd\u5e94\u4e2d\u7684phrase**<\/p>\n<p>1.<br \/>\n\u8fc7 \u6ee4<br \/>\nIP\uff0c\u5982\u6765\u6e90IP\u6216\u8005\u76ee\u6807IP\u7b49\u4e8e\u67d0\u4e2aIP<\/p>\n<p>\u4f8b\u5b50:<br \/>\nip.src eq 192.168.1.107 or ip.dst eq 192.168.1.107<br \/>\n\u6216\u8005<br \/>\nip.addr eq 192.168.1.107 \/\/ \u90fd\u80fd\u663e\u793a\u6765\u6e90IP\u548c\u76ee\u6807IP<\/p>\n<p>2.<br \/>\n\u8fc7\u6ee4<br \/>\n\u7aef \u53e3<\/p>\n<p>\u4f8b\u5b50:<br \/>\ntcp.port eq 80 \/\/ \u4e0d\u7ba1\u7aef\u53e3\u662f\u6765\u6e90\u7684\u8fd8\u662f\u76ee\u6807\u7684\u90fd\u663e\u793a<br \/>\ntcp.port == 80<br \/>\ntcp.port eq 2722<br \/>\ntcp.port eq 80 or udp.port eq 80<br \/>\ntcp.dstport == 80 \/\/ \u53ea\u663etcp\u534f\u8bae\u7684\u76ee\u6807\u7aef\u53e380<br \/>\ntcp.srcport == 80 \/\/ \u53ea\u663etcp\u534f\u8bae\u7684\u6765\u6e90\u7aef\u53e380<\/p>\n<p>udp.port eq 15000<\/p>\n<p>\u8fc7\u6ee4<br \/>\n\u7aef\u53e3\u8303\u56f4<br \/>\ntcp.port >= 1 and tcp.port <= 80\n\n3.\n\u8fc7 \u6ee4\n\u534f\u8bae\n\n\u4f8b\u5b50:\ntcp\nudp\narp\nicmp\nhttp\nsmtp\nftp\ndns\nmsnms\nip\nssl\noicq\nbootp\n\u7b49 \u7b49\n\n\u6392\u9664arp\u5305\uff0c\u5982!arp  \u6216\u8005  not arp\n\n4.\n\u8fc7 \u6ee4\nMAC\n\n\u592a\u4ee5\u7f51\u5934\n\u8fc7\u6ee4\n\neth.dst == A0:00:00:04:C5:84 \/\/\n\u8fc7\u6ee4\n\u76ee \u6807mac\neth.src eq A0:00:00:04:C5:84 \/\/\n\u8fc7 \u6ee4\n\u6765\u6e90mac\neth.dst==A0:00:00:04:C5:84\neth.dst==A0-00-00-04-C5-84\neth.addr eq A0:00:00:04:C5:84 \/\/\n\u8fc7\u6ee4\n\u6765 \u6e90MAC\u548c\u76ee\u6807MAC\u90fd\u7b49\u4e8eA0:00:00:04:C5:84\u7684\n\nless than \u5c0f\u4e8e < lt\n\u5c0f\u4e8e\u7b49\u4e8e le\n\n\u7b49 \u4e8e eq\n\n\u5927\u4e8e gt\n\u5927\u4e8e\u7b49\u4e8e ge\n\n\u4e0d\u7b49 ne\n\n\n5.\u5305\u957f\u5ea6\n\u8fc7 \u6ee4\n\n\n\u4f8b\u5b50:\nudp.length == 26 \u8fd9\u4e2a\u957f\u5ea6\u662f\u6307udp\u672c\u8eab\u56fa\u5b9a\u957f\u5ea68\u52a0\u4e0audp\u4e0b\u9762\u90a3\u5757\u6570\u636e\u5305\u4e4b\u548c\ntcp.len >= 7  \u6307\u7684\u662fip\u6570\u636e\u5305(tcp\u4e0b\u9762\u90a3\u5757\u6570\u636e),\u4e0d\u5305\u62ectcp\u672c\u8eab<br \/>\nip.len == 94 \u9664\u4e86\u4ee5\u592a\u7f51\u5934\u56fa\u5b9a\u957f\u5ea614,\u5176\u5b83\u90fd\u7b97\u662fip.len,\u5373\u4eceip\u672c\u8eab\u5230\u6700\u540e<br \/>\nframe.len == 119 \u6574\u4e2a\u6570\u636e\u5305\u957f\u5ea6,\u4eceeth\u5f00\u59cb\u5230\u6700\u540e<\/p>\n<p>eth &#8212;> ip or arp &#8212;> tcp or udp &#8212;> da<br \/>\nta<\/p>\n<p>6.http \u6a21\u5f0f<br \/>\n\u8fc7\u6ee4<\/p>\n<p>\u4f8b\u5b50:<br \/>\nhttp.request.method == &#8220;GET&#8221;<br \/>\nhttp.request.method == &#8220;POST&#8221;<br \/>\nhttp.request.uri == &#8220;\/img\/logo-edu.gif&#8221;<br \/>\nhttp contains &#8220;GET&#8221;<br \/>\nhttp contains &#8220;HTTP\/1.&#8221;<\/p>\n<p>\/\/ GET\u5305<br \/>\nhttp.request.method == &#8220;GET&#8221; &#038;&#038; http contains &#8220;Host: &#8221;<br \/>\nhttp.request.method == &#8220;GET&#8221; &#038;&#038; http contains &#8220;User-Agent: &#8221;<br \/>\n\/\/ POST\u5305<br \/>\nhttp.request.method == &#8220;POST&#8221; &#038;&#038; http contains &#8220;Host: &#8221;<br \/>\nhttp.request.method == &#8220;POST&#8221; &#038;&#038; http contains &#8220;User-Agent: &#8221;<br \/>\n\/\/ \u54cd\u5e94\u5305<br \/>\nhttp contains &#8220;HTTP\/1.1 200 OK&#8221; &#038;&#038; http contains &#8220;Content-Type: &#8221;<br \/>\nhttp contains &#8220;HTTP\/1.0 200 OK&#8221; &#038;&#038; http contains &#8220;Content-Type: &#8221;<br \/>\n\u4e00 \u5b9a\u5305\u542b\u5982\u4e0b<br \/>\nContent-Type:<\/p>\n<p>7.TCP\u53c2\u6570<br \/>\n\u8fc7 \u6ee4<\/p>\n<p>tcp.flags \u663e\u793a\u5305\u542bTCP\u6807\u5fd7\u7684\u5c01\u5305\u3002<br \/>\ntcp.flags.syn == 0x02    \u663e\u793a\u5305\u542bTCP SYN\u6807\u5fd7\u7684\u5c01\u5305\u3002<br \/>\ntcp.window_size == 0 &#038;&#038; tcp.flags.reset != 1<\/p>\n<p>8.<br \/>\n\u8fc7\u6ee4<br \/>\n\u5185\u5bb9<\/p>\n<p>tcp[20] \u8868\u793a\u4ece20\u5f00\u59cb\uff0c\u53d61\u4e2a\u5b57\u7b26<br \/>\ntcp[20:]\u8868\u793a\u4ece20\u5f00\u59cb\uff0c\u53d61\u4e2a\u5b57\u7b26\u4ee5\u4e0a<br \/>\ntcp[20:8]\u8868\u793a\u4ece20\u5f00\u59cb\uff0c\u53d68\u4e2a\u5b57\u7b26<br \/>\ntcp[offset,n]<\/p>\n<p>udp[8:3]==81:60:03 \/\/ \u504f\u79fb8\u4e2abytes,\u518d\u53d63\u4e2a\u6570\uff0c\u662f\u5426\u4e0e==\u540e\u9762\u7684\u6570\u636e\u76f8\u7b49\uff1f<br \/>\nudp[8:1]==32  \u5982\u679c\u6211\u731c\u7684\u6ca1\u6709\u9519\u7684\u8bdd\uff0c\u5e94\u8be5\u662fudp[offset:\u622a\u53d6\u4e2a\u6570]=nValue<br \/>\neth.addr[0:3]==00:06:5B<\/p>\n","protected":false},"excerpt":{"rendered":"<p>**http.host==6san.com http.host contains&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/freesilo.com\/?p=872\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-872","post","type-post","status-publish","format-standard","hentry","category-windows"],"_links":{"self":[{"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/posts\/872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/freesilo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=872"}],"version-history":[{"count":1,"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/posts\/872\/revisions"}],"predecessor-version":[{"id":873,"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/posts\/872\/revisions\/873"}],"wp:attachment":[{"href":"https:\/\/freesilo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/freesilo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/freesilo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}