#file-transfer #hdmi #steganography #hidden-message

bin+lib hdmifiletransporter

Proof of concept on transferring files using HDMI (video via HDMI) from one computer to another

3 releases

0.1.2 Apr 21, 2023
0.1.1 Apr 20, 2023
0.1.0 Apr 18, 2023

#167 in Video

48 downloads per month

Apache-2.0

49KB
959 lines

HDMI File Transporter

github crates.io docs.rs CI Build codecov

This repository is a Rust implementation for a proof-of-concept to transfer files using video by leveraging HDMI from one computer and USB on a second computer. The computer sending the information might be in a secured environment with very restricted access to Internet or USB devices that can be connected. However, monitors are rarely a source targeted by security. Thus, the concept is to send files using HDMI and captured using a video card with USB on a second computer with no security restriction.

For details about the concept and code visit these articles:

  1. How to Transfer Files Between Computer Using HDMI (Part 1: Plan)

Scope of this Code Base

The code base contains a Rust script that inject a file into a video file. Also, it does the other side: from video file to file.

What is out of scope is the HDMI part. The details can be found in the several articles written.

Information for the Consumers of the Library

Install

cargo add hdmifiletransporter

Information for the Consumers of the CLI

todo: Different options we can use with the CLI

Information for the Developers of the Repository

This section is intended for developers who are contributing to this repository. They are few pointers to how to perform development tasks.

What to Install?

You need to install the right toolchain:

rustup toolchain install stable
rustup default stable

To perform test coverage you need to install

cargo install grcov
rustup component add llvm-tools-preview

To generate benchmark plots you need to install GnuPlot

sudo apt update
sudo apt install gnuplot

# To confirm that it is properly installed:
which gnuplot

To use opencv on WSL:

sudo su 
apt install libopencv-dev clang libclang-dev
sudo apt install cmake

Execute

To get all options using cargo run:

cargo run -- -help

Tests

cargo test

Tests Coverage

You must install few components before running coverage:

cargo install grcov
rustup component add llvm-tools-preview

Then, you can run:

./coverage.sh

Further explanation in the Mozilla grcov website

Documentation

The documentation is generated from the source code using:

cargo doc --open  -document-private-items

Testing CLI

All commands for the user works but instead of using

hdmifiletransporter -m inject -i testAssets/test1.zip -o out1.mp4

Inject Text to Video

cargo run -- -m inject -i testAssets/text1.txt -o outputs/out1.avi --fps 30 --height 1080 --width 1920 --size 1

cargo run -- -m inject -i testAssets/text1.txt -o outputs/out1.avi --fps 30 --height 1080 --width 1920 --size 1 -a bw

Extract Text from Video

cargo run -- -m extract -i outputs/out1.avi -o outputs/text1.txt --fps 30 --height 1080 --width 1920 --size 1

cargo run -- -m extract -i outputs/out1.avi -o outputs/text1.txt --fps 30 --height 1080 --width 1920 --size 1 -a bw

Benchmark

cargo bench

Publishing

Test the Cargo Content

cargo package --allow-dirty

Then go to hdmifiletransporter/target/package/ to see the content

Push a new Cargo Package

cargo login
cargo publish --dry-run
cargo publish

Debugging

You must install CodeLLDB if you want to set break point with VsCode.

Dependencies

~19MB
~143K SLoC