veiled_penguin is a Linux Crypter written in C++17. It recursively traverses a Linux file system, identifying and listing files that meet specific criteria for encryption. This tool is designed for educational and research purposes, particularly in the context of penetration testing and red teaming.
- Recursive File System Traversal: Explores the Linux file system to identify potential encryption targets.
- Targeted Encryption: Selects files based on predefined criteria, avoiding critical system files to maintain system stability.
- Key Generation: Generates a unique 20-byte key for each file requiring encryption.
- XOR Encryption: Encrypts files using a XOR cipher with the generated key.
- Directory Exclusion: Avoids specific directories (e.g.,
/boot,/usr/lib,/proc) to prevent system damage. - Permission Awareness: Checks for read permissions before traversing directories and write permissions before attempting to encrypt files.
- Symlink Avoidance: Actively avoids symbolic links to prevent potential issues.
- Extension Filtering: Excludes files with specific extensions (e.g.,
.img,.elf,.so) and files without extensions.
- A Linux environment
- g++ compiler
- CMake (optional, for building with a Makefile)
- C++17 support
-
Clone the repository:
git clone https://github.com/ice-wzl/veiled_penguin.git cd veiled_penguin -
Compile the code:
-
Dynamic Linking:
g++ veiledpenguin.cpp -o veiledpenguin -std=c++17 -lstdc++fs
-
Static Linking:
g++ veiledpenguin.cpp -o veiledpenguin -std=c++17 -lstdc++fs -static -static-libstdc++
-
Using Makefile:
make dynamic # for dynamic linking # or make static # for static linking
-
-
Run the compiled executable:
./veiledpenguin
Important Considerations:
- The tool will recursively traverse the file system and encrypt eligible files.
- Avoid running this tool on production systems without thorough testing.
- Be aware that encrypted files are not recoverable.
| Testing Status | Distro |
|---|---|
| Working | Ubuntu 22.04 |
| Working, use Static | CentOS 7 |
| Not Tested | CentOS 8 |
| Not Tested | Rocky |
| Not Tested | Debian |
| Not Tested | RHEL |
- All tested times are sub 5 minutes on systems with default packages, binaries, and many user generated files.
Contributions are welcome! If you'd like to contribute to veiled_penguin, please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and test them thoroughly.
- Submit a pull request with a clear description of your changes.
This project is licensed under the MIT License - see the LICENSE file for details.