### Comment:
How does ransomware encrypt files on a victim's computer?

### REPLY:
Ransomware encrypts files on a victim's computer by injecting a malicious code that collects sensitive information such as login credentials and financial data. This information is then used to encrypt the files and hold them hostage until the victim pays a ransom.