Capturing/Analyzing 패킷. WireShark. Ethereal ( 옛날 이름 ). 목차. 네트워크 개요 와이어샥 소개 캡처링 필터 – 캡처 , 화면 표시 통계 기타 툴 참고 문헌. Introduction (Network + Security). 네트워크 보안은 캡처 패킷 - identifying 분석 패킷 - interpreting 보안 분석을 위해 반드시 이해해야 하는 것 패킷 구성 / 구조 - how a packet is constructed and
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
목차 • 네트워크 개요 • 와이어샥 소개 • 캡처링 • 필터 –캡처, 화면 표시 • 통계 • 기타 툴 • 참고 문헌 인젠 연구소: 완전변신 2006
Introduction (Network + Security) • 네트워크 보안은 • 캡처 패킷 - identifying • 분석 패킷 - interpreting • 보안 분석을 위해 반드시 이해해야 하는 것 • 패킷 구성/구조 - how a packet is constructed and • 실제 흐름 - how it performs in real world scenarios. • 무료로 사용할 수 있고 보편적인 툴 • tcpdump (패킷 캡처 라이브러리 포함) • WireShark – Ethereal의 최신 버전 • 프로그램 및 소스 위치 • \\rf1\programs\ 인젠 연구소: 완전변신 2006
App. Transport Network Link Net. Device Capturing layer • Network card를 통하여 in/out 되는 패킷들을 capture 인젠 연구소: 완전변신 2006
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
TCP • Connection-oriented transport layer protocol • Reliable connection for 데이터 교환 • 통신을 위해 Connection establishment 선행 필요 • 모든 패킷이 제대로 순서화 되고 확인되도록 보장 • acknowledgement or ACK. • Windowing (2byte 크기 - 65535) • 모든 패킷마다 ACK해야 한다면 네트워크에 엄청난 부담을 줌 • Windowing 이라는 메커니즘을 통해 이럼 부담을 줄임 • Windowing은 flow control의 방법 • 전송자는 몇 개의 패킷을 보내고 ACK 응답을 확인 • 만약 ACK가 안 오면, 최종 ACK 부를 받은 패킷 부터 재전송 인젠 연구소: 완전변신 2006
ICMP & ARP • ICMP - Internet Control Message Protocol • TCP/IP 프로토콜의 관리 기능 제공 • flow control, unreachable destination alerts, packet redirection, and remote host checking. • 보안상 많은 관리자들은 ICMP로 네트워크 조사를 제한 • ping -n 1 www.yahoo.co.kr • OS 버전 등과 같은 정보를 추측하는 툴들 있음 • Nmap, ettercap, Ntop 등등 • ARP (Address Resolution Protocol) • IP주소를 갖고 특정 MAC 주소를 찾는 방법 • IP 조회는 브로드캐스트, 응답은 유니캐스트 • MAC 주소 조회 • arp -a 인젠 연구소: 완전변신 2006
WireShark - Ethereal 소개 • Network packet analyzer • 네트워크 패킷 캡처 • 가능한 자세한 정보 제공 • 1997말, Gerald Combs 개발 시작 • 2006년 이름 변경됨 - "e-the-real"에서 • 용도 • 네트워크 트러블 슈팅 • 보안 문제 관찰 • 프로토콜 구현디버깅 • 네트워크 프로토콜 internals 학습 • 향상 기능 • 저장하기 (그림 등등), 암호 통신 해독 인젠 연구소: 완전변신 2006
Features • UNIX, Linux and Windows 지원 (Open Source) • 프로토콜의 자세한 정보 제공 • Open and Save packet data captured다양한 포맷 지원 (25+). • Capture (libpcap) / Display 필터 • Colorization, Statistics • 다수의 프로토콜 decoders (460+) • What WireSharkis not • Not an IDS, No manipulations on the network, only "measures" • ... 그 외 다양한 기능 인젠 연구소: 완전변신 2006
Building and Installing Ethereal • 그냥 설치해서 작동시켜도 됨 • Unix/Linux에서 성능 향상 시키기 • 커널 컴파일을 통해서 네트워크 캡처 성능 향상 필요 • Network device polling 활성화 (인텔, 리얼텍 랜카드) • Mmaped libpcap 사용하도록 컴파일 • 실행시 환경 설정 필요 • 별도 문서 참조 인젠 연구소: 완전변신 2006
The Main window Menu Main toolbar Filter toolbar Packet list Packet details Packet bytes Status bar 인젠 연구소: 완전변신 2006
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
Capture filter (libpcap방식) • 모든 HTTP 패킷 • tcp port 80 • Non-HTTP 패킷: • not tcp port 80 또는 !tcp port 80 또는 tcp port not 80 • www.inzen.com HTTP browsing • tcp port 80 || dst www.inzen.com • www.inzen.com 아닌 HTTP browsing • tcp port 80 and not dst www.inzen.com • TCP 패킷: • tcp 또는 ip proto 6 • TCP SYN 패킷 • tcp[tcpflag] & tcp-syn == tcp-syn 인젠 연구소: 완전변신 2006
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
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
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 - enabledby default ? 소스 epan/dissectors/ 인젠 연구소: 완전변신 2006
명령어 기반 보조 툴들 • tcpdump 패킷 캡처 • tethereal 명령어 기반 Ethereal • capinfos 패킷 캡처 파일 정보 • editcap 캡처 파일 편집 –포맷 및 패킷 선택 제거 • mergecap 파일 합치기 • text2pcap ASCII hexdumps to pcap 파일 형태 • idl2eth Corba IDL 파일에서 디코더 (dissector) 생성 인젠 연구소: 완전변신 2006
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 50000 -l 5 /home/dump.pcap • tcpreplay -i eth1 -t -l 1 /home/dump.pcap 인젠 연구소: 완전변신 2006
인증서 등록 (2) IP,Port,Protocols,인증서 순서로 설정 (뒷 페이지에 설명) 인젠 연구소: 완전변신 2006
RSA Key 등록 문자열 • 문자열 구조 • 구분자 : Comma(,) • IP : SSL 통신을 할 서버 IP • Port : SSL 통신을 할 서버 Port • Protocol : SSL 통신으로 암호화 할 프로토콜 • 인증서 위치 : 서버에서 취득한 인증서 • Ex) 127.0.0.1,443,http,/path/to/snakeoil2.key // Unix127.0.0.1,443,http,c:\path\to\snakeoil2.key // Windows10.1.1.1,8080,smtp,/other/path/key.pem // Unix • SecuPoint RSA Key 등록 문자열 설명 • 구성 : 10.3.76.200,2007,http,d:\work\ssl\server_izpl.pem • 10.3.76.200 : 아파치가 설치된 시스템의 IP • 2007 : SSL 통신을 하는 포트 번호 • http : SSL 통신으로 암호화 된 프로토콜 • D:\work\ssl\server_izpl.pem : 10.3.76.200번에서 취득한 인증서를 복사해둔 로컬 Path 인젠 연구소: 완전변신 2006
SSL 인증서 등록 전 암호화 되어 있어 패킷 분석 안됨. 인젠 연구소: 완전변신 2006
SSL 인증서 등록 후 Http 통신으로 복호화하여 보여짐. 인젠 연구소: 완전변신 2006
WireShark Wiki 예제로 연습하기 • http://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=get&target=snakeoil2_070531.tgz • 압축 해제하면 3개의 파일이 존재함. • rsasnakeoil2.cap : SSL 패킷 • rsasnakeoil2.key : RSA 키 • rsasnakeoil2.README : RSA Key 등록 문자열 인젠 연구소: 완전변신 2006