1 / 94

ntop - display top network users

ntop-3.1.1. ntop -d -c -q -w 3000 -r 30. ntop - display top network users. ntop. 연구소 작성자 이삼일. 2006-12-08, V1.1. Revision Control. 2006-12-08, V1.1 연구소 이삼일 Original Issue. Revision Control Page( 본 페이지 ) 추가 마스터 변경 ( 연구소 표준 마스터 ) ntop 개요 > “ 유닉스에서 환경설정 ” 페이지 추가 용어집 추가.

edan
Télécharger la présentation

ntop - display top network users

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.

E N D

Presentation Transcript


  1. ntop-3.1.1 ntop -d -c -q -w 3000 -r 30 ntop - display top network users ntop 연구소 작성자 이삼일 2006-12-08, V1.1

  2. Revision Control • 2006-12-08, V1.1연구소 이삼일 • Original Issue. • Revision Control Page(본 페이지) 추가 • 마스터 변경(연구소 표준 마스터) • ntop 개요 > “유닉스에서 환경설정” 페이지 추가 • 용어집 추가 According to [Stallings], network monitoring is the most fundamental aspect of automated network management. 인젠 연구소: 완전변신 2006

  3. 목차 • ntop 개요 • 메뉴 구성 • 메뉴별 화면 According to [Stallings], network monitoring is the most fundamental aspect of automated network management. 인젠 연구소: 완전변신 2006

  4. ntop 개요

  5. ntop 개요 www.ntop.org • Simple, free, portable network management tool • 주요 기능 • 측정 - Traffic measurement • 감시 - Traffic monitoring • 최적화 및 계획 - Network optimization & planning • 보안 위반 탐지 - Detection of network security violations • 인터페이스 • Web mode: Integrated Web interface • Interactive mode: Simple console command - intop 인젠 연구소: 완전변신 2006

  6. ntop 기능 리스트 • Protocol에 따라 network traffic 정렬 • 다양한 기준에 따라 network traffic 표시 • traffic statistics 표시 • RRD format으로 disk에 지속적인 traffic 통계 저장 • 컴퓨터 사용자들의 신분을 파악 (예 email 주소) • 관찰통한 호스트 OS 추측 (i.e. 프로브에서 패킷 전송 없이) • 다양한 프로토콜들 중에서도 IP traffic 분포 표시 • 발신자와 수신자에 따라 IP traffic 분석 및 정렬 • IP Traffic 서브넷 매트릭스 표시 (who's talking to who?) • Protocol 유형에 따른 IP protocol 사용량 표시 • 라우터/스위치 등등에서 생성된 NetFlow/sFlow수집기로 작동 • RMON과 유사한 network traffic 통계 생성 인젠 연구소: 완전변신 2006

  7. [1] 트래픽 측정 - Traffic measurement • 네트워크 사용을 추적하여 서브넷 전체에 대해 또는 로컬 서브넷에 있는 개별 호스트들에 대해 일련의 통계를 생성 • 모든 패킷을 수집하여 sender/receiver 짝으로 연관시킨다. • 특정 호스트에 대한 모든 트래픽 활동을 추적 • 개별 호스트 정보 - Information for each host found • Data sent/received, Used Bandwidth, IP multicast, TCP 세션History, UDP 트래픽, TCP/UDP 사용 서비스, 트래픽 분포, IP 트래픽 분포 • 글로벌 트래픽 통계 - Global traffic statistics • 트래픽 분포, 패킷 분포, Used Bandwidth, 프로토콜 사용과 분포, 로컬 서브넷 트래픽 매트릭스, 네트워크 플로우 인젠 연구소: 완전변신 2006

  8. [2] 트래픽 감시 - Traffic monitoring • 네트워크 트래픽이 명시된 정책 위반 또는 정의된 임계 값 초과 상황 구별 • 네트워크 설정 문제 탐지 • 중복 IP 주소 사용 • "promiscuous mode"(난잡모드) 로컬 호스트 확인 • 프로토콜 트래픽 데이터 분석을 통한 잘못 설정된 어플리케이션 • 서비스 오용 탐지 • 프로토콜 오용 • 서브넷 라우터 확인 • 과도한 네트워크 대역 사용률 인젠 연구소: 완전변신 2006

  9. [3] 네트워크 최적화 및 계획 • 비생산적인 사용의 잠재적인 원천 탐지 • 특히 불필요한 프로토콜과 비최적화 라우팅 문제 • 트래픽 특징 및 분포를 통해 간접적으로 보다 현명한 사용을 위한 정책들을 재검토할 수 있도록 한다. 인젠 연구소: 완전변신 2006

  10. [4] 네트워크 보안 위반 탐지 • 계속적인 공격 추적 및 잠재적인 보안 취약점 점검 지원 • IP spoofing • Network cards in promiscuous mode • Denial of service attacks • Trojan horses (for well known ports) • Portscan attacks • 관리자를 위한 알람 생성 (via e-mail, SNMP traps, SMS) • 트래픽 정보를 database에도 저장 가능 인젠 연구소: 완전변신 2006

  11. 설치 관련 사항 • 제공 포맷 - www.ntop.org • 소스코드 (하나의 소스에서 거의 모든 플랫폼 지원) • 어플리케이션 바이너리 또는 패키지 • 유닉스, 리눅스, BSD - 풀 버전 제공 • 윈도우용 경우 데모 버전으로 최대 1,000 패킷으로 제한 됨 • 옵션 플러그인 • ICMP, WAP, NetFlow, sFlow, RRD, SNMP, LastSeen 인젠 연구소: 완전변신 2006

  12. 유닉스에서 컴파일 • 소스 다운로드 받기 - CVS 이용 • mkdir /home/src /home/src/ntop • cd /home/src/ntop • export CVSROOT=:pserver:anonymous@cvs.ntop.org:/export/home/ntop • cvs login 'ntop' as password • cvs checkout ntop • 컴파일 순서 • cd ntop 압축해제 폴더 • ./configure • make • make install 인젠 연구소: 완전변신 2006

  13. 유닉스에서 환경설정 • /usr/local/var/ntop owner 설정; ntop 은 nobody 로 실행 되기 때문에 ntop 이 사용하는 DB파일 pid 파일등이 저장 되는 디렉토리의 owner 를 변경한다 # /usr/local/bin/ntop Mon Dec 4 14:31:24 2006 ntop will be started as user nobody **WARNING** INIT: Unable to create pid file (/usr/local/var/ntop/ntop.pid) Mon Dec 4 14:23:31 2006 **ERROR** RRD: Disabled - unable to create base directory (err 13, /usr/local/var/ntop/rrd) # chown -R nobody:nobody /usr/local/var/ntop # ps -ef | grep ntop nobody 896 1 0 Dec04 ? 00:08:31 ntop -d -c -q -w 3000 -r 30 -P /usr/local/var/ntop -M -i eth0 인젠 연구소: 완전변신 2006

  14. 유닉스에서 환경설정 • Admin password 설정 # ntop --set-admin-password=xyz12345 Tue Dec 5 22:59:06 2006 NOTE: Interface merge enabled by default Tue Dec 5 22:59:06 2006 Initializing gdbm databases Tue Dec 5 22:59:06 2006 Admin user password has been set 인젠 연구소: 완전변신 2006

  15. 실행 및 관리자 접속 • 데몬 실행 • ntop -d -c -q -w 3000 -r 30 -P /var/log/ntop -M -i eth0,eth2 • d demon mode • c Sticky hosts • q create suspicious packets • w web server port • r refresh interval - sec • 관리자 웹 UI 접속 - http://hostname:portnumber/ • 디폴트 HTTP 포트: 3000 • 예제 http://f1:3000/ • 기타 설정은 웹에서 수행 • Interactive mode 인젠 연구소: 완전변신 2006

  16. ntop Architecture Report Engine Packet Analyzer NetFlow/sFlow listeners Packet Sniffer 실제 트래픽 Flows Flows 인젠 연구소: 완전변신 2006

  17. ntop host hashtable entries Protocol Traffic Counters IP Traffic Counters Host hashtable entries TCP/UDP Connections Stats Active TCP connections List Peers List 인젠 연구소: 완전변신 2006

  18. ntop 성능관련 사항 • libpcap 기반 성능 • Packet loss 적음 - 커널과 ntop 자체에서 버퍼 됨 • 잠재적으로 오랜 시간 실행하는 액션은 비동기 모드로 구현 • 예) IP address resolution • 여러 개의 쓰레드를 이용 • 해시 테이블을 광범위하게 이용 • 성능향상을 위해 Unix 및 리눅스에서는 PF_RING 사용 • 커널 모드에서 메모리 사용 (???) • RRD (Round Robin Database)와는 다른 것임 인젠 연구소: 완전변신 2006

  19. 기타 특징 • Unix and Win32 다중 프로세스 다중 쓰레드 지원 • 가상 및 다중 네트워크 카드 지원 • 원격 접속을 위해 Perl/PHP/Python lightweight API 지원 • 수집 소스로 NetFlow & sFlow지원 - 동시에 다중 프로브 • 장기간의 트래픽 분석을 위해 RRD database에 통계 저장 • 인터넷 도메인, AS (Autonomous Systems), VLAN 통계 • 수동적 (Passive) 원격 호스트 지문 사용 (ettercap) • 네트워크 OS 및 사용자에 따라 자산 발견 및 분류 • 잘 알려진 P2P (Peer to Peer) 프로토콜에 대한 디코더 • HTTP 사용자당 인증/암호 적용 및 HTTPS via OpenSSL • Graphical Charts via gdchart • WAP support 인젠 연구소: 완전변신 2006

  20. ntop 관련 포함(또는 외장) 툴 내장 HTTP ettercapOS 추정 /etc/services 목록 netFlow 수집기 etter.finger.os.gz lsof List open files NIC 제조자 목록 Perl, PHP, Python sFlow 수집기 oui.txt.gz nmap gdchartgd, libpng libpcap 기반 라우팅 AS 목록 AS-list.txt.gz RRD지원 도메인.국가 목록 OpenSSL HTTPS p2c.opt.table.gz gdbm 데이터베이스 특별한 MAC 목록 WAP지원 specialMAC.txt.gz 인젠 연구소: 완전변신 2006

  21. ntop 플러그인 Netflow sFlow SNMPagent Xmldump PDA rrd icmpWatch LastSeen 인젠 연구소: 완전변신 2006

  22. DB 및 저장소 - gdbm, RRD

  23. 1. ntop 시간 시리즈와 관련 없는 정보 • /usr/local/var/ntop • gdbm 포맷 캐시 데이터 파일 • LsWatch.db • addressQueue.db • dnsCache.db, prefsCache.db • fingerprint.db, macPrefix.db • ntop_pw.db • tcpdump 포맷 패킷 덤프 파일 • ntop-suspicious….pcap 인젠 연구소: 완전변신 2006

  24. 2. RRD 데이터 저장 구조 eth0 matrix 192.168.1.1 192.168.1.106 hosts 00 0B 6A 8A D1 67 192 168 199 1 205 domains kr netflow 인젠 연구소: 완전변신 2006

  25. ntop rrd 파일 리스트 (인터페이스) (.rrd 확장자 생략) • /usr/local/var/ntop/rrd/interfaces/eth0 • 프로토콜별 트래픽 (L2) • ipBytes, arpRarpBytes, stpBytes, otherBytes • IP별 트래픽 (L3) • tcpBytes, udpBytes, icmpBytes • IP 서비스별 트래픽 (L4) • IP_DHCP-BOOTPBytes, IP_DNSBytes, IP_HTTPBytes, IP_SSHBytes, IP_KazaaBytes, IP_MailBytes, IP_eDonkeyBytes IP_MessengerBytes,IP_NBios-IPBytes, IP_SNMPBytes, • 패킷 크기 패킷량 • upTo1518Pkts, upTo1024Pkts, …, upTo128Pkts, upTo64Pkts • 패킷 캐스트 • ethernetPkts, broadcastPkts, multicastPkts • 기타 • IGMP, ethernetBytes, activeHostSendersNum, knownHostsNum 인젠 연구소: 완전변신 2006

  26. ntop rrd 파일 리스트 (domains) • 도메인 이름에 따라 서브 폴더가 생성됨 - 단일 레벨 • 도메인 단위당 트래픽 통계 • /usr/local/var/ntop/rrd/interfaces/eth0/domains/ • bytesRcvd, bytesSent • tcpRcvd, tcpSent • udpRcvd, udpSent 인젠 연구소: 완전변신 2006

  27. ntop rrd 파일 리스트 (hosts) • 내/외부 호스트 구분에 따라 통계 파일들 위치가 다름 • 로컬 호스트 경우는 MAC 주소에 따라 • 외부 호스트 경우 IP 주소에 따라 • /usr/local/var/ntop/rrd/interfaces/eth0/hosts/ • 00/0B/6A/75/1F/2E/ • bytesRcvd, bytesRcvdLoc, ipBytesRcvd, pktRcvd, tcpRcvdLoc, totContactedRcvdPeers • 131/114/21/22/ • IP_HTTPRcvdBytes, IP_HTTPSentBytes, • bytesRcvd, bytesSent, pktRcvd, pktSent • ipBytesRcvd, ipBytesSent • bytesSentLoc, bytesRcvdLoc • tcpRcvdLoc, tcpSentLoc • totContactedSentPeers, totContactedRcvdPeers 인젠 연구소: 완전변신 2006

  28. ntop rrd 파일 리스트 (matrix) • IP 주소에 따라 서브 폴더가 생성됨 - 단일 레벨 • 그 하위에 상위 주소와 통신이 있었던 IP 주소 폴더들이 생성되고 여기에 통계 정보 생성 • /usr/local/var/ntop/rrd/interfaces/eth0/matrix/ • 192.168.1.106/ • 192.168.1.101/ • bytes, pkts • 192.168.1.11/ • bytes, pkts 인젠 연구소: 완전변신 2006

  29. NetFlow and ntop versions ntop nProbe nBox

  30. nBox 임베디트 시스템 내장 웹서버 nProbe ntop과 관련한 기타 SW HTTP 3000 포트 사용 ntop 패킷 콜랙터 요약 통계 NetFlow, sFlow 수집기 관리자 화면 Collector (Receiver) Probe (Sender) NetFlow 수집 위해 UDP 2055 포트 사용 HTTP 3000 포트 사용 nProbe 패킷 콜랙터 요약 통계 NetFlow 수집 위해 UDP 2055 포트 사용 인젠 연구소: 완전변신 2006

  31. nProbe란? • NetFlow 통계 정보 생성 제공자 • Gateway에서 오는 NetFlow 흐름 분석 • Gateway의 Embedded, low-speed, NetFlow 프로브 대체 • 패킷 로스 없이 (또는 아주 적게) 최대 속도에서 Gbit 네트워크 분석 • ntop 또는 상용 제품에 NetFlow 전달 • e.g. Cisco NetFlow Collector 또는 HP-OV 인젠 연구소: 완전변신 2006

  32. nProbe 개요 • 범위 하드웨어 이용 저렴한 NetFlow probe 제공 • 지원 OS: Unix, MacOS X, Windows, embedded 환경 • 효율적인 플로우 처리를 위해 NetFlow v9/nFlow지원 • IPv4와 IPv6 지원 • 제한된 메모리 공간 사용과 and 적절한 CPU 사용. • 네트워크 크기와 상관없이 2 MB 미만 사용 • 제한된 리소스 환경 및 임베디드 시스템을 위해 디자인 됨 • nProbe binary < 100 Kb • 나중 분석을 위해 플로우를 디스크에 저장할 수 있고 기존 모니터링 어플리케이션에 통합 가능 • 고성능 프로브 • 상용 또는 라우터/스위치 내장 프로브들은 고속 네트워크에 대응 못하는 경우가 많음 인젠 연구소: 완전변신 2006

  33. nProbe Flow 필드 • BYTES, PKTS, FLOWS, PROT, TOS, TCP_FLAGS, L4_SRC_PORT, IP_SRC_ADDR • SRC_MASK, INPUT_SNMP, L4_DST_PORT, IP_DST_ADDR, DST_MASK • OUTPUT_SNMP, IP_NEXT_HOP, SRC_AS, DST_AS, BGP_NEXT_HOP • MUL_DPKTS, MUL_DOCTETS, LAST_SWITCHED, FIRST_SWITCHED • IPV6_SRC_ADDR, IPV6_DST_ADDR, IPV6_SRC_MASK, IPV6_DST_MASK • FLOW_LABEL, ICMP_TYPE, IGMP_TYPE, SAMPLING_INTERVAL • SAMPLING_ALGO, FLOW_ACTIVE_TIMEOUT, FLOW_INACTIVE_TIMEOUT • ENGINE_TYPE, ENGINE_ID, TOTAL_BYTES_EXP • TOTAL_PKTS_EXP, TOTAL_FLOWS_EXP, IP_PROTOCOL_VERSION • DIRECTION, IPV6_NEXT_HOP, BPG_IPV6_NEXT_HOP, IPV6_OPTION_HEADERS • MPLS_LABEL_1, MPLS_LABEL_2, MPLS_LABEL_3, MPLS_LABEL_4, MPLS_LABEL_5 • MPLS_LABEL_6, MPLS_LABEL_7, MPLS_LABEL_8, MPLS_LABEL_9, MPLS_LABEL_10 • FRAGMENTED, FINGERPRINT, VLAN_TAG • NW_LATENCY_SEC, NW_LATENCY_NSEC, APPL_LATENCY_SEC, APPL_LATENCY_NSEC • PAYLOAD nprobe -T "%LAST_SWITCHED %FIRST SWITCHED %BYTES %PKTS %INPUT_SNMP %OUTPUT_SNMP %IP_SRC_ADDR %IP_DST_ADDR %PROT %TOS %L4_SRC_PORT %L4_DST_PORT" 인젠 연구소: 완전변신 2006

  34. nBox86 - 임베디드 ntop & nProbe • 내용물 • x86 PC - 최소128 MB RAM, Pentium or better CPU • nBox86 firmware image - 데비안 기반 • IDE Flash disk 또는 128 MB Compact Flash with IDE Adapter. • 구매 옵션 • Software onlyYou purchase a PC and upload the nBox86 firmware yourself • Compact flash nBox86 uploaded • Complete box다양한 박스 선택 가능 인젠 연구소: 완전변신 2006

  35. NetFlow Infrastructure 인젠 연구소: 완전변신 2006

  36. NetFlow에서의 Flow란? • 동일 (src ip & port, dst ip & port, protocol #) 패킷들의 집합 • 몇몇 protocols - ICMP 경우 포트에 대한 개념이 없음 • 모든 플로우는 수명이 있다. nprobe -n <host:port> [-i <interface>] 클라이언트 연결 개념 Flow = Session = Socket 통신 장비에서 주로 사용 개념 프로그래밍에서 주로 사용 개념 인젠 연구소: 완전변신 2006

  37. 메뉴 구성

  38. About What is ntop Show Configuration Credits Man pageHelp Summary Traffic Hosts Network Load ASN Info VLAN Info Network Flows All Protocols Traffic Throughput Activity IP Summary Traffic Directions Local Media Fiber Channel SCSI Sessions Admin Utils 메뉴 구성 인젠 연구소: 완전변신 2006

  39. Summary Traffic Multicast Internet Domain Host Clusters Distribution Traffic Directions Local to Local Local to Remote Remote to Local Remote to Remote Local Routers Ports Used Active TCP sessions Host Fingerprint Host Characterization Network Traffic Map Local Matrix IP 인젠 연구소: 완전변신 2006

  40. Plugins icmpWatch, PDA Plugin, LastSeen NetFlow, sFlow, snmpPlugin, xmldump, rrdPlugin Switch NIC Shutdown Configure Startup Options Preferences Packet Filter Reset Stats Web Users Protect URLs Admin 인젠 연구소: 완전변신 2006

  41. Fibre Channel Traffic Throughput Activity Hosts Traffic Per Port Sessions VSANs VSAN Summary SCSI Sessions Bytes Times Status Task Management Media 인젠 연구소: 완전변신 2006

  42. 메뉴별 화면

  43. Summary -> Traffic Global Traffic Statistics Traffic Report for 'eth0' [Switch] Network Interfaces Sampling Since Active End Nodes Packets Traffic Remote Host Distance Network Load Historical Data (RRD data) Global Protocol Dist. (L2) Global TCP/UDP Protocol Dist. (L4) IP (R)ARP STP … HTTP DNS … Others 인젠 연구소: 완전변신 2006

  44. Summary -> Traffic All Protocol Distribution Host Distance IP Protocol Distribution 인젠 연구소: 완전변신 2006

  45. Summary -> Traffic IP & None IP Packet Cast Packet Size Packet TTL 인젠 연구소: 완전변신 2006

  46. Summary -> Traffic: Historical data (RRD) Cast L2 Protocols Size L3 Protocols L4 Protocols 인젠 연구소: 완전변신 2006

  47. Summary -> Traffic: Historical data (RRD) Last hour Week Month Last 6 Hours Last 12 Hours Year Day 인젠 연구소: 완전변신 2006

  48. Summary -> Hosts • Field details • Host (Name) • Domain (Country Flag based on IP addresses) • IP address • Other name(s) • Bandwidth (% of the total bytes on a interface) • Nw Board Vendor (NIC manufacturer) • Hops Distance • Host Contacts • Age/Inactivity • AS ??? Traffic Unit: [ Bytes ][ Packets ] Hover the mouse to see the actual value. The total will NOT be 100% as local traffic will be counted TWICE (sent and received) 인젠 연구소: 완전변신 2006

  49. Summary -> Hosts 인젠 연구소: 완전변신 2006

  50. Summary -> Hosts: Host Info • Info about a host • Host Traffic Stats • Packet Statistics • Protocol Distribution • Last Contacted Peers • IPServiceStats:ServerRole • TCP/UDP - Traffic on Other Ports • TCP/UDP Recently Used Ports • Active TCP Sessions 인젠 연구소: 완전변신 2006

More Related