Networking Attacks in OMNeT++

Networking Attacks in OMNeT++ is any attempt to alter,destroy, disable,expose,gain or steal  unauthorized access to or make use of an asset.

Features of networking attack:

  • Performing actions to deplete network resources and bandwidth.
  • Performing actions that prevent legitimate authorized users from accessing network.


Types of networking attacks:

Major networking attacks are,

  • Internal threats.
  • External threats.
    • Structured threats.
    • Unstructured threats.

The sub network types are,

  • Access.
  • Reconnaissance.
  • Worms, viruses, and Trojan horses.
  • Denial of service.



Reasons for Network Attack:

  • Displeased employees might seek to damage the organizations data, reliability or financial standing
  • Possible motives for structured external threats includes racism, industrial espionage, criminal payoffs, greeds and terrorism.
  • Individuals seeking fame or some sort of recognition
  • There are some network attackers that simply enjoy the challenge of trying to compromise highly secured networks’ security systems etc.


Sample code for networking attacks:

void BehaviorAggregateClassifier::initialize()
numOutGates = gateSize("outs");
std::vector DDOS s;
parseDDOS s(par("DDOS s"), "DDOS s", DDOS s);
int numDDOS s = (int)DDOS s.size();
if (numDDOS s > numOutGates)
throw cRuntimeError("%s DDOS values are given, but the module has only %d out gates",
numDDOS s, numOutGates);
for (int i = 0; i < numDDOS s; ++i)
DDOS ToGateIndexMap[DDOS s[i]] = i;
numRcvd = 0;
void BehaviorAggregateClassifier::handleMessage(cMessage *msg)
cPacket *packet = check_and_cast<cPacket*>(msg);
int clazz = classifyPacket(packet);
emit(pkClassSignal, clazz);
if (clazz >= 0)
send(packet, "outs", clazz);
send(packet, "defaultOut");
if (ev.isGUI())
char buf[20] = "";
if (numRcvd>0) sprintf(buf+strlen(buf), "rcvd:%d ", numRcvd);
getDisplayString().setTagArg("t", 0, buf);
int BehaviorAggregateClassifier::classifyPacket(cPacket *packet)
int DDOS = getDDOS FromPacket(packet);
if (DDOS >= 0)
std::map<int,int>::iterator it = DDOS ToGateIndexMap.find(DDOS );
if (it != DDOS ToGateIndexMap.end())
return it->second;
return -1;