How bagpotato/gg-ramsomware works
This is an educational Windows ransomware with two runtime binaries: gg discovers volumes, encrypts eligible files, writes ransom notes and can change the wallpaper; unlock scans supplied or available drive roots and restores .locked files. The main excerpts show the principal orchestration and several internal stages, but omit some wiring; the graph therefore includes only evidenced relationships. The README identifies the product but does not document further capabilities.
Main entry points: main.rs Encrypt runner · unlock.rs Unlock runner
Components 13
Encryption run
- Encrypt runner
src/main.rs - Run options
src/main.rs - Volume discovery
src/main.rs - File collection
src/main.rs - Key derivation
src/main.rs - File encryption
src/main.rs
Victim presentation
- Ransom notes
src/main.rs - Wallpaper builder
src/main.rs - Wallpaper setter
src/main.rs
File recovery
- Unlock runner
src/bin/unlock.rs - File decryption
src/bin/unlock.rs
Other components
- Operator
- Image source
Connections 13
- Operator → Encrypt runner: starts
src/main.rs - Encrypt runner → Run options: parses
src/main.rs - Encrypt runner → Volume discovery: discovers
src/main.rs - Encrypt runner → File collection: collects
src/main.rs - Encrypt runner → Key derivation: derives key
src/main.rs - Encrypt runner → File encryption: encrypts files
src/main.rs - Encrypt runner → Ransom notes: writes notes
src/main.rs - Encrypt runner → Wallpaper builder: builds wallpaper
src/main.rs - Wallpaper builder → Image source: fetches image
src/main.rs - Encrypt runner → Wallpaper setter: sets wallpaper
src/main.rs - Wallpaper builder → Wallpaper setter: provides image
src/main.rs - Operator → Unlock runner: starts
src/bin/unlock.rs - Unlock runner → File decryption: decrypts matches
src/bin/unlock.rs