Artificial intelligence is a two-faced technology. On the one hand, it is revolutionizing medicine, science and driving the development of innovative defenses in cyber security, allowing real-time detection of threats. On the other hand, the same powerful tools are finding their way into the hands of cybercriminals, becoming weapons that enhance their capabilities and change the rules of the game. The public release of large-scale language models (LLMs) such as ChatGPT has opened Pandora’s box, lowering the entry threshold for less skilled hackers and turbo-charging the operations of the most advanced ones.
For business and technology leaders, understanding the offensive potential of AI is absolutely crucial today. We are no longer talking about futuristic visions, but real-world techniques already in use today that make attacks more effective, personalized and harder to detect. This article is an analysis of the current state of affairs - without sensationalism, but with technical grounding. We explain how AI is being used to generate malicious code, automate reconnaissance and create next-generation social engineering campaigns. This is essential knowledge for understanding what we face and how to prepare our organizations for the coming era of AI-assisted cyber warfare.
Shortcuts
- How do large language models (LLMs) help malware?
- What is polymorphic and metamorphic malware and what role does AI play in it?
- How are hackers using AI to create hyper-realistic phishing campaigns?
- Can artificial intelligence automate the process of finding vulnerabilities?
- How can AI be used to crack passwords and CAPTCHA mechanisms?
- What defense strategy should organizations adopt in response to AI threats?
- Is “good” AI our best defense against “bad” AI?
- How does nFlo help companies prepare for the next generation of AI-based cyberattacks?
- What is the future of the arms race between offensive and defensive artificial intelligence?
How do large language models (LLMs) help malware?
Large language models such as GPT-4 were designed primarily for text processing and generation, but their ability to understand and write code in various programming languages has become a powerful tool for hackers. Although the developers of these models implement safeguards to block direct requests to create a complete virus, these safeguards can be circumvented relatively easily. Instead of asking “write me ransomware,” the attacker asks for individual, seemingly harmless pieces of code: “write a function in Python that encrypts files in a given folder” or “create a script that scans the network for open ports.”
In this way, LLM becomes a kind of programmer’s assistant for cybercriminals. This significantly lowers the barrier to entry for those with basic technical knowledge. They no longer need to be experts in cryptography or network programming. They can “order” the necessary components from AI and then put them together into working malware. For more advanced attackers, LLM serves as a prototyping and optimization tool. They can ask AI to rewrite existing code to make it harder to detect, or to find bugs in their own malicious code.
What’s more, AI can generate code in less common programming languages, which can further complicate analysis by security teams. The ability to quickly create and modify malware, without the need for deep expertise, is leading to an exponential increase in the number and variety of threats facing defense systems.
📚 Read the complete guide: Cybersecurity: A complete guide to cybersecurity for boards and managers
📚 Read the complete guide: AI Security: AI in cybersecurity - threats, defense, the future
What is polymorphic and metamorphic malware and what role does AI play in it?
For years, traditional antivirus software has relied on signatures - the unique “fingerprints” of known viruses. To bypass this defense, hackers have created polymorphic and metamorphic malware. Polymorphic malware is malware that changes its appearance with each new infection (e.g. by encrypting its code with a different key), but its functional core remains the same. Metamorphic mal ware goes a step further - with each replication it completely rewrites its own code, changing its structure and logic, but retaining the original malicious activity. As a result, each copy of the virus is unique and does not match any known signature.
Developing such software has so far been extremely difficult and required elite skills. Artificial intelligence is completely changing this situation. AI algorithms, especially generative models, can be used to automate the process of mutating malicious code. A hacker can “teach” an AI model how to create thousands of functionally identical but structurally unique variants of the same virus. AI can automatically swap code fragments in place, add unnecessary instructions, rename functions and apply other obfuscation (obfuscation) techniques.
In practice, this means that an organization can be attacked by hundreds of seemingly different viruses that are actually variants of the same threat. Traditional antivirus systems, trying to keep up with the creation of new signatures, stand no chance in this battle. This is forcing defenders to abandon signature-based approaches in favor of behavioral analysis, which focuses not on “what malware looks like,” but on “what it’s trying to do” on the system.
How are hackers using AI to create hyper-realistic phishing campaigns?
Social engineering, and phishing in particular, has always been the most effective attack vector. However, its weakness has often been low quality - grammatical errors, generic content and clumsy attempts to impersonate well-known brands. Large language models (LLMs) eliminate these imperfections, allowing the creation of hyper-realistic, personalized spear-phishing campaigns on a massive scale.
AI can be used to automatically collect information about the target (person or company) from open sources - social media (LinkedIn, Twitter), the company’s website, press releases. Based on this data, the algorithm can generate an email that is perfectly tailored to the context of the victim. The email will be written in flawless Polish (or any other language), refer to recent projects in which the victim was involved, mimic the communication style of his or her supervisor, and contain a credible call to action.
Imagine an email to an employee in the finance department that perfectly mimics the tone of his boss, refers to a publicly announced merger and asks for urgent preparation of financial data for a meeting with “advisors” whose contact information is included in the attachment. The likelihood that an employee will click on such a link or open the attachment is dramatically higher than that of a generic phishing email. AI automates and scales a process that used to require the attacker to spend hours of manual research.
Can artificial intelligence automate the process of finding vulnerabilities?
Discovering new software vulnerabilities (zero-day vulnerabilities) is one of the most difficult and time-consuming tasks in the world of cyber security. Artificial intelligence is beginning to play an increasingly important role in automating this process, giving hackers a powerful tool for finding new attack vectors. One of the main techniques is so-called intelligent fuzzing. Fuzzing involves “bombarding” an application with a huge amount of random or partially distorted input data in the hope that any of the combinations will cause the program to crash (crash). A crash often indicates a memory handling error, which could be a potential vulnerability.
Traditional fuzzing is a largely random and inefficient process. AI brings intelligence and learning capabilities to it. Machine learning algorithms can analyze an application’s source code to understand what types of input data have the best chance of reaching “interesting” pieces of code. Based on the results of previous attempts, AI can adapt the generated data to systematically explore deeper and deeper layers of the application, instead of wandering in the dark. This significantly speeds up the process of finding hidden bugs.
What’s more, AI models can be trained on huge databases of known vulnerable code. In this way, they learn to recognize programming patterns and anti-patterns that often lead to security vulnerabilities. Such a “trained” model can then analyze the code of new applications, pointing out passages that are highly likely to contain similar, as yet undiscovered bugs. It’s like having a super-intelligent, automated code auditor that works 24/7.
How can AI be used to crack passwords and CAPTCHA mechanisms?
Password cracking is a classic area of cyberattacks, which has also been enhanced by artificial intelligence. Traditional methods, such as the dictionary attack (checking a list of popular passwords) or brute-force (checking all possible combinations), have their limitations. AI brings to the process the ability to intelligently predict and generate more likely password candidates.
Machine learning models can be trained on giant sets of passwords leaked in previous hacks. From this, AI learns the patterns and patterns by which people create passwords - for example, that they often use a capital letter at the beginning, numbers at the end, replace letters with similar numbers (e.g., ‘e’ for ‘3’) or add popular phrases. A model trained in this way can generate much “smarter” lists of passwords to check, drastically increasing the probability of success compared to random samples.
Similarly, AI is revolutionizing methods of bypassing CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) mechanisms that are supposed to protect websites from bots. Modern CAPTCHA systems, especially those based on image recognition (“mark all pictures with traffic lights”), are increasingly difficult for traditional scripts. However, for neural networks specialized in image recognition, these tasks are relatively easy. Deep learning models today achieve near-human efficiency in solving CAPTCHA tests, allowing hackers to automate attacks on login forms or other protected resources.
What defense strategy should organizations adopt in response to AI threats?
Defense against AI-assisted attacks requires a fundamental shift in priorities - away from traditional signature-based prevention and toward Zero Trust architecture and proactive behavioral detection. Since email, voice or even software can no longer be fully trusted, trust must be replaced by continuous verification. The Zero Trust architecture, based on the principle of “never trust, always verify,” assumes that an attacker is already on the network and that every user, device or application must prove its identity and privileges before accessing resources.
It becomes crucial to implement advanced detection and response (EDR/XDR/NDR) systems that use “good” AI to combat “bad” AI. These systems do not rely on known virus signatures. Instead, they build a baseline model of normal behavior on networks and devices, and then alert on any anomalies or deviations from the norm. They are able to detect that a Word-related process is suddenly trying to encrypt files, even if it is using brand new, unknown malware generated by AI to do so.
Ultimately, humans remain the most important element of defense, but their role must be reinforced by robust processes. “Out-of-channel” (out-of-band) verification procedures must be implemented and ruthlessly enforced for all sensitive operations, such as changing transfer details or resetting an administrator’s password. In the era of AI-phishing, an employee must have a simple and secure path to confirm the authenticity of a request, and the organizational culture must promote skepticism and caution.
AI Attack VectorTraditional Defense (Inadequate).Modern Defense (Recommended).Hyperrealistic PhishingSpam filters, basic employee training.Advanced email protection (AI-powered), continuous training and simulation, “out-of-channel” verification procedures.Polymorphic MalwareSignature-based antivirus.EDR/XDR systems with behavioral analysis, application control (Application Whitelisting), network segmentation.Automated ReconnaissanceFirewall at the network edge.Zero Trust architecture, NDR systems for monitoring internal traffic, proactive threat hunting.
Is “good” AI our best defense against “bad” AI?
With the growing use of artificial intelligence by cybercriminals, the only effective response is to use the same technology for defense purposes. An arms race is beginning, in which “good” AI, used by security teams, is becoming a key tool to combat “bad” AI in the hands of hackers. This clash is taking place on multiple fronts and is defining the future of cyber security.
Defensive AI is already at the heart of modern security systems. Next-generation SIEM (Security Information and Event Management) platforms use machine learning to analyze billions of events from across the infrastructure and automatically detect subtle anomalies that could indicate an advanced attack. Similarly, EDR (Endpoint Detection and Response) systems use AI to model the normal behavior of processes on workstations and servers to immediately identify and block the activity of unknown, polymorphic malware.
Advanced email gateways also use AI to go beyond simple spam filtering. They analyze writing style, conversation context and the relationship between sender and recipient to detect sophisticated spear phishing attempts that don’t include typical malicious links or attachments. The fight against offensive AI is not about creating a single, perfect defense algorithm. It’s about building a multi-layered ecosystem of defensive AI tools that work together to increase the “cost” of an attack to the criminal and reduce the time from intrusion to detection from months to minutes.
How does nFlo help companies prepare for the next generation of AI-based cyberattacks?
At nFlo, we take the position that fighting the threats of the AI era requires an intelligent strategy and equally intelligent tools. Our services are designed to help organizations move from a traditional, reactive security model to a proactive and adaptive posture, ready to clash with AI-assisted attacks.
We specialize in the implementation and management of next-generation defense technologies that have “good” AI at their heart. We help our clients implement and optimize market-leading EDR/XDR and NDR platforms that use machine learning to detect anomalies and unknown threats.
We understand that technology is not everything. That’s why we place great emphasis on strengthening the “human firewall.” Our advanced social engineering simulations and training programs are constantly updated to reflect the latest hacker tactics, including hyper-realistic AI-generated phishing. As part of vCISO’s services, we work with managements to develop and implement robust policies and procedures based on the Zero Trust model, which are the foundation of resilience in an era when digital communications can no longer be fully trusted.
What is the future of the arms race between offensive and defensive artificial intelligence?
The arms race between attackers and defenders in the field of AI will define the cyber security landscape in the coming decade. We can expect more and more autonomy on both sides of the conflict. The future belongs to autonomous offensive agents, i.e. AI programs that will be able to carry out an entire campaign on their own - from finding vulnerabilities, to creating an exploit and infiltrating a network, to executing a target, such as stealing data.
In response, defense systems will also become more autonomous. SOAR (Security Orchestration, Automation and Response) platforms, enhanced with advanced AI, will be able not only to detect attacks, but also to respond to them autonomously in time measured in milliseconds - isolating infected systems, blocking malicious traffic and deploying virtual patches, often without the need for human intervention. Cyber security will evolve into a conflict fought at a machine-like pace, far beyond human perception and response capabilities.
In this new reality, the role of human security experts will change. Instead of being “guards on the walls,” they will become “strategists and engineers.” Their job will no longer be to manually analyze individual alerts, but to design, train and supervise autonomous defense systems. They will be data analysts, machine learning specialists and “trainers” of defensive AI, preparing it to clash with increasingly intelligent adversaries. Winning this race will depend on the ability to innovate and adapt at the pace imposed by machines.
Related Terms
Learn key terms related to this article in our cybersecurity glossary:
- Cybersecurity — Cybersecurity is a collection of techniques, processes, and practices used to…
- Email Spoofing — Email spoofing is a cyberattack technique involving falsifying the sender’s…
- Fake Mail — Fake mail, also known as fake email, is an email message that has been crafted…
- Shadow AI — Shadow AI refers to the unauthorized use of artificial intelligence tools and…
- Cybersecurity Incident Management — Cybersecurity incident management is the process of identifying, analyzing,…
Learn More
Explore related articles in our knowledge base:
- What is Artificial Intelligence and how is AI changing business?
- What is artificial intelligence and how to safely use its potential in business?
- What is artificial intelligence and how to use AI in business?
- AI in the Law Firm: How Artificial Intelligence Improves Client Service Quality and Efficiency
- AI governance framework: roles, an AI system register and the approval process
Explore Our Services
Need cybersecurity support? Check out:
- Security Audits - comprehensive security assessment
- Penetration Testing - identify vulnerabilities in your infrastructure
- SOC as a Service - 24/7 security monitoring
Cybersecurity for Your Industry
Learn more about cybersecurity in your industry:
Frequently asked questions
How are hackers using AI to create malware?
Hackers use large language models (LLMs) like GPT-4 to generate individual malicious code components — encryption routines, network scanners, and obfuscation scripts — that are assembled into functional malware. AI also helps generate polymorphic and metamorphic malware variants that evade signature-based antivirus detection.
What is AI-powered phishing and why is it more dangerous than traditional phishing?
AI-powered phishing uses language models to generate personalized, grammatically flawless messages tailored to each target's role, interests, and writing style. This eliminates the obvious errors that have historically made phishing emails easy to spot, dramatically increasing their success rate.
Can AI automate the discovery of software vulnerabilities?
Yes — AI tools can automate the scanning of source code and binaries for known vulnerability patterns and even infer potential weaknesses in logic, significantly accelerating the pace at which attackers can identify exploitable flaws in software.
How can organizations defend against AI-powered cyberattacks?
The most effective defenses involve deploying AI-driven behavioral detection tools on the defense side, enforcing strict identity verification and phishing-resistant MFA, conducting regular security awareness training focused on social engineering, and adopting threat intelligence to stay ahead of emerging AI-based attack techniques.
What is the future of the arms race between offensive and defensive AI?
The conflict will increasingly be an automated battle between AI systems — attackers using AI to generate and mutate threats, and defenders using AI to detect behavioral anomalies in real time. Human expertise will remain essential for strategic oversight, but the speed of both attack and response will be determined largely by machine intelligence.
