Opalsec

|

Author: Opalsec

  • Is “Cyber” a Legitimate Weapon in a Tariff War?

    Is “Cyber” a Legitimate Weapon in a Tariff War?

    The Great Tariff War of 2025 between the US and China appears to have hit a natural – if unsatisfying – climax, with both parties having skewered the other with 125%+ tariffs, and are now staring at each other, waiting to see which will bleed out first.

    Despite this, a quote cited in an article from a few weeks ago has been rattling around in the back of my head, and as overblown as it is – I can’t help but wonder if this is or was a genuine possibility that pundits in our industry are wringing their hands over:

    Me, in a high-pitched tone: “Weeeelllllllllll…”

    Turning off water supplies, sewage, or telco networks in retaliation for an (admittedly significant) increase in cost for exports to the US? That seems like a bit much, doesn’t it?

    While that quote is alarmist to say the least, I can see this being a legitimate concern for any CEO who’s already worried about the economic impact of this trade war – let alone the Cyber element.

    Cyber effects and the norms surrounding them aren’t well understood outside of – let alone within – cyber security, and as practitioners it’ll often be on us to provide that context in cases like these.

    So with that said, let’s dissect this, shall we?

    Question #1 – Can they do it?


    In a nutshell – yes.

    Two well-documented groups with recently observed – and possibly ongoing – access to US Critical Infrastructure are Volt Typhoon, and Salt Typhoon.

    Volt Typhoon was identified as a Chinese government-backed hacking group that maintained access to America’s critical infrastructure – namely systems in the Communications, Energy, Transportation Systems, and Water and Wastewater Systems Sectors – since at least 2021 with the perceived goal of pre-positioning for destructive cyberattacks against these targets.

    Salt Typhoon is another highly skilled group that’s been active for at least five years. The group gained infamy after being discovered to have compromised major telcos including Verizon, AT&T, T-Mobile and others; as well as the U.S. Treasury Department. These attacks against Verizon and AT&T are believed to have been carried out as early as 2022, and were only recently uncovered.

    It’s also worth noting that Salt Typhoon were found to have compromised the private communications of targeted individuals, including the now-President Donald Trump and his Vice President J.D. Vance. It’s already well known that China has significant Cyber capability, but this is a tangible example of their ability – and appetite – to use it to target whoever they see fit.

    Oh, and keep in mind – these are just two of China’s more notorious groups as of late. They also have a mature – albeit disorganised – industry of freelance threat actors they can call on, who “jockey for lucrative government contracts by pledgingevermore devastating and comprehensive access to sensitive information deemed useful by Chinese police, military and intelligence agencies”

    Question #2 – Would they do it? How would this even work?


    Given that “Cyber” is such a nebulous term that can take many forms and achieve a wide range of impacts, before we can assess the likelihood of it being used – we first need to understand how it could be used.

    There are a few noteworthy possibilities to consider here:

    Counterintelligence and Espionage

    Salt Typhoon’s campaigns have focused on compromising telecommunications networks to collect sensitive data, including – as we mentioned above – that of the current US President and Vice President. If the Signalgate escapade is anything to go by – this may be easier than you’d think, and this level of access would provide China with strategic advantages during trade negotiations.

    Expressing Displeasure and Sending Signals

    Some have suggested that China could feasibly conduct intrusions with the intent of getting caught – by utilising older tools with a higher risk of detection, for example – to signal their expiring patience in the trade war with the U.S. It might seem like something out of a cheesy Political Thriller, but these “subtle signals” can be a form of communication in a broader “dialogue”.

    Applying Pressure in Negotiations

    China might use cyberattacks to demonstrate its capabilities and pressure the U.S. to cooperate and negotiate trade.

    Legislative Retaliation for Tariffs and Trade Actions

    Beijing has clearly signaled that it won’t take this lying down. While they’ve announced tariffs on US imports, some experts believe China could also retaliate through “backdoor” methods using its cybersecurity laws. For example, interpreting the definitions of data localisation, or the concepts of “important data” and “critical information infrastructure” in such a way as to bog American companies in bureaucracy while seeking licenses and approvals to operate in their market.

    Question #3 – So, would they actually follow through?


    No.

    Well, sort of. 🤔

    To answer it in the context of that original quote – that they would choose to weaponise their “robust foothold within critical infrastructure” in the destructive capacity it’s believed to be intended for – not a chance.

    Yet another atrocity AI must answer for

    Access to US Critical Infrastructure isn’t something China would leverage to “send a message” in a trade dispute, especially when you consider the likelihood that this is being held “in reserve for a Taiwan crisis”, or something of a similar magnitude. The proverbial “cannon” would likely be better used elsewhere.

    More conventional forms of retaliation, such as tariffs, export restrictions on critical minerals, or economic pressure on US allies, are more likely to be employed to solve the problem – and already have been as part of the tit-for-tat.


    Speaking of which – reports emerged late last week that Chinese officials had claimed credit for widespread attacks on US infrastructure – including “ports, water utilities, airports and other targets” – as a “warning to the U.S. about Taiwan.”

    While this could be interpreted as proof that China would leverage their access to US Critical Infrastructure as a tool in diplomatic disputes, what it really shows is that weaponising this access is simply not necessary for the goals they want to achieve.

    To spell it out a bit more clearly:

    More Tub-Thumping than a Warning Shot

    The tacit warning here is “Hey, pal, we have and will keep pre-positioning in US Critical Infrastructure if you keep insisting Taiwan is an independent country,” not “We’ll pull the trigger and weaponise those accesses if you don’t stop.”

    That particular threat isn’t necessary to make their point, and again – that’s something you’d save for a significant crisis, not to apply pressure in a diplomatic discussion.

    The Diplomats Who Cried Wolf

    China have a less-than-credible history when it comes to messaging on cyber attacks, and frequently deflect attribution as the result of an “overactive imagination” on the US’ part – including calling the Volt Typhoon campaigns a US-fabricated hoax.

    My point being – they’ll say whatever is most politically useful for them at the time, regardless of the evidence or facts presented.

    * Old Man Shakes Fist At Cloud *

    The “indirect and somewhat ambiguous” admission in a secret, closed-doors meeting is an example of what we called out earlier – their use of cyber attacks to “send signals” and exert pressure in negotiations.

    Diplomacy – especially for the Chinese Government – is more about posturing than provocation.


    That said, Cyber Espionage is a well-worn page in China’s playbook, and it’ll surprise no one to see the likes of Salt Typhoon, for example, being called on to recreate their previous successes by targeting telcos and the communications of America’s leaders. “Knowing is half the battle”, as they say.

    An increased tempo of offensive Chinese-backed or enabled Cyber Operations is almost a given in the midst of an escalating trade war that seemingly has come to an uncomfortable stalemate, and the US must be prepared for it.

    It’s a good thing the US has a skilled workforce of Cyber Defenders (Oh wait, no they’re shaving CISA’s workforce by 40%), a panel of experts investigating the Salt Typhoon breaches (nope, that was disbanded soon after Trump came into office), and a team of Threat Hunters ready to go (well, what’s left of them).

    Oh dear, Donald. Oh 👏 Dear 👏

    Search

    Proudly powered by WordPress

  • Eroding Foundations: The Precarious State of US Cyber Leadership

    Eroding Foundations: The Precarious State of US Cyber Leadership

     

    Eroding Foundations: The Precarious State of US Cyber Leadership

    Recent developments in the United States paint a concerning picture of a nation whose leadership in the domain of cybersecurity has been effectively eroded by the short-sighted and vindictive agenda of their newly elected President.

    As with his ill-advised imposition of tariffs in trade or the impulsive calls to annex Greenland (for what, we’re still not sure), a series of actions within the cyber realm suggests a shift away from strategic, expert-driven policy towards decisions potentially swayed by political expediency and personal grievances.

    This erosion of stable leadership and expertise will have significant implications for the global cyber threat landscape, creating vulnerabilities that nation-state and cyber criminal adversaries alike will undoubtedly seek to exploit.

    Let’s see where things have unraveled.

    Deprioritisation of the Russia Threat


    One of the first indications of the Trump Administration’s “alternative” approach to Cyber Security was in the alleged instruction to US cyber agencies to stand down on operations targeting Russian entities.

    Reports surfaced suggesting that analysts at CISA were verbally told not to follow or report on Russian threats, and that Russia-related projects were being “nixed“. While CISA publicly refuted these claims, stating that there had been no change in their posture against all cyber threats, including Russia – the proximity in timing between these allegations and a reported pause in offensive cyber operations against Russia by US Cyber Command raised serious questions.

    Senator Chuck Schumer criticized the Trump administration for potentially giving Russia a “free pass” amidst ongoing cyber operations and ransomware attacks against US infrastructure.

    Dismantling Oversight & Accountability Mechanisms


    The next questionable (to say the least) decision by this Administration was the dismantling of the Cyber Safety Review Board (CSRB), which was at the time in the middle of investigating the wide-ranging breach of U.S. and global telcos by the Chinese-linked group Salt Typhoon.

    Senator Ron Wyden criticized the move as a “massive gift to the Chinese spies who targeted top political figures” and suggested it looked like “payback for Microsoft’s million dollar gift to Donald Trump’s inaugural committee”.

    This is a massive gift to the Chinese spies who targeted top political figures. Killing the board that pressured Microsoft to up its cybersecurity looks for all the world like payback for Microsoft’s million dollar gift to Donald Trump’s inaugural committee.

    Senator Ron Wyden (@wyden.senate.gov) 2025-01-21T22:32:09.965Z

    Despite initially being met with scepticism when it was first announced, the CSRB had since proved its value in providing independent and objective review of key Cyber Security incidents.

    Anyone in the industry at the time will remember its scathing report on a “cascade of security failures” at Microsoft which enabled the China-aligned Storm-0558 Threat Group to compromise the systems and emails of multiple senior US leaders and Government Departments. The report led to significant commitments by Microsoft leadership to improve their security practices and culture, demonstrating the CSRB’s ability to affect change.

    The abrupt termination of the CSRB, before the completion of its report on a significant nation-state attack, brings into question the administration’s commitment to independent oversight and understanding of the need to learn from past incidents.

    Firing Skilled Cyber Defenders in Tense Times


    The arbitrary staff cuts of skilled analysts in key cyber agencies like CISA and the NSA represent another critical point of failure. Reports indicate potential cuts of nearly 40 percent of CISA’s workforce, and the Trump administration has been engaged in mass firings of probationary federal employees.

    Former NSA cybersecurity director Rob Joyce warned Congress that these cuts would be “devastating” for US cybersecurity operations, particularly in countering threats from China. The elimination of threat-hunting teams and the fragmentation of personnel responding to critical infrastructure threats weakens the US’ cyber defenses at a time when they are under constant attack.

    The potential loss of experienced cybersecurity talent to the private sector due to uncertainty further exacerbates this issue.

    Personal Insecurities Trump Global Cyber Security


    The firing of the Director of NSA and Cyber Command, General Timothy Haugh, and the Deputy Director without clear and justifiable cause injects further instability into the US cyber leadership structure.

    This decision, occurring shortly after the dismissal of other senior defense officials, has sparked concerns about political interference in traditionally nonpartisan intelligence roles. It’s been widely reported that far-right conspiracy theorist Laura Loomer met with President Trump prior to the announcement being made, and advocated for the removal of Haugh who she saw as “disloyal” to the President.

    Senator Mark Warner expressed deep concern, questioning how firing a “nonpartisan, experienced leader” amidst unprecedented cyber threats – while failing to hold his team accountable for leaking sensitive military information in the Signalgate scandal – makes Americans safer.

    Loyalty Over Integrity


    Finally, the recent revocation of security clearances for all employees of security company SentinelOne as part of a vindictive attack on former CISA head Chris Krebs underscores a deeply concerning trend.

    Eroding Foundations: The Precarious State of US Cyber Leadership

    The White House memorandum accuses Krebs of being a “bad-faith actor who weaponized and abused” his authority at CISA by censoring speech and promoting a partisan agenda related to the 2020 election and COVID-19. As a punitive measure against Krebs, who now works at cyber security vendor SentinelOne, the administration has suspended the security clearances of both him and his current colleagues pending a review.

    SentinelOne, a cybersecurity company that partners with the US government, could see its ability to collaborate and secure government systems hampered by this sweeping revocation.


    The US, once a perceived leader in global cybersecurity, appears to struggling – and failing – to grapple with internal instability, resulting in a shift in priorities that have diminished its capacity and reliability in addressing the escalating cyber threat landscape.

    In a world where cyberattacks transcend borders and can cripple critical infrastructure, a strong and dependable leadership – which has historically been embodied by the US – is paramount. The recent trajectory, however, suggests a concerning vulnerability: that strategic imperatives can – and are – being overshadowed by political agendas and personal vendettas.

    The age of US leadership in cybersecurity is over – at least for the term of this administration. Time will tell if the damage caused (and yet to come) can be reversed by future administrations, but for now – as in the realms of Defence and Commerce – the world will have to redefine how it operates in the Cyber sphere without the US to rally around.



  • Detection is no substitute for Mitigation

    Detection is no substitute for Mitigation

    Detection is no substitute for Mitigation

    Preface:

    I’ve been asked on multiple occasions if we could write a custom detection as a “compensating control” to mitigate the risk of a vulnerability being exploited, in order to buy system admins more time or better yet to altogether negate the need to take a critical business service offline for patching. This article will explain why the answer has never been “yes”, due to the inherent limitations of Threat Detection and Detection Engineering.

    We reported last week on the widespread exploitation of a critical vulnerability in the PaperCut print management software, perpetrated by CL0P and LockBit ransomware affiliates and helped along by a public PoC exploit released by researchers at Horizon3.

    On the flip side of that were defenders, creating and sharing detection rules to assist those who couldn’t/hadn’t yet patched the vulnerability, or who wanted to monitor for possible exploitation as a precaution.

    While a variety were fielded utilising Sysmon logs, device-generated logs, and even network telemetry – the team at Vulncheck last week proved why detections can’t truly compensate for a lack of patching, by bypassing all of them in a revised PoC.

    Now you see me, now you don’t

    The Sysmon detections largely hinged on alerting where the PaperCut application process (pc-app.exe) spawned an unexpected child process like cmd.exe or powershell.exe.

    Detection is no substitute for Mitigation
    Figure 1: modifying the PoC to drop the Java Meterpreter shell will circumvent this detection logic

    While Horizon3 researchers were right to point to native log entries indicative of the exploits targeting of the software’s print scripting interfaces – this, again, was bypassed by Vulncheck who instead found they could abuse the User/Group Sync “custom programs” to achieve the same effect while also avoiding triggering those alerts altogether.


    Opalsec is a reader-supported publication. To receive new posts and support my work, please consider becoming a paid subscriber!


    The Suricata IDS rule proposed by Proofpoint also proved brittle – because the rule searched for the specific string “/app?service=page/SetupCompleted” as an indication of attempted exploitation, it can also be bypassed by inserting junk values that wouldn’t impact the request, such as page//SetupCompleted or random=1&page/SetupCompleted.

    Detection is no substitute for Mitigation

    It’s an Art, not a Science

    Naturally, the original rules could be modified to alert on a child process of java.exe or to search for a string consistent across variations such as “SetupCompleted” – but that would introduce a high risk of generating false positive alerts.

    This brings me to the point of this post – Detection Engineering is a constant battle to maintain a (heavily subjective) balance between being specific enough to generate as few false positive alerts as possible, while also being broad enough to account for attacker permutations and alternate components that can be inserted into the exploit chain to evade our detections.

    The PaperCut vulnerability is the perfect example of why detections are not a substitute for mitigation – the quality of your detection hinges entirely on how well you’ve accounted for all possible implementations or variations of a technique or procedure.

    Should the authors of the first round of detections have been expected to know that User/Group Sync “custom programs” could also be targeted to exploit the vulnerability? Probably not, but the confidence in those detections – which many security teams would be relying on – would have still been moderate to high, in the absence of evidence that they had in fact missed another attack path for the vulnerability.



    The saga continues…

    While I’ve got you – if two ransomware groups and a publicly available exploit PoC weren’t enough to get you patching – Microsoft have also reported spotting Iranian actors getting in on the action, with Mint Sandstorm (formerly PHOSPHORUS) and Mango Sandstorm (formerly MERCURY) observed opportunistically exploiting the vulnerability across a range of industries and geographies.

  • The Defender’s Guide to the 3CX Supply Chain Attack

    The Defender’s Guide to the 3CX Supply Chain Attack

    What the heck is going on?

    The Defender's Guide to the 3CX Supply Chain Attack

    This all kicked off on Wednesday with SentinelOne’s release of a post that looked at a campaign dubbed “Smooth Operator”, which essentially found that the 3CX Voice Over Internet Protocol (VOIP) desktop client – used by some 600,000 companies worldwide and over 12 million daily users – had been compromised with a malicious update.

    The Defender's Guide to the 3CX Supply Chain Attack

    What can I do?

    Well for one – ensure you’ve removed any exceptions that might have been created for the application.

    The compromised software has been assigned CVE-2023-29059, and impacts the following versions on Windows and MacOS:

    1. Windows: versions 18.12.407 and 18.12.416 of the Electron Windows application shipped in Update 7, and
    2. Versions 18.11.1213, 18.12.402, 18.12.407, and 18.12.416 of the Electron MacOS application.

    Florian Roth and his team have also shared several Sigma and YARA rules to help identify compromised files that were leveraged in the attack.

    How did this happen?

    Customer reports of the trojanised application being quarantined by antivirus products first began surfacing the week prior, on the 22nd of March, though SentinelOne have reported observing activity as far back as March 8th.

    Huntress Labs have taken it one even further, having found network infrastructure being established as far back as February 2022:

    The Defender's Guide to the 3CX Supply Chain Attack
    Figure 1: The planning and execution was months in the making

    Whose supply chain was hit?

    3CX were quick to point fingers at ffmpeg – the upstream code supplier for the trojanized ffmpeg.dll binary – but they clearly weren’t in the mood for it and told 3CX to double-check their homework:

    3CX have engaged Mandiant to conduct an investigation, which is ongoing as of the time of writing.



    How does the attack work?

    A trojanized update which was sent out to customers included a modified and malicious version of the legitimate ffmpeg.dll and d3dcompiler.dll binaries, which then retrieved an obfuscated and encrypted .ICO file from an attacker-controlled Github repository.

    The Defender's Guide to the 3CX Supply Chain Attack
    Figure 2: Attack Flow of the malicious update (Credit: @fr0gger_)

    MacOS Execution Chain

    A malicious update was also issued for the MacOS version of the 3CX installer, and it appears to have actually pre-dated the Windows attacks, with the earliest vulnerable version – 18.11.1213 – being deployed in January this year.

    You can find a more detailed analysis of the execution chain in Patrick Wardle’s blog, but for a quick overview, Thomas Roccia (a.k.a @fr0gger_) has you covered:

    The Defender's Guide to the 3CX Supply Chain Attack


    Signed =/= Trusted

    Notably, ReversingLabs reported in their analysis of the Windows sample that they “identified signatures in the appended code pointing to SigFlip, a tool for modifying the authenticode-signed Portable Executable (PE) files without breaking the existing signature.”

    This was elaborated on by Will Dormann, who pointed to its apparent use to abuse a 10 year old flaw – CVE-2013-3900 – classed as a “WinVerifyTrust Signature Validation Vulnerability.”

    While a fix was issued back in 2013, Microsoft made it opt-in, as it could break functionality of legitimate apps such as Google Chrome, which modifies the Authenticode signature as part of denoting if diagnostic logs are meant to be collected and sent.

    The Defender's Guide to the 3CX Supply Chain Attack
    Figure 3: The signature remains intact on the modified dll

    So, who did it?

    CrowdStrike have attributed the attack to a group they track as Labyrinth Chollima, a DPRK-aligned actor with form conducting cyber espionage, cryptocurrency theft and destructive attacks. Their analysis found “the HTTPS beacon structure and encryption key match those observed by CrowdStrike in a March 7, 2023 campaign attributed with high confidence to DPRK-nexus threat actor LABYRINTH CHOLLIMA.”

    Analysts from Sophos and Volexity has also corroborated this attribution to some degree, with Sophos noting the code was “a byte-to-byte match” with what has been seen in previous activity by the Lazarus Group – the catch-all threat group for DPRK-aligned attackers – and Volexity finding the specific shellcode sequence “appears to have been only used in the ICONIC loader and the APPLEJEUS malware, which is known to be linked to Lazarus.”

    How has this been handled?

    Unfortunately, despite receiving dozens of reports from users of multiple EDR products (SentinelOne, CrowdStrike, ESET, Palo Alto Networks, and SonicWall, to name a few) flagging the VOIP client as malicious, 3CX simply responded by telling customers to add exclusions to allow it to continue to run, and to follow-up with their EDR vendor to resolve the problem.

    The Defender's Guide to the 3CX Supply Chain Attack
    Figure 4: 3CX: “We aren’t malware authors therefore this isn’t malware.”

    In an interview with CyberScoop, 3CX CEO Nick Galea noted that antivirus products flagged their software as malicious “quite frequently — so I have to be honest we didn’t take it that seriously […] we did upload it to a site called VirusTotal to check […] and none of the anti-virus engines flagged us of having a virus, so we just left it at that.”

    If that’s not enough to have your head spinning, cop this – Galea only acknowledged the vulnerability on forums on the 31st of March – more than a week after users began reporting the issue – and claims “it was only reported to [them] yesterday night.”

    The Defender's Guide to the 3CX Supply Chain Attack
    The Defender's Guide to the 3CX Supply Chain Attack
    Figure 5: My boy Jackie knows what’s up

    True to form

    A post by respected researcher Kevin Beaumont shows this may be symptomatic of the security culture at 3CX, as he highlighted that when he attempted last year to report a vulnerability that “3CX took little responsibility, didn’t fix it, and started arguing on Twitter”.

    The vulnerability? That files – including the admin password – could be read in plaintext.



    Further Reading

    1. CrowdStrike’s report
    2. SentinelOne’s report
    3. Volexity’s analysis
    4. Huntress’ early analysis
    5. Follow-up analysis by Huntress
    6. Sophos’ analysis
    7. ReversingLab’s analysis
    8. Patrick Wardle’s Analysis of the MacOS attack chain
    9. Analysis & queries by Splunk
  • Your Trust Doesn’t Matter

    Your Trust Doesn’t Matter

    Your Trust Doesn't Matter

    Non-transitive trusts (a.k.a external trusts) – as described by Microsoft – are designed to “deny trust relationships with other domains”, or in other words, only the two domains involved in the trust will be able to authenticate to each other.

    Breaking the Trust

    In the diagram below, a non-transitive trust exists between semperisaz.lab and grandchild1.child1.semperis.lab. This allows for a referral TGT – which is used to request Service Tickets for any service within domains with an established trust path – to be requested for grandchild1.child1.semperis.lab.

    However because it’s a non-transitive trust – there isn’t a trust path between semperisaz.lab and semperis.lab, and attempting to obtain a referral to this domain fails – as expected.

    Your Trust Doesn't Matter
    Figure 1: Non-transitive trusts prevent (direct) authentication to disallowed domains.
    Your Trust Doesn't Matter
    Figure 2: The “local” TGT can then be used to request a referral for the secondary domain.

    While this technique stops short of allowing an attacker to perform “trust hopping” into another forest, Semperis points out the implications of even this limited scope.



    Pivoting using machine accounts

    Semperis have been able to chain this technique with one they previously disclosed, in order to extend the use of local TGTs to enable trust hopping to a forest with which no trusts exist.

    Continuing from where the previous scenario left off, the referral TGT for the semperis.lab domain can be used to retrieve a Service Ticket for the LDAP service, which can then be abused to create a machine account in that domain.

    Your Trust Doesn't Matter
    Figure 3: Creating the TestComp account in semperis.lab

    This account essentially serves as a beachhead within the semperis.lab domain from which we can repeat the exploitation of the flaws found in AD non-transitive trusts.

    The machine account’s TGT requests a referral to the trusting domain of treetest.lab, which is then used request a “local” TGT from treetest.lab.

    Your Trust Doesn't Matter
    Figure 4: The machine account retrieves a local TGT for the intermediate domain

    This local TGT can then be used to request a referral from the DC of the treetest.lab domain to the dsptest.lab domain – which should have been out-of-bounds of an account in semperis.lab, according to the design intent of non-transitive trusts.

    Your Trust Doesn't Matter
    Figure 5: The machine account on semperis.lab can now authenticate to Services in the dsptest.lab domain, for which no trust exists.


    “It’s not a vulnerability, so – no.”

    Unfortunately, Microsoft believe this flaw can’t be classified as a vulnerability, and as such – won’t be taking any action to rectify it.

    Your Trust Doesn't Matter
    Figure 6: Microsoft’s response to Semeperis’ bug report

    Failing that, Semperis recommend auditing Windows 4769 events (A Kerberos service ticket was requested), specifically:

    1. Where a local TGT is requested – the domain (Account Domain field) is for a different forest, and the Service Name is krbtgt;
    2. A second event which follows, requesting a referral TGT – the domain (Account Domain field) is a domain in a different forest, and the Service Name is another domain within the local forest.


  • PoC leak swiftly followed by widespread exploitation – once again

    PoC leak swiftly followed by widespread exploitation – once again

    PoC leak swiftly followed by widespread exploitation - once again

    Attackers have had themselves a field day abusing a vulnerability in Fortinet’s FortiNAC appliance, thanks in no small part to a PoC exploit which was released by security research company Horizon3 – just two business days after Fortinet warned customers to patch the vulnerability.

    The PoC exploit leverages the vulnerability to write arbitrary files to disk, and has been abused by attackers to deploy both interactive and reverse web shells on vulnerable FortiNAC devices.

    PoC leak swiftly followed by widespread exploitation - once again
    Figure 1: A webshell deployed via the PoC exploit, executes base64-encoded commands sent via HTTP POST requests.

    Is two days enough?

    While it’s not surprising that attackers were quick to capitalise on the weaponised exploit, it’s difficult to understand Horizon3’s reasoning for having released it as soon as they did.

    Sure, you might argue that for large organisations lucky enough to have formalised vulnerability management teams and processes – they may have been able to identify and patch the vulnerability in the two business days separating the disclosure of the vulnerability and release of the PoC.

    And this isn’t that far-fetched a scenario either – this hypothetical lines up very neatly with six of Fortinet’s publicly listed case study clients who use FortiNAC appliances in their networks:

    PoC leak swiftly followed by widespread exploitation - once again
    Figure 2: FortiNAC customers aren’t the high-rollers you may think they are


    Timing is everything

    Releasing PoC exploits can help defenders better understand the vulnerable attack surface and detect attempts to exploit it – that’s great, and you’ll find no arguments from me on that.

    There are a myriad of reasons why organisations may be seen to be dragging their heels on patching, many of which are out of the control of the security team or broader organisation, for example:

    1. The organisation is coming up to an important event where absolutely nothing can go wrong – e.g. they’re about to be listed on a stock exchange, their latest product is about to be released for sale, or a long holiday period is coming up – in these cases a “Change Freeze” can be put in place that prevents security teams from making any changes without running a gauntlet of internal approvals;
    2. The software requires staged updates to multiple components before the vulnerable asset itself can be patched – this can take time and co-ordination from multiple internal and vendor stakeholders;
    3. The asset provides critical functionality, and is only able to run as intended on a legacy, vulnerable version. Believe it or not, business requirements can supersede security risks, with “compensating controls” such as “enhanced monitoring” often accepted as a substitute for eliminating a vulnerability – regardless of how critical it is. Ask anyone who’s run a Penetration test on a hospital what the oldest version of Windows they’ve seen on the network is – try not to grimace in disgust when they do.

    Onwards and upwards

    Security research is an invaluable input to Cyber Defence functions, as it provides actionable insights into attacker techniques, security vulnerabilities, and more – all of which defenders must understand, in order to protect against them.

    I’ve been lucky enough to work in several roles on the defensive side, and have seen first-hand how bureaucracy, poor solution design, and convoluted chains of approval can run down the clock when trying to patch security gaps.



    Oh, and it goes without saying – though just in case it needs to be said – I didn’t write this piece to take aim at Horizon3.

    Their work is great – their timing on this one simply presented the opportunity to address a systemic problem in vulnerability disclosure and management.

    I have nothing but respcpt for their team, and wish them all the best.

    PoC leak swiftly followed by widespread exploitation - once again

  • Return of the 0ktapus?

    Return of the 0ktapus?

    Return of the 0ktapus?

    Cryptocurrency exchange operator Coinbase has revealed it responded to an incident in early February where an employee had their credentials compromised, but thankfully resisted an attempt by the attacker to socially engineer their way past the MFA protections they had in place.

    Coinbase have pointed to technical overlaps with the 0ktapus campaign which took place last year and appeared to target customers of the identity provider Okta. Nearly 10,000 accounts in over 130 organisations were compromised through the campaign, which included techniques eerily similar to what was employed in this attack.

    Return of the 0ktapus?

    Significant Overlap in TTPs

    The 0ktapus campaign marked the beginning of activity attributed to a new threat group that is now tracked as UNC3944 (Mandiant) or Scattered Spider (CrowdStrike).

    While their activity has since been reported on mainly due to their experimentation with the bring-your-own-vulnerable-driver (BYOVD) technique and abuse of the Windows Hardware Compatibility Program, the attempted attack on Coinbase marks a return to their tried and true TTPs that earned them their current notoreity.

    SMS Phishing

    The 2022 attack on cloud service provider Twilio – as with many other victims – began with malicious links being delivered via SMS, direct to employees:

    Return of the 0ktapus?
    Figure 2: Twilio employees received Phishing links via SMS

    The links redirected to a spoofed sign-in page for Twilio employees – exactly the same as appears to have occurred in the attack on Coinbase:

    Return of the 0ktapus?
    Figure 3: A spoofed Coinbase login page using the identity provider Duo (credit: @BushidoToken)

    Bypassing MFA

    UNC3944 were noted to have directly called employees to understand the organisation’s Authentication flow and spammed them with MFA prompts (MFA Fatigue) in an attempt to circumvent MFA protections during the 0ktapus campaign. Moreover, Group-IB found that at least 5,441 MFA codes were stolen throughout their long-running campaign.

    In this instance, they opted to attempt to socially engineer the Coinbase employee into helping them bypass MFA by calling them and purporting to be a member of the IT team, after having earlier stolen their credentials via the SMS Phishing lure.

    • Google Voice
    • Skype
    • Vonage/Nexmo
    • Bandwidth[.]com

    Use of lookalike domains

    Coinbase also warned that the actors behind the attack might register and use domains which resemble the company’s trusted services such as sso-<companyName>.com or login.<companyName>-sso.com.

    This exact technique was used extensively during the 0ktapus campaign, and was adapted to match either the organisation being targeted or the provider they were attempting to masquerade as.

    Return of the 0ktapus?
    Figure 4: Lookalike domains identified in the 0ktapus campaign

    Additional Takeaways

    Coinbase have generously shared a list of specific TTPs that stood out from this attack. The full list can be found in their disclosure, but at a high level and in addition to what’s mentioned above, Defenders should watch out for:

    1. Unauthorised, successful/attempted downloads of the AnyDesk (anydesk[.]com) or ISL Online (islonline[.]com) remote desktop viewing software;
    2. Attempts to access the organisation from a 3rd-party VPN provider, specifically Mullvad VPN – which was similarly called out by Okta as a constant within the 0ktapus campaign of 2022;
    3. Unexpected attempts to install the EditThisCookie browser extension;
    4. Use of unapproved text/file-sharing services such as riseup[.]net;
    5. Attempts to enumerate customer support or employee directory applications.

    Growing sophistication


    Appendix A: Mitigating MFA Bypasses

    This attack has reinforced how simple phone-based social engineering is used to coerce users into approving MFA prompts; and while MFA fatigue wasn’t applied in this instance – it’s a known part of UNC3944’s toolkit, and has worked in the past to compromise the likes of Cisco, Microsoft, and Uber.

    In preparation for this threat, here are a few suggestions on how to mitigate it:

    • Enable number matching for Azure AD MFA prompts, and give them context on where the login attempt is coming from so they can judge if it’s a dropped VPN trying to re-authenticate, or a hacker in Argentina trying to mess with them. These measures, combined, can help mitigate MFA fatigue and social engineering attempts;
    • Implement layered Conditional Access Policies, in addition to MFA. E.g. user must be on an MDM-enrolled device with EDR installed; connected to the corporate VPN, and have approved a number-matching MFA prompt to authenticate;
    • Use physical FIDO tokens as your MFA factor – remote attackers can’t easily spoof or socially-engineer this, so they’re much more resilient than both soft and hard tokens;
    • Reduce session-token validity to 24-hours to minimise the time an attacker can maintain access before needing to again bypass MFA;
    • Anticipate compromise – closely monitor Privileged Accounts to compensate for gaps in policy or visibility. Prevention is always ideal, but never a sure thing. Make sure you’re set-up to detect anomalous and unapproved activity by privileged accounts.
  • The Defender’s Guide to OneNote MalDocs

    The Defender’s Guide to OneNote MalDocs

    Why is it being used?

    The Defender's Guide to OneNote MalDocs

    While actors can’t embed VBA macros in OneNote files like they can with Word and Excel documents, it does provide a number of other significant advantages:

    • OneNote files are not affected by Protected View/ Mark-of-the-Web;
    • It allows embedding Malicious Excel/Word/PPT files that will be played without protected view;
    • HTA, LNK, EXE files and more can be embedded in the document, with the extensions spoofed;
    • The document can be formatted in order to trick users into opening a malicious file or a link;
    • Maldoc creation can be automated using the OneNote.Application API and XML.

    Who’s using it?

    Numerous actors – including Initial Access Brokers – have integrated OneNote files into their infection chains, with the end result ranging from credential theft to deployment of secondary malware – some of which are known to lead to ransomware infections.

    These actors have been seen delivering:

    1. Formbook – an infostealer sold on the Dark Web;
    2. Qakbot – a prolific malware family that enables secondary infections which can lead to ransomware deployment;
    3. IcedID – similar to Qakbot, this malware is widely spread and can enable ransomware attacks;
    4. ASyncRAT & xwormASyncRAT is a popular, publicly available RAT that is deployed to maintain attacker access to a compromised system. xworm is a stager malware that delivers other payloads while also retaining basic infostealing capabilities;
    5. The RedLine infostealer, and Remcos RATRedLine is a highly capable and widely used infostealer, while the Remcos RAT is an open-source trojan that is used to facilitate network intrusions.
    The Defender's Guide to OneNote MalDocs
    Figure 1: OneNote Campaigns really accelerated in January

    How does this work?

    Overview

    Similar to traditional Excel and Word document lures, OneNote lures have largely masqueraded as an invoice, remittance advice or other document that the target is urged to view.

    Upon opening the document, instead of asking a user to click “Enable Content”, the lure prompts them to double-click a fake “Open” button:

    The Defender's Guide to OneNote MalDocs
    Figure 2: OneNote lures still require some social engineering

    This button simply sits over an embedded .hta file, which is executed when the user attempts to double-click the button overlay:

    The Defender's Guide to OneNote MalDocs
    Figure 3: A Qakbot OneNote lure that executes a malicious .hta file when the user double-clicks “Open”


    Example Attack – Qakbot

    Max Malyutin was one of the first to flag the adoption of OneNote files by the actors distributing Qakbot, with their lures going virtually undetected by antivirus engines at the beginning of their campaign.

    The Defender's Guide to OneNote MalDocs
    Figure 4: Low detection rates for Qakbot’s initial campaigns

    The lure used was as above, with a malicious .hta file executed when the user double-clicked the lure.

    This invoked curl to download a secondary payload – the Qakbot malware – which was then executed by rundll32.exe and injected into the wermgr.exe process.

    The Defender's Guide to OneNote MalDocs
    Figure 4: The Qakbot infection chain, injecting the 2nd stage payload into wermgr.exe

    What’s the point?

    OneNote files aren’t subject to the same Mark-of-the-Web restrictions (i.e. the default blocking of macros in downloaded files) as Excel and Word documents.

    This means that the convoluted .iso > .lnk mechanism that was adopted to circumvent this protection isn’t necessary, with the added benefit that opening a OneNote file is a much more familiar concept to end users than mounting a virtual disk image, making it a more believable lure.

    The Defender's Guide to OneNote MalDocs
    Figure 5: OneNote files allow IcedID payloads to be delivered with less dependencies and steps

    Attackers are also able to format the OneNote document to match the theme of the email and further add to the apparent legitimacy of the lure, while still enabling the embedding of malicious code and techniques such as HTML Smuggling.



    How can I analyse these files?

    A few tools have been flagged by the community, which can help in analysing OneNote files:

    1. One-Extract by Volexity
    2. OneNoteAnalyzer by knight0x07
    3. OneDump.py by Didier Stevens

    As demonstrated by malware analyst pr0xylife, OneDump.py can be chained with other commandline tools to yield quick results, especially where the OneNote file is used to download a 2nd-stage payload from a C2 address:

    The Defender's Guide to OneNote MalDocs
    Figure 6: Didier Stevens’ commandline tools can be chained together to extract easy wins

    OneNoteAnalyzer is a significantly more fully-featured tool, extracting metadata, attachments and images from the document for a more detailed review:

    The Defender's Guide to OneNote MalDocs
    Figure 7: OneNoteAnalyzer dumping attached COM executables from the maldoc

    For a more detailed walkthrough of the overall process, check out Josh Stroschein’s video that examines an ASyncRAT delivery campaign:

    How can I detect it?

    Examining files with YARA rules

    The YARA rules created and shared publicly thusfar have focused on:

    1. The “magic bytes” identifying OneNote files (0xE4525C7B);
    2. The FileDataStoreObject GUID {BDE316E7-2665-4511-A4C4-8D4D0B7A9EAC} that indicates embedded files (flagged by Didier Stevens);
    3. Potentially malicious strings.

    SIEM Detections using Sigma rules

    @nas_bench from Nextron Systems has provided this Sigma rule that looks for OneNote files created in suspicious directories, which are commonly abused to drop downloaded files.

    I’ve also had a go at creating a Sigma rule that looks for variations of the process tree you’re likely to see in a campaign leveraging OneNote files, including where they’ve renamed the system binaries being abused. You can find it here.



  • KeePass Vulnerability allows export of clear-text credentials

    KeePass Vulnerability allows export of clear-text credentials

    KeePass Vulnerability allows export of clear-text credentials

    An exploit PoC has been shared publicly for CVE-2023-24055, which relates to the ability for an attacker to add an export trigger within the KeePass XML configuration file, enabling them to dump clear-text passwords from the Password Manager.

    KeePass Vulnerability allows export of clear-text credentials
    Figure 1: The credentials are dumped in plain-text to an xml file

    The author of the PoC even helpfully provided a PowerShell one-liner to base64-encode the dumped passwords and exfil them via a HTTP POST request:

    1
    Figure 2: Credentials can be exfiltrated with basic, in-built tools

    Working as intended

    KeePass, however, have argued that this is not a vulnerability, as “the password database is not intended to be secure against an attacker who has that level of access to the local PC”, further insisting that “KeePass cannot magically run securely in an insecure environment.”

    The full scope of impacted versions of KeePass is still unknown, but the vulnerability is at least confirmed to be present in 2.5x versions.

    Detection & Mitigation

    While this vulnerability is still being disputed and a patch yet to be released, organisations and users relying on this product should monitor for file modification events of the config file (KeePass.config.xml), and investigate the feasibility of setting more restrictive ACLs to prevent unauthorised modification of the file.

  • Beware spoofed x.509 Certificates

    Beware spoofed x.509 Certificates

    Beware spoofed x.509 Certificates

    Researchers from Akamai have released a technical write-up and PoC exploit for CVE-2022-34689, a critical vulnerability in the Windows CryptoAPI library that could enable attackers to spoof legitimate x.509 Certificates, in order to perform authentication or code signing as the spoofed certificate.

    Technical Details

    The vulnerability stems from the CreateChainContextFromPathGraph function call in the crypt32.dll module, which validates cached certificates solely based on the value of the certificate’s MD5 thumbprint.

    Therefore, if an attacker could serve a malicious certificate whose MD5 thumbprint collides (has the same value) with one that is already in the victim’s certificate cache, they would be able to bypass this check and have their malicious certificate trusted by the victim system.

    MD5 Hash Collisions

    For those thinking “isn’t it still technically impossible for us to create two different files that have matching MD5 values?” – you’d be right! That’s called a preimage attack, and while it can be done for more simple hash types like SHA1, it isn’t yet feasible for MD5.

    The specifics of how the attack works isn’t something that can be summarised without getting overly technical, but the key points are that:

    1. There’s a part of the x.509 certificate called the tbsCertificate (to-be-signed) or TBS – this contains all the identity-related values, such as the subject, extensions, Public Key, and more. This is what the Certificate Signature validates;
    2. The attacker must modify the contents of the TBS – in particular replacing the Public Key value with an attacker-controlled Public Key value – which is what allows the attacker to sign as the malicious certificate;
    3. The Certificate Signature is left untouched, which means the Certificate is incorrectly signed. This doesn’t matter for the purpose of this exploit though, as the vulnerable CryptoAPI library only compares the Certificate Thumbprint;
    4. The other steps of the prefix collision attack are performed – manipulating the contents of the original and malicious certificates and copying the result of the MD5 prefix collision computation (i.e. the colliding MD5 thumbprint values) into both of the certificates.

    Attack Flow

    Based on the above, there are now three certificates to be aware of:

    1. The original, unmodified Target Certificate;
    2. The Modified Target Certificate which has the colliding MD5 thumbprint value inserted into it; and
    3. The Malicious Certificate, which – in addition to having the colliding MD5 thumbprint – also contains the modified Public Key value in the TBS segment.

    Akamai’s research team found that Google Chrome v48 and Chromium applications from that time were vulnerable to this flaw, and illustrated the attack flow using the modified certificates to perform a MiTM attack:

    Real-World Impact

    While Akamai’s research team have thusfar only identified Chrome v48 and associated Chromium applications as being vulnerable, they have indicated there are likely more vulnerable targets in-the-wild that have simply not yet been discovered.

    Moreover, they noted that they “found that fewer than 1% of visible devices in data centers are patched, rendering the rest unprotected from exploitation of this vulnerability.”