Skip to content

Instantly share code, notes, and snippets.

@leeyoungseok
Last active August 8, 2020 02:16
Show Gist options
  • Save leeyoungseok/ecaf5081920e611f58c211fd78691c0a to your computer and use it in GitHub Desktop.
Save leeyoungseok/ecaf5081920e611f58c211fd78691c0a to your computer and use it in GitHub Desktop.

[실습1] Packet capture

1. wireshark 설치 후 캡쳐 실행

  • 캡쳐 후 필터로 원하는 패킷 검색: 필터 창에 http 라고 입력하면 http 패킷만 볼 수 있음.
  • 대부분의 웹 사이트들이 암호화된 HTTPS 프로토콜을 사용하고 있기때문에 http라고 하더라도 원하는 패킷을 캡쳐해서 볼 수 없음. 크롬 웹 브라우저에 http://networks.cnu.ac.kr 과 같이 입력해보면 plain text 로 전송되는 http 요청, 응답 메시지를 볼 수 있음

2 tcpdump

  • http://www.tcpdump.org 에서 tcpdump 명령어 도구를 다운받아서 설치하면 GUI가 아닌 명령어로도 capture하여 패킷을 볼 수 있음
  • command example

tcpdump -n -i eth0 -s 1514 -w output.pcap tcpdump -n -r output.pcap -s 1514 port 80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment