Presentation is loading. Please wait.

Presentation is loading. Please wait.

Capturing/Analyzing 패킷

Similar presentations


Presentation on theme: "Capturing/Analyzing 패킷"— Presentation transcript:

1 Capturing/Analyzing 패킷
WireShark Ethereal (옛날 이름)

2 목차 네트워크 개요 와이어샥 소개 캡처링 필터 – 캡처, 화면 표시 통계 기타 툴 참고 문헌 인젠 연구소: 완전변신 2006

3 Introduction (Network + Security)
네트워크 보안은 캡처 패킷 - identifying 분석 패킷 - interpreting 보안 분석을 위해 반드시 이해해야 하는 것 패킷 구성/구조 - how a packet is constructed and 실제 흐름 - how it performs in real world scenarios. 무료로 사용할 수 있고 보편적인 툴 tcpdump (패킷 캡처 라이브러리 포함) WireShark – Ethereal의 최신 버전 프로그램 및 소스 위치 \\rf1\programs\ 인젠 연구소: 완전변신 2006

4 OSI 7 layers and TCP/IP 모델 구현 인젠 연구소: 완전변신 2006

5 Capturing layer Network card를 통하여 in/out 되는 패킷들을 capture App.
Transport Network Link Net. Device 인젠 연구소: 완전변신 2006

6 TCP/IP Protocol Suite TCP/IP (Transmission Control Protocol/Internet Protocol) 다양한 네트워크 프로토콜들의 집합 네트워크를 통해 각기 다른 OS와 각기 다른 어플리케이션 통신을 위해 디자인됨 TCP와 IP는 각기 다른 레이어에 두 개의 프로토콜 IP (Internet Protocol) To handle datagram services between hosts. Addressing, Routing, Reassembly of packets IP addresses are 32 bits long (4 octets) in IPV4 ARP, RARP(?) TCP는 TCP와 UDP로 다시 구분됨 (Transport layer) ICMP 인젠 연구소: 완전변신 2006

7 TCP Connection-oriented transport layer protocol
Reliable connection for 데이터 교환 통신을 위해 Connection establishment 선행 필요 모든 패킷이 제대로 순서화 되고 확인되도록 보장 acknowledgement or ACK. Windowing (2byte 크기 ) 모든 패킷마다 ACK해야 한다면 네트워크에 엄청난 부담을 줌 Windowing 이라는 메커니즘을 통해 이럼 부담을 줄임 Windowing은 flow control의 방법 전송자는 몇 개의 패킷을 보내고 ACK 응답을 확인 만약 ACK가 안 오면, 최종 ACK 부를 받은 패킷 부터 재전송 인젠 연구소: 완전변신 2006

8 UDP UDP (User Datagram Protocol) UDP Applications
Unreliable, connectionless 패킷 전송. Messages(datagrams) 전송 – 다음 부담 없음 ACKs established connections sequencing UDP Applications NFS (2049), TFTP (79), DNS (53), SNMP 인젠 연구소: 완전변신 2006

9 데모 프로토콜 분석 프로토콜 분석

10 TCP/IP Encapsulation Process
Ethernet: Frame IP: Packet 인젠 연구소: 완전변신 2006

11 IP Header 인젠 연구소: 완전변신 2006

12 TCP Header 인젠 연구소: 완전변신 2006

13 ICMP & ARP ICMP - Internet Control Message Protocol
TCP/IP 프로토콜의 관리 기능 제공 flow control, unreachable destination alerts, packet redirection, and remote host checking. 보안상 많은 관리자들은 ICMP로 네트워크 조사를 제한 ping -n 1 OS 버전 등과 같은 정보를 추측하는 툴들 있음 Nmap, ettercap, Ntop 등등 ARP (Address Resolution Protocol) IP주소를 갖고 특정 MAC 주소를 찾는 방법 IP 조회는 브로드캐스트, 응답은 유니캐스트 MAC 주소 조회 arp -a 인젠 연구소: 완전변신 2006

14 Example: FTP Application
인젠 연구소: 완전변신 2006

15 WireShark - Ethereal 소개
Network packet analyzer 네트워크 패킷 캡처 가능한 자세한 정보 제공 1997말, Gerald Combs 개발 시작 2006년 이름 변경됨 - "e-the-real"에서 용도 네트워크 트러블 슈팅 보안 문제 관찰 프로토콜 구현 디버깅 네트워크 프로토콜 internals 학습 향상 기능 저장하기 (그림 등등), 암호 통신 해독 인젠 연구소: 완전변신 2006

16 Features UNIX, Linux and Windows 지원 (Open Source) 프로토콜의 자세한 정보 제공
Open and Save packet data captured 다양한 포맷 지원 (25+). Capture (libpcap) / Display 필터 Colorization, Statistics 다수의 프로토콜 decoders (460+) What WireShark is not Not an IDS, No manipulations on the network, only "measures" ... 그 외 다양한 기능 인젠 연구소: 완전변신 2006

17 다양한 Capture Media 지원 802.11 ATM Ethernet FDDI Frame Relay Loopback
Serial Token Ring AIX Unknown Yes FreeBSD Yes1 HP-UX No Irix Linux Yes2 Yes3 Yes4 Mac OS X Yes5 Yes6 NetBSD OpenBSD Solaris Tru64 UNIX Windows Yes7 N/A8 Yes9 인젠 연구소: 완전변신 2006

18 Building and Installing Ethereal
그냥 설치해서 작동시켜도 됨 Unix/Linux에서 성능 향상 시키기 커널 컴파일을 통해서 네트워크 캡처 성능 향상 필요 Network device polling 활성화 (인텔, 리얼텍 랜카드) Mmaped libpcap 사용하도록 컴파일 실행시 환경 설정 필요 별도 문서 참조 인젠 연구소: 완전변신 2006

19 The Main window Menu Main toolbar Filter toolbar Packet list
Packet details Packet bytes Status bar 인젠 연구소: 완전변신 2006

20 Menu File Open / merge / save / print / export, and to quit Edit
Packet 찾기, 시간 참조, 마킹, 환경 설정 View 화면 표시 제어 - colorization, zooming, a new window, expand/collapse Go To go to a specific packet Capture 캡처 시작 종료 및 캡처 필터 설정 Analyze 화면 필터, 프로토콜 설정, 디코더 설정, follow a TCP stream Statistics 요약, protocol hierarchy, endpoints, 기타 등등 Help 기본 도움말, 지원 protocols 리스트, 매뉴얼 페이지, 웹 접속 인젠 연구소: 완전변신 2006

21 File Input / Output and Printing
Open capture files Saving captured 패킷 Merging capture files File Sets - "List Files" Exporting data as Plain Text, as PostScript, as CSV, as PSML, as PDML Printing 패킷 다시 확인 인젠 연구소: 완전변신 2006

22 데모 메뉴

23 Capturing Live Network Data
Start Capturing "Capture Interfaces" dialog box "Capture Options" dialog box 인젠 연구소: 완전변신 2006

24 Capture options 인젠 연구소: 완전변신 2006

25 Capture filter (libpcap 방식)
모든 HTTP 패킷 tcp port 80 Non-HTTP 패킷: not tcp port 80 또는 !tcp port 80 또는 tcp port not 80 HTTP browsing tcp port 80 || dst 아닌 HTTP browsing tcp port 80 and not dst TCP 패킷: tcp 또는 ip proto 6 TCP SYN 패킷 tcp[tcpflag] & tcp-syn == tcp-syn 인젠 연구소: 완전변신 2006

26 Capture filter (libpcap 방식)
IP 패킷 with total length > 255 ip[2:2] > 0xff ICMP echo request and reply icmp[icmptype] == icmp-echo or icmp[icmptype] == icmp-echoreply IP 또는 IPX 패킷 ip or ipx IPX 패킷 ipx IPX 패킷 destined for IPX network 00:01:F0:EE ipx는 일부 주소만 지정 불가능 인젠 연구소: 완전변신 2006

27 Capture/Display Filter – 주의 필요
Libpcap 입력 방식 다중 조건 경우 OR 확장 입력과 동시에 자동 문법 체크 다중 조건 경우 OR로 확장 인젠 연구소: 완전변신 2006

28 데모 캡처 및 캡처 필터

29 Working with captured 패킷
패킷 보기 Display Filter Finding 패킷 "Find Packet", "Find Next", "Find Previous" Go to a specific packet "Go Back", "Go Forward", "Go to Packet", "Go to Corresponding Packet", "Go to First Packet", "Go to Last Packet" Marking 패킷 표시 시간 표시 형식 and 시간 참조 패킷 시간 참조 인젠 연구소: 완전변신 2006

30 실제 예제 (Display 필터) 스캐닝 – TCP 커넥션 트로이잔 – SubSeven 트로이잔 – Netbus
tcp.flags.syn==1&&tcp.flags.ack==1 또는 tcp.flags==18 트로이잔 – SubSeven tcp.port == 27374 트로이잔 – Netbus tcp.port == || tcp.port == 12346 웹 – SQL Slammer udp.port==1434 and ip.len < 384 Nmap 스캐닝 확인 nmap -sS -O /24 인젠 연구소: 완전변신 2006

31 데모 화면 필터

32 Advanced Features – 화면 표시 제어
Following TCP streams 특정 세선에 대한 프로토콜 흐름 분석 Name Resolution Ethernet name resolution (MAC) IP name resolution (network) TCP/UDP port name resolution (transport) IPX name resolution (network) Packet Reassembling - enabled by default ? 소스 epan/dissectors/ 인젠 연구소: 완전변신 2006

33 Name resolution, Fragment Reassembly
인젠 연구소: 완전변신 2006

34 Follow stream 인젠 연구소: 완전변신 2006

35 캡처 화면 – 필터, 이름 변환, 재조함 인젠 연구소: 완전변신 2006

36 디코더 선택 (Dissector) 소스 epan/dissectors/ 인젠 연구소: 완전변신 2006

37 데모 Follow stream 디코더 이름 변환

38 Statistics Summary Protocol Hierarchy Endpoints Conversations
IO Graphs Service Response Time (별로…) Protocol specific statistics (별로…) 인젠 연구소: 완전변신 2006

39 통계: 요약 인젠 연구소: 완전변신 2006

40 Endpoints – 호스트 리스트 인젠 연구소: 완전변신 2006

41 명령어 기반 보조 툴들 tcpdump 패킷 캡처 tethereal 명령어 기반 Ethereal
capinfos 패킷 캡처 파일 정보 editcap 캡처 파일 편집 – 포맷 및 패킷 선택 제거 mergecap 파일 합치기 text2pcap ASCII hexdumps to pcap 파일 형태 idl2eth Corba IDL 파일에서 디코더 (dissector) 생성 인젠 연구소: 완전변신 2006

42 tcpdump/tcpreplay To monitor/capture 패킷 (promiscuous mode)
Run tcpdump with just as tcpdump To write output to a temp file with –w option To view it later with the –r option tcpdump -w /tmp/capture-1.tcpd tcpdump -r /tmp/capture-1.tcpd To disable name resolution, use the –n option 실제 예제 tcpdump -i eth0 -w /home/tcpdump.pcap -s 1518 port 80 tcpreplay -i eth1 -p l 5 /home/dump.pcap tcpreplay -i eth1 -t -l 1 /home/dump.pcap 인젠 연구소: 완전변신 2006

43 참고 이더리얼 www.ethereal.com Ethereal 매뉴얼 Ethereal Packet Sniffing
샘플 캡처 파일 wiki.ethereal.com/SampleCaptures 토론 사이트 wiki.ethereal.com 프로토콜 디코더 Ethereal 매뉴얼 Ethereal User's Guide V for Ethereal Ethereal User's Guide V for Ethereal Ethereal Packet Sniffing by Angela Orebaugh et al., 2004, Syngress Tcpdump Tcpdump, libpcap Mmaped libpcap (Phil Wood) public.lanl.gov/cpw 인젠 연구소: 완전변신 2006

44 SecuPoint SSL 패킷 분석 (WireShark로 설명)
주원석 전임 추가

45 인증서 등록 (1) Edit  Preferences  Protocols  SSL 인젠 연구소: 완전변신 2006

46 인증서 등록 (2) IP,Port,Protocols,인증서 순서로 설정 (뒷 페이지에 설명) 인젠 연구소: 완전변신 2006

47 RSA Key 등록 문자열 문자열 구조 SecuPoint RSA Key 등록 문자열 설명 구분자 : Comma(,)
IP : SSL 통신을 할 서버 IP Port : SSL 통신을 할 서버 Port Protocol : SSL 통신으로 암호화 할 프로토콜 인증서 위치 : 서버에서 취득한 인증서 Ex) ,443,http,/path/to/snakeoil2.key // Unix ,443,http,c:\path\to\snakeoil2.key // Windows ,8080,smtp,/other/path/key.pem // Unix SecuPoint RSA Key 등록 문자열 설명 구성 : ,2007,http,d:\work\ssl\server_izpl.pem : 아파치가 설치된 시스템의 IP 2007 : SSL 통신을 하는 포트 번호 http : SSL 통신으로 암호화 된 프로토콜 D:\work\ssl\server_izpl.pem : 번에서 취득한 인증서를 복사해둔 로컬 Path 인젠 연구소: 완전변신 2006

48 SSL 인증서 등록 전 암호화 되어 있어 패킷 분석 안됨. 인젠 연구소: 완전변신 2006

49 SSL 인증서 등록 후 Http 통신으로 복호화하여 보여짐. 인젠 연구소: 완전변신 2006

50 WireShark Wiki 예제로 연습하기
압축 해제하면 3개의 파일이 존재함. rsasnakeoil2.cap : SSL 패킷 rsasnakeoil2.key : RSA 키 rsasnakeoil2.README : RSA Key 등록 문자열 인젠 연구소: 완전변신 2006

51 참조 사이트 인젠 연구소: 완전변신 2006


Download ppt "Capturing/Analyzing 패킷"

Similar presentations


Ads by Google