{"id":1553,"date":"2006-12-10T14:26:00","date_gmt":"2006-12-10T14:26:00","guid":{"rendered":"http:\/\/gleamynode.net\/articles\/1553\/packet-sniffing-using-tcpdump"},"modified":"2022-12-28T01:46:45","modified_gmt":"2022-12-27T16:46:45","slug":"packet-sniffing-using-tcpdump","status":"publish","type":"post","link":"https:\/\/vault.motd.kr\/wordpress\/posts\/1553\/packet-sniffing-using-tcpdump\/","title":{"rendered":"Packet sniffing using tcpdump"},"content":{"rendered":"
tcpdump<\/tt>\ub97c \uc774\uc6a9\ud55c \ud328\ud0b7 \ud6d4\uccd0\ubcf4\uae30<\/p>\n
It is easy to monitor packets being exchanged by network applications in your desktop machine, because we have a great software called ‘Ethereal<\/a>‘. But what if we are working on a remote console without any GUI? We have to use tcpdump<\/tt>. The following is typical tcpdump<\/tt> options I use to monitor the data being exchanged:<\/p>\n \ub370\uc2a4\ud06c\ud0d1 \uba38\uc2e0\uc5d0\uc11c \ub124\ud2b8\uc6cc\ud06c \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc774 \uad50\ud658\ud558\ub294 \ud328\ud0b7\uc744 \ubaa8\ub2c8\ud130\ub9c1\ud558\ub294 \uac83\uc740 \uc27d\uc2b5\ub2c8\ub2e4. Ethereal\uc774\ub77c\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4\uac00 \uc788\uae30 \ub54c\ubb38\uc774\uc8e0. \ud558\uc9c0\ub9cc GUI\uac00 \uc5c6\ub294 \uc6d0\uaca9 \ucf58\uc194\uc5d0\uc11c \uc791\uc5c5\ud560 \ub54c\ub294 \uc5b4\ub5bb\uac8c \ud574\uc57c \ud560\uae4c\uc694? tcpdump<\/tt>\ub97c \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4. \ub2e4\uc74c\uc740 \uc81c\uac00 \uad50\ud658\ub418\ub294 \ub370\uc774\ud130\ub97c \ubaa8\ub2c8\ud130\ub9c1\ud558\ub294 \ub370 \uc4f0\ub294 \uc804\ud615\uc801\uc778 tcpdump<\/tt> \uc635\uc158\ub4e4\uc785\ub2c8\ub2e4:<\/p>\n \n-N<\/tt> and -f<\/tt> option works around performance and stability issues on some systems. -s 0<\/tt> option prevents tcpdump<\/tt> from printing captured packets as truncated. -X<\/tt> option is used to print captures packets as hexadecimal dump format. 'tcp[13] & 8 == 8'<\/tt> expression filters out all packets except DATA<\/tt> packets because what we have interest in are only DATA<\/tt> packets.<\/p>\n -N<\/tt>\uacfc -f<\/tt> \uc635\uc158\uc740 \uc5b4\ub5a4 \uc2dc\uc2a4\ud15c\uc5d0\uc11c \ubc1c\uc0dd\ud558\ub294 \uc131\ub2a5\uc774\ub098 \uc548\uc815\uc131 \ubb38\uc81c\ub97c \ud574\uacb0\ud569\ub2c8\ub2e4. -s 0<\/tt> \uc635\uc158\uc740 tcpdump<\/tt>\uac00 \ucea1\ucc98\ud55c \ud328\ud0b7\uc758 \ub4b7\ubd80\ubd84\uc744 \uc798\ub77c\ubc84\ub9ac\uace0 \ucd9c\ub825\ud558\uc9c0 \ubabb\ud558\ub3c4\ub85d \ud569\ub2c8\ub2e4. -X<\/tt> \uc635\uc158\uc740 \ucea1\ucc98\ud55c \ud328\ud0b7\uc744 16\uc9c4 \ub364\ud504 \ud615\uc2dd\uc73c\ub85c \ucd9c\ub825\ud558\ub3c4\ub85d \ud558\ub294\ub370 \uc4f0\uc785\ub2c8\ub2e4. 'tcp[13] & 8 == 8'<\/tt> \ud45c\ud604\uc740 DATA<\/tt> \ud328\ud0b7\uc744 \uc81c\uc678\ud55c \ubaa8\ub4e0 \ud328\ud0b7\uc744 \ud544\ud130\ub9c1\ud569\ub2c8\ub2e4. \uc6b0\ub9ac\uac00 \uad00\uc2ec\uc788\ub294 \uac83\uc740 DATA<\/tt> \ud328\ud0b7\ubfd0\uc774\ub2c8\uae4c\uc694.<\/p>\n","protected":false},"excerpt":{"rendered":" tcpdump\ub97c \uc774\uc6a9\ud55c \ud328\ud0b7 \ud6d4\uccd0\ubcf4\uae30 It is easy to monitor packets being exchanged by network applications in your desktop machine, because we have a great software called ‘Ethereal‘. But what if we are working on a remote console without any GUI? We have to use tcpdump. The following is typical tcpdump options I use to monitor… Continue reading \n
tcpdump -N -f -s 0 -X -vvv -i eth0
\n host 210.103.210.233 and tcp and port 9132 and
\n 'tcp[13] & 8 == 8'<\/pre>\n<\/blockquote>\n