SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Analysis NetFlow[v5] in Real Time
Piotr Perzyna
Marzec 2016
SGGW
What is NetFlow?
1. NetFlow is a feature that was introduced on Cisco routers that provides the ability to
collect IP network traffic as it enters or exits an interface.
2. NetFlow have a several versions from 1 to 10, but the comon is only v5 and v9.
3. The idea was that the first packet of a flow would create a NetFlow switching record. This
record would then be used for all later packets of the same flow, until the expiration of
the flow. Only the first packet of a flow would require an investigation of the route table
to find the most specific matching route.
Where is NetFlow?
NetFlow v5 content
Bytes Contents Description
0-3 srcaddr Source IP address
4-7 dstaddr Destination IP address
8-11 nexthop IP address of next hop router
12-13 input SNMP index of input interface
14-15 output SNMP index of output interface
16-19 dPkts Packets in the flow
20-23 dOctets
Total number of Layer 3 bytes in the
packets of the flow
24-27 first SysUptime at start of flow
28-31 last
SysUptime at the time the last packet
of the flow was received
32-33 srcport
TCP/UDP source port nr or
equivalent
34-35 dstport
TCP/UDP dest port nr or
equivalent
36 pad1 Unused (zero) bytes
37 tcp_flags Cumulative OR of TCP flags
38 prot IP protocol type
39 tos IP type of service (ToS)
40-41 src_as
Autonomous system number of the
source, either origin or peer
42-43 dst_as
Autonomous system number of the
destination, either origin or peer
44 src_mask Source address prefix mask bits
45 dst_mask Destination address prefix mask bits
46-47 pad2 Unused (zero) bytes
Mikrotik as NetFlow Exporter?!
1. SIA Mikrotīkls, as MikroTik - Latvian manufacturer of computer hardware.
2. The main product is a Linux-based operating system known as MikroTik RouterOS.
3. It allows you to change any PC computer (including machines in MIPS and PowerPC) fully
functional router.
4. Remote administration from using the program WinBox
Logstash as NetFlow Collector?!
Process Any Data, From Any Source
1. Centralize data processing of all types
2. Normalize varying schema and formats
3. Quickly extend to custom log formats
4. Easily add plugins for custom data sources
The recent Logstash 2.2 release is powered by a new and improved, next-generation pipeline
backbone, enables dynamic watermarking for JDBC input queries, supports compressed HTTP input
requests, and is compatible with the latest versions of Elasticsearch and Beats.
ElasticSearch as storage?!
1. Object Json DB
2. Real-Time Data
3. High Availability
4. Full-Text Search
5. RESTful API
6. Massively Distributed
Kibana as Analyzer?!
Open Source
Easy Setup
Integration with Elasticsearch
Data visualization platform
GeoIP
Easy to Share
Simple Data Export
Data from Many Sources
Simple laboratory
Our exercise is
to create an area
highlighted in
red
Configuration contained in the
presentation is designed to exercise
and show a circuit diagram.
Production use inadvisable for security reasons.
CookBook logstash?!
1. Create new directory
# mkdir /opt/logstash
# mkdir /opt/logstash/config
2. Download logstash
# wget
https://download.elastic.co/logstash/logst
ash/logstash-2.2.2.tar.gz
3. Unpack kibana to /opt/kibana
# tar -zxvf logstash-2.2.2.tar.gz
1. Download NetFlow library
# wget
https://raw.githubusercontent.com/logstash
-plugins/logstash-codec-
netflow/master/lib/logstash/codecs/netflow
/netflow.yaml
# mv netflow.yaml
/opt/logstash/config/netflow.yml
CookBook logstash?!
1. Create configuration
/opt/logstash/config/mikrotik.yml
input {
udp {
port => 9995
codec => netflow {
definitions => "/opt/logstash/config/netflow.yml"
versions => [5]
}
}
}
output {
elasticsearch {
index => "logstash-%{+YYYY.MM}"
hosts => "localhost:9200"
}
}
6. Run
# screen -dmS logstash
/opt/logstash/bin/logstash -f
/opt/logstash/config/mikrotik.yml
7. Tell presenter Your IP address, NetFlow will start
flood your server :)
CookBook elasticsearch?!
1. Create new directory /opt/elastic
# mkdir /opt/elastic
2. Download elastic
# wget
https://download.elasticsearch.org/elastic
search/release/org/elasticsearch/distribut
ion/tar/elasticsearch/2.2.0/elasticsearch-
2.2.0.tar.gz
3. Unpack to /opt/elastic
# tar -zxvf elasticsearch-2.2.0.tar.gz
1. Change /opt/elastic/config/elasticsearch.yml
# path.data: /opt/elastic/data
# path.logs: /var/log/elastic
# network.host: 0.0.0.0
# http.port: 9200
2. Run elasticsearch
# screen -dmS elastic
/opt/elastic/bin/elasticsearch -
Des.insecure.allow.root=true
CookBook kibana?!
1. Create new directory /opt/kibana
# mkdir /opt/kibana
2. Download kibana
# wget
https://download.elastic.co/kibana/kibana
/kibana-4.4.1-linux-x64.tar.gz
3. Unpack kibana to /opt/kibana
# tar -zxvf kibana-4.4.1-linux-x64.tar.gz
# mv kibana-4.4.1-linux-x64/* /opt/kibana/
4. Change /opt/kibana/config/kibana.yml
✓ server.port: 5601
✓ server.host: “0.0.0.0”
✓ elasticsearch: “http://localhost:9200”
✓ kibana.index: “.kibana”
5. Run kibana
# screen -dmS kibana /opt/kibana/bin/kibana
Login via browser to:
http://xxx.xxx.xxx.xxx:5601
and
create fantastic dashboard!
poweroff
Thank you for watching!

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Telco Access Network with SDN
Telco Access Network with SDNTelco Access Network with SDN
Telco Access Network with SDN
 
Simplifying and Securing your OpenShift Network with Project Calico
Simplifying and Securing your OpenShift Network with Project CalicoSimplifying and Securing your OpenShift Network with Project Calico
Simplifying and Securing your OpenShift Network with Project Calico
 
LiteOS
LiteOS LiteOS
LiteOS
 
The Universal Dataplane
The Universal DataplaneThe Universal Dataplane
The Universal Dataplane
 
OCP U.S. Summit 2017 Presentation
OCP U.S. Summit 2017 PresentationOCP U.S. Summit 2017 Presentation
OCP U.S. Summit 2017 Presentation
 
如何用k8s打造國產5G NFV平臺? 剖析經濟部5G核網技術的關鍵
如何用k8s打造國產5G NFV平臺?剖析經濟部5G核網技術的關鍵如何用k8s打造國產5G NFV平臺?剖析經濟部5G核網技術的關鍵
如何用k8s打造國產5G NFV平臺? 剖析經濟部5G核網技術的關鍵
 
In-kernel Analytics and Tracing with eBPF for OpenStack Clouds
In-kernel Analytics and Tracing with eBPF for OpenStack CloudsIn-kernel Analytics and Tracing with eBPF for OpenStack Clouds
In-kernel Analytics and Tracing with eBPF for OpenStack Clouds
 
OpenContrail Cloudwatt Feedback
OpenContrail Cloudwatt FeedbackOpenContrail Cloudwatt Feedback
OpenContrail Cloudwatt Feedback
 
Container network security
Container network securityContainer network security
Container network security
 
OpenContrail SDN for Kubernetes
OpenContrail SDN for KubernetesOpenContrail SDN for Kubernetes
OpenContrail SDN for Kubernetes
 
DPDK IPSec performance benchmark ~ Georgii Tkachuk
DPDK IPSec performance benchmark ~ Georgii TkachukDPDK IPSec performance benchmark ~ Georgii Tkachuk
DPDK IPSec performance benchmark ~ Georgii Tkachuk
 
KubeCon EU 2016: Secure, Cloud-Native Networking with Project Calico
KubeCon EU 2016: Secure, Cloud-Native Networking with Project CalicoKubeCon EU 2016: Secure, Cloud-Native Networking with Project Calico
KubeCon EU 2016: Secure, Cloud-Native Networking with Project Calico
 
Interop2018 contrail ContrailEnterpriseMulticloud
Interop2018 contrail ContrailEnterpriseMulticloudInterop2018 contrail ContrailEnterpriseMulticloud
Interop2018 contrail ContrailEnterpriseMulticloud
 
OpenStack and OpenDaylight: An Integrated IaaS for SDN/NFV
OpenStack and OpenDaylight: An Integrated IaaS for SDN/NFVOpenStack and OpenDaylight: An Integrated IaaS for SDN/NFV
OpenStack and OpenDaylight: An Integrated IaaS for SDN/NFV
 
Deployment of Juniper Contrail in AVG Technologies
Deployment of Juniper Contrail in AVG TechnologiesDeployment of Juniper Contrail in AVG Technologies
Deployment of Juniper Contrail in AVG Technologies
 
Symantec SDN Deployment
Symantec SDN DeploymentSymantec SDN Deployment
Symantec SDN Deployment
 
M-CORD cloud-native
M-CORD cloud-nativeM-CORD cloud-native
M-CORD cloud-native
 
Can the Open vSwitch (OVS) bottleneck be resolved? - Erez Cohen - OpenStack D...
Can the Open vSwitch (OVS) bottleneck be resolved? - Erez Cohen - OpenStack D...Can the Open vSwitch (OVS) bottleneck be resolved? - Erez Cohen - OpenStack D...
Can the Open vSwitch (OVS) bottleneck be resolved? - Erez Cohen - OpenStack D...
 
IO Visor Summit 2017: Welcome & Overview via Pere Monclus
IO Visor Summit 2017: Welcome & Overview via Pere MonclusIO Visor Summit 2017: Welcome & Overview via Pere Monclus
IO Visor Summit 2017: Welcome & Overview via Pere Monclus
 
Contrail integrated with Kubernetes and Openstack
Contrail integrated with Kubernetes and OpenstackContrail integrated with Kubernetes and Openstack
Contrail integrated with Kubernetes and Openstack
 

Andere mochten auch

Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech MeetupLogstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Startit
 
Base De Datos Oracle Para Una Galeria De
Base De Datos Oracle Para Una Galeria DeBase De Datos Oracle Para Una Galeria De
Base De Datos Oracle Para Una Galeria De
Arkaitz Lira
 

Andere mochten auch (20)

Netflow Analysis using Elastic Stack - 조인중
Netflow Analysis using Elastic Stack - 조인중Netflow Analysis using Elastic Stack - 조인중
Netflow Analysis using Elastic Stack - 조인중
 
Network Traffic Analysis at a financial institution with 788 branches for 350...
Network Traffic Analysis at a financial institution with 788 branches for 350...Network Traffic Analysis at a financial institution with 788 branches for 350...
Network Traffic Analysis at a financial institution with 788 branches for 350...
 
What's new in NetFlow Analyzer 12.2
What's new in NetFlow Analyzer 12.2What's new in NetFlow Analyzer 12.2
What's new in NetFlow Analyzer 12.2
 
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech MeetupLogstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
 
Base De Datos Oracle Para Una Galeria De
Base De Datos Oracle Para Una Galeria DeBase De Datos Oracle Para Una Galeria De
Base De Datos Oracle Para Una Galeria De
 
Logmanagement with Icinga2 and ELK
Logmanagement with Icinga2 and ELKLogmanagement with Icinga2 and ELK
Logmanagement with Icinga2 and ELK
 
Detecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking DataDetecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking Data
 
Workshop: Big Data Visualization for Security
Workshop: Big Data Visualization for SecurityWorkshop: Big Data Visualization for Security
Workshop: Big Data Visualization for Security
 
Arquitectura de Bases de Datos Oracle
Arquitectura de Bases de Datos OracleArquitectura de Bases de Datos Oracle
Arquitectura de Bases de Datos Oracle
 
E-Mail Forensics
E-Mail ForensicsE-Mail Forensics
E-Mail Forensics
 
Сети для самых маленьких. Часть восьмая. BGP и IP SLA
Сети для самых маленьких. Часть восьмая. BGP и IP SLAСети для самых маленьких. Часть восьмая. BGP и IP SLA
Сети для самых маленьких. Часть восьмая. BGP и IP SLA
 
Working With a Real-World Dataset in Neo4j: Import and Modeling
Working With a Real-World Dataset in Neo4j: Import and ModelingWorking With a Real-World Dataset in Neo4j: Import and Modeling
Working With a Real-World Dataset in Neo4j: Import and Modeling
 
Applied Detection and Analysis Using Flow Data - MIRCon 2014
Applied Detection and Analysis Using Flow Data - MIRCon 2014Applied Detection and Analysis Using Flow Data - MIRCon 2014
Applied Detection and Analysis Using Flow Data - MIRCon 2014
 
İnternet Üzerinde Anonimlik ve Tespit Yöntemleri
İnternet Üzerinde Anonimlik ve Tespit Yöntemleriİnternet Üzerinde Anonimlik ve Tespit Yöntemleri
İnternet Üzerinde Anonimlik ve Tespit Yöntemleri
 
Uygulamalı Ağ Güvenliği Eğitimi Lab Çalışmaları
Uygulamalı Ağ Güvenliği Eğitimi Lab ÇalışmalarıUygulamalı Ağ Güvenliği Eğitimi Lab Çalışmaları
Uygulamalı Ağ Güvenliği Eğitimi Lab Çalışmaları
 
SOC Ekiplerinin Problemlerine Güncel Yaklaşımlar - NETSEC
SOC Ekiplerinin Problemlerine Güncel Yaklaşımlar - NETSECSOC Ekiplerinin Problemlerine Güncel Yaklaşımlar - NETSEC
SOC Ekiplerinin Problemlerine Güncel Yaklaşımlar - NETSEC
 
Pfsense Firewall ve Router Eğitimi
Pfsense Firewall ve Router EğitimiPfsense Firewall ve Router Eğitimi
Pfsense Firewall ve Router Eğitimi
 
Zararlı Yazılım Analizi Eğitimi Lab Kitabı
Zararlı Yazılım Analizi Eğitimi Lab KitabıZararlı Yazılım Analizi Eğitimi Lab Kitabı
Zararlı Yazılım Analizi Eğitimi Lab Kitabı
 
Mobile Application Penetration Testing
Mobile Application Penetration TestingMobile Application Penetration Testing
Mobile Application Penetration Testing
 
DDoS Saldırıları ve Korunma Yöntemleri ile E-posta ve ATM Güvenliği
DDoS Saldırıları ve Korunma Yöntemleri ile E-posta ve ATM GüvenliğiDDoS Saldırıları ve Korunma Yöntemleri ile E-posta ve ATM Güvenliği
DDoS Saldırıları ve Korunma Yöntemleri ile E-posta ve ATM Güvenliği
 

Ähnlich wie Analise NetFlow in Real Time

[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4
Open Networking Summits
 
Snabb Switch: Riding the HPC wave to simpler, better network appliances (FOSD...
Snabb Switch: Riding the HPC wave to simpler, better network appliances (FOSD...Snabb Switch: Riding the HPC wave to simpler, better network appliances (FOSD...
Snabb Switch: Riding the HPC wave to simpler, better network appliances (FOSD...
Igalia
 

Ähnlich wie Analise NetFlow in Real Time (20)

Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SPKrzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
Krzysztof Mazepa - Netflow/cflow - ulubionym narzędziem operatorów SP
 
How to configure flexible netflow export on cisco routers
How to configure flexible netflow export on cisco routersHow to configure flexible netflow export on cisco routers
How to configure flexible netflow export on cisco routers
 
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
 
OpenCORD MiniSummit - Physical POD test and deployments
OpenCORD MiniSummit - Physical POD test and deploymentsOpenCORD MiniSummit - Physical POD test and deployments
OpenCORD MiniSummit - Physical POD test and deployments
 
Snabbflow: A Scalable IPFIX exporter
Snabbflow: A Scalable IPFIX exporterSnabbflow: A Scalable IPFIX exporter
Snabbflow: A Scalable IPFIX exporter
 
OpenFlow tutorial
OpenFlow tutorialOpenFlow tutorial
OpenFlow tutorial
 
IRJET- Assessment of Network Protocol Packet Analysis in IPV4 and IPV6 on Loc...
IRJET- Assessment of Network Protocol Packet Analysis in IPV4 and IPV6 on Loc...IRJET- Assessment of Network Protocol Packet Analysis in IPV4 and IPV6 on Loc...
IRJET- Assessment of Network Protocol Packet Analysis in IPV4 and IPV6 on Loc...
 
NetFlow Monitoring for Cyber Threat Defense
NetFlow Monitoring for Cyber Threat DefenseNetFlow Monitoring for Cyber Threat Defense
NetFlow Monitoring for Cyber Threat Defense
 
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
 
IPS_3M_eng
IPS_3M_engIPS_3M_eng
IPS_3M_eng
 
BASIC TO ADVANCED NETWORKING TUTORIALS
BASIC TO ADVANCED NETWORKING TUTORIALSBASIC TO ADVANCED NETWORKING TUTORIALS
BASIC TO ADVANCED NETWORKING TUTORIALS
 
[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4
 
BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!
 
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)
 
64bit SMP OS for TILE-Gx many core processor
64bit SMP OS for TILE-Gx many core processor64bit SMP OS for TILE-Gx many core processor
64bit SMP OS for TILE-Gx many core processor
 
B.Eng-Final Year Project interim-report
B.Eng-Final Year Project interim-reportB.Eng-Final Year Project interim-report
B.Eng-Final Year Project interim-report
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
 
Snabb Switch: Riding the HPC wave to simpler, better network appliances (FOSD...
Snabb Switch: Riding the HPC wave to simpler, better network appliances (FOSD...Snabb Switch: Riding the HPC wave to simpler, better network appliances (FOSD...
Snabb Switch: Riding the HPC wave to simpler, better network appliances (FOSD...
 
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
 

Mehr von Piotr Perzyna (7)

K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Pact - Contract Testing
Pact - Contract TestingPact - Contract Testing
Pact - Contract Testing
 
Deployment Strategies
Deployment StrategiesDeployment Strategies
Deployment Strategies
 
Helm - Package manager in K8S
Helm - Package manager in K8SHelm - Package manager in K8S
Helm - Package manager in K8S
 
Is a ORCHESTRATION a new milestone?
Is a ORCHESTRATION  a new milestone?Is a ORCHESTRATION  a new milestone?
Is a ORCHESTRATION a new milestone?
 
Wizualizacja dancyh - graphite/grafana/kibana
Wizualizacja dancyh - graphite/grafana/kibanaWizualizacja dancyh - graphite/grafana/kibana
Wizualizacja dancyh - graphite/grafana/kibana
 
What is Linux?
What is Linux?What is Linux?
What is Linux?
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Analise NetFlow in Real Time

  • 1. Analysis NetFlow[v5] in Real Time Piotr Perzyna Marzec 2016 SGGW
  • 2. What is NetFlow? 1. NetFlow is a feature that was introduced on Cisco routers that provides the ability to collect IP network traffic as it enters or exits an interface. 2. NetFlow have a several versions from 1 to 10, but the comon is only v5 and v9. 3. The idea was that the first packet of a flow would create a NetFlow switching record. This record would then be used for all later packets of the same flow, until the expiration of the flow. Only the first packet of a flow would require an investigation of the route table to find the most specific matching route.
  • 4. NetFlow v5 content Bytes Contents Description 0-3 srcaddr Source IP address 4-7 dstaddr Destination IP address 8-11 nexthop IP address of next hop router 12-13 input SNMP index of input interface 14-15 output SNMP index of output interface 16-19 dPkts Packets in the flow 20-23 dOctets Total number of Layer 3 bytes in the packets of the flow 24-27 first SysUptime at start of flow 28-31 last SysUptime at the time the last packet of the flow was received 32-33 srcport TCP/UDP source port nr or equivalent 34-35 dstport TCP/UDP dest port nr or equivalent 36 pad1 Unused (zero) bytes 37 tcp_flags Cumulative OR of TCP flags 38 prot IP protocol type 39 tos IP type of service (ToS) 40-41 src_as Autonomous system number of the source, either origin or peer 42-43 dst_as Autonomous system number of the destination, either origin or peer 44 src_mask Source address prefix mask bits 45 dst_mask Destination address prefix mask bits 46-47 pad2 Unused (zero) bytes
  • 5. Mikrotik as NetFlow Exporter?! 1. SIA Mikrotīkls, as MikroTik - Latvian manufacturer of computer hardware. 2. The main product is a Linux-based operating system known as MikroTik RouterOS. 3. It allows you to change any PC computer (including machines in MIPS and PowerPC) fully functional router. 4. Remote administration from using the program WinBox
  • 6. Logstash as NetFlow Collector?! Process Any Data, From Any Source 1. Centralize data processing of all types 2. Normalize varying schema and formats 3. Quickly extend to custom log formats 4. Easily add plugins for custom data sources The recent Logstash 2.2 release is powered by a new and improved, next-generation pipeline backbone, enables dynamic watermarking for JDBC input queries, supports compressed HTTP input requests, and is compatible with the latest versions of Elasticsearch and Beats.
  • 7. ElasticSearch as storage?! 1. Object Json DB 2. Real-Time Data 3. High Availability 4. Full-Text Search 5. RESTful API 6. Massively Distributed
  • 8. Kibana as Analyzer?! Open Source Easy Setup Integration with Elasticsearch Data visualization platform GeoIP Easy to Share Simple Data Export Data from Many Sources
  • 9. Simple laboratory Our exercise is to create an area highlighted in red
  • 10. Configuration contained in the presentation is designed to exercise and show a circuit diagram. Production use inadvisable for security reasons.
  • 11. CookBook logstash?! 1. Create new directory # mkdir /opt/logstash # mkdir /opt/logstash/config 2. Download logstash # wget https://download.elastic.co/logstash/logst ash/logstash-2.2.2.tar.gz 3. Unpack kibana to /opt/kibana # tar -zxvf logstash-2.2.2.tar.gz 1. Download NetFlow library # wget https://raw.githubusercontent.com/logstash -plugins/logstash-codec- netflow/master/lib/logstash/codecs/netflow /netflow.yaml # mv netflow.yaml /opt/logstash/config/netflow.yml
  • 12. CookBook logstash?! 1. Create configuration /opt/logstash/config/mikrotik.yml input { udp { port => 9995 codec => netflow { definitions => "/opt/logstash/config/netflow.yml" versions => [5] } } } output { elasticsearch { index => "logstash-%{+YYYY.MM}" hosts => "localhost:9200" } } 6. Run # screen -dmS logstash /opt/logstash/bin/logstash -f /opt/logstash/config/mikrotik.yml 7. Tell presenter Your IP address, NetFlow will start flood your server :)
  • 13. CookBook elasticsearch?! 1. Create new directory /opt/elastic # mkdir /opt/elastic 2. Download elastic # wget https://download.elasticsearch.org/elastic search/release/org/elasticsearch/distribut ion/tar/elasticsearch/2.2.0/elasticsearch- 2.2.0.tar.gz 3. Unpack to /opt/elastic # tar -zxvf elasticsearch-2.2.0.tar.gz 1. Change /opt/elastic/config/elasticsearch.yml # path.data: /opt/elastic/data # path.logs: /var/log/elastic # network.host: 0.0.0.0 # http.port: 9200 2. Run elasticsearch # screen -dmS elastic /opt/elastic/bin/elasticsearch - Des.insecure.allow.root=true
  • 14. CookBook kibana?! 1. Create new directory /opt/kibana # mkdir /opt/kibana 2. Download kibana # wget https://download.elastic.co/kibana/kibana /kibana-4.4.1-linux-x64.tar.gz 3. Unpack kibana to /opt/kibana # tar -zxvf kibana-4.4.1-linux-x64.tar.gz # mv kibana-4.4.1-linux-x64/* /opt/kibana/ 4. Change /opt/kibana/config/kibana.yml ✓ server.port: 5601 ✓ server.host: “0.0.0.0” ✓ elasticsearch: “http://localhost:9200” ✓ kibana.index: “.kibana” 5. Run kibana # screen -dmS kibana /opt/kibana/bin/kibana
  • 15. Login via browser to: http://xxx.xxx.xxx.xxx:5601 and create fantastic dashboard!