Skip to content

Castro-Ian/Web-Threat-Interactions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Web-threat-Interactions

This project aims to analyze web traffic data to identify and predict suspicious activities. The following steps are performed in the script:

  1. Load and Preprocess Data:

    • Load the web traffic data from a CSV file CloudWatch_Traffic_Web_Attack.
    • Convert timestamp columns to datetime format.
    • Set the timestamp column as the index for time series analysis.
    • Remove duplicate rows and standardize text data.
  2. Visualize Web Traffic:

    • Plot the amount of data transferred (bytes in and bytes out) over time to understand traffic patterns.
  3. Feature Engineering:

    • Calculate the duration of each web interaction.
    • Standardize numerical features and encode categorical features for machine learning models.
  4. Correlation Analysis:

    • Compute and visualize the correlation matrix for numerical features to understand relationships between variables.
  5. Detection Types by Country:

    • Create a stacked bar chart to visualize the frequency of different detection types by country.
  6. Network Graph:

    • Create and visualize a network graph to show interactions between source and destination IP addresses.
  7. Machine Learning Model:

    • Encode detection types into binary labels (suspicious or not).
    • Split the data into training and testing sets.
    • Train a neural network model to predict suspicious activities.
    • Evaluate the model's performance and visualize the training history.

Result

The result of this project is a comprehensive analysis of web traffic data and a trained machine learning model capable of predicting suspicious web interactions. The key outcomes include:

  1. Data Visualizations:

    • Web Traffic Over Time: Visual representation of bytes in and bytes out over time, highlighting traffic patterns and potential anomalies.
    • Correlation Matrix Heatmap: Visualization of correlations between numerical features, helping to identify relationships and dependencies.
    • Detection Types by Country: Stacked bar chart showing the frequency of different detection types by country, providing insights into geographic patterns of suspicious activities.
    • Network Graph: Graphical representation of interactions between source and destination IP addresses, illustrating the network structure and potential points of compromise.
  2. Machine Learning Model:

    • Neural Network Training: A neural network model is trained to classify web interactions as suspicious or not based on the features extracted from the data.
    • Model Evaluation: The model's performance is evaluated using metrics like accuracy, and the results are visualized to show training and validation accuracy and loss over epochs.
  3. Predictive Capabilities:

    • The trained neural network model can be used to predict suspicious web interactions in real-time, enhancing an organization's ability to detect and respond to potential security threats proactively.

What It Proved

This project proved several important concepts and capabilities in the context of cybersecurity and data analysis:

  1. Feasibility of Automated Threat Detection: The project demonstrated that machine learning models, specifically neural networks, can effectively classify web interactions as suspicious or not, enabling automated threat detection.
  2. Value of Data Visualization: Visualizing web traffic data, correlation matrices, and network interactions provides valuable insights that can help in identifying patterns, anomalies, and potential security threats.
  3. Importance of Feature Engineering: The project highlighted the importance of feature engineering, such as calculating connection durations and encoding categorical data, in improving the performance of machine learning models.
  4. Real-Time Predictive Analysis: The trained model's ability to predict suspicious activities in real-time showed the potential for proactive security measures, allowing organizations to detect and mitigate threats before they cause significant damage.
  5. Applicability of Data Science in Cybersecurity: The project reinforced the applicability of data science and machine learning techniques in the field of cybersecurity, demonstrating how these tools can enhance threat detection and response strategies.

By implementing this project, organizations can gain valuable insights into their web traffic, identify suspicious activities, and improve their overall cybersecurity posture using data-driven techniques and machine learning models.

Real-World Applications

This project demonstrates several real-world applications of data analysis and machine learning in cybersecurity:

  • Anomaly Detection: By visualizing web traffic and computing correlations, security analysts can identify unusual patterns that may indicate malicious activity.
  • Threat Detection: The trained machine learning model can predict whether a web interaction is suspicious, helping to automate threat detection processes.
  • Network Analysis: The network graph visualization aids in understanding the relationships and interactions between different IP addresses, which can be crucial for identifying compromised nodes in a network.
  • Proactive Security Measures: By continuously analyzing web traffic data and updating the machine learning model, organizations can proactively detect and mitigate potential security threats.

This project serves as a foundation for developing advanced cybersecurity solutions that leverage data science and machine learning to enhance the detection and prevention of cyber threats.

By implementing this project, organizations can gain valuable insights into their web traffic, identify suspicious activities, and improve their overall cybersecurity posture using data-driven techniques and machine learning models.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published