| Simulator | Definition |
|---|---|
| OMNeT++ | is a modular, component-based C++ simulation library and framework |
| Veins | is a framework for running vehicular network simulations |
| Plexe | is a cooperative driving framework extending SUMO and Veins permitting the realistic simulation of platooning |
| SUMO | is a microscopic traffic simulator |
Clone the ComFASE repository and follow these steps to activate the tool to execute the fault and attack injection test campaigns.
-
After clonning the ComFASE project in your local directory, change the path in the following files,
i. BasePhyLayer.cc ("path to comfase"/comfase/src/comfase/injectorVeins/injectorV.h)
ii. ChannelAccess.cc ("path to comfase"/comfase/src/comfase/injectorVeins/injectorV.h)
iii. SignalUtils.cc ("path to comfase"/comfase/src/comfase/injectorVeins/injectorV.h) -
Open the terminal in veins folder and run the following commands,
i../configure
ii.make -j16(number 16 represents the number of the available cores of the system) -
Open the terminal in plexe folder and run the following commands,
i../configure --with-veins "path to veins folder"
ii.make -j16 -
Open the plexe folder,
i. Open the file “run.py”
ii. Add ‘../comfase/src’ in run_ned list -
Import following cloned folders to OMNeT++ editor (OMNeT++ 5.6.2 must be installed beforehand),
i. comfase
ii. plexe-veins
iii. veins -
In theOMNeT++ cloned projects check the references for the projects,
i. for veins project, comfase should be referenced
ii. for plexe project, comfase and veins should be referenced -
Build the veins project from OMNeT++ editor
-
Build the plexe project from OMNeT++ editor
-
The configuration steps ends here, now it is possible to run the scenario either directly from the OMNeT++ editor or from the commandline (such as
./run -u Cmdenv -c Sinusoidal -r 2) from the terminal in the plexe->examples->platooning_comfase folder -
It is also possible to run the campaigns from the python scripts (comfase_run.py) in the plexe->examples->platooning_comfase folder
Before integrating ComFASE into the simulator, it is recommended to have all the simulators running on your system. You can follow the instructions on the OMNeT++, Veins, and Plexe webpages to install them and get them ready to run.
Note: ComFASE is tested in the below-mentioned versions of the simulators:
- OMNeT++ 5.6.2
- Veins 5.1
git clone -b veins-5.1 https://github.com/sommer/veins.git - Plexe 3.0a2
git clone -b plexe-3.0a2 https://github.com/michele-segata/plexe.git - SUMO 1.9.2
- Clone the ComFASE project and import it into the OMNeT++ IDE.
- Reference ComFASE in Veins and Plexe as below:
- To use the ComFASE in the desired part of the code, add below lines to call comfase header file:
#include "veins/base/utils/FindModule.h"
#include "<path to comfase>comfase/src/comfase/attackInjection/Injector.h"
Note: the path to the Injector.h file can be different depending on your directory.
for Delay and DoS attacks the following lines are added into the "channelAccess.cc" in source code of the Veins
auto comfase = FindModule<injectorV*>::findGlobalModule();
if (comfase->DelayAttack){
std::cout<<"Delay Attack = is TRUE"<<std::endl;
float correctValue = receiverPos.distance(senderPos) / BaseWorldUtility::speedOfLight();
return comfase->PropagationDelayAttack(senderModule->getId(), receiverModule->getId(), correctValue);
}
else if (comfase->DoSAttack){
std::cout<<"DoS Attack = is TRUE"<<std::endl;
float correctValue = receiverPos.distance(senderPos) / BaseWorldUtility::speedOfLight();
return comfase->DenialOfServiceAttack(senderModule->getId(), receiverModule->getId(), correctValue);
}
else{
// this time-point is used to calculate the distance between sending and receiving host
return receiverPos.distance(senderPos) / BaseWorldUtility::speedOfLight();
}
- Update ned file of the example that you want to run by adding:
import comfase.comfase.injectorVeins.injectorV;
and
comfase: injectorV {
@display("p=120,50;i=abstract/penguin");
}
- Update your example ini file by adding "attackInjection.ini" as following:
include <path to comfase>comfase/src/comfase/injectorVeins/injectorV.ini
- Compile the code to make it ready to run (build all projects in OMNeT++ IDE)
Note: Step1 is suitable for working in IDE level, proceed to step2 if test automation is required (i.e., to run experiments in bulk automatically).
This optinon can be used to run test campaigns automatically. A test campaign consists of many experiments where the number of the experimnets depends on the test configuration setup such as, attack start time, attack end time, and attack values vector. The test campaign can be configured by using a Python script (i.e., comfase_run.py).
Follow the below steps to compile ComFASE from the command line to be able to use the comfase_run.py for test configuration and automation.
- Go to comfase folder, open a cmd terminal to run
$ ./configurethen$ make -j <number of cores of your PC> - Go to Veins folder, open a cmd terminal to run
$ ./configurethen$ make -j <number of cores of your PC> - Go to Plexe-Veins folder, open a cmd terminal to run
$ ./configure --with-veins ~/src/veinsthen$ make -j <number of cores of your PC> - Go to Plexe-Veins folder, open run.py and update run_neds list as
run_neds = ['../veins/src/veins', 'src/plexe', '../comfase/src'] - Finally, go to Plexe-Veins/examples/platooning_comfase folder and configure the parameters in comfase_run.py script according to the test requirement and execute the script.
Configure the attack injection scenario through updating the attackInjection.ini file as denoted below, and run the desired example.
##########################################################
# Attack Start #
##########################################################
*.comfase.attackStartTime = ${attackStartTime = 12}s
### Attack End #
###########################################################
*.comfase.attackEndTime = ${attackEndTime = 15}s # This is not for DoS attack
#
## Target Vehicle and Attack Surface #
###########################################################
*.comfase.attackNode = 27
*.comfase.attackActive = false
*.comfase.attackOnSender = true
*.comfase.attackOnReceiver = false
#
#
## Delay Attack #
###########################################################
*.comfase.DelayAttack = true
*.comfase.myPDValue = ${myPDValue = 0.5}s
#
#
## DoS Attack #
###########################################################
*.comfase.DoSAttack = false
*.comfase.myPDforDoS = ${myPDforDoS = 60}s
A Python script is written to run the ComFASE experiments, before running that you can define your attack injection setup such as target node (target vehicle), attack type (Delay or DoS), and target attack surface (sender, receiver or both):
Node=27 # NODE/VEHICLE UNDER ATTACK
Activation='true' # BOOLEAN FOR ATTACK ACTIVATION
Delay='true' # BOOLEAN FOR DELAY
Sender='true' # BOOLEAN FOR TARGET SURFACE FOR SENDER
Receiver='true' # BOOLEAN FOR TARGET SURFACE FOR RECEIVER
for t in numpy.arange(17.0, 21.9, 0.2): # This loop defines the target time to inject attack
ComFASE is an open source attack injection tool and can be used under the GNU General Public License. For OMNet++, Veins and Plexe-veins simulators please check their license terms and conditions.
- "ComFASE: A Tool for Evaluating the Effects of V2V Communication Faults and Attacks on Automated Vehicles," 2022 52nd Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN), 2022.
- "Modeling and Evaluating the Effects of Jamming Attacks on Connected Automated Road Vehicles," 2022 27th IEEE Pacific Rim International Symposium on Dependable Computing (PRDC), 2022.
- "Simulation-based Evaluation of a Remotely Operated Road Vehicle under Transmission Delays and Denial-of-Service Attacks," 2023 28th IEEE Pacific Rim International Symposium on Dependable Computing (PRDC), 2023.



