Advertisement
herouxma

IDS/IPS c wrapper

May 14th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.77 KB | None | 0 0
  1. //Trust payload until abnormal activity
  2. //Currently under analysis
  3.  
  4. #include <stdio.h>
  5.  
  6. //receive argv[0] is the payload
  7. int main(int argc, char *argv[])
  8. //begin
  9. {
  10. char* abnormal;
  11. int x;
  12. //initialization to false
  13. x = 0;
  14.     do
  15.     {
  16.     /* "check for abnormal activity
  17.     by calling specific Suricata function*/
  18.     if (check_abnormal(argv[0]) == 1);         
  19.     }
  20.     while ( x != 0 );
  21.         alert(threat_identified);
  22.         //reset counter
  23.         {x = 0;}
  24. check_abnormal(char* check_discover)
  25.      //pass variable to Suricata Engine
  26.      call_Suricata (check_discover, check_compare);
  27.         if (call_Suricata == "check_validate")
  28.         {
  29.         x = 1;
  30.         return x;
  31.         }
  32. //end  
  33. }
  34. //see to include Network IP, pass, MAC Address
  35. //see if we need to add these variables
  36. //char* known_threat;
  37. //char* unknown_threat;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement