Skip to content

Repository files navigation

Utilising Flow Aggregation to Classify Benign Imitating Attacks

This work aims to introduce new features based on a higher level of abstraction of network traffic, called Flow Aggregation features. In this repository, two features are extracted: Number of flows, Source ports delta.

Citation

To be updated.

General Parameters

ArgumentUsageDefaultValues and Notes
--normal_pathCICIDS2017 Dataset Monday File Pathcsv_files/biflow_Monday-WorkingHours_Fixed_Hour_0.csv
--attack_pathsCICIDS2017 Dataset Attack Pathscsv_files/biflow_Wednesday-WorkingHours_Slowhttptest.csvComma separated
--drop_aggregationWhether or not to drop flow aggregation features00/1
--slice_normalWhether or not to use a portion of normal file00/1
--slice_attacksWhether or not to use portion(s) of attack file(s)00/1 (comma separated)
--slice_normal_percentPercentage of the portion to use from normal file0
--slice_attacks_percentPercentage of the portion(s) to use from attack file(s)0Comma separated
--normal_slice_noSlice number to use when slicing the normal file0
--slice_attacks_numberSlice number(s) to use when slicing the attack files0Comma separated
--slice_attacks_numberSlice number(s) to use when slicing the attack files0Comma separated
--number_of_featuresNumber of RFE features to print5Only used in print_features script
--outputThe output file nameresult.csv
--choose_featuresWhether or not to run RFE00/1 (check selected_features argument)
--selected_featuresThe features to use during training'fwd_mean_pkt_len, bwd_mean_pkt_len, fwd_min_pkt_len, bwd_min_pkt_len, fwd_max_pkt_len,num_src_flows, src_ip_dst_prt_delta'

How to Run the repository:

Clone this repository.
run pcap_parser.py [pcap file path] run print_features [specify the parameters as required] run flow_aggregation.py [specify the parameters as required]
  • The output of pcap_parser will be saved as 'pcap_file_name.csv'.
  • Print features script will display the RFE ranked features in order (slicing in parameters is only used if set, default is to use the whole files).
  • Flow aggregation script will output the classification accuracy and the confusion matrices for a 5-fold cross validation.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages