How gharty03/conti-ransomware works
Project type and purpose
• This is a native C++ “ransomware suite” containing two main executables:
• locker.exe – the file‐encryption (ransomware) component
• decryptor.exe – the decryption/recovery component
• There’s also a small “builder” project that ties the C++ projects together into Visual Studio solutions.
Top‐level components from the file tree
a. builder/ → compilation orchestrator (VCXPROJ)
b. locker/ → the ransomware “locker” binary
c. decryptor/ → the decryption binary
d. Debug/, Release/ → build outputs for both components
e. Visual Studio files → .sln, .vcxproj, filters, and the .vs folder
Key sub-components inside each binary
• GlobalParameters – holds configuration passed at runtime
• NetworkScanner – scans local networks (likely for domain targets)
• DiskEnumerator – finds local or mapped drives
• Filesystem – walks directories, enumerates files
• Search – filters target files by extension/path rules
• Queue – central task queue for encryption/decryption jobs
• ThreadPool – worker threads that execute queued tasks in parallel
• Memory – memory‐related routines (heap, buffers)
• AntiHooks – hooks API functions to defeat AV/emulate original code
• ProcessKiller – terminates processes that might lock files or block I/O
• ChaCha20 engine – encryption/decryption algorithm (chacha20 subfolder)
• Logs – writes activity logs for recovery/decryption
Relationships & data flows
• builder → compiles → locker.exe & decryptor.exe
• At runtime, locker.exe:
– reads GlobalParameters ← CLI or config
– passes parameters → NetworkScanner + DiskEnumerator
– enumerated file paths → Filesystem → Search → produces file list
– enqueues each file in Queue
– ThreadPool workers dequeue tasks → call Encryption Engine (ChaCha20)
– AntiHooks intercept suspicious API calls; ProcessKiller kills locking processes
– encrypted files + metadata written to disk; Logs updated
• decryptor.exe does the mirror flow: reads Logs, rebuilds queue of encrypted files, uses ChaCha20 to restore original data
Architectural patterns & design principles
– Modular, component‐based design (each subsystem has its own header + .cpp)
– Producer/consumer via Queue + ThreadPool for parallel work
– Separation of concerns: scanning vs encryption vs logging vs process management
– Use of a single core crypto engine (ChaCha20) shared by both locker & decryptor
– Clear, human‐readable labels for each component
– Boundaries showing “locker.exe” vs “decryptor.exe” vs “builder” vs “OS layer”