zuluokonkwo/Encrypted-Network-Traffic-Classification-with-Higher-Order-Graph-Neural-Network

CSVS in the Graph Generation section

Duperr opened this issue · 2 comments

Duperr commented

May I ask how the four csvs in the Graph Generation section are generated?thanks!

I wrote some python codes to extract the columns from a master file I created.
Here are some basic steps you can follow to create the master file:

  • Extract network traffic in raw byte format, then normalize(if you want). Pad to ensure packets are 1500 bytes, every packet should correspond to a row in the csv file.
  • Create two new columns called "Source" and "Destination". These columns defines the edge and basically describes how the packets(nodes) are related to one another (in my case sequentially).
  • Create another column called the "Label". This column refers to the class label of every packet (node).
  • Create another column called "Graph_ID". This column refers to the session each packet (node) belongs to (basically the graph number).

When you've created the master file you can then extract the four csv files as described in the paper.

NB: This is how I chose to do mine, you can adopt any other means convenient for you.

I wrote some python codes to extract the columns from a master file I created. Here are some basic steps you can follow to create the master file:

  • Extract network traffic in raw byte format, then normalize(if you want). Pad to ensure packets are 1500 bytes, every packet should correspond to a row in the csv file.
  • Create two new columns called "Source" and "Destination". These columns defines the edge and basically describes how the packets(nodes) are related to one another (in my case sequentially).
  • Create another column called the "Label". This column refers to the class label of every packet (node).
  • Create another column called "Graph_ID". This column refers to the session each packet (node) belongs to (basically the graph number).

When you've created the master file you can then extract the four csv files as described in the paper.

NB: This is how I chose to do mine, you can adopt any other means convenient for you.

Can you share the specific code? thanks!