CyberShield is a C++ security project focused on file protection, runtime monitoring, and defensive process control on POSIX-compatible systems.
It combines strong modern encryption with syscall-level interception to help protect sensitive files and reduce the risk of unauthorized access or unsafe process behavior.
Developed by Ali Firas (thesmartshadow) in collaboration with the Phantom Force Team.
CyberShield was built to explore a practical security model that combines:
- file encryption for sensitive data
- runtime interception for defensive monitoring
- hardware-tied identity concepts
- memory-focused anti-tampering ideas
- lightweight integrity enforcement
The goal of the project is not just to encrypt data, but to add an additional defensive layer around how sensitive resources are accessed and handled at runtime.
-
Modern file encryption
- Uses authenticated encryption for protecting file contents
-
Syscall-level defensive monitoring
- Intercepts selected runtime behavior to restrict unsafe file access
-
Dynamic identity concept
- Uses host-linked attributes and timing-derived context as part of session logic
-
Ephemeral key handling
- Designed around short-lived cryptographic state
-
Integrity-oriented execution model
- Helps detect or disrupt suspicious interaction patterns during execution
-
Self-test mode
- Includes a built-in test path for quick validation after build
Many small security tools focus on one thing only: encryption, access control, or monitoring.
CyberShield is an attempt to bring these ideas together in one project:
- encrypt data at rest
- monitor behavior at runtime
- limit risky access patterns
- keep the workflow simple enough to test locally
This makes it useful as a research-oriented security project, a learning resource, and a base for future defensive experimentation.
CyberShield is intended for POSIX-compatible systems.
Install the required dependencies:
sudo apt update
sudo apt install -y g++ libsodium-dev libssl-dev gitClone the repository:
git clone https://github.com/thesmartshadow/CyberShield.git
cd CyberShieldStandard build:
make buildBuild with a specific compiler:
make CXX=g++
make CXX=clang++Other useful targets:
make debug
make sanity
make cleanBuild the shared object:
g++ -std=c++20 -fPIC -shared -o CyberShield.so cyber_shield.cpp -ldl -lsodiumBuild the standalone binary:
g++ -std=c++20 -o CyberShield cyber_shield.cpp -lsodium -ldl./CyberShield /etc/passwdThis creates an encrypted output file such as:
passwd.enc./CyberShield --self-testThis performs an internal validation flow to confirm that the encryption path is working as expected.
You can load the shared object into a target process:
sudo LD_PRELOAD=./CyberShield.so /usr/sbin/sshdTry opening a restricted file through a preloaded process:
LD_PRELOAD=./CyberShield.so nano /etc/shadowIf the interception logic is active, access should be denied by the defensive layer.
CyberShield writes encrypted output files using the .enc extension.
Current format:
- 4-byte magic:
CSH1 - 1-byte version:
0x01 - 1-byte nonce length
- nonce bytes
- ciphertext bytes using ChaCha20-Poly1305
Output file permissions are set to:
0600
CyberShield is built around a few core ideas:
Sensitive data should be protected with modern authenticated encryption, not plain obfuscation or reversible weak transformations.
Protection should not stop at file encryption. Runtime behavior matters too, especially when a process touches sensitive paths.
Reducing the lifetime of key material lowers exposure during inspection or tampering attempts.
CyberShield is also a research-driven project. Some parts are intentionally built to explore stronger runtime security concepts and system-level hardening ideas.
Build the project:
make buildRun the self-test:
./CyberShield --self-testEncrypt a file:
./CyberShield /etc/passwdTest the interception layer:
LD_PRELOAD=./CyberShield.so nano /etc/shadowCyberShield may be useful for:
- local security research
- defensive systems experimentation
- file protection demonstrations
- runtime hardening prototypes
- educational work around encryption and process control
CyberShield is an actively structured security project and may continue evolving as new defensive ideas, hardening strategies, and runtime protections are explored.
Distributed under the MIT License.
Ali Firas (thesmartshadow) Phantom Force Team