Research Article

An Automata Based Intrusion Detection Method for Internet of Things

Algorithm 1

Algorithm for intrusion detection.
Input:
Label Array ; //one transition sequence detected by IDS.
Transition Array ; //the transition system of the protocol.
Output:
secure, fake-attack, jam-attack, replay-attack
Begin
Transition Array ;
Transition Array ;
Label Array ;
String result;
int flag=0; Search [] in and record the results in ;
For each transition in
 record the next transition of in ;
 record [] in ;
For (int ; .length; ++)
 flag++;
 If ()
  record the next transition of in ;
  =;
  remove from ;
  Search [] in and record the results in ;
  record [] in ; else
  For each in
   Search in and record the results in ;
   If ()
    continue;
   
  
  If ([] in )
   result=“replay-attack";
   return result;
  
  else
   result=“fake-attack”;
   return result;
   
If(flag==)
 If(.nexState().getStatus.equals(“end”))
  result=“secure”;
  return result;
else
  result=“jam-attack”;
  return result;
  result=“secure”;
End