OopsSec - The bad, the worst and the ugly of APT’s operations security
Tomer Bar (Director of Security Research · SafeBreach Labs)
TROOPERS23 · Day 1 · Attack & Research · Attack & Research
Overview
In this compelling talk, Tomer Bar, VP of Security Research at SafeBreach, dismantles the myth of the infallible hacker by exposing egregious operational security (OpSec) failures committed by both sophisticated nation-state Advanced Persistent Threat (APT) groups and large-scale cybercrime operations. Titled "OopsSec - The bad, the worst and the ugly of APT’s operations security," Bar's presentation delves into real-world case studies spanning over a decade, demonstrating how human error, laziness, and fundamental misconfigurations consistently undermine even the most advanced adversaries. The talk serves as a critical reminder that even highly resourced threat actors are susceptible to basic mistakes, offering invaluable insights for defenders and researchers.

Key moments
- 0:00 Introduction, assumptions, and OopsSec meter explained
- 6:00 Gaza APT: Database password exposed via HTTP GET request
- 21:50 Cybercrime: Credit card smishing, victim lists, bash history
- 27:50 Cybercrime: Open Telegram groups, Google-indexed credit cards
- 38:00 Best OpSec: Iranian APT's DGA and RSA signature verification
- 48:00 Best OpSec: Discovering the weakest link via metadata
- 52:00 Conclusion: Attackers are human, check your own OpSec
- 54:00 Q&A: Reporting cybercrime operations to law enforcement
OopsSec - The bad, the worst and the ugly of APT’s operations security
Speakers: Tomer Bar, Director of Security Research, SafeBreach Labs
Conference: TROOPERS
YouTube: https://www.youtube.com/watch?v=qZYW_S_9RIw
Overview
In this compelling talk, Tomer Bar, VP of Security Research at SafeBreach, dismantles the myth of the infallible hacker by exposing egregious operational security (OpSec) failures committed by both sophisticated nation-state Advanced Persistent Threat (APT) groups and large-scale cybercrime operations. Titled "OopsSec - The bad, the worst and the ugly of APT’s operations security," Bar's presentation delves into real-world case studies spanning over a decade, demonstrating how human error, laziness, and fundamental misconfigurations consistently undermine even the most advanced adversaries. The talk serves as a critical reminder that even highly resourced threat actors are susceptible to basic mistakes, offering invaluable insights for defenders and researchers.
Bar's extensive experience, including 20 years in APT and vulnerability research, underpins a systematic analysis of these OpSec blunders. He highlights that these errors are not isolated incidents but rather recurring patterns, often persisting even after public disclosure. By dissecting the technical details behind these failures – from exposed databases and backend code to compromised attacker identities – Bar provides a unique perspective on threat intelligence. The core message is clear: understanding and exploiting an adversary's OpSec weaknesses can be as impactful as detecting their malware, offering opportunities for disruption, attribution, and enhanced defense.
This talk is particularly significant because it empowers the cybersecurity community to look beyond the malware itself and focus on the often-overlooked vulnerabilities in an attacker's infrastructure. By revealing how simple misconfigurations can expose vast amounts of victim data, attacker tools, and even personal details of the threat actors themselves, Bar underscores the importance of proactive monitoring and analysis of the "attacker's backyard." The research presented offers a practical framework for identifying and leveraging these OpSec gaps, transforming perceived adversary sophistication into actionable intelligence for improved security posture.
Background
▶ Watch: Introduction, assumptions, and OopsSec meter explained (0:00)
The genesis of Tomer Bar's research into "OopsSec" is rooted in a fundamental assumption: attackers, regardless of their sophistication or resources, are ultimately human and thus prone to making mistakes. This premise directly challenges the Hollywood stereotype of flawless, all-knowing hackers who effortlessly breach defenses. Bar emphasizes that being an "Advanced APT" does not automatically equate to perfect OpSec or secure infrastructure management. This human element introduces exploitable vulnerabilities in their operations that often go unnoticed or unprioritized by defenders focused solely on malware signatures and attack vectors.
A second crucial assumption driving this research is the observation that some threat actors exhibit a degree of laziness or complacency. Even after their operations are detected, exposed in public research, or disrupted, they often continue with minimal changes. This reluctance to adapt or invest in robust OpSec remediation creates persistent weaknesses that can be repeatedly leveraged by researchers. This behavior suggests a cost-benefit analysis by the attackers, where the effort to overhaul their infrastructure might outweigh the perceived risk of continued exposure.
Finally, Bar advocates for a shift in incident response and threat intelligence paradigms. While investigations typically focus on the victim's environment, he argues for the critical importance of understanding and legally probing the "attacker's backyard." By analyzing adversary infrastructure, researchers can uncover misconfigurations, exposed data, and even clues for attribution that are otherwise unattainable. To quantify and compare these OpSec failures, Bar developed an "OpSec Meter," a scoring system where threat actors accumulate "bad points" across ten categories (e.g., victim identity exposure, ability to take down operations). A higher score indicates worse OpSec, providing a standardized way to evaluate and contrast different groups' operational security posture.
Key Findings
▶ Watch: Cybercrime: Credit card smishing, victim lists, bash history (21:50)
Tomer Bar's extensive research unveiled a consistent pattern of OpSec failures across diverse threat actors, leading to several key findings:
- Ubiquitous Misconfigurations: Even highly advanced nation-state APTs and large-scale cybercrime groups frequently fall victim to fundamental infrastructure misconfigurations. Common examples include open directory listings, unauthenticated API endpoints, hardcoded credentials, misconfigured web servers, forgotten temporary files (like ZIP archives of backend code), and publicly exposed bash history files on C2 servers. These basic errors often provide researchers with direct access to sensitive data, tools, and even attacker communications.
- Persistence Despite Exposure: A striking finding is the remarkable complacency of many threat actors. Bar repeatedly demonstrated that even after public disclosure of their OpSec flaws, many groups made only superficial changes (e.g., changing a subdomain or IP address) or failed to remediate the underlying vulnerabilities. This "laziness" often allowed researchers to regain access to compromised data streams or backend code years after the initial discovery, highlighting a persistent opportunity for disruption.
- Inadvertent Attribution: OpSec failures can directly lead to the attribution of individuals behind cybercrime operations. By infecting their own testing machines, using public communication channels (like misconfigured Telegram groups), or exposing personal details within their infrastructure, attackers inadvertently leave digital breadcrumbs. Bar showcased a case where an attacker's infected phone revealed hosting provider messages, leading to their full name, bank account, phone numbers, and address.
- Scaling Through OpSec Gaps: Large-scale cybercrime operations, particularly those involved in "phishing-as-a-service," leverage OpSec weaknesses in their own distribution models. By offering their tools and infrastructure for free or a percentage of stolen funds, they allow a broader network of affiliates to operate. However, the very infrastructure used to facilitate this pyramid scheme often suffers from poor OpSec, making the entire ecosystem vulnerable to discovery and intelligence gathering.
- The "Weakest Link" Principle: Even in campaigns exhibiting exceptionally strong OpSec, a single weak link can unravel years of careful planning. Bar's analysis of a highly sophisticated Iranian APT, which employed advanced techniques like Domain Generation Algorithms (DGA) and RSA signature verification for C2 communication, ultimately found its Achilles' heel in the internal transfer of exfiltrated data between their VPS and their home country. This demonstrated that no OpSec is truly impenetrable, and persistent, creative analysis can always find an opening.
Technical Deep Dive
▶ Watch: Best OpSec: Iranian APT's DGA and RSA signature verification (38:00)
Tomer Bar presented a series of compelling case studies, each illustrating distinct OpSec failures with specific technical details.
Gaza-based Threat Actor (PalToMe / Pal4U)
This threat actor, active since 2012 and targeting Windows and Android, showcased repeated OpSec blunders. In 2017, their self-developed web panel for a "records management system" was flawed: despite having MFA, navigating directly to inner pages bypassed all authentication, exposing victim keylogger data. Fast forward to 2022, the group continued its activities, masquerading as Google Play apps. The Android malware exfiltrated data via HTTP POST requests to a /data URL. Bar discovered that simply sending an HTTP GET request to this URL, instead of the expected POST, returned the database password, exposing all victim data.
The attackers had shifted from a self-developed backend to Laravel, a common legitimate framework, but it was severely misconfigured, leading to stack traces and sensitive data exposure. Bar found that all their C2 servers were vulnerable to this. Furthermore, a C2 server (e.g., app.pal4u.net) was misconfigured to allow directory listing of a folder (e.g., /CCC). This exposed zip files containing all exfiltrated victim data, sorted by date. Bar was able to download these files, mapping 8,000 victims (mostly in Gaza) and estimating the total exfiltrated data at 2-3 terabytes (500MB compressed daily).
Another critical mistake was open directory listings revealing backend code. Using VirusTotal Graph, Bar pivoted through their infrastructure and found a server (tawaji.pal4u.net) where attackers had uploaded their backend code as a large ZIP file, extracted it, but forgot to delete the original ZIP. This allowed Bar to download the entire backend source code. Even after public disclosure in June 2022, the attackers' remediation was superficial: they changed the subdomain (e.g., app.pal4u.net to i.pal4u.net), moved their server to Amsterdam, and changed the IP. However, when Bar sent malformed POST requests (e.g., omitting mac or app ID, or changing app ID to a string), the server returned detailed error messages, exposing SQL injection vulnerabilities and revealing the structure of the phones table with all its fields, indicating continued data exfiltration. Crucially, while they fixed the directory listing for the CCC folder, Bar knew the file naming convention and could still download the exfiltrated data directly. They also did not bother to change the encryption password for this data, granting Bar full visibility. This group scored 47 "bad points" on the OpSec meter.
Iranian Threat Actor (Powershell Shell & iCloud Phishing)
Late 2021 saw an Iranian APT leveraging an MSHTML zero-day vulnerability to infect Farsi-speaking victims with a PowerShell script dubbed "PowerShortShell." This actor also engaged in sophisticated phishing for Gmail, Instagram, and especially Apple ID credentials. Their OpSec failures mirrored the previous case: open directory listings and downloadable backend code (often in ZIP files). Analysis of the backend code revealed vulnerabilities allowing arbitrary file uploads and directory traversal, theoretically enabling remote code execution on their C2 servers.
For iCloud phishing, they developed browser automation to bypass two-factor authentication by capturing and inputting OTPs in real-time. The logs of these stolen credentials were written to a publicly accessible file named out.txt, exposing all victim passwords simply by browsing to the file.
Second Iranian APT (Telegram Phishing)
This nation-state actor focused on phishing Telegram credentials of perceived threats to the Islamic regime. Their malware exfiltrated data via FTP in cleartext, allowing easy retrieval of credentials through reverse engineering. The critical OpSec flaw was placing the FTP incoming directory under the Webroot of the HTTP server. This meant an attacker could upload a web shell via FTP and then execute it via HTTP, gaining control over the C2 server. Their phishing campaign logs, including full credential theft steps, were written to names.txt, again publicly accessible. Decompiling their .NET backend code revealed that credentials were not only logged locally but also sent to an attacker's Gmail account, providing further access points.
Chinese Threat Actor (Sharp Panda)
Known for targeting South Asian governments, Sharp Panda utilized an old but effective Office exploit. In 2021, checkpoint reported their C2 servers had open directory listings and their main.php wrote exfiltrated data to a fixed-name textual file. Two years later, Bar found no changes had been made. Although the data was RC4 encrypted, the password was a trivial 123456, allowing easy decryption and access to victim data. This highlights the "laziness" assumption.
Iranian Cybercrime (Credit Card Stealing)
This large-scale cybercrime operation aimed to steal credit cards through a five-step infection chain.
- Victim Collection: They scraped Iranian online market sites (e.g.,
divar.ir) using a Python script to collect phone numbers. The full victim list was stored in a publicly downloadable file,users.lst. - C2 Server OpSec: The Linux C2 server had its bash history file publicly accessible, exposing all commands typed by the attackers.
- Smishing (SMS Phishing): Victims received SMS lures (e.g., arrest threats, COVID payments) leading to a fake payment site.
- Malware Delivery: The fake payment site delivered an Android SMS stealer APK. Decompiling the malware revealed a hardcoded C2 IP and a PHP page that uploaded victim SMS messages to a fixed-name file,
LydiaTeam.txt, making all SMS accessible. - Credit Card Theft: The fake payment site (displaying a fake HTTPS lock and a countdown timer) collected credit card details. The backend code, containing a typo (
new Cloud received), sent these details to attacker-controlled Telegram groups.
Bar discovered that by querying the Telegram API (getChat function) with C2-derived chat IDs, he could obtain invite links to several attacker-controlled groups (SMS, Data, Card). Some groups were misconfigured to display all members without joining. The "SoGood" group was particularly egregious, allowing full message access without joining, exposing credit card numbers, tools, backend code, and even Farsi voice messages between hackers. Further, Google dorking for "Lydia Team" and the typo "new card received" indexed their phishing servers and more Telegram groups, revealing the scale of their "phishing-as-a-service" operation. This operation used a pyramid structure, offering tools for free in exchange for 20% of stolen credit cards. Bar even joined several groups with his real name, observing operations in real-time.
Decompiling the malware also revealed weak randomization of exfiltrated filenames (just five digits), allowing Bar to script the download of all SMS messages. Crucially, the attackers infected their own machine for testing, leading to an SMS from their hosting provider being exfiltrated. This allowed Bar to identify the attacker as a specific individual, complete with his bank account, phone numbers, and address, confirming direct attribution.
Iranian Nation-State APT (Infy / Foudre / Tonnerre) – The "Best" OpSec
This APT, active since 2007, was initially very difficult to disrupt. In 2015, Bar successfully sinkholed their hardcoded C2 URLs, capturing victim IP addresses but no data due to their strong OpSec. After this takedown, the group analyzed their failures and returned in 2017 with a highly secure infrastructure:
- Two-Stage Infection:
Foudre(lightning) as a reconnaissance tool to verify the victim and environment, followed byTonnerre(thunder) for full surveillance only if safe.Tonnerreremained largely undetectable on VirusTotal for a year. - Domain Generation Algorithm (DGA): They generated 101 unique domains weekly using
crc32with a prefix, year, month, and week number. To prevent time synchronization issues, the malware would download RSS feeds from legitimate sites like Sky News or BBC to get the current date and time. - C2 Signature Verification (RSA): The malware downloaded a signature file from the C2, decrypted it with an embedded public key. Only if the signature was valid (meaning it was encrypted with the corresponding private key held by the attackers) would the malware proceed, preventing researchers from impersonating C2 servers and capturing data. Bar's attempts to pre-purchase DGA domains and sinkhole them only captured IPs, as the malware would cease communication without a valid signature.
However, even this "best" OpSec had a weakest link discovered in 2022. The attackers needed to transfer exfiltrated data from their European VPS C2 servers to Iran. Bar noticed non-DGA filenames (log1f, f1host) alongside DGA-generated ones. He found they used a self-developed PHP backend that allowed listing and deleting files in specific directories. While the exfiltrated data files were strongly encrypted, Bar discovered de-obfuscated metadata embedded above the encryption layer. This metadata included screenshots, victim usernames, machine GUIDs, hostnames, and Tonnerre versions, providing valuable intelligence. Critically, the attackers also infected their own computers for testing, and their exfiltrated data included files named after an Iranian opposition leader (maljun SAR Brazil), further aiding attribution and understanding of their targets.
Demo / Proof of Concept
▶ Watch: Best OpSec: Discovering the weakest link via metadata (48:00)
Throughout the talk, Tomer Bar described how he legally replicated or verified the existence of the OpSec vulnerabilities he discovered. His "demos" were essentially proofs-of-concept for the flaws. For instance, he demonstrated:
- HTTP GET request: Instead of sending an HTTP POST, he simply navigated to the C2's
/dataURL in a browser, which immediately returned the database password. - Directory listing: He showed screenshots of web server directories exposing victim data (e.g., the
CCCfolder) or backend code (e.g., the ZIP files). He explained how he downloaded these files. - Accessing log files: He directly browsed to
out.txtornames.txtto retrieve exposed credentials. - Telegram group access: He detailed how he used the Telegram API functions (
getChat,getUpdates) and invite links found on C2 servers to gain access to attacker-controlled groups, even joining some with his real name to observe real-time activity. - Google Dorking: He explained how specific search queries (e.g., "Lydia team", "new card received" with the typo) revealed publicly indexed phishing servers and Telegram channels.
- Malware Decompilation: He showed snippets of decompiled code to illustrate hardcoded credentials, weak randomization, or specific API calls.
Bar explicitly stated that he did not perform any illegal actions such as SQL injection or uploading web shells to the attackers' servers. His methods focused on passive observation and leveraging publicly exposed or easily discoverable vulnerabilities through legal means, demonstrating the efficacy of "hacking yourself" or simply browsing the attacker's infrastructure.
Defensive Implications
▶ Watch: Q&A: Reporting cybercrime operations to law enforcement (54:00)
Tomer Bar's research offers several critical defensive implications for organizations and security professionals:
- Prioritize Basic OpSec for Your Own Infrastructure: The core lesson is that if sophisticated attackers make these mistakes, legitimate organizations are just as, if not more, susceptible. Defenders must proactively audit their own web-facing infrastructure for common misconfigurations:
- Prevent open directory listings: Ensure web servers are configured to disallow directory browsing.
- Secure file uploads: Implement strict validation for file types and paths to prevent arbitrary file uploads or directory traversal vulnerabilities.
- Delete temporary files: Ensure that temporary files, especially large archives of source code or sensitive data, are promptly deleted after use.
- Secure logging: Never log sensitive information (like credentials) in plaintext to publicly accessible files or directories. Implement robust log management with strict access controls.
- Proper authentication: Validate all API endpoints and backend panels require strong, multi-factor authentication, and ensure that direct navigation to internal pages doesn't bypass these controls.
- Sanitize inputs: Protect against SQL injection and other injection attacks by properly sanitizing all user inputs.
- Review frameworks: Even using popular frameworks like Laravel doesn't guarantee security; proper configuration is paramount.
- "Hunt in the Attacker's Backyard": Adopt an adversarial mindset and actively investigate adversary infrastructure when an attack is detected. This involves:
- Leveraging OSINT tools: Use tools like VirusTotal Graph, Shodan, and public search engines (Google dorking) to pivot from known Indicators of Compromise (IOCs) and uncover related infrastructure.
- Passive reconnaissance: Legally browse and analyze attacker C2 servers for exposed files, misconfigurations, and error messages that might reveal internal workings or vulnerabilities.
- Look for patterns: Recognize recurring OpSec mistakes (e.g., hardcoded paths, weak encryption keys, reused domains) that can provide persistent access or intelligence.
- Assume Attacker Laziness and Persistence: Do not assume that public disclosure or initial disruption will lead to complete remediation by threat actors. Continuously monitor known adversary infrastructure for changes and re-evaluate their OpSec posture. Their reluctance to invest in thorough fixes often creates long-term intelligence opportunities.
- Enhance Attribution Capabilities: OpSec failures can be a goldmine for attribution. Look for clues like:
- Attacker testing environments inadvertently infected with their own malware.
- Publicly exposed communication channels (e.g., misconfigured Telegram groups, exposed email accounts).
- Metadata within exfiltrated files (usernames, machine IDs, hostnames) that might reveal attacker identities or internal testing.
- Secure Your Software Development Lifecycle (SDLC): The prevalence of self-developed, insecure backend systems highlights the need for robust security practices throughout the SDLC, including secure coding guidelines, regular security testing, and avoiding common pitfalls like cleartext communication (e.g., FTP) for sensitive data.
Key Takeaways
- Human Error is Universal: Even highly advanced APTs and large-scale cybercrime groups are prone to basic operational security mistakes due to human error, complacency, and laziness.
- OpSec Failures Expose Critical Data: These mistakes frequently lead to the exposure of vast amounts of sensitive information, including victim data, backend source code, internal attacker communications, and even the personal identities of the threat actors themselves.
- Common Misconfigurations Persist: Recurring OpSec blunders include open directory listings, unauthenticated API endpoints, hardcoded credentials or paths, forgotten temporary files, and publicly accessible log files containing sensitive data.
- Remediation is Often Superficial: Threat actors often fail to thoroughly remediate their OpSec flaws even after public disclosure, making their infrastructure persistently vulnerable to legal reconnaissance and intelligence gathering.
- "Attacker's Backyard" Intelligence: Proactive and legal investigation of adversary infrastructure can yield invaluable intelligence, aiding in attribution, understanding attack methodologies, and disrupting operations.
- Self-Audit is Crucial: Organizations should regularly audit their own external-facing infrastructure for similar misconfigurations to prevent becoming victims of the very OpSec failures that plague their adversaries.
About the Speaker(s)
Tomer Bar is the Director of Security Research at SafeBreach Labs, bringing over 20 years of extensive experience in the cybersecurity domain. His expertise primarily lies in APT research, vulnerability research, and operational technology (OT) security. Bar is a highly respected figure in the conference circuit, having presented numerous talks at prestigious events such as BlackHat USA (10 talks in the last five years) and Defcon (9 talks). He was also qualified to speak at three upcoming BlackHat and Defcon events, underscoring his deep knowledge and consistent contributions to the security community. His research focuses on uncovering and analyzing the tactics, techniques, and procedures of advanced threat actors, with a particular emphasis on their operational security.
Reviews
Dr. Zero (Offensive Security Researcher) — SOLID
Tomer Bar drops a much-needed reality check on the 'advanced' in APT, proving most nation-state operators are just lazy developers making the same dumb misconfigurations as your own IT team. It's a fantastic, concrete threat intel briefing that trades buzzwords for receipts. If you're still treating threat actors like omnipotent ghosts instead of dudes leaving open directories on their C2s, watch this.
Heather Calloway (CISO) — SOLID
Bar delivers a highly credible look at the operational security failures of advanced threat actors. The core takeaway for leadership isn't just that we can hunt in the adversary's backyard, but the sobering realization that basic infrastructure misconfigurations plague even well-funded nation-states. Worth your threat intelligence lead's time, and a necessary reality check for your infrastructure organization.