{"id":7247,"date":"2025-09-27T10:03:27","date_gmt":"2025-09-27T10:03:27","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2025\/09\/27\/llm-based-lamehug-malware-dynamically-generate-commands-for-reconnaissance-and-data-theft\/"},"modified":"2025-09-27T10:03:27","modified_gmt":"2025-09-27T10:03:27","slug":"llm-based-lamehug-malware-dynamically-generate-commands-for-reconnaissance-and-data-theft","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2025\/09\/27\/llm-based-lamehug-malware-dynamically-generate-commands-for-reconnaissance-and-data-theft\/","title":{"rendered":"LLM-Based LAMEHUG Malware Dynamically Generate Commands for Reconnaissance and Data Theft"},"content":{"rendered":"<p>    LLM-Based LAMEHUG Malware Dynamically Generate Commands for Reconnaissance and Data Theft<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p>A sophisticated new threat has emerged in the cybersecurity landscape that represents a significant evolution in malware development.<\/p>\n<p>The LAMEHUG malware family, first identified by CERT-UA in July 2025, marks a concerning advancement in cyber attack methodology by integrating artificial intelligence directly into its operational framework.<\/p>\n<p>Unlike traditional malware that relies on static, pre-programmed instructions, LAMEHUG leverages large language models hosted on Hugging Face to dynamically generate commands for reconnaissance, data theft, and system manipulation in real-time.<\/p>\n<p>This innovative approach transforms how malicious software operates by enabling attacks that can adapt their behavior based on the specific environment they encounter.<\/p>\n<p>The <a href=\"https:\/\/cybersecuritynews.com\/chatgpt-powered-malware-analysis\/\" target=\"_blank\" rel=\"noreferrer noopener\">malware<\/a> targets Windows environments through carefully crafted spear-phishing campaigns, disguising itself as legitimate applications such as AI image generators or canvas tools.<\/p>\n<p>Once deployed, LAMEHUG systematically harvests sensitive information including credentials, system configurations, and documents while continuously evolving its attack patterns to evade detection mechanisms.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjzgrBFCycfu8-Ug2KCJSZoISvGle6ztY6BAj5w6oUKJE-rNybOsvoHn26aAtiecT0w40TUyKNfNSlqjUFDUJMwbhCQHZadlWEzexdDojGgV5T_L3uqYKUCHJz9KLMeiWKJ1EA2BzzDHFTSuZ812iwDZMFsmDSElM1q_H53xMaMmj56alml2jPO-0RGFnI\/s16000\/LAMEHUG%2520Main%28%29%2520and%2520LLM_QUERY_EX%2520Thread%2520%28Source%2520-%2520Splunk%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">LAMEHUG Main() and LLM_QUERY_EX Thread (Source \u2013 Splunk)<\/figcaption><\/figure>\n<\/div>\n<p>Splunk analysts <a href=\"https:\/\/www.splunk.com\/en_us\/blog\/security\/lamehug-ai-driven-malware-llm-cyber-intrusion-analysis.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">identified<\/a> that LAMEHUG\u2019s deployment strategy involves sophisticated social engineering techniques, presenting itself through filenames like \u201cAI_generator_uncensored_Canvas_PRO_v0.9.exe\u201d and \u201cAI_image_generator_v0.95.exe\u201d to capitalize on current interest in AI-powered applications.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEi_HD4cQ1flphikxHTTepUQITlM3oE_aQercIKXK_bya72ziSHKROIIyscHc0xVTQBrV-iX2sq8dzpvvxzuSzKxi1PF_VOa1mPEK5-gOtRia61bJI2IbUvYr-IjbLqQq8jSsujoSst1Apwmi1cWblnO6pYUc-wfWsRDgl0zeQCSZD2GbhHhBXfyzIWvoHc\/s16000\/The%2520LLM%2520Query%2520Setup%2520of%2520LAMEHUG%2520%28Source%2520-%2520Splunk%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">The LLM Query Setup of LAMEHUG (Source \u2013 Splunk)<\/figcaption><\/figure>\n<\/div>\n<p>The malware\u2019s ability to generate contextually appropriate commands through LLM queries makes it particularly dangerous, as it can adapt to different system configurations and <a href=\"https:\/\/cybersecuritynews.com\/strengthening-security-measures-in-digital-advertising-platforms-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">security measures<\/a> without requiring updates from its operators.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-dynamic-command-generation-through-llm-integration\"><strong>Dynamic Command Generation Through LLM Integration<\/strong><\/h2>\n<p>The most distinctive feature of LAMEHUG lies in its unprecedented use of large language models to generate malicious commands dynamically.<\/p>\n<p>The malware connects to the Qwen 2.5-Coder-32B-Instruct model through HuggingFace\u2019s API infrastructure, essentially weaponizing legitimate AI services for malicious purposes.<\/p>\n<p>This integration occurs through the LLM_QUERY_EX() function, which constructs specific prompts designed to elicit Windows administrative commands from the AI model.<\/p>\n<p>The malware operates by sending carefully crafted prompts that instruct the LLM to act as a \u201cWindows systems administrator\u201d and generate commands for specific malicious objectives.<\/p>\n<p>For system reconnaissance, LAMEHUG prompts the AI to create commands that establish the directory \u201cC:ProgramDatainfo\u201d and gather comprehensive system information including hardware specifications, running processes, network configurations, and Active Directory domain details, all consolidated into a single text file.<\/p>\n<pre class=\"wp-block-code\"><code>def LLM_QUERY_EX():\n    prompt = {\n        'messages': [\n        {\n            'role': 'Windows systems administrator',\n            'content': 'Make a list of commands to create folder C:\\Programdata\\info and to gather computer information,\n            hardware information, process and services information, networks information, AD domain information, to execute in\n            one line and add each result to text file c:\\Programdata\\info\\info.txt. Return only commands, without markdown'}],\n        'temperature': 0.1,\n        'top_p': 0.1,\n        'model': 'Qwen\/Qwen2.5-Coder-32B-Instruct' }<\/code><\/pre>\n<p>For data collection, the malware issues subsequent prompts requesting commands to recursively copy office documents, PDFs, and text files from user directories including Documents, Downloads, and Desktop folders to the centralized collection point.<\/p>\n<p>The AI-generated responses utilize Windows utilities such as systeminfo, wmic, whoami, and dsquery for <a href=\"https:\/\/cybersecuritynews.com\/morphing-meerkat-phaas-using-dns-reconnaissance\/\" target=\"_blank\" rel=\"noreferrer noopener\">reconnaissance<\/a>, while xcopy.exe facilitates document harvesting across multiple folder paths.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhJA1Fzl1staIgSVrlSp4BxqHiUlnQO_PTvASX7gxDq6E7SQjEzRqbFcZQGTAKq2cWR0rxNaNX8L8VaPcYpAHaPujRvWtSm3ulMFGQglJXaDvplTYyvkZA0FOLyWOjHUXHLaHw-WKwIkSV4wdKSZxsj-3j5ZXe4khMP1TJbynoH6JWlXUC03kEulWb0A6Q\/s16000\/LAMEHUG%2520System%2520Information%2520Discovery%2520and%2520File%2520Collection%2520%28Source%2520-%2520Splunk%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">LAMEHUG System Information Discovery and File Collection (Source \u2013 Splunk)<\/figcaption><\/figure>\n<\/div>\n<p>This dynamic approach ensures that the malware can adapt to different Windows environments and execute contextually appropriate commands based on the AI model\u2019s understanding of system administration tasks.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjanWz88Y_tcfbFgu_b88fWFZF3-N8wT75Ol2sMr-RKPdP-EupQfAo2vC-3hCF641q9MHp8Zya0GmiPBr8RV9myAdTUdRMJvaL0XXtCOVMvDpOawmiMKPug5lOEWDQS7072Sggijvsq3rCVnsb8z1mrj7zuiFgOEXW-PwRVfFRreCwYdMTYh-vHVe8_TEE\/s16000\/LAMEHUG%2520SSH%2520C2%2520Server%2520%28Source%2520-%2520Splunk%29.webp?ssl=1\" alt=\"\"><figcaption class=\"wp-element-caption\">LAMEHUG SSH C2 Server (Source \u2013 Splunk)<\/figcaption><\/figure>\n<\/div>\n<p>The collected information is subsequently exfiltrated through multiple channels, including SSH connections to remote servers using hardcoded credentials, or through HTTPS POST requests to command-and-control infrastructure.<\/p>\n<p>Some variants encode their LLM prompts in Base64 format and utilize different exfiltration endpoints, demonstrating the malware\u2019s operational flexibility and the operators\u2019 understanding of evasion techniques.<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 89%,rgb(169,184,195) 100%)\"><strong>Follow us on\u00a0<a href=\"https:\/\/news.google.com\/publications\/CAAqMggKIixDQklTR3dnTWFoY0tGV041WW1WeWMyVmpkWEpwZEhsdVpYZHpMbU52YlNnQVAB?hl=en-IN&amp;gl=IN&amp;ceid=IN:en\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Google News<\/a>,\u00a0<a href=\"https:\/\/www.linkedin.com\/company\/cybersecurity-news\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">LinkedIn<\/a>,\u00a0and\u00a0<a href=\"https:\/\/x.com\/cyber_press_org\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">X<\/a>\u00a0to Get More Instant Updates<\/strong>,\u00a0<strong>Set CSN as a Preferred Source in\u00a0<a href=\"https:\/\/www.google.com\/preferences\/source?q=cybersecuritynews.com\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Google<\/a>.<\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/llm-based-lamehug-malware-dynamically-generate-commands\/\">LLM-Based LAMEHUG Malware Dynamically Generate Commands for Reconnaissance and Data Theft<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Tushar Subhra Dutta<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/llm-based-lamehug-malware-dynamically-generate-commands\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>LLM-Based LAMEHUG Malware Dynamically Generate Commands for Reconnaissance and Data Theft A sophisticated new threat has emerged in the cybersecurity landscape that represents a significant evolution in malware development. The LAMEHUG malware family, first identified by CERT-UA in July 2025, marks a concerning advancement in cyber attack methodology by integrating artificial intelligence directly into its [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,63,649],"tags":[130],"class_list":["post-7247","post","type-post","status-publish","format-standard","hentry","category-cyber-security","category-cyber-security-news","category-threats","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/7247"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=7247"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/7247\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=7247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=7247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=7247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}