{"id":45,"date":"2010-10-31T16:34:49","date_gmt":"2010-10-31T05:34:49","guid":{"rendered":"http:\/\/ykyi.net\/?p=45"},"modified":"2010-10-31T16:34:49","modified_gmt":"2010-10-31T05:34:49","slug":"tcpdump%e5%9f%ba%e7%a1%80%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/ykyi.net\/?p=45","title":{"rendered":"tcpdump\u57fa\u7840\u6559\u7a0b"},"content":{"rendered":"<p>\u82f1\u6587\u539f\u6587\u51fa\u81ea\uff1a <a href=\"http:\/\/danielmiessler.com\/study\/tcpdump\/\">A tcpdump Tutorial and Primer<\/a><br \/>\n\t\u7ffb\u8bd1: ykyi.net<\/p>\n<p>Tcpdump\u662f\u4fe1\u606f\u5b89\u5168\u4e13\u4e1a\u4eba\u58eb\u6700\u91cd\u8981\u7684\u4e00\u4e2a\u7f51\u7edc\u5206\u6790\u5de5\u5177\u3002\u5bf9\u8fd9\u4e2a\u5de5\u5177\u6709\u4e00\u4e2a\u6df1\u5165\u7684\u7406\u89e3\u5bf9\u4e8e\u6bcf\u4e00\u4e2a\u559c\u6b22\u900f\u5f7b\u7406\u89e3tcp\/ip\u534f\u8bae\u6808\u7684\u4eba\u6765\u8bdd\u90fd\u662f\u5fc5\u987b\u7684\u3002\u4f46\u5f88\u591a\u4eba\u9009\u62e9\u4e00\u4e2a\u66f4\u9ad8\u7ea7\u522b\u7684\u5de5\u7ea7\uff0c\u6bd4\u5982Ethereal Wireshark\uff0c\u4f46\u662f\u6211\u8ba4\u4e3a\u8fd9\u662f\u4e00\u4e2a\u9519\u8bef\uff01<\/p>\n<p>\u4e0d\u5e94\u8be5\u673a\u68b0\u7684\u53cd\u590d\u8bb0\u5fc6\u6982\u5ff5\u800c\u5e94\u8be5\u505a\u5230\u771f\u6b63\u7684\u7406\u89e3\uff0c\u56e0\u4e3a\u5bf9tcp\/ip\u534f\u8bae\u7c07\u4fdd\u6301\u6e05\u9192\u7684\u8ba4\u77e5\u975e\u5e38\u7684\u91cd\u8981\u3002\u5982\u679c\u5bf9\u8be5\u534f\u8bae\u7c07\u80fd\u591f\u5b8c\u5168\u7cbe\u901a\uff0c\u90a3\u4f60\u8c03\u8bd5\u7f51\u7edc\u7684\u80fd\u529b\u5219\u80fd\u6bd4\u540c\u884c\u4eec\u9ad8\u51fa\u51e0\u4e2a\u6863\u6b21\u3002\u4f46\u662f\uff0c\u8981\u5b66\u7cbe\u795etcp\/ip\u534f\u8bae\u7c07\uff0c\u53ea\u6709\u4e0d\u591f\u7684\u5b9e\u8df5\u5256\u6790\u5b83\u4eec\u624d\u80fd\u505a\u5230\u3002<\/p>\n<p>\u5f53\u4f60\u4f7f\u7528\u67d0\u79cd\u5de5\u5177\u6765\u663e\u793a\u7f51\u7edc\u4e2d\u7684\u539f\u59cb\u6d41\u91cf\u4fe1\u606f\u65f6\uff0c\u4eba\u7c7b\uff0c\u800c\u4e0d\u662f\u673a\u5668\uff0c\u5c31\u8981\u627f\u62c5\u8d77\u5206\u6790\u8fd9\u4e9b\u6d41\u91cf\u7684\u91cd\u4efb\u4e86\u3002\u7528\u8fd9\u79cd\u65b9\u6cd5\u5c31\u53ef\u4ee5\u4e0d\u65ad\u5730\u52a0\u6df1\u5bf9tcp\/ip\u7684\u7406\u89e3\u3002\u5e76\u4e14\uff0c\u7528\u8fd9\u79cd\u5b66\u4e60\u65b9\u6cd5\u7684\u65f6\u5019\uff0c\u6211\u5728\u4efb\u4f55\u53ef\u80fd\u7684\u60c5\u51b5\u4e0b\u90fd\u5f3a\u70c8\u4e3b\u5f20\u4f7f\u7528tcpdump\u800c\u4e0d\u662f\u5176\u5b83\u5de5\u5177\u3002<\/p>\n<p><strong>\u9009\u9879<\/strong><br \/>\n\t\u4e0b\u9762\u5c06\u5217\u51fa\u4e00\u4e9b\u7528\u4f8b\u5b50\u7684\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u4f60\u4f7f\u7528\u8fd9\u4e2a\u5de5\u5177\u65f6\u5bf9\u4f60\u6709\u5f88\u5927\u7684\u5e2e\u52a9\u3002\u8fd9\u4e9b\u9009\u9879\u5f88\u5bb9\u6613\u6de1\u5fd8\u6216\u4e0e\u5176\u5b83\u7c7b\u578b\u7684\u6ee4\u955c(Filter,\u7b14\u8005\u8ba4\u4e3a\u8fd9\u91cc\u7684\u6ee4\u955c\u5b9e\u9645\u4e0a\u6307\u7684\u662f\u5176\u5b83\u7f51\u7edc\u5de5\u5177)\u6df7\u6dc6\u3002\u6bd4\u5982, ethereal\u3002\u6240\u4ee5\uff0c\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u53ef\u4ee5\u4f5c\u4e3a\u4e00\u4e2a\u53c2\u8003\u6587\u6863\uff0c\u6211\u5c31\u662f\u8fd9\u6837\u4f7f\u7528\u5b83\u7684\u3002<\/p>\n<p>\u9996\u5148\uff0c\u6211\u8981\u5148\u4ecb\u7ecd\u51e0\u4e2a\u6211\u8ba4\u4e3a\u5f88\u65b9\u4fbf\u7684tcpdump\u7684\u9009\u9879\u3002\u7b2c\u4e00\u4e2a\u662f -n, \u8fd9\u6837\u7684\u8bdd\u57df\u540d\u5c31\u4e0d\u4f1a\u88ab\u89e3\u6790\u4e86\uff0c\u800c\u662f\u7528\u6570\u5b57IP\u7684\u5f62\u5f0f\u663e\u793a\u5730\u5740(\u8bd1\u8005\u6ce8: \u540cnetstat\u7684-n\u662f\u4e00\u6837\u7684\u5594)\u3002\u7b2c\u4e8c\u4e2a\u662f -X, \u8fd9\u6837\u5c31\u4f1a\u540c\u65f6\u628a\u5305\u7684\u5185\u5bb9\u4ee5ASCII\u7801\u548c\u5341\u516d\u5236\u7684\u5f62\u5f0f\u663e\u793a\u3002\u6700\u540e\u4e00\u4e2a\u662f -S, \u5b83\u4e2a\u9009\u9879\u4f1a\u663e\u793a\u7edd\u5bf9\u5e8f\u53f7\u800c\u4e0d\u662f\u76f8\u5bf9\u5e8f\u53f7\u3002\u56e0\u4e3a\u5f53\u5305\u88ab\u9690\u85cf\u8d77\u6765\u7684\u8bdd\uff0c\u4f60\u4e5f\u4e0d\u4f1a\u770b\u5230\u5947\u602a\u7684\u5e8f\u53f7\u3002\u8bf7\u8c28\u8bb0\uff0ctcpdump\u8f83\u4e4b\u5176\u5b83\u5de5\u5177\u7684\u4f18\u52bf\u4e4b\u4e00\u5c31\u662f\u53ef\u4ee5\u4e0e\u5305(packets)\u624b\u5de5\u4ea4\u4e92\u3002<\/p>\n<p>\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0ctcpdump\u9ed8\u8ba4\u53ea\u4f1a\u4ecepacket\u4e2d\u53d6\u51fa\u524d96\u4e2a\u5b57\u8282\u3002\u5982\u679c\u4f60\u60f3\u8981\u591a\u4e00\u4e9b\u7684\u8bdd\uff0c\u90a3\u5c31\u9700\u8981\u9700\u8981\u628a -s xxxx \u52a0\u4e0a\u3002\u8fd9\u91cc\u7684xxxx\u662f\u4f60\u786e\u5207\u60f3\u8981\u6293\u53d6\u7684\u603b\u5b57\u8282\u6570\u3002\u5982\u679c\u6211\u4f7f\u7528\u8fd9\u4e2a\u9009\u9879\u7684\u8bdd\uff0c\u6211\u901a\u5e38\u4f1a\u628a\u8fd9\u4e2a\u6570\u5b57\u8bbe\u5b9a\u4e3a1514\u800c\u5f97\u5230\u6240\u6709\u7684\u6570\u636e\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u77ed\u7684\u5217\u8868\u5217\u51fa\u6211\u7ecf\u5e38\u4f7f\u7528\u7684\u9009\u9879\u3002<\/p>\n<p>-i any: \u76d1\u542c\u6240\u6709\u7684\u4ecb\u9762\u3002\u8fd9\u6837\u4f60\u5c31\u77e5\u9053\u662f\u4e0d\u662f\u6709\u6d41\u91cf\u4ea7\u751f\u3002<br \/>\n\t-n: \u4e0d\u8981\u89e3\u51b3\u4e3b\u673a\u540d\uff0c\u4ee5IP\u6570\u5b57\u5f62\u5f0f\u663e\u793a\u4e3b\u673a\u3002<br \/>\n\t-nn: \u4e0d\u8981\u89e3\u6790\u4e3b\u673a\u540d\u6216\u7aef\u53e3\u540d\u5b57\u3002<\/p>\n<p>-A: \u4ee5ASCII\u5b57\u7b26\u663e\u793a\u5305\u7684\u6570\u636e\u3002<br \/>\n\t-X: \u540c\u65f6\u4ee5\u5341\u516d\u8fdb\u5236\u548cASCII\u5b57\u7b26\u663e\u793a\u5305\u7684\u6570\u636e\u3002<br \/>\n\t-XX: \u540c-X,\u4f46\u4e5f\u4f1a\u663e\u793a Ethernet\u5934\u90e8\u3002<br \/>\n\t-v, -vv, -vvv: \u8be6\u7ec6\uff0c\u66f4\u8be6\u7ec6\uff0c\u518d\u8be6\u7ec6\u4e9b\uff01 \u5197\u4f59\u8f93\u51fa\u5f97\u5230\u7684\u5305\u4fe1\u606f\u3002<br \/>\n\t-c: \u6293\u53d6 x \u4e2a\u5305\u540e\u5c31\u505c\u4e0b\u3002<br \/>\n\t-S: \u6253\u5370\u7edd\u5bf9\u5e8f\u53f7\u3002<br \/>\n\t-e: \u540c\u65f6\u5f97\u5230Ethernet\u5934\u90e8\u3002<br \/>\n\t-q: \u663e\u793a\u5c11\u4e00\u70b9\u534f\u8bae\u4fe1\u606f\u3002<br \/>\n\t-E: \u7528\u63d0\u4f9b\u7684\u5bc6\u94a5\u89e3\u5bc6 IPSEC \u6d41\u91cf\u3002<br \/>\n\t-s: \u8bbe\u7f6e\u663e\u793a\u524d\u591a\u5c11\u4e2a\u5b57\u8282\u7684\u5305\u5185\u5bb9\uff08snaplength\uff09\u3002<\/p>\n<p>tcpdump 4.0\u7684snaplength\u7684\u957f\u5ea6\u4ece68\u5b57\u8282\u6539\u6210\u4e8696\u5b57\u8282\uff0c\u8fd9\u6837\u4f60\u5c31\u53ef\u4ee5\u770b\u5230\u591a\u4e9b\u5185\u5bb9\u4e86\u3002\u4f46\u4ecd\u7136\u770b\u4e0d\u5230\u6240\u6709\u7684\u5185\u5bb9\uff0c\u6307\u5b9a -s 1514 \u5f97\u5230\u5305\u7684\u6240\u6709\u5185\u5bb9\u3002<\/p>\n<p><a href=\"http:\/\/ykyi.net\">http:\/\/ykyi.net<\/a><br \/>\n\t<strong>\u4e00\u4e9b\u57fa\u672c\u7684\u5e94\u7528<\/strong><br \/>\n\t\u6839\u636e\u6211\u8981\u67e5\u770b\u7684\u4e0d\u540c\u6d41\u91cf\uff0c\u6211\u4f7f\u7528\u4e0d\u540c\u7684\u9009\u9879\u7ec4\u5408\uff0c\u5982\u4e0b:<\/p>\n<p>1.Basic communication \/\/ see the basics without many options<br \/>\n\ttcpdump -nS<\/p>\n<p>1.\u57fa\u672c\u901a\u8baf\uff0c\u4e0d\u7528\u592a\u591a\u9009\u9879\u7747\u7747\u57fa\u672c\u7684<br \/>\n\ttcpdump -nS<\/p>\n<p>2.\u57fa\u672c\u901a\u8fc5\uff0c\u5197\u4f59\u8f93\u51fa\u3002\u53ef\u4ee5\u770b\u5230\u597d\u591a\u6d41\u91cf\uff0c<br \/>\n\ttcpdump -nnvvS<\/p>\n<p>3. \u6df1\u5165\u4e00\u70b9\u67e5\u770b\u6d41\u91cf\u3002<br \/>\n\ttcpdump -nnvvXS \/\/ -X \u9009\u9879\u5fc5\u4e0d\u4f1a\u4f7ftcpdump\u8f93\u51fa\u66f4\u591a.<\/p>\n<p>4. \u770bsize\u5927\u4e00\u70b9\u7684\u5305.<br \/>\n\ttcpdump -nnvvXSs 1514 \/\/ -s 1514 \u9009\u9879\u8bbe\u5b9a\u663e\u793a\u6240\u6709\u5305\u5185\u5bb9\u3002<\/p>\n<p>\u4e0b\u9762\u7684\u4f8b\u5b50\u4f7f\u7528\u6211\u4eec\u4e0a\u6587\u63d0\u5230\u7684\u9009\u9879\u6293\u53d6\u4e24\u4e2a( -c2 )ICMP\u5305(\u4e00\u4e2aping\u548c\u4e00\u4e2apong)\u3002\u8bf7\u6ce8\u610f\u6bcf\u4e2a\u5305\u6211\u4eec\u90fd\u80fd\u770b\u5230\u4e9b\u4ec0\u4e48\u3002<\/p>\n<p>ykyi.net# tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 1514 bytes<br \/>\n\t00:20:39.722393 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 192.168.111.128 &gt; 173.83.123.7: ICMP echo request, id 10621, seq 1, length 64<br \/>\n\t0x0000: 4500 0054 0000 4000 4001 e225 c0a8 6f80 E..T..@.@..%..o.<br \/>\n\t0x0010: ad53 7b07 0800 64e6 297d 0001 d745 cc4c .S{&#8230;d.)}&#8230;E.L<br \/>\n\t0x0020: d005 0b00 0809 0a0b 0c0d 0e0f 1011 1213 &#8230;&#8230;&#8230;&#8230;&#8230;.<br \/>\n\t0x0030: 1415 1617 1819 1a1b 1c1d 1e1f 2021 2223 &#8230;&#8230;&#8230;&#8230;.!&quot;#<br \/>\n\t0x0040: 2425 2627 2829 2a2b 2c2d 2e2f 3031 3233 $%&amp;&#39;()*+,-.\/0123<br \/>\n\t0x0050: 3435 3637 4567<br \/>\n\t00:20:40.064096 IP (tos 0x0, ttl 128, id 25296, offset 0, flags [none], proto ICMP (1), length 84) 173.83.123.7 &gt; 192.168.111.128: ICMP echo reply, id 10621, seq 1, length 64<br \/>\n\t0x0000: 4500 0054 62d0 0000 8001 7f55 ad53 7b07 E..Tb&#8230;&#8230;U.S{.<br \/>\n\t0x0010: c0a8 6f80 0000 6ce6 297d 0001 d745 cc4c ..o&#8230;l.)}&#8230;E.L<br \/>\n\t0x0020: d005 0b00 0809 0a0b 0c0d 0e0f 1011 1213 &#8230;&#8230;&#8230;&#8230;&#8230;.<br \/>\n\t0x0030: 1415 1617 1819 1a1b 1c1d 1e1f 2021 2223 &#8230;&#8230;&#8230;&#8230;.!&quot;#<br \/>\n\t0x0040: 2425 2627 2829 2a2b 2c2d 2e2f 3031 3233 $%&amp;&#39;()*+,-.\/0123<br \/>\n\t0x0050: 3435 3637 4567<br \/>\n\t2 packets captured<br \/>\n\t2 packets received by filter<br \/>\n\t0 packets dropped by kernel<br \/>\n\tykyi.net#<\/p>\n<p><strong>\u8868\u8fbe\u5f0f(Expressions)<\/strong><br \/>\n\t\u4f7f\u7528\u8868\u8fbe\u5f0f\u53ef\u4ee5\u8ba9\u4f60\u7565\u53bb\u5404\u79cd\u5404\u6837\u7684\u6d41\u91cf\u800c\u53ea\u5f97\u5230\u4f60\u771f\u6b63\u5173\u6ce8\u7684\u3002\u638c\u63e1\u8868\u8fbe\u5f0f\u5e76\u4e14\u4f1a\u521b\u9020\u6027\u5730\u4f7f\u7528\u7ec4\u5408\u6280\u5de7\u624d\u4f7f\u4f60\u771f\u6b63\u53d1\u6325tcpdump\u7684\u529b\u91cf\u3002\u6709\u4e09\u79cd\u4e3b\u8981\u7684\u8868\u8fbe\u5f0f: type, dir \u548c proto.<\/p>\n<p>Type\u9009\u9879\u662fhost, net, \u548c port. \u65b9\u5411\u7528 dir \u6307\u793a\u3002\u53ef\u4ee5\u8fd9\u6837 src, dst\uff1b src \u6216\u8005 dst\uff1b \u800c\u4e14 src \u548c dst\u3002\u4e0b\u9762\u662f\u4e00\u4e9b\u4f60\u5e94\u8be5\u719f\u7ec3\u638c\u63e1\u7684\u4f8b\u5b50\u3002<\/p>\n<p>host: \u53ea\u67e5\u770b\u6307\u5b9aIP\u6216\u8005\u6307\u5b9a\u4e3b\u673a\u7684\u6d41\u91cf(\u5f53\u4f60\u4f7f\u7528 -n \u9009\u9879\u65f6\u4e0d\u53ef\u4ee5\u6307\u5b9a\u4e3b\u673a\u540d)<br \/>\n\tykyi.net# tcpdump host 1.2.3.4<\/p>\n<p>src, dst: \u67e5\u770b\u4ece src \u53d1\u51fa\u7684\uff0c\u6216\u8005\u76ee\u7684\u5730\u662f dst \u7684\u6d41\u91cf(\u5ffd\u7565\u4f1a\u8bdd\u7684\u53e6\u4e00\u7aef)<br \/>\n\t&bull;src, dst \/\/ find traffic from only a source or destination (eliminates one side of a host conversation)<br \/>\n\tykyi.net# tcpdump src 2.3.4.5<br \/>\n\tykyi.net# tcpdump dst 3.4.5.6<\/p>\n<p>net: \u4f7f\u7528\u65e0\u7c7b\u522b\u57df\u95f4\u8def\u7531(CIDR\uff0cClassless Inter-Domain Routing)\u6307\u5b9a\u8981\u6293\u5305\u7684\u7f51\u7edc\u3002<br \/>\n\t# tcpdump net 1.2.3.0\/24<\/p>\n<p>proto: \u6307\u5b9a\u8981\u6293\u53d6\u7684\u5305\u7684\u534f\u8bae\u7c7b\u578b\uff0c\u53ef\u4ee5\u6307\u5b9atcp,udp,\u6216icmp\u3002\u53ef\u4ee5\u4e0d\u7528\u6572\u5165proto<br \/>\n\t# tcpdump icmp<\/p>\n<p>port: \u53ea\u67e5\u770b\u4ece\u6307\u5b9a\u7aef\u53e3\u8fdb\u51fa\u7684\u6d41\u91cf<br \/>\n\t# tcpdump port 3389<\/p>\n<p>src, dst port: \u6307\u5b9a\u7684\u6e90\u5730\u5740\u548c\u7aef\u53e3\u53f7\uff0c\u6216\u8005\u76ee\u7684\u5730\u5740\u548c\u7aef\u53e3\u53f7\u3002\u53ea\u6293\u53d6\u5339\u914d\u6307\u5b9a\u5730\u5740\u7aef\u53e3\u7684\u6d41\u91cf\u3002<br \/>\n\t# tcpdump src port 1025<br \/>\n\t# tcpdump dst port 389<\/p>\n<p>src,dst port, protocal : \u7ec4\u5408\u4e09\u79cd\u6307\u5b9a\u6761\u4ef6.<br \/>\n\t# tcpdump src port 1025 and tcp<br \/>\n\t# tcpdump udp and src port 53<\/p>\n<p>\u8fd8\u6709\u4e00\u4e2a\u9009\u9879\u53ef\u4ee5\u8ba9\u4f60\u6307\u5b9a\u4e00\u4e2a\u7aef\u53e3\u5730\u5740\u7684\u8303\u56f4<br \/>\n\t&bull;Port Ranges<br \/>\n\ttcpdump portrange 21-23<\/p>\n<p>\u6307\u5b9a\u5305\u7684\u5927\u5c0f<br \/>\n\t&bull;Packet Size Filter \/\/ only see packets below or above a certain size (in bytes)<br \/>\n\ttcpdump less 32<br \/>\n\ttcpdump greater 128<br \/>\n\ttcpdump equal 64<\/p>\n<p>tcpdump &gt; 32 \/\/ \u4e5f\u53ef\u4ee5\u4f7f\u7528\u6570\u5b66\u7b26\u53f7<br \/>\n\ttcpdump<\/p>\n<p><strong>\u5199\u5165\u6587\u4ef6<\/strong><br \/>\n\t\u7528 -w \u9009\u9879\u53ef\u4ee5\u6307\u5b9a\u4e00\u4e2a\u6587\u4ef6\uff0c\u628a\u6293\u53d6\u5230\u7684\u5185\u5bb9\u5b58\u5165\u8be5\u6587\u4ef6\u5185\u3002\u4ee5\u540e\u8fd8\u53ef\u4ee5\u7528 -r \u6307\u5b9a\u6587\u4ef6\uff0c\u628a\u4ee5\u524d\u5b58\u5165\u7684\u5185\u5bb9\u518d\u8bfb\u56de\u6765\u3002\u8fd9\u662f\u4e00\u4e2a\u76f8\u5f53\u4e0d\u9519\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5148\u6293\u53d6\u5305\uff0c\u4ee5\u540e\u518d\u7528\u5404\u79cd\u5de5\u5177\u5206\u6790\u3002<\/p>\n<p>\u4ee5\u8fd9\u79cd\u5f62\u5f0f\u6293\u5230\u7684\u6d41\u91cf\u662f\u4ee5tcpdump\u7684\u683c\u5f0f\u50a8\u5b58\u7684\u3002\u8fd9\u79cd\u683c\u5f0f\u5728\u7f51\u7edc\u5206\u6790\u7684\u5de5\u5177\u4e4b\u95f4\u975e\u5e38\u901a\u7528\u3002\u8fd9\u610f\u5473\u7740\uff0c\u50cf Wireshark, Snort, \u7b49\u5de5\u5177\u4e5f\u53ef\u4ee5\u8bfb\u53d6\u5b83\u3002<\/p>\n<p>\u628a\u51fa\u516580\u7aef\u53e3\u7684\u6240\u6709\u6d41\u91cf\u8bb0\u5f55\u5230\u6587\u4ef6\u4e2d<br \/>\n\t# tcpdump -s 1514 port 80 -w capture_file<\/p>\n<p>\u7136\u540e\uff0c\u5728\u5c06\u6765\u67d0\u4e2a\u65f6\u5019\uff0c\u4f60\u5c31\u80fd\u591f\u628a\u5b58\u5728\u6587\u4ef6\u4e2d\u7684\u6d41\u91cf\u8bfb\u56de\uff0c\u6bd4\u5982:<br \/>\n\t# tcpdump -r capture_file<\/p>\n<p>\u521b\u9020\u6027\u7684\u4f7f\u7528tcpdump<br \/>\n\t\u8868\u8fbe\u5f0f\u786e\u5b9e\u4e0d\u9519\uff0c\u4f46\u662f\u8981\u771f\u6b63\u53d1\u6325tcpdump\u7684\u5a01\u529b\u6765\u81ea\u4e8e\u521b\u9020\u6027\u5730\u7ec4\u5408\u4f7f\u7528\u5404\u79cd\u8868\u8fbe\u5f0f\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u628a\u4f60\u60f3\u8981\u5173\u6ce8\u7684\u4fe1\u606f\u5355\u72ec\u62bd\u51fa\u6765\u3002tcpdump\u6709\u4e09\u79cd\u7ec4\u5408\u65b9\u5f0f\uff0c\u5982\u679c\u4f60\u7a0d\u5fae\u61c2\u70b9\u8ba1\u7b97\u673a\uff0c\u8fd9\u7b80\u76f4\u592a\u5bb9\u6613\u7406\u89e3\u4e86\u3002<br \/>\n\t1.\u4e0e\u64cd\u4f5c<br \/>\n\tand \u6216\u8005 &amp;&amp;<br \/>\n\t2.\u6216\u64cd\u4f5c<br \/>\n\tor \u6216\u8005 ||<br \/>\n\t3.\u975e\u64cd\u4f5c<br \/>\n\tnot \u6216\u8005 !<\/p>\n<p>\u6bd4\u5982\u68c0\u6d4b\u6765\u81ea10.5.2.3\u53bb\u5230\u7aef\u53e33389\u7684\u6d41\u91cf<br \/>\n\t# tcpdump -nnvvS tcp and src 10.5.2.3 and dst port 3389<\/p>\n<p>\u68c0\u6d4b\u6765\u81ea\u7f51\u7edc 192.168.0.0\/16 \u53bb\u5230\u7f51\u7edc 10.0.0.0\/8 \u6216\u8005\u7f51\u7edc 172.16.0.0\/16 \u7684\u6d41\u91cf<br \/>\n\t# tcpdump -nvX src net 192.168.0.0\/16 and dst net 10.0.0.0\/8 or 172.16.0.0\/16<\/p>\n<p>\u6765\u81ea\u7f51\u7edc 172.16.16.0.0\/16 \u53bb\u5230\u4e3b\u673a 1292.168.0.2\u7684 ICMP \u6d41\u91cf.<br \/>\n\t# tcpdump -nvvXSs 1514 dst 192.168.0.2 and src net 172.16.0.0\/16 and not icmp<\/p>\n<p>\u4ece\u4e3b\u673a\u540d\u4e3a Mars(\u706b\u661f) \u6216\u8005 Pluto(\u51a5\u738b\u661f) \u53d1\u51fa\u7684\uff0c\u76ee\u7684\u5730\u4e0d\u662fSSH\u7aef\u53e3\u7684\u6d41\u91cf<br \/>\n\t# tcpdump -vv src mars or pluto and not dst port 22<\/p>\n<p>\u4f60\u5df2\u7ecf\u770b\u5230\u4e86\uff0c\u4f60\u53ef\u4ee5\u521b\u5efa\u4e0d\u540c\u7684\u7ec4\u5408\u6765\u5b8c\u6210\u4e0d\u540c\u7684\u9700\u8981\u3002\u5173\u952e\u5728\u4e8e\u4f60\u77e5\u9053\u81ea\u5df1\u9700\u8981\u600e\u6837\u7684\u6570\u636e\uff0c\u7136\u540e\u5c31\u53ef\u4ee5\u4f7f\u7528\u6070\u5f53\u7684\u8bed\u6cd5\u628a\u5b83\u4eec\u63d0\u70bc\u51fa\u6765\u3002<\/p>\n<p>\u540c\u65f6\u9700\u8981\u7262\u8bb0\u5728\u5fc3\u7684\u662f\uff0c\u5f53\u4f60\u521b\u5efa\u590d\u6742\u7684\u7ec4\u5408\u65f6\uff0c\u4f60\u53ef\u80fd\u4f1a\u9700\u8981\u7528\u5355\u5f15\u53f7\u628a\u51e0\u4e2a\u9009\u9879\u62ec\u8d77\u6765\u3002\u4f7f\u7528\u5355\u5f15\u53f7\u662f\u4e3a\u4e86\u544a\u8bc9 tcpdump \u5ffd\u7565\u7279\u6b8a\u5b57\u7b26(\u8bd1\u8005\u6ce8: \u540cBASH\u4e00\u6837)\u3002\u6bd4\u5982\u8fd9\u79cd\u60c5\u51b5, \u4e00\u5bf9\u5c0f\u62ec\u53f7&quot;()&quot;\u3002\u540c\u6837\u7684\u6280\u672f\u53ef\u4ee5\u7528\u6765\u628a\u51e0\u4e2a\u8868\u8fbe\u5f0f\u62ec\u8d77\u6765\uff0c\u6bd4\u5982 host, port, net \u7b49\u3002\u770b\u770b\u4e0b\u9762\u7684\u4f8b\u5b50:<\/p>\n<p>\u8981\u6293\u53d6\u4ece10.0.2.4\u51fa\u53d1\u53bb\u5230\u7aef\u53e33389\u6216\u7aef\u53e322\u7684\u6d41\u91cf\u3002<br \/>\n\t# tcpdump src 10.0.2.4 and (dst port 3389 or 22) \/\/ \u9519\u8bef\u7684\u5199\u6cd5\uff01<\/p>\n<p>\u672c\u5e94\u8be5\u662f\u4e00\u4e2a\u5f88\u6709\u7528\u7684\u7ec4\u5408\uff0c\u4f46\u662f\u4f60\u8fd0\u884c\u5b83\uff0c\u4f60\u5374\u5f97\u5230\u4e00\u4e2a\u9519\u8bef\uff0c\u56e0\u4e3a\u5c0f\u62ec\u53f7\uff01\u4f60\u53ef\u4ee5\u7528\u4e24\u79cd\u65b9\u5f0f\u7ea0\u6b63\u8fd9\u4e2a\u9519\u8bef\u3002\u8981\u4e48\u5728\u5c0f\u62ec\u53f7\u524d\u52a0\u4e0a\u8f6c\u4e49\u5b57\u7b26 \\ \u6216\u8005\u628a\u6574\u4e2a\u7ec4\u5408\u547d\u4ee4\u7528\u5355\u5f15\u53f7\u62ec\u8d77\u6765\u3002<\/p>\n<p># tcpdump &#39;src 10.0.2.4 and (dst port 3389 or 22)&#39; \/\/ \u73b0\u5728\u5c31\u5bf9\u4e86\uff01<\/p>\n<p><strong>\u8fdb\u9636\u90e8\u5206<\/strong><br \/>\n\t\u4f60\u8fd8\u53ef\u4ee5\u6839\u636e\u5305\u91cc\u9762\u7684\u67d0\u4e9b\u5b57\u6bb5\u6765\u7ec4\u5408\u5404\u79cd\u6761\u4ef6\u6307\u5b9a\u4f60\u8981\u5173\u6ce8\u7684\u5305\u3002\u8fd9\u4e2a\u529f\u80fd\u5728\u4f60\u60f3\u8981\u67e5\u770bSYNs\u548cRSTs\u975e\u5e38\u6709\u7528\u3002<\/p>\n<p>Show me all URG packets:<br \/>\n\t\u67e5\u770b\u6240\u6709\u7684\u7d27\u6025\u5305(URG\u5305)<br \/>\n\t# tcpdump &#39;tcp[13] &amp; 32 != 0&#39;<\/p>\n<p>\u67e5\u770b\u6240\u6709\u7684\u786e\u8ba4\u5305(ACK\u5305)<br \/>\n\t# tcpdump &#39;tcp[13] &amp; 16 != 0&#39;<\/p>\n<p>\u67e5\u770b\u6240\u6709\u7684PSH\u5305<br \/>\n\t# tcpdump &#39;tcp[13] &amp; 8 != 0&#39;<\/p>\n<p>\u67e5\u770b\u6240\u6709\u7684RST\u5305<br \/>\n\t# tcpdump &#39;tcp[13] &amp; 4 != 0&#39;<\/p>\n<p>\u67e5\u770b\u6240\u6709\u7684SYN\u5305<br \/>\n\t# tcpdump &#39;tcp[13] &amp; 2 != 0&#39;<\/p>\n<p>\u67e5\u770b\u6240\u6709\u7684FIN\u5305<br \/>\n\t# tcpdump &#39;tcp[13] &amp; 1 != 0&#39;<\/p>\n<p>\u67e5\u770b\u6240\u6709\u7684SYN-ACK\u5305<br \/>\n\t# tcpdump &#39;tcp[13] = 18&#39;<\/p>\n<p>\u6ce8\u610f\uff1a\u53ea\u6709PSH, RST, SYN \u548c FIN \u6807\u5fd7\u663e\u793a\u5728tcpdump\u7684\u6807\u5fd7\u57df\u8f93\u51fa\u4e2d\u3002URG\u548cACK\u4e5f\u4f1a\u88ab\u663e\u793a\uff0c\u4f46\u663e\u793a\u5728\u5176\u5b83\u7684\u5730\u65b9\u800c\u4e0d\u662f\u5728\u6807\u5fd7\u4f4d\u4e2d(Flags Field).<\/p>\n<p>\u4f60\u5e94\u8be5\u660e\u767d\u4e3a\u4ec0\u4e48\u4ee5\u4e0a\u7684\u547d\u4ee4\u7684\u5199\u6cd5\u3002tcp[13]\u8868\u793a\u5728tcp\u5934\u7684\u504f\u79fb\u91cf13\u5b57\u8282\u7684\u4f4d\u7f6e\uff0c\u7136\u540e\u4f5c\u4e86\u4e00\u4e2a\u5e03\u5c14\u5224\u65ad\u3002<\/p>\n<p>\u5728\u795e\u5947\u7684Unix\u4e16\u754c\uff0c\u4e00\u4ef6\u4e8b\u901a\u5e38\u53ef\u4ee5\u7528\u597d\u51e0\u79cd\u65b9\u5f0f\u505a\u5230\u3002tcpdump\u4e5f\u4e0d\u4f8b\u5916\u3002\u4e0b\u9762\u7684\u4f8b\u5b50\u662f\u53e6\u4e00\u4e2a\u901a\u8fc7\u6307\u5b9atcp\u5305\u7684\u6807\u5fd7\u4f4d\u6765\u67e5\u770b\u5305\u7684\u547d\u4ee4\u3002<\/p>\n<p>Capturing TCP Flags Using the tcpflags Option<br \/>\n\t\u7528 tcpflags \u9009\u9879\u6765\u6307\u5b9a tcp \u6807\u5fd7\u4f4d\u3002<\/p>\n<p>\u67e5\u770bSYN\u5305.<br \/>\n\t# tcpdump &#39;tcp[tcpflags] &amp; tcp-syn != 0<\/p>\n<p><strong>\u7279\u6b8a\u6d41\u91cf<\/strong><br \/>\n\t\u67e5\u770b\u6240\u6709IPv6\u7684\u6d41\u91cf<br \/>\n\t# tcpdump ip6<\/p>\n<p>\u67e5\u770b\u6240\u6709\u540c\u65f6\u8bbe\u7f6e\u4e86SYN\u548cRST\u4f4d\u7684\u6d41\u91cf(\u4ec5\u4ec5\u4e3e\u4f8b\uff0c\u5b9e\u9645\u4e0a\u5e76\u4e0d\u53ef\u80fd\u53d1\u751f):<br \/>\n\t# tcpdump &#39;tcp[13] = 6&#39;<\/p>\n<p>\u67e5\u770b\u6240\u6709\u7684 evil \u4f4d\u88ab\u8bbe\u7f6e\u7684\u6d41\u91cf<br \/>\n\t# tcpdump &#39;ip[6] &amp; 128 != 0&#39;<\/p>\n<p><strong>\u603b\u7ed3\uff1a<\/strong><br \/>\n\t\u55ef\uff0c\u8fd9\u7bc7\u6587\u7ae0\u5e94\u8be5\u80fd\u8ba9\u4f60\u7684\u6280\u672f\u53d8\u5f97\u66f4\u597d\uff0c\u5f53\u7136man\u624b\u518c\u6c38\u8fdc\u662f\u9ad8\u624b\u4eec\u7684\u5fc5\u5907\u7269\u54c1\u3002\u6211\u771f\u8bda\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u591f\u5e2e\u5230\u4f60\u3002\u5982\u679c\u6709\u4ec0\u4e48\u95ee\u9898\uff0c\u4e0d\u8981\u72b9\u8c6b\uff0c\u53ef\u4ee5\u8054\u7cfb\u6211\u3002<\/p>\n<p>copyright ykyi.net<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u82f1\u6587\u539f\u6587\u51fa\u81ea\uff1a A tcpdump Tutorial and Primer \u7ffb\u8bd1: ykyi.net Tcpdump\u662f\u4fe1\u606f\u5b89\u5168\u4e13\u4e1a\u4eba\u58eb\u6700\u91cd\u8981\u7684\u4e00\u4e2a\u7f51\u7edc\u5206\u6790\u5de5\u5177\u3002\u5bf9\u8fd9\u4e2a\u5de5\u5177\u6709\u4e00\u4e2a\u6df1\u5165\u7684\u7406\u89e3\u5bf9\u4e8e\u6bcf\u4e00\u4e2a\u559c\u6b22\u900f\u5f7b\u7406\u89e3tcp\/ip\u534f\u8bae\u6808\u7684\u4eba\u6765\u8bdd\u90fd\u662f\u5fc5\u987b\u7684\u3002\u4f46\u5f88\u591a\u4eba\u9009\u62e9\u4e00\u4e2a\u66f4\u9ad8\u7ea7\u522b\u7684\u5de5\u7ea7\uff0c\u6bd4\u5982Ethereal Wireshark\uff0c\u4f46\u662f\u6211\u8ba4\u4e3a\u8fd9\u662f\u4e00\u4e2a\u9519\u8bef\uff01 \u4e0d\u5e94\u8be5\u673a\u68b0\u7684\u53cd\u590d\u8bb0\u5fc6\u6982\u5ff5\u800c\u5e94\u8be5\u505a\u5230\u771f\u6b63\u7684\u7406\u89e3\uff0c\u56e0\u4e3a\u5bf9tcp\/ip\u534f\u8bae\u7c07\u4fdd\u6301\u6e05\u9192\u7684\u8ba4\u77e5\u975e\u5e38\u7684\u91cd\u8981\u3002\u5982\u679c\u5bf9\u8be5\u534f\u8bae\u7c07\u80fd\u591f\u5b8c\u5168\u7cbe\u901a\uff0c\u90a3\u4f60\u8c03\u8bd5\u7f51\u7edc\u7684\u80fd\u529b\u5219\u80fd\u6bd4\u540c\u884c\u4eec\u9ad8\u51fa\u51e0\u4e2a\u6863\u6b21\u3002\u4f46\u662f\uff0c\u8981\u5b66\u7cbe\u795etcp\/ip\u534f\u8bae\u7c07\uff0c\u53ea\u6709\u4e0d\u591f\u7684\u5b9e\u8df5\u5256\u6790\u5b83\u4eec\u624d\u80fd\u505a\u5230\u3002 \u5f53\u4f60\u4f7f\u7528\u67d0\u79cd\u5de5\u5177\u6765\u663e\u793a\u7f51\u7edc\u4e2d\u7684\u539f\u59cb\u6d41\u91cf\u4fe1\u606f\u65f6\uff0c\u4eba\u7c7b\uff0c\u800c\u4e0d\u662f\u673a\u5668\uff0c\u5c31\u8981\u627f\u62c5\u8d77\u5206\u6790\u8fd9\u4e9b\u6d41\u91cf\u7684\u91cd\u4efb\u4e86\u3002\u7528\u8fd9\u79cd\u65b9\u6cd5\u5c31\u53ef\u4ee5\u4e0d\u65ad\u5730\u52a0\u6df1\u5bf9tcp\/ip\u7684\u7406\u89e3\u3002\u5e76\u4e14\uff0c\u7528\u8fd9\u79cd\u5b66\u4e60\u65b9\u6cd5\u7684\u65f6\u5019\uff0c\u6211\u5728\u4efb\u4f55\u53ef\u80fd\u7684\u60c5\u51b5\u4e0b\u90fd\u5f3a\u70c8\u4e3b\u5f20\u4f7f\u7528tcpdump\u800c\u4e0d\u662f\u5176\u5b83\u5de5\u5177\u3002 \u9009\u9879 \u4e0b\u9762\u5c06\u5217\u51fa\u4e00\u4e9b\u7528\u4f8b\u5b50\u7684\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u4f60\u4f7f\u7528\u8fd9\u4e2a\u5de5\u5177\u65f6\u5bf9\u4f60\u6709\u5f88\u5927\u7684\u5e2e\u52a9\u3002\u8fd9\u4e9b\u9009\u9879\u5f88\u5bb9\u6613\u6de1\u5fd8\u6216\u4e0e\u5176\u5b83\u7c7b\u578b\u7684\u6ee4\u955c(Filter,\u7b14\u8005\u8ba4\u4e3a\u8fd9\u91cc\u7684\u6ee4\u955c\u5b9e\u9645\u4e0a\u6307\u7684\u662f\u5176\u5b83\u7f51\u7edc\u5de5\u5177)\u6df7\u6dc6\u3002\u6bd4\u5982, ethereal\u3002\u6240\u4ee5\uff0c\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u53ef\u4ee5\u4f5c\u4e3a\u4e00\u4e2a\u53c2\u8003\u6587\u6863\uff0c\u6211\u5c31\u662f\u8fd9\u6837\u4f7f\u7528\u5b83\u7684\u3002 \u9996\u5148\uff0c\u6211\u8981\u5148\u4ecb\u7ecd\u51e0\u4e2a\u6211\u8ba4\u4e3a\u5f88\u65b9\u4fbf\u7684tcpdump\u7684\u9009\u9879\u3002\u7b2c\u4e00\u4e2a\u662f -n, \u8fd9\u6837\u7684\u8bdd\u57df\u540d\u5c31\u4e0d\u4f1a\u88ab\u89e3\u6790\u4e86\uff0c\u800c\u662f\u7528\u6570\u5b57IP\u7684\u5f62\u5f0f\u663e\u793a\u5730\u5740(\u8bd1\u8005\u6ce8: \u540cnetstat\u7684-n\u662f\u4e00\u6837\u7684\u5594)\u3002\u7b2c\u4e8c\u4e2a\u662f -X, \u8fd9\u6837\u5c31\u4f1a\u540c\u65f6\u628a\u5305\u7684\u5185\u5bb9\u4ee5ASCII\u7801\u548c\u5341\u516d\u5236\u7684\u5f62\u5f0f\u663e\u793a\u3002\u6700\u540e\u4e00\u4e2a\u662f -S, \u5b83\u4e2a\u9009\u9879\u4f1a\u663e\u793a\u7edd\u5bf9\u5e8f\u53f7\u800c\u4e0d\u662f\u76f8\u5bf9\u5e8f\u53f7\u3002\u56e0\u4e3a\u5f53\u5305\u88ab\u9690\u85cf\u8d77\u6765\u7684\u8bdd\uff0c\u4f60\u4e5f\u4e0d\u4f1a\u770b\u5230\u5947\u602a\u7684\u5e8f\u53f7\u3002\u8bf7\u8c28\u8bb0\uff0ctcpdump\u8f83\u4e4b\u5176\u5b83\u5de5\u5177\u7684\u4f18\u52bf\u4e4b\u4e00\u5c31\u662f\u53ef\u4ee5\u4e0e\u5305(packets)\u624b\u5de5\u4ea4\u4e92\u3002 \u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0ctcpdump\u9ed8\u8ba4\u53ea\u4f1a\u4ecepacket\u4e2d\u53d6\u51fa\u524d96\u4e2a\u5b57\u8282\u3002\u5982\u679c\u4f60\u60f3\u8981\u591a\u4e00\u4e9b\u7684\u8bdd\uff0c\u90a3\u5c31\u9700\u8981\u9700\u8981\u628a -s xxxx \u52a0\u4e0a\u3002\u8fd9\u91cc\u7684xxxx\u662f\u4f60\u786e\u5207\u60f3\u8981\u6293\u53d6\u7684\u603b\u5b57\u8282\u6570\u3002\u5982\u679c\u6211\u4f7f\u7528\u8fd9\u4e2a\u9009\u9879\u7684\u8bdd\uff0c\u6211\u901a\u5e38\u4f1a\u628a\u8fd9\u4e2a\u6570\u5b57\u8bbe\u5b9a\u4e3a1514\u800c\u5f97\u5230\u6240\u6709\u7684\u6570\u636e\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u77ed\u7684\u5217\u8868\u5217\u51fa\u6211\u7ecf\u5e38\u4f7f\u7528\u7684\u9009\u9879\u3002 -i any: \u76d1\u542c\u6240\u6709\u7684\u4ecb\u9762\u3002\u8fd9\u6837\u4f60\u5c31\u77e5\u9053\u662f\u4e0d\u662f\u6709\u6d41\u91cf\u4ea7\u751f\u3002 -n: \u4e0d\u8981\u89e3\u51b3\u4e3b\u673a\u540d\uff0c\u4ee5IP\u6570\u5b57\u5f62\u5f0f\u663e\u793a\u4e3b\u673a\u3002 -nn: \u4e0d\u8981\u89e3\u6790\u4e3b\u673a\u540d\u6216\u7aef\u53e3\u540d\u5b57\u3002 -A: \u4ee5ASCII\u5b57\u7b26\u663e\u793a\u5305\u7684\u6570\u636e\u3002 -X: \u540c\u65f6\u4ee5\u5341\u516d\u8fdb\u5236\u548cASCII\u5b57\u7b26\u663e\u793a\u5305\u7684\u6570\u636e\u3002 -XX: \u540c-X,\u4f46\u4e5f\u4f1a\u663e\u793a Ethernet\u5934\u90e8\u3002 -v, -vv, -vvv: \u8be6\u7ec6\uff0c\u66f4\u8be6\u7ec6\uff0c\u518d\u8be6\u7ec6\u4e9b\uff01 \u5197\u4f59\u8f93\u51fa\u5f97\u5230\u7684\u5305\u4fe1\u606f\u3002 -c: \u6293\u53d6 x \u4e2a\u5305\u540e\u5c31\u505c\u4e0b\u3002 -S: \u6253\u5370\u7edd\u5bf9\u5e8f\u53f7\u3002 -e: \u540c\u65f6\u5f97\u5230Ethernet\u5934\u90e8\u3002 -q: &hellip; <a href=\"https:\/\/ykyi.net\/?p=45\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;tcpdump\u57fa\u7840\u6559\u7a0b&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,6,7],"tags":[78,116],"class_list":["post-45","post","type-post","status-publish","format-standard","hentry","category-network","category-security","category-tech_articles","category-unix_linux","tag-tcpdump","tag-116"],"_links":{"self":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=45"}],"version-history":[{"count":0,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions"}],"wp:attachment":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}