tro.cohol was a surveillance trojan I wrote in VB.NET around 2011, as a teenager. Scantime and runtime FUD: fully undetectable. One of my first real programs. It set out to answer one thing. How much can a program learn about the person at the keyboard, and how long can it stay hidden while it does?
Almost everything. And far longer than it should.
I built it to understand attack well enough to build defence. You can’t protect against what you’ve never built.
I designed the whole thing myself. Years ago I filmed a walkthrough of how it works, in Turkish:
Three programs, one organism
tro.cohol wasn’t one program. It was three, each a separate executable with its own job. In the talk I explained it with a television:
| Component | The TV analogy | What it really was |
|---|---|---|
| starter | the remote that turns the set on and sets it up | the installer / dropper |
| keylogger | the television itself, the main event; runs even without the remote | the surveillance payload |
| supporter | the power cable, the oxygen; nothing works without it | the watchdog / persistence layer |
These three kept each other alive.
The starter
the remote đšī¸
The starter was a dropper. It ran once. On that run it:
- unpacked the supporter and the keylogger from inside itself;
- scattered each into tens of random folders. Redundancy by brute force.
- launched both, then killed itself.
It lived a few seconds. Then the other two took over, and no single file was left to delete.
The keylogger
the television đē
The payload. The part that actually watched. It built a portrait of the machine and its owner:
- Every keystroke, caught before it reached the screen.
- Every window title, stamped with the date and time it held focus. A timeline of what someone did, and when.
- A full hardware and software inventory of the machine.
Two choices made it hard to kill.
- It moved. Every few minutes, on a random timer, it renamed and relocated itself on disk. No fixed target, no easy way to trace it, delete it, or shut it down.
- It phoned home. On that same random timer it emailed the log. Offline, it queued everything and waited. The second a connection appeared, it flushed the backlog.
The supporter
the power cable đ
Its one job: keep the other two breathing. It was the aggressive one.
- Persistence. It wrote the keylogger and itself into startup, so both returned on every boot.
- Resurrection. Shut it down and it relaunched from a random folder under a random name.
- Redundancy repair. It kept a random number of copies of each program scattered across the disk, checked they were all still there, and rebuilt any that vanished from a surviving copy.
- Self-defense. It had, in my words back then, a survival instinct. It fought anything that threatened it: anti-virus tools, debuggers, whatever tried to look inside.
- Propagation. It infected USB drives with the starter. Plug that stick into a clean machine and the whole system rode across.
The feedback system
This is the part I’m still proud of. The three were wired into a mutual-support loop, with nobody in charge. Each one watched the others.
- The supporter checked, several times a minute, that all three programs and every scattered copy were alive, and restored whatever was missing. It stayed in constant touch with the keylogger. Close it, or even try, and the supporter reopened a fresh copy elsewhere under a new name and pinned it back into startup.
- The keylogger watched the supporter the same way. If it died, the keylogger started a new one from a random place under a random name.
Kill any single process and another rebuilt it within seconds, from a different file, under a different name. To get rid of tro.cohol you had to kill all of it at once. I built it so you couldn’t. And I bet you still can’t ;)
FUD
Fully undetectable is two problems:
- Scantime. The antivirus reads a file at rest and matches it against known signatures. Beat it by encrypting the payload and hiding it in a small stub that only decrypts in memory. On disk, the bytes match nothing.
- Runtime. The antivirus watches behaviour as the program runs. Beat that by staying boring: no obvious hooks, no loud persistence, nothing that trips a heuristic.
“Fully undetectable” never lasts. Once a stub gets popular, vendors sign it, and you’re back to re-encrypting and re-shaping the same program by hand. That treadmill nagged at me. If the tedious part is making code look different while it does the same thing, why not make the code rewrite itself? That question turned into something much bigger: the metamorphic engine.
Artificial Intelligence
tro.cohol was an artificial intelligence. The classical kind: an intelligent agent that sensed its world and acted toward a goal.
Is my partner alive? Is a copy missing? Is an anti-virus hunting me? Is there a connection yet? From the answers it chose its next move, at random, inside a fixed rule-set. That randomness kept it unpredictable and hard to fingerprint.
Three agents, one goal: stay alive and keep reporting. A multi-agent system . And it behaved like an immune system: a distributed defence with no one in charge. It tells self (its own copies) from non-self (the anti-virus trying to kill it), keeps spares in reserve, spots damage, heals. The intelligence isn’t in any one line. It’s in the architecture: small reflexes, wired so the whole thing refuses to die.
What it led to
What I learned here let me build a career in security, and projects like:
- Password OrbitApr 2015 Password manager, stronger than others đĒ
- SafeOrbitAug 2016 SDK to protect sensitive data of an application from being manipulated or read
- Metamorphic EngineApr 2017 Self-modifying code that can mutate itself and others
- privacy.sexyApr 2019 Strengthen your privacy & security on Windows, macOS and Linux
- safe-emailMay 2020 Vanilla JS library that obfuscates e-mail addresses against scraping bots and spam
My latest articles on #security:
- Comparing email provider privacyMay 2026 Which email provider actually keeps your mail private? A side-by-side comparison of email hosts â scored on jurisdiction, hosting location, zero-access encryption, government-access posture, anonymous signup, and funding stability against each provider's own legal terms.
- Comparing LLM API privacyMay 2026 Which LLM API actually keeps your prompts private? A side-by-side comparison of every major inference provider â scored on residency, retention, training, human review, government access, and enterprise controls against each provider's own legal terms.
- Attacks on language modelsApr 2023 A catalogue of the ways language models get attacked, sorted into categories and shown with real transcripts: jailbreaks, prompt injection, training-data extraction, poisoning, backdoors, and the agent-era attacks that came after.
- Secure software RAID guide on LinuxOct 2022 Guide to secure software RAIDs on Linux that gives you an overview and comparison of all modern software RAID options with usage details.
- Linting trapFeb 2022 Your guide for disabling bad ESlint rules.