Skip to content

Latest commit

 

History

History
112 lines (79 loc) · 6.38 KB

README.md

File metadata and controls

112 lines (79 loc) · 6.38 KB

VR User Identification and Authentication

This repository contains the code required to reproduce the results presented in the paper "VR-DIAMOND: Virtual Reality Dynamic Identification and Authentication via MOtion and Network Data".

The code is primarily designed to process the Questset dataset (https://researchdata.cab.unipd.it/1239/). However, it can be adapted to work with other datasets containing VR movement traces and/or network traffic traces.

Repository Structure

.
├── pre-processing/
│   ├── synchronizer.py
│   ├── generate_frame_traces.py
|   ├── feature_extraction.py
|   ├── feature_extraction_before_attack.py
|   ├── spoofing_parameters.py
│   └── feature_extraction_during_attack.py
│
├── main-codes/
│   ├── user_id.py
│   ├── user_auth.py
│   ├── user_auth_movement.py
│   └── user_auth_movement_spoofing.py
│
├── utils/
│   └── confidence_interval.py
│
└── README.md

1. Pre-processing

The pre-processing stage synchronizes the raw data and extracts the features required by the identification and authentication algorithms.

1.1. General pre-processing

  • synchronizer.py - Synchronizes raw movement and network traffic data.
  • generate_frame_traces.py - Generates frame traces from the raw network traffic data.
  • feature_extraction.py - Extracts movement, traffic, and frame-related features and generates the corresponding feature files.

1.2. Spoofing attack pre-processing

  • feature_extraction_before_attack.py - Computes the mean values of the movement features over the training samples. It generates slow_means.csv and fast_means.csv.

  • spoofing_parameters.py - Uses the mean values computed by feature_extraction_before_attack.py to calculate the scale factors required to perform spoofing for all attacker-victim pairs. It generates fast_scale_factors.csv and slow_scale_factors.csv.

  • feature_extraction_during_attack.py - Computes the altered features resulting from the spoofing attack and generates the corresponding test files. Specifically, feature_extraction_during_attack.py generates the following files:

    • test_data_post_attack_beat_saberX_test_only.pkl: Altered features for victim X during Beat Saber, considering all attackers in the test_only test set (Uout).
    • test_data_post_attack_beat_saberX_test_trained.pkl: Altered features for victim X during Beat Saber, considering all attackers in the test_trained test set (Uin).
    • test_data_post_attack_forklift_simulatorX_test_only.pkl: Altered features for victim X during Forklift Simulator, considering all attackers in the test_only test set (Uout).
    • test_data_post_attack_forklift_simulatorX_test_trained.pkl: Altered features for victim X during Forklift Simulator, considering all attackers in the test_trained test set (Uin).

    where, X represents the victim's user identifier.

Implementation notes

The feature_extraction_during_attack.py script relies on the following inputs:

  • Scale factors generated by spoofing_parameters.py.
  • Height normalization factors.
  • Genuine test data.
  • Windows selected for the test set.

This implementation is designed to optimize computation by processing only the windows selected for testing, since these are the only samples required at test time.

The genuine test data and selected windows are extracted from the genuine user authentication implementation (user_auth_movement.py).

Height normalization factors are explicitly applied in this script to reproduce the behavior of a realistic system, in which the height normalization factor is estimated during training. This avoids using the height normalization procedure in user_auth.py, which would otherwise also account for altered features, resulting in undesired behavior.

2. Main Identification and Authentication Algorithms

The main-codes/ folder contains the following implementations:

  • user_id.py - Implements user identification.
  • user_auth.py - Implements user authentication using all considered features.
  • user_auth_movement.py - Implements user authentication using movement data only. It also generates the auxiliary files required to perform spoofing attacks.
  • user_auth_movement_spoofing.py - Implements user authentication using movement data only, under a spoofing attack.

3. Paper-related Helper Functions

The utils/ folder contains one helper script used to generate the results presented in the paper:

  • confidence_interval.py - Computes confidence intervals for the voting effect, as reported in Figures 3, 7, 8, and 9 of the paper.

4. How to run the codes

4.1. User identification and authentication

To reproduce the user identification or authentication results, execute the following scripts in the specified order:

  1. Run synchronizer.py to synchronize the raw movement and traffic data.
  2. Run generate_frame_traces.py to generate frame traces from the raw traffic data.
  3. Run feature_extraction.py to extract the required features.
  4. Run the desired identification or authentication implementation:
    • user_id.py for user identification.
    • user_auth.py for user authentication.
    • user_auth_movement.py for movement-only user authentication.

4.2. Spoofing attack

To reproduce the spoofing attack experiments, execute the following steps in order:

  1. Run feature_extraction_before_attack.py to compute the mean movement features over the training samples.
  2. Run spoofing_parameters.py to calculate the spoofing scale factors.
  3. Run user_auth_movement.py after uncommenting the lines responsible for generating the auxiliary files required by the spoofing implementation. These lines are clearly indicated in the script.
  4. Run feature_extraction_during_attack.py to generate the altered test features.
  5. Run user_auth_movement_spoofing.py to perform user authentication under the spoofing attack.

Important: The spoofing attack pipeline requires the output files generated at each previous step. Make sure to execute the scripts in the specified order.

5. Citation

If you use this code in your research, please cite the following paper:

S. Baldoni, F. Chiariotti, S. Benhamadi, M. Zorzi and F. Battisti, "VR-DIAMOND: Virtual Reality Dynamic Identification and Authentication via MOtion and Network Data," in IEEE Transactions on Mobile Computing, doi: 10.1109/TMC.2026.3751487.