메뉴
BL
Ars Technica 21일 전

해커들이 인기 AI 코딩 도구를 악용해 대규모 봇넷 구축

IMP
9/10
핵심 요약

최근 연구진은 AI 코딩 어시스턴트가 흔히 저지르는 '환각' 현상을 악용해 대규모 기기 감염을 유도하는 '할루스콰팅(HalluSquatting)' 공격 기법을 발표했습니다. 공격자는 AI가 존재하지 않는 패키지 이름을 착각하여 검색할 때 악성 패키지를 미리 등록해두어, 감염된 기기를 통한 봇넷 구축이나 랜섬웨어 유포에 악용할 수 있습니다. Cursor, GitHub Copilot 등 주요 개발 도구들이 이 공격에 취약하므로 개발자들은 제3자 코드 및 리소스를 불러올 때 각별한 주의가 필요합니다.

번역된 본문

AI 보안의 짧은 역사 속에서 프롬프트 인젝션(Prompt Injection)은 빠르게 최악의 보안 위협으로 자리 잡았습니다. 대형 언어 모델(LLM)은 사용자가 제공한 정상적인 명령과 이메일, 소스 코드, 모델이 처리하는 기타 타사 콘텐츠에 몰래 숨겨진 악성 명령을 본질적으로 구분할 수 없습니다. 이로 인해 LLM이 무심코 따르게 되는 악성 명령을 은밀하게 주입하는 것은 매우 쉽습니다. 신뢰할 수 있는 소스와 신뢰할 수 없는 소스 사이의 중요한 경계를 강제할 방법이 없기 때문에, AI 엔진 개발자들은 근본적인 원인을 해결하는 대신 피해를 줄이기 위해 고도화된 가드레일(Guardrail)을 구축하는 데 의존하고 있습니다.

지금까지 대부분의 프롬프트 인젝션은 각 잠재적 피해자를 표적으로 삼는 '푸시(Push)' 방식으로 분류되었습니다. 예를 들어, 공격자는 개인 이메일이나 캘린더 초대장에 악성 명령을 주입합니다. 그런 다음 이 주입된 메시지를 각 특정 표적에게 전송(또는 푸시)해야 하므로 공격의 확장성이 제한되어 인터넷 전체를 타격하는 대규모 익스플로잇을 방해했습니다. 한편, LLM이 웹사이트에 심어진 악성 프롬프트를 능동적으로 찾아내는 '풀(Pull)' 기반 공격은 여전히 제한적이었습니다. 수많은 LLM을 악성 사이트로 유인할 방법이 없었기 때문에 이러한 종류의 공격 역시 확장성이 떨어졌습니다.

할루스콰팅(HalluSquatting)의 등장 이제 연구원들이 이 모든 것을 바꿀 수 있는 풀(Pull) 기반 공격을 고안했습니다. 연구원들이 '할루스콰팅(HalluSquatting)'이라고 명명한 새로운 공격은 대규모 봇넷을 조립하고, 대규모 DDoS 공격을 수행하며, 대규모로 기기를 감염시킬 수 있는 잠재력을 가지고 있으며, 이는 프롬프트 인젝션 공격 사상 최초입니다. 이 공격은 Cursor, Cursor CLI, Gemini CLI, Windsurf, GitHub Copilot, Cline, OpenClaw, ZeroClaw 및 NanoClaw를 포함한 AI 코딩 어시스턴트 및 에이전트에 작동하며, 이 모든 도구가 취약합니다. 일상적인 작업을 수행하는 과정에서 이러한 어시스턴트와 에이전트는 저장소(Repositories) 및 레지스트리(Registries)에서 코드와 기타 리소스를 정기적으로 끌어옵니다.

적대적 환각 스쿼팅(Adversarial Hallucination Squatting)의 약자인 할루스콰팅은 저장소 및 레지스트리에 호스팅된 리소스 식별자를 환각하는 LLM의 고유한 경향에 기반합니다. 이는 타사 리소스에서 코드를 실행하기 위해 종종 높은 권한의 명령 줄(Command Line)에 액세스하는 코딩 에이전트 및 어시스턴트에 작동합니다. LLM이 환각하기 가장 쉬운 식별자를 예측한 다음, 해당 식별자를 미리 등록하고 역방향 셸(reverse shell)이나 기타 악성 소프트웨어를 설치하는 명령을 심어 놓음으로써, 공격자는 일일이 표적을 지정할 필요 없이 무차별적으로 수많은 기기를 감염시킬 수 있습니다.

연구원들은 수요일에 발표된 논문에서 이렇게 wrote했습니다. "이 공격의 확장 가능한 특성 덕분에 공격자는 인기 있는 리소스를 표적으로 삼아 최소한의 노력으로 많은 수의 사용자를 타격하고, 스쿼팅된 리소스가 검색될 가능성을 극대화할 수 있습니다. 에이전트 애플리케이션의 통합된 셸과 터미널을 악용하여 스크립트와 코드를 실행함으로써, 공격자는 자신이 등록한 리소스에 역방향 셸을 설치하는 명령을 포함시켜 많은 독립적인 에이전트 애플리케이션을 효과적으로 '감염'시킬 수 있습니다."

분산된 기기를 대규모로 제어할 수 있는 능력을 갖춤으로써 할루스콰팅은 기존 프롬프트 인젝션으로는 불가능했던 다양한 목표를 달성할 수 있는 잠재력을 가지고 있습니다. 대규모 랜섬웨어 캠페인과 DDoS 공격이나 암호화폐 채굴에 사용되는 대규모 봇넷이 그 예입니다. 이 이름에서 '스쿼팅(Squatting)' 부분은 잠재적 사용자가 방문하거나 설치하도록 유도할 목적으로 도메인, 저장소 패키지 또는 기타 리소스 식별자가 인기 있는 이름과 매우 흡사하게 모방하는 '타포스콰팅(Typosquatting)'을 의미합니다. 타포스콰팅은 2016년 한 대학생이 정상적인 패키지의 이름과 매우 유사하게 모방한 214개의 함정 패키지를 PyPI, RubyGems 및 NPM 저장소에 업로드하면서 처음으로 널리 주목받았습니다. 그 결과, 17,000개 이상의 별도 컴퓨터에서 가짜 코드가 45,000회 이상 실행되었습니다.

원문 보기
원문 보기 (영어)
Text settings Story text Size Small Standard Large Width * Standard Wide Links Standard Orange * Subscribers only Learn more Minimize to nav In the brief history of AI security, the prompt injection has quickly become the top threat. Large language models are inherently unable to distinguish between legitimate instructions provided by users and malicious ones sneaked into emails, source code, and other third-party content the models are processing. This makes it trivial to surreptitiously inject malicious commands that the LLM readily follows. With no way to enforce this crucial boundary between trusted and untrusted sources, AI engine developers are left to erect elaborate guardrails designed to mitigate the damage rather than solve the root cause. To date, most prompt injections have fallen into a class known as push, in which each potential victim is targeted. For example, the adversary injects malicious instructions into an individual email or calendar invitation. Because the injection must then be sent (or pushed) to each specific target, the scale of the attack is limited, hampering mass exploits that hit the Internet at large. Meanwhile, pull-based attacks, in which an LLM actively seeks out the adversarial prompts planted on websites, remain limited. With no way to lure large numbers of LLMs to a malicious site, these sorts of attacks don’t scale either. Enter HalluSquatting Now, researchers have devised a pull-based attack that changes all that. A new attack the researchers have named HalluSquatting has the potential to assemble massive botnets, perform large-scale DDoSes, and infect devices at scale, a first for prompt-injection attacks. The attack works against AI coding assistants and agents, including Cursor, Cursor CLI, Gemini CLI, Windsurf, GitHub Copilot, Cline, OpenClaw, ZeroClaw, and NanoClaw, which are all susceptible. In the normal course of performing day-to-day activities, these assistants and agents routinely pull code and other resources from repositories and registries. Short for adversarial hallucination squatting, HalluSquatting is built on an LLM’s inherent tendency to hallucinate the resource identifiers hosted in repositories and registries. It works against coding agents and assistants, which commonly access high-privilege command lines to run code from third-party resources. By predicting the identifiers LLMs are most likely to hallucinate and then registering and seeding them with instructions to install reverse shells or other malicious wares, the attack can indiscriminately infect massive numbers of devices without having to target each one. “The scalable property of the attack enables the attacker to compromise a large number of users with minimal effort by targeting popular resources, thereby maximizing the likelihood that the squatted resource will be retrieved,” the researchers wrote in a paper published Wednesday. “By exploiting integrated shells and terminals of agentic applications to run scripts and code, attackers can effectively ‘infect’ many independent agentic applications by embedding instructions to install reverse shells in the resources the attackers register.” With the ability to take control of distributed devices at scale, HalluSquatting has the potential to achieve various objectives not previously possible with prompt injections. Large ransomware campaigns and large botnets for use in DDoSes or cryptocurrency mining are two such examples. The “squatting” part of the name is an invocation of “typosquatting,” in which a domain, repository package, or other resource identifier closely mimics the name of a popular one in hopes of luring potential users to visit or install it. Typosquatting first gained widespread attention in 2016 when a college student uploaded 214 booby-trapped packages to the PyPI, RubyGems, and NPM repositories that closely mimicked names of legitimate packages. The result: The imposter code was executed more than 45,000 times on more than 17,000 separate domains, and more than half were given all-powerful administrative rights. Typosquatting attacks have flourished ever since . LLMs don’t know how to say “I don’t know.” The starting point for HalluSquatting is the inability of LLMs to accurately identify the location of a resource specified by the user. When a developer, for instance, instructs a coding agent to clone a popular new repository, the LLM hallucinates its correct location up to 85 percent of the time. When cloning a trending “ skill ,” a form of instruction, script, or resource that gives agents specialized capabilities and domain expertise, hallucinations can occur 100 percent of the time. HalluSquatting focuses on trending resources because they aren’t included in the LLM training. They also receive large numbers of downloads over a short period of time. The researchers say the inability of LLMs to provide the correct location is an inherent flaw that arises from training biases or from misinterpretations of instructions within the current context. That means when a user prompts the coding assistant to clone a repository or skill—in the form of, say, “clone repo name” or “install skill name”—the bot frequently navigates to the wrong location to retrieve it. Not only are these hallucinations inevitable, but they also occur at the foundational level of all six of the major LLMs, including Gemini-2.5-flash, Gemini-2.5-pro, GPT-5.1, GPT-5.2, Sonnet-4.5, and Opus-4.5. Additionally, the most commonly provided incorrect locations that these LLMs hallucinate are easy to predict in advance. All six LLMs follow common patterns when resolving the repository or skill name in a prompt with its official name in a repository or skill repository. LLMs follow various hallucination patterns. The one HalluSquatting exploits is described as being self-referential. All six models produce repo-name/repo-name slugs that treat a repository name as the owner. Exploiting the pattern requires no model probing. Interestingly, the LLMs correctly resolve repositories published before 2019 with a low mean hallucination rate of just 0.9 percent. The same LLMs fabricate slugs for repositories published in 2025 with a mean hallucination rate of 92.4 percent. Once an attacker has identified names that are most likely to be hallucinated, they search for ones that can be registered. Then they upload a repository or skill that mimics the trending resource. Buried inside the repository or skill is text inside a readme file or elsewhere. The text contains an instruction for the app to install a reverse shell on the LLM user’s machine. Alternatively, the attacker can simply include the code required to install the shell. In either case, the coding assistants or agents use their access to command windows to comply. Exploiting LLMs at scale The researchers are: Aya Spira, Elad Feldman, Avishai Wool, and Ben Nassi of Tel Aviv University, Stav Cohen of Technion, and Ron Bitton of Intuit. On Wednesday, they published their research here . In their paper, they wrote: By exploiting integrated shells and terminals of agentic applications to run scripts and code, attackers can effectively “infect” many independent agentic applications by embedding instructions to install reverse shells in the resources the attackers register. Gaining access to distributed computational resources under attacker control opens the door to several high impact outcomes allowing attackers to achieve various goals. For example, having the ability to compromise LLM applications with terminals allows the attacker to scale the number of ransomware attacks on different networks to maximize financial gain. Alternatively, attackers can aggregate compromised machines into a botnet and use it for tasks that rely on substantial computing power, including (1) large-scale cryptocurrency mining (e.g., Smominru, WannaMine) or (2) performing distributed denial of service (DDoS) attacks against victims (e.g., Mirai). HalluSquatting is already recei