Traffic data extraction and labeling for machine learning based attack detection in IoT networks