NETWORK ATTACKS FRAMEWORK
1.0.0
A NETwork Attacks framework. Making network attacks impact evaluation easier!
|
00001 // 00002 // Copyright (C) 2013, NESG (Network Engineering and Security Group), http://nesg.ugr.es, 00003 // - Gabriel Maciá Fernández (gmacia@ugr.es) 00004 // - Leovigildo Sánchez Casado (sancale@ugr.es) 00005 // - Rafael A. Rodríguez Gómez (rodgom@ugr.es) 00006 // - Roberto Magán Carrión (rmagan@ugr.es) 00007 // - Pedro García Teodoro (pgteodor@ugr.es) 00008 // - José Camacho Páez (josecamacho@ugr.es) 00009 // - Jesús E. Díaz Verdejo (jedv@ugr.es) 00010 // 00011 // This file is part of NETA. 00012 // 00013 // NETA is free software: you can redistribute it and/or modify 00014 // it under the terms of the GNU General Public License as published by 00015 // the Free Software Foundation, either version 3 of the License, or 00016 // (at your option) any later version. 00017 // 00018 // NETA is distributed in the hope that it will be useful, 00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 // GNU General Public License for more details. 00022 // 00023 // You should have received a copy of the GNU General Public License 00024 // along with NETA. If not, see <http://www.gnu.org/licenses/>. 00025 // 00026 00027 #ifndef NA_ATTACK_H_ 00028 #define NA_ATTACK_H_ 00029 00030 #include <omnetpp.h> 00031 #include "common/log/NA_NesgLog.h" 00032 00033 /* --------------- CONSTANTS --------------------------------*/ 00037 #define NA_ATTACK_ACTIVATE_TAG "Activate" 00038 00042 #define NA_ATTACK_DEACTIVATE_TAG "Deactivate" 00043 00047 #define NA_ATTACK_END_MESSAGE "EndAttack" 00048 00052 #define NA_ATTACK_START_MESSAGE "StartAttack" 00053 00054 /* ---------------- NED MODULE ATTRIBUTES NAMES ------------------ */ 00058 #define NA_ATTACK_TYPE "attackType" 00059 00063 #define NA_ATTACK_ACTIVE "active" 00064 00068 #define NA_ATTACK_END_TIME "endTime" 00069 00073 #define NA_ATTACK_START_TIME "startTime" 00074 00091 class NA_Attack: public cSimpleModule { 00092 00093 private: 00097 char* attackType; 00098 00102 vector<cModule *> modList; 00103 00104 protected: 00105 00109 NA_NesgLog log; 00110 00114 virtual void initialize(); 00115 00120 void getAttackModules(); 00121 00125 void scheduleAttack(); 00126 00132 void sendMessageToHackedModules(cMessage *msg); 00133 00137 virtual void activateModules(); 00138 00142 virtual void deactivateModules(); 00143 00149 virtual void handleMessage(cMessage *msg); 00150 00165 virtual cMessage *generateAttackMessage(const char* name); 00166 }; 00167 00168 #endif /* NA_ATTACK_H_ */