To complete the response to the network
topology scan, mainly to spoof ping and traceroute
(Windows system is tracert) command detection,
these two commands mainly rely on ICMP protocol,
and the premise of ICMP protocol is that the attacker
knows the physical address of the destination host,
That is, the ARP protocol. As long as you can
simulate the ARP and ICMP protocols, you can
respond to basic ping and traceroute probes. The
principle of topology simulation is described below:
3.2.1 ARP Simulation
The ARP (Address Resolution Protocol)
protocol is used to obtain the physical address based
on the IP address. The OpenFlow switch is a Layer 2
device. It does not have an IP address and cannot
answer ARP requests. The system uses the ARP
response method from the controller. When the
controller receives the ARP request, it searches for
the MAC address of the corresponding IP according
to the content of the configuration file, and
constructs a response packet according to this, and
returns it to the requesting party.
3.2.2 ICMP Simulation
The Internet Control Message Protocol (ICMP)
protocol is often used to test network connectivity.
Scanning the network topology is based on ICMP.
ICMP is generally used for two commands: ping and
traceroute. When the controller receives the ping
request, the configuration file is read, and the
connectivity between the target host and the request
source and the hop count are determined according
to the network topology defined by the configuration
file, and the response packet is constructed
according to the configuration, and returned to the
requesting party. The principle of detecting the
network topology by using traceroute is that the
attacker first sends a packet with a TTL of 1 to the
destination. When the first router on the path
receives it, the TTL is decremented by 1. At this
time, the TTL is 0. The router will discard the packet
and return a Time Exceed message. Upon receiving
the message, the attacker knows that there is a router
on the path, and then sends a packet with a TTL of 2
to probe the second route. Repeat the above actions
until the data packet is sent to the destination host.
Since the traceroute command generally sends UDP
packets, the destination port is 33434~33534. The
general application will not use this range of ports,
and the host will reply to ICMP after receiving it.
Port Unreachable message, after the attacker
receives it, it can judge that the destination has
arrived. The traceroute command can send UDP,
TCP, and ICMP packets separately using different
parameters. The system processes all three
traceroute requests and can respond to traceroute
probes under different parameters.
3.3 Exploit Module
In the exploit response module, we used a
honeypot switching strategy based on attack tree
phase detection. The attack that may be suffered is
represented in the form of an attack tree. The attack
is divided into multiple paths. Each path is regarded
as a phase of the attack. The IDS is configured to
detect the alarm rules of each phase. When the IDS
sends the next phase. When the attack is alerted, the
attack as the previous stage is completed. At this
time, the IDS reports the attack information to the
SDN controller, and the controller modifies the flow
table to switch the honeypot traffic that is
communicating with the attacker to another
honeypot, in such a manner that the attacker is in the
previous stage. The attack is invalid, which will
slow down the attack and protect the honeypot.
According to the attack tree generation method,
we created an attack tree model that represents a
general network attack (as shown in the Figure 6).
Due to the variety of actual attacks, it is difficult to
display all attacks on one attack tree. This paper
selects the experimental part. The privilege
escalation attack is detailed and analyzed, and other
forms of attack are similar.