### Comment:
What is the purpose of a keylogger in malware?

### REPLY:
The purpose of a keylogger in malware is to collect sensitive information such as login credentials, banking details, social security numbers, or personal conversations. This information can be sold on the dark web or used for various malicious activities like blackmail or identity theft.