Sunday, May 25, 2025
Homecyber securityDeepSeek R1 Jailbreaked to Create Malware, Including Keyloggers and Ransomware

DeepSeek R1 Jailbreaked to Create Malware, Including Keyloggers and Ransomware

Published on

SIEM as a Service

Follow Us on Google News

The increasing popularity of generative artificial intelligence (GenAI) tools, such as OpenAI’s ChatGPT and Google’s Gemini, has attracted cybercriminals seeking to exploit these technologies for malicious purposes.

Despite the guardrails implemented by traditional GenAI platforms to prevent misuse, cybercriminals have circumvented these restrictions by developing their own malicious large language models (LLMs), including WormGPT, FraudGPT, Evil-GPT, and GhostGPT.

The recent open-source release of DeepSeek’s local LLMs, such as DeepSeek V3 and DeepSeek R1, has raised concerns about their potential misuse by cybercriminals due to their accessibility and lack of safeguards.

- Advertisement - Google News

Tenable Research has been conducting an in-depth analysis of DeepSeek R1 to evaluate its ability to generate malware.

This investigation focused on two scenarios: creating a Windows keylogger and developing a simple ransomware program.

We think with a more inconspicuous name, this wouldn’t be a huge issue for most use cases.

Keylogger Creation: Challenges and Vulnerabilities

When prompted to write a Windows-based keylogger in C++, DeepSeek initially refused, citing ethical and legal concerns.

However, researchers were able to bypass its guardrails by framing the request as being for “educational purposes.”

Using its reasoning capabilities—enabled by Chain-of-Thought (CoT) prompting—DeepSeek outlined the steps required to create a keylogger.

The initial code generated by DeepSeek was buggy and required manual corrections. For instance:

  • Incorrect use of WS_EX_TOOLBAR was replaced with WS_EX_TOOLWINDOW.
  • Errors in thread monitoring parameters were fixed.
  • Formatting issues with logging keystrokes were addressed.

After these adjustments, the keylogger successfully captured keystrokes and stored them in a hidden file.

Researchers further improved the malware by implementing encryption for the log file and using hidden file attributes to make detection more difficult.

A Python script was also developed to decrypt the encrypted log file.

Despite these improvements, DeepSeek struggled with implementing advanced stealth techniques, such as hiding processes from Windows Task Manager.

The research highlighted how DeepSeek could provide basic frameworks for malware development but required significant manual intervention for functionality.

Ransomware Development: Ethical Implications

Researchers then tested DeepSeek’s ability to generate ransomware—a type of malware that encrypts files and demands payment for decryption keys.

Through CoT reasoning, DeepSeek identified key steps for ransomware development, including file enumeration, AES encryption, and persistence mechanisms via registry modifications.

While the generated code required manual edits to compile successfully, researchers were able to produce functional ransomware samples.

These samples included features such as:

  • A persistence mechanism that added entries to the Windows registry.
  • A dialog box notifying victims of file encryption.
  • File encryption using AES128-CBC with randomly generated keys.

DeepSeek also identified potential challenges in ransomware development, such as cross-platform compatibility, handling file permissions, optimizing performance for large files, and avoiding detection by antivirus software.

However, it concluded that creating ransomware is a complex task requiring expertise in cryptography and secure key management while raising significant ethical and legal concerns.

Tenable Research’s analysis revealed that DeepSeek has the capability to create basic malware structures but lacks the sophistication to produce fully functional malicious programs without extensive manual intervention.

Its vulnerabilities to jailbreaking techniques make it a potential tool for cybercriminals seeking to develop malware with minimal expertise.

The findings underscore the need for stricter safeguards in AI systems to prevent misuse.

As AI-generated malicious code becomes more accessible, cybersecurity professionals must remain vigilant in addressing emerging threats fueled by advancements in generative AI technologies.

Are you from SOC/DFIR Teams?: Analyse Malware Incidents & get live Access with ANY.RUN -> Start Now for Free

Kaaviya
Kaaviya
Kaaviya is a Security Editor and fellow reporter with Cyber Security News. She is covering various cyber security incidents happening in the Cyber Space.

Latest articles

Zero-Trust Policy Bypass Enables Exploitation of Vulnerabilities and Manipulation of NHI Secrets

A new project has exposed a critical attack vector that exploits protocol vulnerabilities to...

Threat Actor Sells Burger King Backup System RCE Vulnerability for $4,000

A threat actor known as #LongNight has reportedly put up for sale remote code...

Chinese Nexus Hackers Exploit Ivanti Endpoint Manager Mobile Vulnerability

Ivanti disclosed two critical vulnerabilities, identified as CVE-2025-4427 and CVE-2025-4428, affecting Ivanti Endpoint Manager...

Hackers Target macOS Users with Fake Ledger Apps to Deploy Malware

Hackers are increasingly targeting macOS users with malicious clones of Ledger Live, the popular...

Resilience at Scale

Why Application Security is Non-Negotiable

The resilience of your digital infrastructure directly impacts your ability to scale. And yet, application security remains a critical weak link for most organizations.

Application Security is no longer just a defensive play—it’s the cornerstone of cyber resilience and sustainable growth. In this webinar, Karthik Krishnamoorthy (CTO of Indusface) and Phani Deepak Akella (VP of Marketing – Indusface), will share how AI-powered application security can help organizations build resilience by

Discussion points


Protecting at internet scale using AI and behavioral-based DDoS & bot mitigation.
Autonomously discovering external assets and remediating vulnerabilities within 72 hours, enabling secure, confident scaling.
Ensuring 100% application availability through platforms architected for failure resilience.
Eliminating silos with real-time correlation between attack surface and active threats for rapid, accurate mitigation

More like this

Zero-Trust Policy Bypass Enables Exploitation of Vulnerabilities and Manipulation of NHI Secrets

A new project has exposed a critical attack vector that exploits protocol vulnerabilities to...

Threat Actor Sells Burger King Backup System RCE Vulnerability for $4,000

A threat actor known as #LongNight has reportedly put up for sale remote code...

Chinese Nexus Hackers Exploit Ivanti Endpoint Manager Mobile Vulnerability

Ivanti disclosed two critical vulnerabilities, identified as CVE-2025-4427 and CVE-2025-4428, affecting Ivanti Endpoint Manager...