Research Article

A Black-Box Attack Method against Machine-Learning-Based Anomaly Network Flow Detection Models

Algorithm 2

Network flow adversarial example generate algorithm.
Input:, , , , , , where is the substitute model, is the target model, is the network flow data, is the iteration steps, is original label, and is the move step
Output: traffic adversarial example
(1)set
(2)fordo
(3) loss
(4) gradient
(5) perturbation , where is shown in equation (8)
(6) set
(7)if and then
(8)  break
(9) end if
(10)ifthen
(11)  break
(12) end if
(13) end for
(14)return