Stackelberg Game for WSN Attack Detection
Stackelberg Game for WSN Attack Detection
Dr.D.Usha,
Assistant Professor, Mother Teresa Women’s University, Kodaikanal
Game theory is one of the interactive decision- The rest of the paper is organized as follows. Section
making methodology which follows the techniques in a 2 presents a detailed study of related work, section 3
mathematical way. Generally, a formal game should consist describes the proposed network model and section 4
of three elements such as the players of the game, the formulates the game between players. Section 5 gives a
techniques are available for each player, and the optimal brief overview of strategic space Section 6 discusses the
payoffs of each player. In a proposed stackelberg game experimental results obtained using MATLAB and section
contains multi leaders and multi followers[1]. The followers
2. Network Model
Many papers describe the taxonomies of different
layers attacks. Most of those papers show attacks classified
by protocol stack layers(9). Some of papers show attacks
classified on passive and active presented TPP Game
algorithm that aims at modeling, analyzing the cooperation
and trustable behavior between the nodes. In presented the
Stackelberg game framework was employed to model and
analyze the transmitting-jamming problem, and the anti-
jamming power control game was investigated in wireless
networks. In the cooperative transmission game was studied,
and the equilibrium solution was obtained. In the authors
formulated an attacker-defender Stackelberg game(10) Received Signal Strength Indicator (RSSI) is the
between a jammer and a target node, and the timing channel measured power of a received radio signal [9]. The attacks
was exploited. In a secure offloading game was formulated, are detected based on Packet delivery Rate (PDR) and
and the Stackelberg equilibrium was derived. In we Packet Forwarding Rate (PFR). Threshold RSSI value for
investigated the anti-jamming channel selection problem in
an adversarial environment, and proposed a hierarchical black hole attack is 𝑇 _ 40. Threshold RSSI value
learning approach to obtain the desirable solutions. Note for warm hole attack is 𝑇 _ 55. Threshold Packet
that a survey on the jamming and anti-jamming techniques delivery rate in black hole attack is𝑇 _ 90. Threshold
in wireless networks can be found in. Therefore, the rapid value of packet delivery rate in warm hole attack is
detection of the worm outbreak propagation in the IoT with
𝑇 _ 80.
limited resources by IDS has become an urgent problem to
be solved(11). Herein, such IoT devices with embedded
IDS are collectively referred to as “sensors”. The The cluster head has selected using particle swarm
"scheduling strategy" mentioned in the following chapters optimization refer as Figure 2. During the transmission of
of this paper is mainly aimed at methods of “sensor” data from cluster head to all other agent nodes refer in figure
combination opening(12). 3, some attacker node may indicate highest Received Signal
strength value and packet delivery rate.
3. Network Model All the received values are recorded. In this situation
some normal nodes may choose wrong path. If the newly
Network Topology generated RSSI value may exceed the threshold RSSI value
The network topology of the proposed system for analyzing then it will be assumed as some nodes may affect by a black
Black hole and warm hole attack is given in figure 1. hole attack.
IJCSNS International Journal of Computer Science and Network Security, VOL.23 No.8, August 2023 161
4. Game Formulation
Game theory is the formal, mathematical methodology
for interaction between players like people, agents or robots
which has been applied in diverse areas such as business,
economics, and management to solve problems. In this
section we have identified the attacked nodes through some
gaming strategy. Competition among the players is one of
the significant topics.
We use stackelberg game model which is applied to find the
best non malicious nodes in a sensor environment is
depicted in figure 5.
In a Stackelberg model, leader chooses a strategy first
and then follower observes this decision and makes his own
strategy choice. Intuitively, the first player chooses the best
possible point based on the second player’s best response
function. Generally the game includes the following three
comprise:
Player set: Players set contains Leaders and Followers
Leaders denoted as N
Followers denoted as M
Strategy set: A - Denotes the set of actions, i-denotes the
During the path finding process, some attacker node strategy. The set of actions of a game is denotes as 𝐴 = 𝐴1 ×
can automatically create a tunnel with some other attacker
𝐴2 × … × 𝐴𝑛. a-denotes the player which is defined as 𝑎𝑖 ∈
node. So the packet delivery process may automatically
deviate the valid route to wrong route. In this scenario the (𝑎𝑖, 𝑎− ) 𝑎𝑖 denotes the player a with 𝑖 strategy while 𝑎−𝑖
Received signal strength value and packet delivery rate can denotes other players’ strategies.
be monitored. If the monitored value is greater than Utility functions: The utility function or outcome of player
threshold received signal strength value and packet delivery 𝑖 denoted by ui (ai,a−i). The payoff function is measured by
rate then it is assumed as some nodes may affect by a warm outcome of ith player strategy and other players’ strategies.
hole attack is illusted in figure 4. In a game theory players are considered rational decision
makers they choose the best strategy to maximize their
benefit function.
Vector tuple y:= (y1….ym) ɛ ℝm 𝑜𝑙𝑑𝑝 𝑝 , the historical population is used in the
n:= ∑ 𝑛 calculation of the search-direction matrix.
(xF,x-F) ɛ ℝmF + m –F , m-F := m-mF 7. 𝑀 𝑃 3 𝑃𝑟𝑒 𝑃 // 3 is random number ~
Objective function or Utility function N(0,1)
ƟF : ℝn+m → ℝ is dependent on yF to y-F , ∀ x
Follower Strategy : Step 4: Crossover
YF (y-F , x) ℝmF is dependent on leaders x BSA’s crossover process generates the final form of the trial
Follower solve the following optimization problem population T. The initial value of the trial population is
Min QF (x, yF, y-F) Mutant, as set in the mutation process. Trial individuals
Subject to yF ɛ YF with better fitness values for the optimization problem are
F(x,y):= ∇𝒚 , ƟF used to evolve the target population individuals. BSA’s
crossover process has two steps.
The first step calculates a binary integer-valued matrix
Backtracking Search Optimization
(map) of size N. D that indicates the individuals of T to be
After applying quadratic programming we can get the
manipulated by using the relevant individuals of P. If map
optimized nodes. Generally backtracking search is applied
n, m = 1, where n ϵ {1,2,3…,N} and m ϵ {1,2,3…,D}, T is
to have multiple solutions and need all those solution.
updated with T n, m := P n ,m In Algorithm-2 (on line 3)
Backtracking algorithm which is mainly used to execute a
indicates the ceiling function, defined as rand ~ U (0, 1).
multiple sequence of decisions, which is performed
BSA’s crossover strategy is quite different from the
recursively until satisfying certain constraints.
crossover strategies used in EA’s and its variants. The mix
𝐺 = Global Minimizer Game matrix
rate parameter (mixrate) in BSA’s crossover process
𝐺 = Minimum of Minimum Game matrix
controls the number of elements of individuals that will
N= Number of agent nodes mutate in a trial by using ceil (mixrate. rand. D).
D= population size The function of the mix rate is quite different from the
𝑃 , = Player of i,j strategy crossover rate used in EA’s. Two predefined strategies are
randomly used to define BSA’s map. The first strategy uses
Pre i,j = All other players i,j strategy mixrate. The second strategy allows only one randomly
fitpi = Fitness function player with strategy i chosen individual to mutate in each trial. BSA’s crossover
process is more complex than the process used in EA’s.
Algorithm 3: Some individuals of the trial population obtained at the end
Input: 𝑂 , 𝑁, 𝐷, 𝑚𝑎𝑥 , 𝑚𝑖𝑥 , 𝑙𝑜𝑤 , 𝑢𝑝, 𝑒𝑝𝑜𝑐ℎ𝑒𝑠 of BSA’s crossover process can overflow the allowed search
Output:𝐺 , 𝐺 space limits as a result of BSA’s mutation strategy. The
individuals beyond the search-space limits are regenerated
Step1: Initialization using Algorithm-3.
1. 𝑃 , ~𝑈 𝑙𝑜𝑤 𝑢𝑝 ) // i=1..N , j=1..D,U- is the 8. 𝐶𝑟 : , : 1
uniform distribution 9. 𝐼𝑓 𝑐 𝑑 𝑡ℎ𝑒𝑛
For k=1 from N
Step 2: Selection –IBSA has the option of redefining old 𝐶𝑟 , : 0
∗
population, it is used to randomly change the order of the
𝐸𝑛𝑑 𝑓𝑜𝑟
individuals in old population
Else
2. 𝐺 𝑖𝑛𝑓,D=30,N= 𝐴𝑔𝑒𝑛𝑡 ;
𝐹𝑜𝑟 𝑘 1 𝑓𝑟𝑜𝑚 𝑁
3. 𝑃 , lim lim 𝑢𝑝 𝑙𝑜𝑤 𝑙𝑜𝑤 𝐶𝑟 : 0
→ →
4. 𝑃𝑟𝑒 , lim lim 𝑢𝑝 𝑙𝑜𝑤 𝑙𝑜𝑤 𝐸𝑛𝑑 𝑓𝑜𝑟
→ →
𝑇 𝑀
5. 𝑓𝑖𝑡 lim 𝑂 𝑃
→ //Boundary control mechanism
6. 𝐹𝑜𝑟 𝑦 1 𝑡𝑜 𝑚𝑎𝑥 𝑇,
𝐼𝑓 𝑎 𝑏 𝑡ℎ𝑒𝑛 𝑃𝑟𝑒 𝑃 𝑟𝑎𝑛𝑑 𝑢𝑝 𝑙𝑜𝑤 𝑙𝑜𝑤 𝑖𝑓 𝑇 , 𝑙𝑜𝑤 𝑂𝑅 𝑇 ,
𝑃𝑟𝑒 𝑝𝑒𝑟𝑚𝑢𝑡𝑖𝑛𝑔 𝑃𝑟𝑒 // permuting function is a lim lim
→ → 𝑇, 𝑒𝑙𝑠𝑒
random shuffling function
𝐸𝑛𝑑 𝑖𝑓
𝑆𝑡𝑒𝑝 3: 𝑀𝑢𝑡𝑎𝑡𝑖𝑜𝑛
Step 5: Selection – II
The mutation process generates the initial form of the trial
In BSA’s Selection-II stage, the Ti’s that have better fitness
population called 𝑀
values than the corresponding Pi’s are used to update the
𝑀 𝑃 𝐹 𝑃𝑟𝑒 𝑃 // where F controls the
Pi’s based on a greedy selection. If the best individual of P
amplitude of the search direction matrix
(Pbest) has a better fitness value than the global minimum
164 IJCSNS International Journal of Computer Science and Network Security, VOL.23 No.8, August 2023
After applying all the above algorithms the optimum results taken. The Y-axis is denoted as Number of rounds the
can be obtained. algorithm is going to be implemented. Numerical values
used for evaluation as shown in Table 1,2,3,4,5,6 and the
evaluation measures are depicted as Accuracy in figure 7,
6. Simulation Results sensitivity shows figure 8, Figure 9 as Detection Rate,
Figure 10 shows that F-Score, Figure 11 shows that False
The proposed algorithm can be implemented in matlab positive rate, Figure 12 shows that false negative rate of the
code and the convergence is calculated. The performance proposed system.
evaluation will be computed based on some parametric
measures. The X-axis is denotes as number of nodes are
Table 1 : ACCURACY
20 40 60 80 100
overall 94.52518 97.15385 98.89155 98.74127 98.9011
BH 84.80255 89.28571 92.89041 95.38462 97.77419
WH 80.31325 87.2069 95.59459 96.93939 97.74468
Table 2: Sensitivity:
20 40 60 80 100
over all 93.43697 95.59459 96.56098 97.2973 98.53922
BH 82.29197 85.36585 93.52326 94.30769 95.33962
WH 78.34247 83.39535 91.90909 93.58 924.5926
Table 4: F-Score
20 40 60 80 100