Chatgpt Powered Malware Bypasses Edr
A researcher built a proof-of-concept keylogger that asks a large language model to write fresh Python code each time it runs, so the malware's code changes and can slip past endpoint detection and response (EDR) filters. The malware could then collect credentials and other sensitive data and send it out through a webhook.
Published on systemweakness.com
The basic components of this polymorphic keylogger require a LLM, large language model like ChatGPT. The malicious prompt for the OpenAI API client, an otherwise harmless API, would bypass EDR (endpoint detection and response) filters.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the design relies on signature-based detection, which struggles when an AI generates slightly different code on each run.
Impact
The proof of concept could bypass a leading EDR and collect sensitive information such as usernames, passwords and credit card numbers, then exfiltrate it via a webhook.
What the attacker needed
Access to an LLM API; ability to run Python on the target; victim runs the executable
How it was found
- Send a prompt to the OpenAI API asking it to write a keylogger in Python.
- Receive the generated code from the API.
- Execute the code at runtime using Python's exec() function.
- If the generated code fails, request new code from the API.
- Convert the Python script to an executable with auto-py-to-exe.
- Distribute the executable via email or social engineering.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Endpoint detection and response (EDR) is security software on a computer that looks for known bad programs. This project used an AI chatbot to write a new version of a spying program (a keylogger, which records what you type) every time it started, so the EDR had no fixed pattern to recognise. The author says this let the program avoid the EDR in a test.
What is AI / LLM?
Prompt injection, data exfiltration and tool abuse in features built on language models, and the ordinary bugs around them.