利用静脉进行DoS攻击

问题描述 投票:0回答:3

我是静脉新手,我想使用洪水技术进行 DoS 攻击。我尝试过发送一条消息,该消息在发生事故时使用,例如,由一辆特定的汽车发送一百万次。这足以发起 DoS 攻击吗?我可以让这段代码变得更复杂吗?

void TraCIDemo11p::handlePositionUpdate(cObject* obj) {
    BaseWaveApplLayer::handlePositionUpdate(obj);   
    if (externalID == "2"){ //2 is the attacker
       for (int i = 0; i<1000000; i++)
            sendMessage(mobility->getRoadId());
     }

注意:我使用的是 omnet 5.0、sumo-0.25.0 和静脉-4.4、TraCIDemo11p.cc

omnet++ veins sumo
3个回答
1
投票

对于 NED 文件

import inet.applications.dhcp.DhcpServer;
import inet.node.dsdv.DsdvRouter;
import inet.node.inet.AdhocHost;
import inet.node.inet.MulticastRouter;
import inet.node.inet.WirelessHost;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.node.aodv.AodvRouter;
import inet.node.wireless.AccessPoint;
import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
import inet.visualizer.integrated.IntegratedVisualizer;
import inet.visualizer.networklayer.NetworkRouteVisualizer;
import inet.visualizer.integrated.IntegratedMultiVisualizer;
import ned.DelayChannel;
network pingattack
{
    parameters:
        int numhost;
        int numattacker;
    submodules:
        visualizer: IntegratedMultiVisualizer {
            @display("p=14,295");
        }
        configurator: Ipv4NetworkConfigurator {
            //config = default(xml("<config><interface WirelessHost='**' address='10.0.0.x' netmask='255.255.255.0'/></config>"));
            @display("p=42,430");
        }
        radioMedium: Ieee80211ScalarRadioMedium {
            @display("p=14,339");
        }
        Attacker[numattacker]: WirelessHost {
            @display("p=180,331");
        }
        Master: WirelessHost {
            @display("p=274,316");
        }
        Slaves[numhost]: WirelessHost {
            @display("p=313,247");
        }
        ap: AccessPoint {
            @display("p=244,246");
        }
}

对于 Ini 文件,

[General]
description = Displaying Ping Attack
network = pingattack

# Setting up the max area which the modules are able to travel to 
# "Z" limits the height. It can only be observed in 3D
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m

**.updateInterval = 0.1s # test with 0s too, and let getCurrentPosition update the display string from a test module

# Does not specify the intial positions. Random initial position will be chosen within the contraint area,
# unless it is specified in the display string in NED file or initialX,Y,Z
**.mobility.initFromDisplayString = false

# Setting all the default application type to "GlobalArp"
**.arp.typename = "GlobalArp"

# Attacker parameters
*.Attacker[*].numApps = 1                  # Number of application layers on attackers
*.Attacker[*].app[0].typename = "PingApp" # Application type for attackers
*.Attacker[*].app[0].destAddr = "Master"  # Set ping destination
*.Attacker[*].app[0].startTime = 10s       # Initialize start time of ping


# Master Communication
*.Master.numApps = 1                   # Number of application layers on master
*.Master.app[0].typename = "PingApp"   # Application type for master


# MasterDrone Mobility
*.Master.mobility.typename = "LinearMobility"   # Master move at constant speed
*.Master.mobility.speed = 20mps                 # of 20mps 


# Slave Communication
*.Slaves[*].numApps = 1                     # Number of application layers on slaves                                    
*.Slaves[*].app[0].typename = "PingApp"     # Application type for slaves
*.Slaves[*].app[0].destAddr = "Master"      # Set ping destination, to ensure connection with master
*.Slaves[*].app[0].startTime = replaceUnit (0.1*(parentIndex()), "s") # to avoid synchronization
#*.Slaves[*].app[0].sendInterval= 1s            # Slaves send ping every 1 second       

# Slave mobility
*.Slaves[*].mobility.typename = "MassMobility"              # Slaves move randomly 
*.Slaves[*].mobility.changeInterval = truncnormal(2s, 0.5s)  
*.Slaves[*].mobility.angleDelta = normal(0deg, 30deg)        
#*.Slaves[*].mobility.speed = 15mps      

# Wlan Config
*.Master.wlan[*].radio.transmitter.power = 10mW     # Setting up Master, slaves, attacker wlan transmit power
*.ap.wlan[*].radio.transmitter.power = 100mW


# Pcap recording
**.crcMode = "computed"                           # To include CRC values in capture files
**.fcsMode = "computed"                           # To include FCS values in capture files 
**.numPcapRecorders = 1                           # To include PcapRecordere module  
**.pcapRecorder[*].pcapNetwork = 105              # Set PCAP files link-layer header type to 802.11
**.pcapRecorder[*].pcapFile = "results/all.pcap"  # Specifying file to write traces in & enable packet capture 
**.pcapRecorder[*].verbose = true                 # To print tcpdump-like textual information to the log (EV)
**.pcapRecorder[*].alwaysFlush = true             # Record the packets even if simulation crashes 
**.pcapRecorder[*].packetFilter = "ping*"

#Analysis
*.*.wlan[*].**.vector-recording = false

# Visualizer parameters
# Displaying network path activity
*.visualizer.*.numDataLinkVisualizers = 2
*.visualizer.*.numInterfaceTableVisualizers = 2
*.visualizer.*.dataLinkVisualizer[0].displayLinks = true
*.visualizer.*.dataLinkVisualizer[0].packetFilter = "*ping*"
#*.visualizer.*.physicalLinkVisualizer[*].displayLinks = true
#*.visualizer.*.interfaceTableVisualizer[*].displayInterfaceTables = true
#*.visualizer.*.interfaceTableVisualizer[0].format = "%4"
*.visualizer.*.infoVisualizer[0].modules = "*.*.app[0]"
*.visualizer.*.infoVisualizer[1].modules = "*.*.app[1]"
#*.visualizer.*.infoVisualizer[*].format = "%t"
#*.visualizer.*.statisticVisualizer[0].sourceFilter = "**.app[*]"
#*.visualizer.*.statisticVisualizer[0].signalName = "rtt"
#*.visualizer.*.statisticVisualizer[0].unit = "ms"
#*.visualizer.*.infoVisualizer[*].placementHint = "topCenter"
#*.visualizer.*.packetDropVisualizer[*].displayPacketDrops = true
#*.visualizer.*.packetDropVisualizer[*].packetFilter = "ping*"
#*.visualizer.*.packetDropVisualizer[*].labelFormat = "%n/reason: %r"
#*.visualizer.*.packetDropVisualizer[*].fadeOutTime = 3s

#edit
# Set number of Attacker
# Set number of Host
# Set Attacker Ping interval
# Set Transmittion Power of Master Slave Attacker and AP
# Set Max constrain area XYZ


sim-time-limit = 20s
pingattack.numhost = 5
pingattack.numattacker = 1
*.Attacker[*].app[0].sendInterval = 0.0001s
**.constraintAreaMaxX = 2000m
**.constraintAreaMaxY = 2000m
**.constraintAreaMaxZ = 2000m
*.Slaves[*].wlan[*].radio.transmitter.power = 100mW
*.Attacker[*].wlan[*].radio.transmitter.power = 200mW
*.Attacker[*].**.vector-recording = false
*.Slaves[*].mobility.speed = 16mps

0
投票

我正在从事类似的工作,但我的场景中有 50 辆车,并且想让一辆车向 RSU 发送 ddos 攻击。

你能告诉我,在我的模型中哪里可以找到这个功能吗:

无效 TraCIDemo11p::handlePositionUpdate(cObject* obj)

谢谢你


-1
投票

嗨,我使用 PingApp 进行了 DOS 攻击。我想你可以参考PingApp的源代码。重要的部分是让 sendInterval 为 0.0001s。希望这有帮助!

© www.soinside.com 2019 - 2024. All rights reserved.