วันอังคารที่ 10 กันยายน พ.ศ. 2556

Wireshark เบื้องต้น

การใช้งาน Wireshark เบื้องต้น

1. การใช้ Filter โดยในที่นี้เป็นการกรองเอาเฉพาะ Packet ที่มาจาก IP นั้นๆ ตามภาพ
*ก่อนการ Capture

wireshark-filter.png

2.Filter หลัง Capture ตัวอย่างเช่น ตัวอย่างการฟิลเตอร์

http contains facebook
tcp contains facebook
ip.src == 192.168.1.100
ip.dst == 192.168.5.100
ip.src != 192.168.3.1
ip.dst != 192.168.8.1
ip.src == 192.168.1.100 and ip.dst == 192.168.5.100
ip.addr == 10.2.1.10
udp.port == 5060
udp.dstport == 5060
udp.srcport == 5060

เครื่องหมายเปรียบเทียบ มีดังต่อไปนี้
== (equal), != (not equal), > (greather than), < (less than), >= (greather or equal), <= (lessthan or equal)

เครื่องหมาย locical expressoin มีดังต่อไปนี้
&& (and), || (or), ! (not), ^^ (xor)

ตัวอย่างที่ 1 ให้แสดงเฉพาะแพ็กเก็ตที่ส่งมาจากไอพี 58.8.87.69 (ส่งมาจากไอพี หมายถึง ไอพีต้นทาง หรือ source ip -> ip.src) ฟิลเตอร์ที่ใส่คือ ip.src == 58.8.87.69 จะได้ดังรูป

wireshark-filter-1-small.png

ตัวอย่างที่ 2 ให้แสดงเฉพาะแพ็กเก็ตที่ส่งไปยังไอพี 58.8.87.69 (ส่งไปยังไอพี หมายถึง ไอพีปลายทาง หรือ destination ip -> ip.dst) และส่งมาจากพอร์ต 5060 (ส่งมาจากพอร์ต หมายถึง พอร์ตต้นทาง หรือ source port -> srcport) ใช้โปรโตคอล UDP พิลเตอร์ที่ใส่คือ ip.dst == 58.8.87.69 && udp.srcport == 5060 จะได้ดังรูป

wireshark-filter-2-small.png

Credit: voip4share

ไม่มีความคิดเห็น:

แสดงความคิดเห็น