Skip to content

Commit

Permalink
Merge pull request #46 from twardokus/dev
Browse files Browse the repository at this point in the history
Merge dev into master for v3.0.0 release
  • Loading branch information
twardokus authored Jun 12, 2022
2 parents 298ebf9 + a9a7558 commit 47a720e
Show file tree
Hide file tree
Showing 735 changed files with 610,585 additions and 12,478 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.15)
project(v2verifier)

add_subdirectory(src)








162 changes: 106 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# V2Verifier

****Important** - this version of V2Verifier (v3.0.0) is a _preliminary_ release of V2Verifier 3.0.
As we await bug fixes in third-party open-source projects that V2Verifier relies on
for C-V2X sidelink communication, **this version of V2Verifier temporarily does
not support C-V2X**. We thank you for your patience as we work towards resolving this
issue.**

V2Verifer is an open-source testbed for experimental evaluation of security in
vehicle-to-vehicle (V2V) communication. V2Verifier supports a broad range of
experimentation with V2V technologies and security protocols using a
Expand All @@ -11,9 +17,9 @@ message signing and verification and V2V certificates
- Dedicated Short Range Communication (DSRC) - adapted from
the [WiME Project's](http://dx.doi.org/10.1109/TMC.2017.2751474)
IEEE 802.11p transceiver
- Cellular Vehicle-to-Everything (C-V2X) - based on the
- ~~Cellular Vehicle-to-Everything (C-V2X) - based on the
[srsRAN](https://github.com/srsRAN/srsRAN) project (formerly
srsLTE)
srsLTE)~~ (temporarily not supported)

Check out our
[YouTube page](https://www.youtube.com/channel/UC5lY5D4KYgfKu3FXtfjHP7A)
Expand All @@ -30,11 +36,15 @@ If you use V2Verifier or any of its components in your work, please cite
IEEE ICC 2021. Additional publications involving V2Verifier are listed on the
same page.

## Requirements
V2Verifier is designed to be run with software-defined radios (SDRs);
specifically, we recommend either the USRP B210 or, preferably, the USRP N210,
both available from Ettus Research. When using N210s, 6 GHz daughterboards
(e.g., UBX 40) are required for each N210 device.
## Equipment Requirements
V2Verifier is designed for over-the-air experiments with software-defined radios
(SDRs).
For C-V2X, you _**must**_ use SDRs with GPSDO modules installed. We recommend
the USRP B210 and TCXO GPSDO module from Ettus Research (we have not tested and
do not officially support the use of other SDRs for C-V2X).
For DSRC, you may use USRP B210s (GPSDO not required for DSRC) or, preferably,
USRP N210s (also available from Ettus Research). If you are using N210s, a 6 GHz
daughterboard (e.g., UBX 40) is required for each N210 device.

If you do not have access to SDRs, V2Verifier can also be run as a pure
simulation environment that only requires a modern PC to run. With or without
Expand All @@ -44,14 +54,32 @@ operating system. **Windows operating systems are not supported.**

## Installing V2Verifier

**Important:** These instructions must be completed for _each_ PC you wish
to use for running V2Verifier experiments.
Installation consists of two parts.

### Part 1 - V2V Protocols
Follow the instructions for DSRC, C-V2X, or both to install the software needed
for your PC to communicate with your software-defined radios and send V2V
messages over the air.

#### C-V2X

V2Verifier's implementation of C-V2X sidelink communication is based on the
open-source srsRAN project.

_C-V2X support has been temporarily removed as we await bug fixes in third-party code
that V2Verifier relies on. Thank you for your patience as we work to restore this
functionality as soon as possible._

#### DSRC

V2Verifier's implementation of DSRC is based on the open-source GNURadio
and WiME Project implementation of IEEE 802.11p.

[GNURadio](https://github.com/gnuradio/gnuradio) version 3.8 is required to run
DSRC experiments in V2Verifier. Additionally, GNURadio modules from the
[WiME project](https://www.wime-project.net/)] are required. Install GNURadio
[WiME project](https://www.wime-project.net/) are required. Install GNURadio
as well as the required WiME modules with the following commands. If you
encounter any errors, please visit the GNURadio project for their most recent
encounter any errors, please visit the GNURadio project on GitHub for their most recent
installation instructions and troubleshooting guide.

sudo apt install -y python3-pip
Expand All @@ -69,68 +97,90 @@ run GNURadio Companion.

pybombs run gnuradio-companion

Next, on each Ubuntu PC, you must install the following dependencies:
### Part 2 - V2Verifier

Now that you have installed the communication software, you can install V2Verifier.
Begin by installing several dependencies:

sudo apt install -y git cmake libuhd-dev uhd-host swig libgmp3-dev python3-pip python3-tk python3-pil
python3-pil.imagetk
Install and/or upgrade some Python 3 libraries.
python3-pil.imagetk

If you have not already cloned the V2Verifier repository, do so with the commands

cd ~
git clone https://github.com/twardokus/v2verifier.git

Move into the V2Verifier directory and build the project using the standard CMake
build process:

pip3 install -U image fastecdsa pyyaml eel folium pynmea2
cd v2verifier
mkdir build
cd build
cmake ../
make

If you have missed any dependencies, CMake will warn you at this point.
Once V2Verifier is built, proceed to the next section for instructions on how to
run experiments in V2Verifier.

Finally, download the ZIP file for the latest stable release of V2Verifier, extract the project, and you are ready
to start using V2Verifier!

## Running V2Verifier
Connect one USRP to each PC. On both PCs, launch GNURadio with the command `gnuradio-companion` from a terminal.
On one PC, open the `wifi_tx.grc` file from the `v2verifier/grc` project subdirectory. On the other PC, open
the `wifi_rx.grc` file from the same subdirectory. Click the green play button at the top of GNURadio to launch the
flowgraphs on both PCs. You will need to configure the communication options (e.g., bandwith, frequency) to suit your
needs. The default is a 10 MHz channel on 5.89 GHz.

On each PC, navigate to the v2verifier directory. For the receiver, run the command
Before running V2Verifier, connect one USRP (with appropriate antennas) to each Ubuntu PC.
Assuming you have two PCs with one USRP each, designate one USRP as the "receiver" and the other
as the "transmitter." In this configuration, the receiver will show you how a single vehicle
responds to V2V transmissions (e.g., using a GUI) while the transmitter can generate V2V
traffic for up to ten vehicles. You can specify the number of vehicles by changing the relevant
parameter in `config.json`.

On each PC, begin by launching the C-V2X or DSRC code (follow
the respective instructions below) to run in the background and manage your SDR transmitting
or receiving. Then, on each PC, `cd` into the `build` directory. For the receiver, run the command

./src/v2verifier dsrc receiver [--test] [--gui]

python3 v2verifier.py receiver -t {dsrc cv2x} [-g {web tk}] [--test]
For the transmitter, run the command

to launch the receiver (include the `-g` option for GUI support). For the transmitter, run the command
./src/v2verifier dsrc transmitter [--test]

python3 v2verifier.py transmitter [--test]
to begin transmitting messages. See the command-line help (`python3 v2verifier.py --help`) for information about the
optional arguments noted for each command.
See the command-line help (`./v2verifier -h`) for optional arguments. You should not use the `--test`
option unless you are not using SDRs (this option allows you to run transmitter and receiver on a
single PC with communication via network socket). Use `--gui` on the receiver if you want to use
a graphical interface on the receiver (see additional instructions for GUIs below).

*Note that V2Verifier also supports C-V2X communication, but this requires equipment capable of both cellular
communication and GPS clock synchronization (e.g., USRP B210 w/ GPSDO or
### Radio layer: C-V2X
*Note C-V2X communication requires equipment capable of both cellular
communication and GPS clock synchronization (e.g., USRP B210 w/ GPSDO or
[Cohda Wireless MK6c](https://cohdawireless.com/solutions/hardware/mk6c-evk/)) as well as access to either an outdoor
testing environment or synthesized GPS source.*

**Important note about GUI usage:** V2Verifier currently offers two graphical
**C-V2X support has been temporarily removed as we await bug fixes in third-party code
that V2Verifier relies on. Thank you for your patience as we work to restore this
functionality as soon as possible.**


### Radio layer: DSRC

On both PCs, launch GNURadio with `pybombs run gnuradio-companion`.
On one PC, open the `wifi_tx.grc` file from the `v2verifier/grc` project subdirectory. On the other PC, open
the `wifi_rx.grc` file from the same subdirectory. Click the green play button at the top of GNURadio to launch the
flowgraphs on both PCs. You will need to configure the communication options (e.g., bandwith, frequency) to suit your
needs. The default is a 10 MHz channel on 5.89 GHz.

### Using GUIs
V2Verifier currently offers two graphical
interfaces. The first is a web-based interface that interacts with Google Maps.
To use this GUI, you will need to purchase a Google Maps API key through Google
Cloud services and create `config.js` file in the `web` directory of V2Verifier
(some familiarity with JavaScript is helpful). Our second interface is based on
(some familiarity with JavaScript is helpful). Please contact us for assistance
if you want to use this GUI.

Our second interface is based on
TkGUI. To use this option, open a separate terminal window before running any
`v2verifier.py` commands and run `python3 tkgui_execute.py` to launch the
TkGUI interface as a separate process. We encourage you to open a GitHub issue
with any questions or problems using either graphical interface.

## Replay attack with V2Verifier
**Note - these instructions apply to versions of V2Verifier through the beta release of version 2.0. While updates are in progress, please ensure you use an appropriate release of V2Verifier as these instructions will not work with release 2.0**

Conducting a replay attack requires three USRPs and three PCs. Note that these instructions apply only to DSRC at present.
One USRP, which will be used to conduct the attack, will require two antennas.

Set up two PCs as above and run the normal transmitter and receiver programs. Make sure to use the `-g` option with
the `local` program to launch the receiver GUI.

python3 ./main.py [local | remote] dsrc [-g]

On the third PC, connected to the USRP with two antennas, open the `wifi_rx.grc` and `wifi_tx.grc` flowgraphs in
GNURadio. Also, open a terminal and navigate to the `replay_attack` directory in the V2Verifier directory.
- Run the `wifi_rx.grc` flowgraph
- Switch to the terminal and run `python3 ./replay_attack.py <seconds_to_collect>`
- When the script prompts to press Enter, *wait!* Go back to GNURadio, stop the `wifi_rx.grc` flowgraph and run
the `wifi_tx.grc` flowgraph
- Return to the terminal and press Enter. The attacker will begin replaying messages.
- Look at the receiver you started at the beginning. You should see the effects of the replay attack (e.g., warning
messages in yellow text on the message feed) on the GUI.
`v2verifier` commands above and run `python3 tkgui_execute.py` to launch the
TkGUI interface as a separate process.

We encourage you to open a GitHub issue
with any questions or problems using either graphical interface.
5 changes: 5 additions & 0 deletions cert_keys/0/p256.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIGGhFfeEVSrX9PFPZ8GkC3y1Y7GiU7UWkm20Ax2s5bWMoAoGCCqGSM49
AwEHoUQDQgAE69lZ1lwl5RoCLgUloGjGAWLvoSP60dSMtm9x4a2eOaxRxABNnbcQ
jMh6ehFwG1kOITJEkrWAz7FGYy597cUfWQ==
-----END EC PRIVATE KEY-----
4 changes: 4 additions & 0 deletions cert_keys/0/p256.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE69lZ1lwl5RoCLgUloGjGAWLvoSP6
0dSMtm9x4a2eOaxRxABNnbcQjMh6ehFwG1kOITJEkrWAz7FGYy597cUfWQ==
-----END PUBLIC KEY-----
5 changes: 5 additions & 0 deletions cert_keys/1/p256.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIOdZo/BUfwrOyiJn9kRMi6FxqvWOwlVTOiI/dMAG8KCdoAoGCCqGSM49
AwEHoUQDQgAEivUpbefuTzu3qOtCdyT4Z0WsnytUBkEYSYTEis0UESbnVz5ZdVKA
lUF+WrYv/6PGa3fa45lGXKwXRR3Y83qF4Q==
-----END EC PRIVATE KEY-----
4 changes: 4 additions & 0 deletions cert_keys/1/p256.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEivUpbefuTzu3qOtCdyT4Z0WsnytU
BkEYSYTEis0UESbnVz5ZdVKAlUF+WrYv/6PGa3fa45lGXKwXRR3Y83qF4Q==
-----END PUBLIC KEY-----
5 changes: 5 additions & 0 deletions cert_keys/2/p256.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIBYytb8yZCt9QUg5D04gpTcV06QqqhsmveP3BVOAgXCgoAoGCCqGSM49
AwEHoUQDQgAEwWqvXaj64fMU929RTNEn/TWfXr0HY8wNb/nTXFIcwRJRYGocLSAw
2YpOLVEjOE6hJ8PreRI5WQ/93HNYwGbhNA==
-----END EC PRIVATE KEY-----
4 changes: 4 additions & 0 deletions cert_keys/2/p256.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEwWqvXaj64fMU929RTNEn/TWfXr0H
Y8wNb/nTXFIcwRJRYGocLSAw2YpOLVEjOE6hJ8PreRI5WQ/93HNYwGbhNA==
-----END PUBLIC KEY-----
5 changes: 5 additions & 0 deletions cert_keys/3/p256.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIIKfV9HWUcKUX9korBYRQ7zvn/4heNrdsLHh/+Cco9hioAoGCCqGSM49
AwEHoUQDQgAEJzW3KEzRicLyOTIoX2anjElNOU6xq8OxEIrEyTBMmcCGW420ffhX
LR6ObpRtQj1cvokpbToZ7zWIQr138Bzp9w==
-----END EC PRIVATE KEY-----
4 changes: 4 additions & 0 deletions cert_keys/3/p256.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEJzW3KEzRicLyOTIoX2anjElNOU6x
q8OxEIrEyTBMmcCGW420ffhXLR6ObpRtQj1cvokpbToZ7zWIQr138Bzp9w==
-----END PUBLIC KEY-----
5 changes: 5 additions & 0 deletions cert_keys/4/p256.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIEDNkMDcu9XnBXO31vFtD5vsxwhz7jnjmrytE7EAYdqhoAoGCCqGSM49
AwEHoUQDQgAE6r2tVNNQSd6qQbPb2JFgA4Ei2YWn6YmCYJlJ7sJ46p29svlXMP+U
+M2BUh1RjkRLfwbZ5Dfu/4j1NbUkSxcyTg==
-----END EC PRIVATE KEY-----
4 changes: 4 additions & 0 deletions cert_keys/4/p256.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE6r2tVNNQSd6qQbPb2JFgA4Ei2YWn
6YmCYJlJ7sJ46p29svlXMP+U+M2BUh1RjkRLfwbZ5Dfu/4j1NbUkSxcyTg==
-----END PUBLIC KEY-----
5 changes: 5 additions & 0 deletions cert_keys/5/p256.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEICZ5PiugrRF2Q7PWaxiAYf9l8ruhhgvetI1/P/1JmkiToAoGCCqGSM49
AwEHoUQDQgAE+u2i+dS+FjD8noV4qbdXkDK2rjzpCnnwoAnDZgc7BOC2XRW8ibXl
WloI60v1xgckyhdMxK/YKiRupLU06Z3QoA==
-----END EC PRIVATE KEY-----
4 changes: 4 additions & 0 deletions cert_keys/5/p256.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE+u2i+dS+FjD8noV4qbdXkDK2rjzp
CnnwoAnDZgc7BOC2XRW8ibXlWloI60v1xgckyhdMxK/YKiRupLU06Z3QoA==
-----END PUBLIC KEY-----
5 changes: 5 additions & 0 deletions cert_keys/6/p256.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIKfIJcO2I5CZsCGd35XbS22SxotDf3acSFmiHyD9i17goAoGCCqGSM49
AwEHoUQDQgAEOduUkqf24J8/plLxsTCofESaE/qK/WzmFYHtA8C+YbvxRZoMQZfV
4ulZ1WHHO/VxWDzgiSYwmPrOO6rRzMFFYA==
-----END EC PRIVATE KEY-----
4 changes: 4 additions & 0 deletions cert_keys/6/p256.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEOduUkqf24J8/plLxsTCofESaE/qK
/WzmFYHtA8C+YbvxRZoMQZfV4ulZ1WHHO/VxWDzgiSYwmPrOO6rRzMFFYA==
-----END PUBLIC KEY-----
5 changes: 5 additions & 0 deletions cert_keys/7/p256.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIJosh2NAW/0IO4G/Xq5XCqwBJHpX5HRMchGu23R9lqknoAoGCCqGSM49
AwEHoUQDQgAE3nlCxmxyMeluj70aFAJsKHsCTeCpk/O4byDlodG5GmG/zx0Wh+Gy
6hYW3Rp0+Mkts+7BOzyEKhx5TB0+O/+QhQ==
-----END EC PRIVATE KEY-----
4 changes: 4 additions & 0 deletions cert_keys/7/p256.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE3nlCxmxyMeluj70aFAJsKHsCTeCp
k/O4byDlodG5GmG/zx0Wh+Gy6hYW3Rp0+Mkts+7BOzyEKhx5TB0+O/+QhQ==
-----END PUBLIC KEY-----
5 changes: 5 additions & 0 deletions cert_keys/8/p256.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIK6GTeDyfXGlgfUK67UwasyMMJjQxquMl4rlfm1PmrJ3oAoGCCqGSM49
AwEHoUQDQgAEvxXC/BTJ+Xvdus06c4vWaGgdN8DymoT7/uXi6wEthzxVamTdX1Pd
HJjmeh1Aaz/W2JcEW1reX2icf9ohvvQVwg==
-----END EC PRIVATE KEY-----
4 changes: 4 additions & 0 deletions cert_keys/8/p256.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEvxXC/BTJ+Xvdus06c4vWaGgdN8Dy
moT7/uXi6wEthzxVamTdX1PdHJjmeh1Aaz/W2JcEW1reX2icf9ohvvQVwg==
-----END PUBLIC KEY-----
5 changes: 5 additions & 0 deletions cert_keys/9/p256.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIFzsaVn4XIw4xNQiWcQxCyk9J4O6jHyXonuOl1/QjrG/oAoGCCqGSM49
AwEHoUQDQgAESGjA8dlnJe2kd6eCXWy9pxNhUt382WctA2jq8vcH7mNCTYT57YEd
avG9dEH6X9rHMMVVQUJOWgndHHnFUsiSjg==
-----END EC PRIVATE KEY-----
4 changes: 4 additions & 0 deletions cert_keys/9/p256.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESGjA8dlnJe2kd6eCXWy9pxNhUt38
2WctA2jq8vcH7mNCTYT57YEdavG9dEH6X9rHMMVVQUJOWgndHHnFUsiSjg==
-----END PUBLIC KEY-----
29 changes: 28 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
# Changelog
Notable changes to this project will be tracked here. Additions, deprecations, etc. are described per version release.

## Unreleased changes
## [3.0.0] - 2022-06
Version 3.0.0, a preliminary release, is a major overhaul of the testbed. Most prominently, V2Verifier is now a C++ project. Several factors
informed the change from Python to C++; most significantly, V2Verifier code now runs at speeds much closer to real
V2V software and therefore more accurately reflects real-world performance (e.g., ECDSA verifications are performed)
at a more realistic pace.

**While we await bug fixes in third-pary software that our C-V2X transceiver relies on,
we have _temporarily_ removed C-V2X support.** Please see the README for details.
Version 3.0.1 will be released in the near future as a hotfix to restore C-V2X support.

### Added
- C++ implementations of all V2Verifier files.
- Support for GNURadio version 3.8
### Changed
- V2Verifier is now a C++ project
- TkGUI is now a standalone utility included with the project that can be run alongside,
but not as a direct part of, the main C++ code.
- C-V2X is temporarily not supported pending bug fixes in third-party source code that this project relies on.
### Fixed
- Sidelink communication (C-V2X) in V2Verifier based on the srsRAN project ([issue #34](https://github.com/twardokus/v2verifier/issues/34)) was fixed by srsRAN developers (see that project's [issue #838](https://github.com/srsran/srsRAN/issues/838)).
### Deprecated
- All Python-based versions of V2Verifier (<3.0) are no longer supported.
- GNURadio 3.7 is no longer supported.
### Removed
- All Python (.py,.pyc) files except some utilities and GUI source files.

## [2.0] - 2021-10-10
V2Verifier 2.0 introduced several major changes including support for C-V2X and additional IEEE 1609.2 features.
### Added
- Implicit certificate and certificate digest structures (see IEEE 1609.2 Section 6.4) are now included with V2Verifier messages. \*_Note that full cryptographic support for certificate generation and verification, including 1609.2 pseudonym generation and linkage, is not yet included but is currently under active development_.
- A new, browser-based GUI (built with JavaScript as an Electron app) features a Google Maps integration and support for GNSS-based vehicle locations.
Expand Down
Loading

0 comments on commit 47a720e

Please sign in to comment.