Day 2

This room is a small introduction to Python and it's software library Pandas that help with data manipulation and analysis.

Learning Objectives

In today’s task:

  • Get an introduction to what data science involves and how it can be applied in Cybersecurity

  • Get a gentle (We promise) introduction to Python

  • Get to work with some popular Python libraries such as Pandas and Matplotlib to crunch data

  1. How many packets were captured (looking at the PacketNumber)?

print(df)

This will print the whole data frame and as we can see the total number of packets is [REDACTED]

  1. What IP address sent the most amount of traffic during the packet capture?

df.groupby(['Source']).size().sort_values(ascending=True)

This will print the column Sourcewith the count of for each IP address. We can see the Source IP with the most amount of packets sent is [REDACTED] with [REDACTED]

  1. What was the most frequent protocol?

df.value_counts(['Protocol'])

This will print the column Protocol with the count of each Protocol used and in descending order. We can see the most used Protoclol is [REDACTED] with [REDACTED]


Last updated

Was this helpful?