Heretic is an educational and fully reversible ransomware for TempleOS and written in HolyC.
The “encryption” mechanism is based solely on a fixed-key XOR operation applied only to text files (.TXT). Running the program twice on the same files restores the original content.
This project is intended strictly for educational and research purposes.
- Traverses the Home directory inside TempleOS
- Identifies .TXT files
- Applies a byte-by-byte XOR using a fixed key ("Davisanism")
- Overwrites the file contents
- The process is fully reversible by running the XOR operation again
- TempleOS (ISO and VM disk in qcow2 format included)
- QEMU (to run the VM)
- mtools (to run the sync commands and copy Heretic.HC)
Setting up the environment:
#Install the required environment:
./install.sh
#Synchronise the project files to the VM disk:
./sync.sh
#Run TempleOS VM in QEMU:
./run.shRunning Heretic:
//Load Heretic inside TempleOS
#include "Heretic.HC";
//Screen will clear itself after successfully loading the ransomware.
//It won't be automatically executed, it must be invoked running:
Heretic;- The "Encryption Key" (XOR Key) can be found (and modified) in the
Key.HCfile. - Running Heretic() once “encrypts” the files.
- Running it again restores them to their original state.
Heretic is an educational toy project.
It does not implement secure cryptography, does not attempt to evade detection, and must not be used outside testing or learning environments.