In a recent LinkedIn post, Yonathan Cohen shares a cautionary tale about the evolving security threats posed by artificial intelligence tools, detailing a personal experience where he was compromised by a malicious link provided by an AI assistant.
Cohen’s account serves as a stark warning, emphasizing that such incidents are likely to become more frequent. He recounts how an AI assistant provided him with a download command that appeared legitimate upon pasting into his terminal, only to lead him to a copycat website laden with malware.
As Yonathan Cohen notes:
“He got hacked by a link his own AI gave him. That is going to happen a lot more.”
This experience prompted Cohen to develop a solution: a skill designed to scrutinize any file before installation. He outlines the key checks his tool performs to mitigate these risks.
Analyzing the Security Vulnerabilities of AI-Generated Links
Yonathan Cohen highlights several critical areas of concern when interacting with AI-generated commands and files. His analysis focuses on the deceptive nature of lookalike domains and the inherent risks of executing commands without full understanding.
According to Yonathan Cohen, a primary vector for these attacks involves subtly manipulated web addresses:
“read the domain, character by character. Lookalike domains are the whole business model.”
Cohen argues that a fundamental security practice is to meticulously verify the destination of any link or command. His proposed solution involves a direct comparison of the provided domain against the official source, terminating the interaction if any discrepancy is found.
Understanding the True Intent of AI Prompts
Beyond domain verification, Yonathan Cohen stresses the importance of scrutinizing what AI tools are asking users to execute. He warns against commands that require pasting into a terminal, equating such requests to an attempt to gain control of a user’s machine rather than simply perform a task.
In Yonathan Cohen’s view:
“a file that tells you to paste a command into your terminal is not asking for your task. It is asking for your machine.”
He asserts that legitimate AI assistants should not require such invasive actions. Cohen’s developed skill aims to intercept and analyze these commands, ensuring they do not pose an undue risk to the user’s system.
Assessing Permissions and Data Exfiltration
Cohen further elaborates on the principle of least privilege, advising users to question the scope of access requested by any tool or file. He points out that tools should only have permissions necessary for their stated function.
Yonathan Cohen advises users to ask critical questions about the reach of a given file:
“which tools, which accounts, which files. Something that only writes emails has no reason to see your drive. If the scope is wider than the job, ask why.”
This principle extends to understanding what data is being transmitted. Cohen emphasizes that any outgoing data, whether sent, posted, uploaded, or emailed, should be clearly articulated within the file’s code. The absence of such transparency, he warns, does not imply security but rather a hidden risk.
📝 About This Content
This article is based on insights shared by Yonathan Cohen on LinkedIn.
📅 Originally posted on September 7, 2026 | View original post on LinkedIn →