Pith. sign in

REVIEW 2 cited by

MCGMark: An Encodable and Robust Online Watermark for Tracing LLM-Generated Malicious Code

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2408.01354 v2 pith:CIBYMC5U submitted 2024-08-02 cs.CR cs.SE

classification cs.CRcs.SE
keywords codemaliciousllmsmcgmarkencodableoutputrobustnesssoftware
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

With the advent of large language models (LLMs), numerous software service providers (SSPs) are dedicated to developing LLMs customized for code generation tasks, such as CodeLlama and Copilot. However, these LLMs can be leveraged by attackers to create malicious software, which may pose potential threats to the software ecosystem. For example, they can automate the creation of advanced phishing malware. To address this issue, we first conduct an empirical study and design a prompt dataset, MCGTest, which involves approximately 400 person-hours of work and consists of 406 malicious code generation tasks. Utilizing this dataset, we propose MCGMark, the first robust, code structure-aware, and encodable watermarking approach to trace LLM-generated code. We embed encodable information by controlling the token selection and ensuring the output quality based on probabilistic outliers. Additionally, we enhance the robustness of the watermark by considering the structural features of malicious code, preventing the embedding of the watermark in easily modified positions, such as comments. We validate the effectiveness and robustness of MCGMark on the DeepSeek-Coder. MCGMark achieves an embedding success rate of 88.9% within a maximum output limit of 400 tokens. Furthermore, it also demonstrates strong robustness and has minimal impact on the quality of the output code. Our approach assists SSPs in tracing and holding responsible parties accountable for malicious code generated by LLMs.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 2 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. MOCHA: Are Code Language Models Robust Against Multi-Turn Malicious Coding Prompts?

    cs.CL 2025-07 conditional novelty 7.0 of 10

    MOCHA is a benchmark of 10.5K malicious coding prompts, including multi-turn decomposition attacks, showing code LLMs reject these incremental attacks at much lower rates and that fine-tuning on the benchmark improves...

  2. Disappearing Ink: Obfuscation Breaks N-gram Code Watermarks in Theory and Practice

    cs.CR 2025-07 conditional novelty 6.0 of 10

    Obfuscation reduces detection of N-gram watermarked code to random guessing, and the authors prove this is unavoidable under a distribution consistency assumption.

Pith tools