Research Article
Multilevel Modeling of Distributed Denial of Service Attacks in Wireless Sensor Networks
Listing 1
Compromised sensor node modeled in QoP-ML.
(1) host CompromisedSensor(rr)(⋆) | (2) | (3) | (4) #MY_ID = id(); | (5) #Attacker_ID = id(Attacker); | (6) #SINK_ID = id(Sink); | (7) #KEY = nonce(); | (8) | (9) process MainProcess(⋆) | (10) | (11) while(true) | (12) | (13) in(ch_MGMT: MESSAGE: |⋆,⋆|); | (14) | (15) DATA = collected_data()[UPDATED]; | (16) save_collected_data(DATA)[UPDATED]; | (17) | (18) subprocess EncCollectedData(⋆) | (19) DATA = (DATA, nonce()); | (20) DATA = s_enc(DATA, KEY)[AESCTR,128]; | (21) | (22) | (23) DATA_MSG = (MY_ID, SINK_ID, data_msg(), | (24) non_legit(), DATA); | (25) | (26) if(MESSAGE[2] msg_flood1()) | (27) out(ch_WSN: DATA_MSG); | (28) | (29) | (30) %... | (31) | (32) if(MESSAGE[2] msg_flood6()) | (33) out(ch_WSN: DATA_MSG); | (34) | (35) | (36) if(MESSAGE[2] msg_stop()) | (37) break; | (38) | (39) | (40) | (41) |
|