top of page

The Mug, The Code, and The Collapse: A Deep Dive Into a Polymorphic Social Engineering Attack

  • John Gomez
  • May 20
  • 9 min read


A Deep Dive into a Polymorphic Social Engineering Attack

Introduction to A Deep Dive into a Polymorphic Social Engineering Attack

Modern cybersecurity has trained its focus on digital threats: firewalls, EDRs, zero-days, and ransomware. But as defenders race to harden systems, attackers shift back to the oldest exploit in the book: human behavior.


In this blog post "A Deep Dive into a Polymorphic Social Engineering Attack", we outline a highly viable, deeply layered social engineering attack that blends physical, digital, and psychological elements. It's elegant, terrifyingly effective, and nearly impossible to detect with traditional controls.


This post is not theoretical.


Everything you are about to read is both possible and, in many cases, already in practice by sophisticated adversaries. Our goal is to raise awareness—not fear—by thinking like an attacker and exploring the gaps most blue teams never see.


Backstory: A Coffee Mug, Whiteboard and AI Agents


Several years ago, I was tasked with trying to find a way to defeat system security at airports and planes as part of a skunkworks project. The result of that was something totally unexpected, which led to the discovery of an attack type that could lead to a rather serious national security issue. The backbone of my approach in that project was to go way outside the box of normal and do something completely unexpected.


Fast forward to several weeks ago and a rainy Sunday afternoon.


I started to wonder how I could devise an attack that had a 90% success rate and would allow me to render most, if not all, cybersecurity defense for any organization useless. I put aside watching "In the Kitchen with David" on QVC and headed to my home office where I fired up a bunch of AI minions, our shared electronic whiteboard and poured a cup of Black Flag EMS coffee.


We spent the next several hours conjuring up different approaches, all of which ended with the same general conclusion between me and the minions - been there, done that, got the t-shirt. Although many of the approaches we came up with were viable, they just didn't meet our goal of a 90% success rate. We also wanted something that was easily replicated and beyond anything anyone was currently doing in the world of offensive computing.


I offered the AI minions another cup of coffee (Black Flag EMS coffee is amazingly tasty - highly suggest you get yourself a bag and support a great cause - link below), but they reminded me that AI doesn't drink coffee - their loss. As I held the mug of coffee in my hand, I wondered why every coffee drinker didn't have a bag of Black Flag coffee. That is when it hit me - use coffee as the attack vector.


The AI minions and I started to dive into this concept and eureka - we came up with a rather foolproof methodology that we believed had at least a 90% success rate in breaching a targeted organization's cybersecurity defenses. The attack methodology is economically feasible, bypasses both psychological and technical defenses and allows us to scale from targeting one to hundreds or thousands of people, depending on our goals.


I want to be very clear that although this backstory is meant to be a bit lighthearted, this attack is not lighthearted nor is it a parody. We did get the chance to perform real-world testing of this methodology, and we did achieve well over a 90% success rate. To better understand exactly what we did, based on not only our initial research, but the actual real-world testing, read on.


Background: From OSINT to Physical Delivery


Imagine this: One morning, you receive a beautifully packaged coffee mug at your home. It comes with a personalized note that appears to be from your CEO: "We're launching a new employee engagement initiative. Scan the code on the mug or inside the note to help us shape the future. Your voice matters." (The actual letter we sent was much more detailed and customized.)


Seems harmless, even thoughtful.


But it's the opening act in a highly coordinated attack.


Step 1: Branding Research


We started by using publicly accessible information to understand the overall tone and market presence of our target organization. This included using AI agents to review their website, blog posts, news articles, social media (LinkedIn, Facebook, Instagram, X) posts as well as becoming very familiar with their C-Suite leaders. We focused on learning the overall voice of the organization, in order to later replicate that voice and tonality in our communication to the organization's employees.


Step 1(a): SWAG Development & Finances


Our next step was to develop the "swag" we would send to each of our target organizations employees. This included developing a branded coffee-mug and the letterhead for the personalized letter we would include, as well as a marketing insert with QR code. A key component during this step was ensuring we could justify the financing required to build and ship our swag to each team-member that worked for the target organization.


The cost of printing, shipping and the branded coffee mugs came to $3.89 per target-member. Which was within our mission budget. To clarify this meant we were spending $3.89 for each person we targeted in this attack. We were able to keep the pricing down by using bulk shipping and white label printing companies.


Step 2: Building the Target List


We once again embraced AI to find the names of team-members who currently worked for the target organization. Using AI vastly sped this process up and allowed us to employ additional approaches to find team-members who were not on LinkedIn but were on other social media platforms. Our minimum viable data set only required the target's first and last name and the town or county they lived in at the moment.


Once we had this list, we started to utilize "people search databases" after we established a fictitious LLC to purchase the lists. This came to a total of $243.00, including the LLC registration and the public records list expanded our dataset to include phone numbers and names of household members (extended family). The biggest challenge at this point was a lack of accurate and complete home addresses for each of our targeted victims.


To solve that, one of the AI minions suggested we leverage public records: voter registration data, GIS portals, and property tax assessor databases. These records—available in most states for a small fee or via FOIA request—allowed us to correlate names with accurate addresses, property ownership, and even household demographics. With this development, we had accurate addresses, names, and other details for about 98% of all our targets, including 100% of the details to target the C-Suite and Board members of the organization if we decided to exploit them in the future.


Step 2(a): Target Prioritization


AI then suggested we create an algorithm that allows us to stratify our targets. That suggestion was embraced and several minutes later we converted the CSV into a SQL database table with Python front-end. The data was then fed into a prioritization algorithm that resulted in the following categorization:


  • High Value: Executives, IT admins, HR, finance.

  • High Influence: Nurses, supervisors, security officers.

  • Low Vigilance: Long-tenured staff, older demographic, socially active individuals.


At this point we had all of the background data and logistics to execute our attack and determine if our predicted 90% plus success rate would be achieved. Our next step was to launch our social engineering campaign.


Execution: The Social Engineering Chain


Step 1: The Physical Attack Vector


Each target receives a swag box that was branded with the target organization's logo. Inside the box was a branded coffee mug, marketing insert and personalized letter from the CEO. The letter stated that the organization was thankful for their being a part of the team and explained how valuable their thoughts and honest feedback was; in order to help shape the future of the organization.


The letter asked the team-member to please scan the QR code (on the marketing insert) or to use their computer's web browser to visit a URL. The goal of which was for them to complete a critical survey that will help shape things like future benefits programs, salary levels and other decisions which they may wish to have a voice in shaping. We found about 30% of people elected to use the URL and the remaining respondents utilized the QR code.


Step 2: The Payload


The URL and QR code did lead to malicious websites, but these were newly registered domains such as futureofstaff.org or staff-survey.app, which bypassed domain age-based blocklists. The QR code could trigger a malicious APK download (particularly dangerous on Android devices with sideloading enabled), or initiate a browser-based exploit to deliver a device configuration profile, rogue Wi-Fi connection, or staged phishing.


The sites themselves mimicked familiar internal resources like Okta, Microsoft 365, or intranet SSO portals. Behind the scenes, we worked to compromise the mobile device and/or home network to establish a durable presence. In some cases, we even embedded AI-driven session hijacking tools to defeat MFA challenges.


To maintain trust, the employee always landed on a believable survey interface. The survey introduced our fictitious consulting firm and promised follow-up, laying the groundwork for deeper social engineering engagement over time.


Step 4: Home Network Compromise


Once on the user's device a remote access trojan (RAT) established C2 (Command and Control), allowing us to monitor home network traffic. One of our first objectives was to map out the home network, especially work laptops with VPN access and IoT devices (for persistence if discovered). We also attempted to inventory any and all synced folders (OneDrive, SharePoint, Dropbox).


If the work laptop connected to the organization's VPN, we were more often than not able to pivot through the VPN tunnel, effectively gaining a toehold inside the internal corporate network. We would then move laterally, watching traffic, mapping AD, and planting additional payloads.


Step 5: Evolving the Approach: Polymorphism and Behavioral Camouflage


Here is where the attack departed from typical social engineering attacks even further. The AI suggested we create polymorphic malware, which can change its signature with not only each deployment, but also each execution of the malware in order to evade pattern or signature-based detection systems. We also employed "low-and-slow" tactics to avoid behavioral analytic thresholds.


Another component was the deployment of AI agents within the malware. These agents were designed to mimic the user's keyboard cadence and login times, blend command traffic with legitimate web or CDN traffic, and slowly retrain surveillance tools like SIEM and UEBA to view malicious behavior as benign—until it was too late.


Attack Outcomes: What We the Attacker Gained


The attack overall was highly successful, far surpassing our 90% effectiveness metric. This multi-pronged approach allowed us to vastly lower the threshold on harvesting credentials, session tokens and bypassing MFA. We were able to deploy "crafted" ransomware inside the perimeter and access critical operational and other network connected systems and resources. We were able to tamper with telemetry and other critical infrastructure (some of which is considered life sustaining) as well as control when we wanted the breach to be discovered.


All of this from a coffee mug.

Summary and Recommendations


This attack is not theoretical—it’s viable, scalable, and deeply effective. And defending against it is very hard. The attack was partly based on the inner workings of my own mind, but was made so much more damaging because I didn't rely on humans, but rather on AI agents with personas specifically crafted for offensive computing.


The AI in this mission were responsible for helping with mission planning, mission simulation, malware development, evolving polymorphic approaches, open-source intelligence harvesting, brand development, LLC establishment, crafting the survey and so much more. The original attack methodology and theory took us about four hours, then another two hours to run simulations. Our real-world testing (life event asides) took nine days from initial attack planning to final compromise and launch of final payloads.


The total cost of this attack, including the shipping of branded boxes and their contents, AI subscriptions, compute time, legal filings/requests came to $14,473.56. The return on investment? Tou can be the judge of that by asking what if we executed this attack on your organization. A fourteen-thousand-dollar investment by an attack organization or nation-state is a rounding error.


Key Challenges for Defenders:

  • Physical delivery mechanisms bypass digital controls

  • QR codes are trusted by users and often bypass policy checks

  • Home network exposure is outside most orgs’ security models

  • Polymorphic and low-and-slow tactics evade traditional detection especially when enhanced with AI agents deployed on your network

  • Domain fronting, DNS-over-HTTPS, and traffic mimicry make C2 detection even harder


Recommendations:

  1. User education must evolve beyond email phishing.

  2. Block installation of unverified apps and remove sideloading capabilities.

  3. Segment VPN access to block lateral movement from hybrid workers—zero trust is no longer optional.

  4. Monitor home-office VPN endpoints with enhanced scrutiny if at all possible.

  5. Treat QR codes as untrusted links, especially when unsolicited.

  6. Train blue teams to think physically and psychologically—not just digitally.

  7. Invest in threat modeling that includes physical and hybrid attack vectors.


Closing Thoughts


Attackers don’t need zero-days—they need zero suspicion.

As defenders harden servers and segment clouds, the path of least resistance leads straight to the employee’s home.


A coffee mug. A QR code. A breach.


It’s time you expand your perimeter—not just to the edge, but to the doorstep.


If you are wondering if "Black Flag EMS" coffee is real or not - see below and if you feel inclined, please help.


Stay sharp.

— Illuminis Labs


About Black Flag EMS Coffee: Black Flag EMS is on a mission to provide high-quality EMS training to EMTs, Paramedics, Firefighters and Police Officers for $5 to $25 per training course, making it highly accessible to those who have sworn to help us in our time of need.


To help offset operational costs Black Flag EMS is hoping you choose to support their mission by purchasing an amazingly good bag of coffee. You can become part of the Black Flag EMS mission by visiting this link - Black Flag EMS Coffee


Disclosure:  This attack was a red-team event with full authorization and compliance by the organization targeted.

Comments


bottom of page