🔐 UPLINK is a Rust lightweight (2MB) tool for file transfer and remote management that uses AES-GCM and Envelope Encryption over WebSockets.

Overview

UPLINK

░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░░▒▓█▓▒░      ░▒▓█▓▒░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░ 
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ 
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ 
░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░░▒▓█▓▒░      ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░  
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░      ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ 
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░      ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ 
 ░▒▓██████▓▒░░▒▓█▓▒░      ░▒▓████████▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
                
                                                    Krystian Bajno 2024

UPLINK is a Rust-based tool for file transfer and remote management. It uses AES-GCM and Envelope Encryption over WebSockets. UPLINK supports command execution, file transfers, and system management via command-line interface. Both server and client can issue commands to each other.

AES-GCM channel:

  • GZ compressed, then encrypted.
  • 256-bit key.

When one of the peers sends a command in envelope encryption mode:

  1. Alice establishes an AES-GCM channel with Bob using pre-shared Passphrase (key derived using HKDF). AES-GCM is a means of Alice authentication and channel encryption.
  2. Alice sends HANDSHAKE command.
  3. Bob generates and responds with Public Key.
  4. Alice generates Session Key and encrypts it with Bob's Public Key.
  5. Alice sends Envelope with a Command and encrypted Session Key inside - { PublicKey-Encrypted Session Key; SessionKey-Encrypted Command }. Communication stays on a protected AES-GCM channel.
  6. Bob receives the Envelope and decrypts Session Key using his Private Key, then decrypts Command using the Session Key.
  7. Bob responds to Alice with SessionKey-Encrypted Response under the AES-GCM channel.
  8. Alice receives the SessionKey-Encrypted Response. Alice decrypts the Response using SessionKey and decrypts AES-GCM traffic.
  9. Alice parses the Response.

Security Options

  • Disable envelope encryption: --no-envelope
  • Disable command execution: --no-exec
  • Disable file transfer: --no-transfer

Installation

To compile UPLINK:

git clone <repository_url>
cd uplink
cargo build --release

Command Reference

  • General Commands

    • HELP | H - Print help
    • TEXT | ECHO | PRINT | MSG | T - Send a message to the connected node
  • File Management

    • GET | D | DOWNLOAD <remote> <local> - Download a file or directory
    • PUT | U | UPLOAD <local> <remote> - Upload a file or directory
    • LIST | L | LS | DIR - List files in the directory
  • Command Execution

    • E | X | SHELL | EXEC | RUN | CMD <command> - Execute a shell command on the connected node
  • System Information

    • ID | WHOAMI | WHO | W - Get current user information
    • PWD | WHERE - Get the current directory path
    • USERS - List users on the system
    • NETSTAT - Display network connections
    • N | NETWORK | IFCONFIG | IPCONFIG - Get network adapter configuration
    • SYSTEM | INFO | SYSTEMINFO | UNAME - Get system configuration details
  • Encryption Management

    • HANDSHAKE - Change crypto keys and reestablish a new secure channel (envelope encryption only)

Usage

Starting the Server

PASSPHRASE=YourStrongPassphraseHere ./uplink server 127.0.0.1:8080

Starting the Client

PASSPHRASE=YourStrongPassphraseHere ./uplink client 127.0.0.1:8080

Disable Command Execution

./uplink client 127.0.0.1:8000 --no-exec
./uplink server 127.0.0.1:8000 --no-exec

Disable File Transfer

./uplink client 127.0.0.1:8000 --no-transfer
./uplink server 127.0.0.1:8000 --no-transfer

Disable envelope encryption

./uplink client 127.0.0.1:8000 --no-envelope
./uplink server 127.0.0.1:8000 --no-envelope

Preconfiguring UPLINK

Modify build.rs to embed default settings into the binary:

fn main() {
    println!("cargo:rustc-env=CARGO_PKG_METADATA_PRECOMPILED_MODE=server");
    println!("cargo:rustc-env=CARGO_PKG_METADATA_PRECOMPILED_ADDRESS=127.0.0.1:8080");
    println!("cargo:rustc-env=CARGO_PKG_METADATA_PRECOMPILED_PASSPHRASE=my_precompiled_passphrase");
}

Compile and run preconfigured:

./uplink

TODO:

  • Add CONNECT and PROXY support
  • Support more protocols like QUIC, RTSP, WebRTC
  • Add netcat-like functionality
You might also like...
A Rust binary for file encryption to multiple participants.

Kaspa-miner A Rust binary for file encryption to multiple participants. Installation From Sources With Rust's package manager cargo, you can install k

A secure file encryption utility, written in rust.

Dexios Dexios What is it? Building notes Checksums Performance Output file sizes Environment Variables Key Inputs Usage Examples To Do What is it? Dex

 DexiosGUI - Simple cross-platform drag-and-drop Dexios file encryption
DexiosGUI - Simple cross-platform drag-and-drop Dexios file encryption

DexiosGUI Simple cross-platform drag-and-drop Dexios file encryption. Latest Windows x64 release is here. DexiosGUI is a Qt/C++ app for encrypt and de

Quick poc of the rsync wire protocol in Rust. Supports delta transfer.

Rsync wire protocol in Rust This is a quick poc of the rsync wire protocol in Rust. It supports delta transfer. The code is really a mess right now, a

A value transfer bridge between the Monero blockchain and the Secret Network.

Secret-Monero-Bridge A value transfer bridge between the Monero blockchain and the Secret Network. Proof-of-Concept Video Demonstration: https://ipfs.

Plutonium is a two-device chat application that utilises WebSockets and a X25519 ECDH Key Exchange

Plutonium is a two-device chat application that utilises WebSockets and a X25519 ECDH Key Exchange, in addition to AES-256 to securely communicate between the two clients.

An all-in-one IBC protocol providing fungible token transfer, interchain account, and async query functionalities

ICS-999 An all-in-one IBC protocol providing fungible token transfer, interchain account (ICA), and query (ICQ) functionalities, implemented in CosmWa

Scans the Ethereum network for USDT ERC-20 token transfer transactions

ethscan This is a Rust command line program for scanning the Ethereum blockchain for USDT transfers within a time span and amount span. prerequisites

Simple to use CLI tool that makes encryption easy! Written in Rust.

🔒 eme: Encryption Made Easy an extremely simple AES-256 encryption tool written in Rust Usage: # To encrypt: eme --encrypt secret.png # To decrypt: e

Releases(release)
Owner
Krystian Bajno
Krystian Bajno
A blazingly fast, ShareX uploader coded in Rust (using actix web) which utilizes AES-256-GCM-SIV to securely store uploaded content.

Magnesium Oxide ❔ What is this? Magnesium-Oxide (MGO) is a secure file uploader with support for ShareX. ?? Features ?? Blazingly fast uploads and enc

Nitrogen Development 26 Nov 25, 2022
A simple key-value store with a log-structured, append-only storage architecture where data is encrypted with AES GCM.

akvdb A simple key-value store with a log-structured, append-only storage architecture where data is encrypted with AES GCM. Modified from the actionk

Olle W 3 Oct 10, 2022
A simple to use, cross-platform aes encryption

About Project End to End encryption (AES) for multiple languages (cross-platform) with CBC Icon Item ?? Upcoming ⚖️ License ?? ChangeLog Usage (rust)

Zot Cryptography 2 Dec 15, 2022
A young, simple and naive file crypto lib based on AES.

naive-file-crypto A young, simple and naive file crypto lib based on AES. The MAC implementation is not standard GCM, so it may be vulnerable. All cpu

DF_XYZ 1 Jan 16, 2022
Rust encryption library for practical time-lock encryption.

tlock_age: Hybrid Timelock Encryption/Decryption in Rust tlock_age is a library to encrypt and decrypt age filekey using tlock scheme. It provides an

Thibault 5 Mar 29, 2023
Authenticated Encryption with Associated Data Algorithms: high-level encryption ciphers

RustCrypto: Authenticated Encryption with Associated Data (AEAD) Algorithms Collection of Authenticated Encryption with Associated Data (AEAD) algorit

Rust Crypto 457 Jan 4, 2023
A simple and secure rust command-line tool to protect your text by encrypting and decrypting it using the robust AES-256 algorithm.

Secret Keeper A simple and secure command-line tool to protect your text by encrypting and decrypting it using the robust AES-256 algorithm. Built wit

Kunal Bagaria 9 May 11, 2023
Project Masterpass is a deterministic databaseless key management algorithm, aimed to help those who cannot protect their encryption keys in storage

Project Masterpass (working title) Attention! This project is still under heavy development, and SHOULD NOT be used in practice, as the algorithms cou

Gyorgy Wang 2 Sep 11, 2022
Chargo is a tool for file encryption/decryption. It's based on Argon2 and ChaCha20Poly1305 algorithms.

| Documentation Chargo is a tool for file encryption/decryption with password. It's based on Argon2 and ChaCha20Poly1305 algorithms. From arg2u with ♥

Airat Galiullin 7 Jan 1, 2023
Fast(er) AES-based constructions for WebAssembly and Rust.

Fast(er) AES-based constructions for Rust and WebAssembly AEGIS-128L AEGIS-256 AES-128-CTR AES-256-CTR AES-128-OCB AES-256-OCB AES-128-GCM AES-256-GCM

Frank Denis 5 May 31, 2023