<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Security on zoph.me</title>
    <link>/tags/security/</link>
    <description>Recent content in Security on zoph.me</description>
    <image>
      <title>zoph.me</title>
      <url>https://zoph.me/posts/resources/images/code-social.png</url>
      <link>https://zoph.me/posts/resources/images/code-social.png</link>
    </image>
    <generator>Hugo -- 0.148.2</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 04 Apr 2026 07:37:00 +0200</lastBuildDate>
    <atom:link href="/tags/security/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Speeding Up IAMTrail: One Boto3 Process Instead of 1,500 CLI Invocations</title>
      <link>/posts/2026-04-04-iamtrail-optim/</link>
      <pubDate>Sat, 04 Apr 2026 07:37:00 +0200</pubDate>
      <guid>/posts/2026-04-04-iamtrail-optim/</guid>
      <description>&lt;h2 id=&#34;the-46-minute-problem&#34;&gt;The 46-Minute Problem&lt;/h2&gt;
&lt;p&gt;The IAMTrail detection engine fetches ~1,500 AWS managed IAM policies every run. The original approach was pure bash:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-1&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-1&#34;&gt;1&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-2&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-2&#34;&gt;2&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-3&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-3&#34;&gt;3&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-4&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-4&#34;&gt;4&lt;/a&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;aws iam list-policies --output json &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    jq -cr &lt;span class=&#34;s1&#34;&gt;&amp;#39;...&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    xargs -P &lt;span class=&#34;m&#34;&gt;16&lt;/span&gt; -n3 sh -c &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;se&#34;&gt;&lt;/span&gt;      &lt;span class=&#34;s1&#34;&gt;&amp;#39;aws iam get-policy-version --policy-arn $1 --version-id $2 | jq --indent 4 . &amp;gt; &amp;#34;policies/$3&amp;#34;&amp;#39;&lt;/span&gt; sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Looks fine, right? Except each iteration spawns a full AWS CLI process. That means a fresh Python runtime, boto3 import, credential resolution, one single HTTP call, then exit. Times 1,500.&lt;/p&gt;</description>
    </item>
    <item>
      <title>IAMTrail.com: The AWS Managed Policy Archive (Evolved from MAMIP)</title>
      <link>/posts/2025-10-23-mamip-compagnion-website/</link>
      <pubDate>Thu, 23 Oct 2025 13:37:00 +0200</pubDate>
      <guid>/posts/2025-10-23-mamip-compagnion-website/</guid>
      <description>&lt;h2 id=&#34;-the-origins&#34;&gt;📜 The Origins&lt;/h2&gt;
&lt;p&gt;Back in 2019, &lt;a href=&#34;https://twitter.com/0xdabbad00&#34;&gt;Scott Piper&lt;/a&gt; started a GitHub repository to track changes to AWS Managed Policies. It was a simple setup, manually triggered but it worked well and was incredibly useful. Using &lt;code&gt;git diff&lt;/code&gt; or the Github.com UI, Scott and the community could easily see how policies evolved over time.&lt;/p&gt;
&lt;p&gt;At that time, AWS didn&amp;rsquo;t publicly share the changes made to managed policies by the various &amp;ldquo;two-pizza&amp;rdquo; product teams inside AWS.&lt;/p&gt;</description>
    </item>
    <item>
      <title>AWS CloudFormation Phishing Attack: A Growing Threat</title>
      <link>/posts/2025-02-10-cloudformation-phishing-campaign/</link>
      <pubDate>Mon, 10 Feb 2025 13:37:00 +0200</pubDate>
      <guid>/posts/2025-02-10-cloudformation-phishing-campaign/</guid>
      <description>&lt;h2 id=&#34;-introduction&#34;&gt;✨ Introduction&lt;/h2&gt;
&lt;p&gt;It starts with an innocuous-looking email. The sender claims to be AWS Support, warning the recipient about an urgent security issue. A single button labeled “Launch Stack” is prominently placed, urging immediate action. What appears to be a standard security advisory is, in reality, the gateway to a sophisticated AWS account takeover attempt.&lt;/p&gt;
&lt;p&gt;Threat actors are exploiting AWS CloudFormation StackSets in phishing campaigns designed to compromise AWS environments. Originally reported by &lt;a href=&#34;https://ramimac.me/&#34;&gt;Rami McCarthy&lt;/a&gt; back in 2022 and by Scott Piper in this &lt;a href=&#34;https://tldrsec.com/p/blog-lesser-known-aws-attacks&#34;&gt;blog post&lt;/a&gt; (2021), this technique continues to evolve, demonstrating how adversaries leverage AWS automation against its own users.&lt;/p&gt;</description>
    </item>
    <item>
      <title>About AWS Security Digest acquisition</title>
      <link>/posts/2024-07-31-aws-security-digest-acquisition/</link>
      <pubDate>Wed, 31 Jul 2024 13:37:00 +0200</pubDate>
      <guid>/posts/2024-07-31-aws-security-digest-acquisition/</guid>
      <description>&lt;h2 id=&#34;history&#34;&gt;📜 History&lt;/h2&gt;
&lt;p&gt;In late 2020, I was floored by the number of announcements, changes, re:Invent releases, and blog posts that AWS pushes every week.&lt;/p&gt;
&lt;p&gt;Then, I decided to automate part of my weekly routine to stay up to date. The idea was to get a digest email summary of what was going on. It was very helpful for my job as an &lt;a href=&#34;https://zoph.io&#34;&gt;Indie AWS Security Consultant&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A few weeks later, I decided to open my weekly digest to external subscribers, as I believed it could interest folks in the same field. Here we were with the ASD Newsletter in January 2021.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Brewing the Best in AWS Security: Top Reads of the Year</title>
      <link>/posts/2023-12-17-aws-security-wrap-up/</link>
      <pubDate>Sun, 17 Dec 2023 13:37:00 +0200</pubDate>
      <guid>/posts/2023-12-17-aws-security-wrap-up/</guid>
      <description>&lt;p&gt;As we welcome 2024, I&amp;rsquo;m excited to share a special post for the &lt;a href=&#34;https://awssecuritydigest.com&#34;&gt;AWS Security Digest Newsletter&lt;/a&gt;. It&amp;rsquo;s been a remarkable year, and your engagement has made it even more so.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;ASD Chef&#34; loading=&#34;lazy&#34; src=&#34;/posts/resources/images/posts/chef-asd.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;🔗 I&amp;rsquo;ve compiled the top 5 most-clicked links from our 2023 editions.&lt;/p&gt;
&lt;p&gt;These links represent the most intriguing, informative, and impactful topics in the AWS Security landscape.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1️⃣ &lt;a href=&#34;https://asd.zph.app/QwW&#34;&gt;Enabling Just-In-Time (JIT) Access for AWS S3 Buckets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;2️⃣ &lt;a href=&#34;https://asd.zph.app/puE&#34;&gt;Actionable AWS Security Best Practices [Cheat Sheet]&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;3️⃣ &lt;a href=&#34;https://asd.zph.app/QHg&#34;&gt;AWS Security Foundations For Dummies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;4️⃣ &lt;a href=&#34;https://asd.zph.app/Mrc&#34;&gt;Bare minimum AWS Security Alerting and Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;5️⃣ &lt;a href=&#34;https://s.zoph.io/t/xT8&#34;&gt;AWS ImdsPacketAnalyzer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;👨‍🍳 Why a Chef? You might wonder about the image. In our newsletter, we &amp;lsquo;cook&amp;rsquo; complex AWS concepts into digestible insights, much like a chef preparing a gourmet meal. This theme has been a fun and integral part of our journey.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Elevate your AWS Security with basic alerting</title>
      <link>/posts/2023-02-12-aws-security-survival-kit/</link>
      <pubDate>Sun, 12 Feb 2023 13:37:00 +0200</pubDate>
      <guid>/posts/2023-02-12-aws-security-survival-kit/</guid>
      <description>&lt;p&gt;As businesses continue to adopt cloud computing and move their operations to the cloud, it&amp;rsquo;s crucial to ensure the security of their cloud environment. Amazon Web Services (AWS) is the leading cloud platform, but with the ease of use comes the responsibility of securing the data, applications, and services deployed on the cloud.&lt;/p&gt;
&lt;p&gt;AWS provides a vast array of security services, but it can be challenging to keep track of all the activities and changes happening in your AWS account. That&amp;rsquo;s where the AWS Security Survival Kit (ASSK) comes in. This comprehensive and free open-source kit sets up basic proactive monitoring and alerting on common suspicious activities in your AWS account.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The day when the AWS Support got access to your S3 data</title>
      <link>/posts/2021-12-22-the-day-when-aws-support-got-access-to-your-data/</link>
      <pubDate>Wed, 22 Dec 2021 13:37:00 +0200</pubDate>
      <guid>/posts/2021-12-22-the-day-when-aws-support-got-access-to-your-data/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Update from: 2021-12-23&lt;/p&gt;
&lt;p&gt;Official Security bulletin from AWS
AWSSupportServiceRolePolicy Informational Update&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://aws.amazon.com/security/security-bulletins/AWS-2021-007/&#34;&gt;https://aws.amazon.com/security/security-bulletins/AWS-2021-007/&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;You will find below details about the security incident that led to this unattended access for millions of AWS customers.&lt;/p&gt;
&lt;p&gt;On &lt;code&gt;22nd December 2021&lt;/code&gt;, AWS deployed a new version (&lt;code&gt;v20&lt;/code&gt;) of &lt;code&gt;AWSSupportServiceRolePolicy&lt;/code&gt;, used by a mandatory role &lt;code&gt;AWSServiceRoleForSupport&lt;/code&gt; for AWS Support access to all AWS Accounts. In this policy, they added the action &lt;code&gt;s3:getObject&lt;/code&gt;, which gives AWS Support teams access to all customer Amazon S3 data.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Does AWS drink its own champagne? 🍾</title>
      <link>/posts/2021-04-01-analysis-of-managed-policies/</link>
      <pubDate>Tue, 06 Apr 2021 13:37:00 +0200</pubDate>
      <guid>/posts/2021-04-01-analysis-of-managed-policies/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;TL;DR:
AWS Managed Policies are safe. Currently.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3 id=&#34;arrows_counterclockwise-previously-in-policy-validation&#34;&gt;:arrows_counterclockwise: Previously in Policy Validation&lt;/h3&gt;
&lt;p&gt;Before the AWS Access Analyzer (AA) Policy Validation release, a few open source initiatives were available to lint AWS IAM Policies, like &lt;a href=&#34;https://github.com/duo-labs/parliament&#34;&gt;Parliament&lt;/a&gt; from &lt;a href=&#34;https://duo.com/labs/&#34;&gt;Duolabs&lt;/a&gt; and &lt;a href=&#34;https://github.com/salesforce/cloudsplaining&#34;&gt;CloudSplaining&lt;/a&gt; (Salesforce).&lt;/p&gt;
&lt;p&gt;The tricky part of these tools is that they are community-driven, from volunteer contributors, and most of the master data comes from AWS IAM docs web scraping. It is difficult to maintain over time, especially if the documentation format is changing, or if the documentation is not in sync with the IAM reality. It will be easier for everyone if the one who is providing the rules is the one who creates the validation tool to run against these rules. Isn&amp;rsquo;t it?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Keeping you posted on AWS Security</title>
      <link>/posts/2021-01-22-aws-security-digest/</link>
      <pubDate>Fri, 22 Jan 2021 13:37:00 +0200</pubDate>
      <guid>/posts/2021-01-22-aws-security-digest/</guid>
      <description>&lt;p&gt;Since my last post on how to &lt;a href=&#34;/posts/2020-12-19-how-to-deal-with-information-overload/&#34;&gt;deal with information overload&lt;/a&gt; and reading pipeline, I&amp;rsquo;ve created a &lt;a href=&#34;https://asd.zoph.io/&#34;&gt;free digest newsletter&lt;/a&gt; about &lt;strong&gt;AWS Security&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The goal of this curated AWS Security Digest is to condense what happened last week, from the most relevant sources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;🔦 A highlight of the week&lt;/li&gt;
&lt;li&gt;👮 Changes since last week on AWS Managed IAM Policies&lt;/li&gt;
&lt;li&gt;💌 Curated cloud security newsletters&lt;/li&gt;
&lt;li&gt;👀 AWS API changes&lt;/li&gt;
&lt;li&gt;🔒 IAM permissions changes&lt;/li&gt;
&lt;li&gt;🆙 Most upvoted posts on r/AWS&lt;/li&gt;
&lt;li&gt;🔗 Top shared links on Twitter (by cloudsec folks)&lt;/li&gt;
&lt;li&gt;🐦 Most engaged tweets from the community&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is an ongoing side project, so more content will be added over time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Level-up your online privacy using PGP</title>
      <link>/posts/2020-09-19-levelup-your-data-privacy-using-pgp/</link>
      <pubDate>Tue, 29 Sep 2020 13:37:00 +0200</pubDate>
      <guid>/posts/2020-09-19-levelup-your-data-privacy-using-pgp/</guid>
      <description>&lt;h3 id=&#34;tldr&#34;&gt;TL;DR&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;I&amp;rsquo;m now using PGP for archive file encryption.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;the-trigger&#34;&gt;The trigger&lt;/h2&gt;
&lt;p&gt;This summer, I read &lt;a href=&#34;https://www.amazon.com/Permanent-Record-Edward-Snowden-audiobook/dp/B07VZWH6NB/ref=sr_1_1?dchild=1&amp;amp;qid=1600524366&amp;amp;refinements=p_27%3AEdward+Snowden&amp;amp;s=books&amp;amp;sr=1-1&#34;&gt;Permanent Record&lt;/a&gt; from &lt;a href=&#34;https://en.wikipedia.org/wiki/Edward_Snowden&#34;&gt;Edward Snowden&lt;/a&gt;, &amp;ldquo;Ed&amp;rdquo; for those in the know. I was pretty impressed at how a government organization with a multi-billion dollar budget can organize a mass surveillance program at a worldwide scale in only a few decades.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Encryption works. Properly implemented strong crypto systems are one of the few things that you can rely on. Unfortunately, endpoint security is so terrifically weak that NSA can frequently find ways around it.”&lt;/p&gt;</description>
    </item>
    <item>
      <title>[MAMIP] Monitor AWS Managed IAM Policies</title>
      <link>/posts/2019-09-08-mamip/</link>
      <pubDate>Sat, 22 Feb 2020 13:37:00 +0200</pubDate>
      <guid>/posts/2019-09-08-mamip/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This article was originally posted in September 2019. Updated in February 2020.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;disclaimer&#34;&gt;Disclaimer&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Thanks to &lt;a href=&#34;https://github.com/0xdabbad00&#34;&gt;@0xdabbad00&lt;/a&gt; from &lt;a href=&#34;https://summitroute.com/&#34;&gt;SummitRoute&lt;/a&gt; for the original idea and &lt;code&gt;jq&lt;/code&gt; parsing.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h1 id=&#34;purpose&#34;&gt;Purpose&lt;/h1&gt;
&lt;p&gt;When your production workloads rely on AWS IAM Managed Policies (don&amp;rsquo;t do this), you will need to be notified when changes occur behind the scenes. It&amp;rsquo;s also interesting to monitor new AWS service releases ahead of the announcements to get spoiled.&lt;/p&gt;
&lt;p&gt;This pet project automates the retrieval (every 4 hours) of new AWS Managed IAM Policies to make it easier to monitor and get alerted when changes occur (by AWS), using the &amp;ldquo;Watch&amp;rdquo; feature on GitHub, RSS or a dedicated &lt;a href=&#34;https://twitter.com/mamip_aws&#34;&gt;Twitter Account&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>AWS Security Toolbox (AST)</title>
      <link>/posts/2019-12-16-aws-security-toolbox/</link>
      <pubDate>Mon, 16 Dec 2019 13:37:00 +0200</pubDate>
      <guid>/posts/2019-12-16-aws-security-toolbox/</guid>
      <description>&lt;p&gt;In my day-to-day job, I was wasting time reinstalling and dealing with the dependencies of all my favorite tools for AWS Security Audits and Assessments.&lt;/p&gt;
&lt;p&gt;So, lately, I&amp;rsquo;ve decided to start another &lt;a href=&#34;/posts/2019-05-20-my-pet-projects&#34;&gt;pet project&lt;/a&gt; trying to solve this issue and provide a simple Docker container with all the security-related tooling for your AWS Assessments.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve decided to open-source it. After some discussion with my peers, they were interested in this kind of stuff to avoid wasting hours installing a myriad of apps and Python dependencies on their own laptop or customer machine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>[FR] AWS re:Inforce 2019</title>
      <link>/posts/2019-07-12-reinforce2019/</link>
      <pubDate>Mon, 15 Jul 2019 13:37:00 +0200</pubDate>
      <guid>/posts/2019-07-12-reinforce2019/</guid>
      <description>&lt;h1 id=&#34;reinforce-2019&#34;&gt;re:Inforce 2019&lt;/h1&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://d2908q01vomqb2.cloudfront.net/22d200f8670dbdb3e253a90eee5098477c95c23d/2019/03/12/AWS_reinforce_socail_1200x600_save-the-date3@3x.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Il s&amp;rsquo;agit de la première édition de cette conférence AWS dédiée à la sécurité de ce Cloud Service Provider (CSP). AWS est actuellement en train de proposer de nouveaux événements et summits sur des sujets spécifiques, en plus de l&amp;rsquo;événement annuel, le re:Invent.&lt;/p&gt;
&lt;p&gt;Cette conférence aura lieu chaque année dans une ville différente des États-Unis, il est question de Houston pour l&amp;rsquo;année prochaine.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://reinforce.awsevents.com/&#34;&gt;https://reinforce.awsevents.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;J&amp;rsquo;ai eu l&amp;rsquo;occasion de participer au re:Cap du re:Inforce proposé par AWS France, voici en synthèse, les éléments à ne pas manquer.&lt;/p&gt;</description>
    </item>
    <item>
      <title>[FR] leHack 2019</title>
      <link>/posts/2019-07-13-lehack-2019/</link>
      <pubDate>Sat, 13 Jul 2019 13:37:00 +0200</pubDate>
      <guid>/posts/2019-07-13-lehack-2019/</guid>
      <description>&lt;h2 id=&#34;présentation&#34;&gt;Présentation&lt;/h2&gt;
&lt;p&gt;Anciennement &amp;ldquo;la Nuit du Hack&amp;rdquo;, c&amp;rsquo;est une conférence sur la sécurité informatique, le ethical hacking de manière plus générale, organisée depuis plus de 16 ans par &lt;a href=&#34;https://lehack.org/fr/a-propos/team&#34;&gt;la même équipe&lt;/a&gt;. Cette année était la première année après son changement de nom, les organisateurs attendaient cette fois-ci plus de 3500 personnes.&lt;/p&gt;
&lt;p&gt;J&amp;rsquo;ai eu la chance d&amp;rsquo;y participer pour la première fois cette année à la Cité des Sciences et de l&amp;rsquo;Industries de Paris.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Enable Default Encryption for EBS (Worldwide)</title>
      <link>/posts/2019-06-10-ebs-default-encryption/</link>
      <pubDate>Mon, 10 Jun 2019 13:37:00 +0200</pubDate>
      <guid>/posts/2019-06-10-ebs-default-encryption/</guid>
      <description>&lt;p&gt;Following the &lt;a href=&#34;https://aws.amazon.com/blogs/aws/new-opt-in-to-default-encryption-for-new-ebs-volumes/&#34;&gt;announced&lt;/a&gt; new opt-in option regarding the default encryption of EBS volumes a few days ago, I&amp;rsquo;ve made a small Python script to enable this feature on all AWS regions within an AWS account. Quick and &lt;del&gt;Dirty&lt;/del&gt; Simple.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;ebs default encryption&#34; loading=&#34;lazy&#34; src=&#34;https://media.amazonwebservices.com/blog/2019/ed_always_on_2.png&#34;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This is an example. Use it at your own risk, and test it before applying to production, as usual :)&lt;/p&gt;&lt;/blockquote&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-1&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-1&#34;&gt; 1&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-2&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-2&#34;&gt; 2&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-3&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-3&#34;&gt; 3&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-4&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-4&#34;&gt; 4&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-5&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-5&#34;&gt; 5&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-6&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-6&#34;&gt; 6&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-7&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-7&#34;&gt; 7&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-8&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-8&#34;&gt; 8&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-9&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-9&#34;&gt; 9&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-10&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-10&#34;&gt;10&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-11&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-11&#34;&gt;11&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-12&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-12&#34;&gt;12&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-13&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-13&#34;&gt;13&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-14&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-14&#34;&gt;14&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-15&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-15&#34;&gt;15&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-16&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-16&#34;&gt;16&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-17&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-17&#34;&gt;17&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-18&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-18&#34;&gt;18&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-19&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-19&#34;&gt;19&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-20&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-20&#34;&gt;20&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-21&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-21&#34;&gt;21&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-22&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-22&#34;&gt;22&lt;/a&gt;
&lt;/span&gt;&lt;span class=&#34;lnt&#34; id=&#34;hl-0-23&#34;&gt;&lt;a class=&#34;lnlinks&#34; href=&#34;#hl-0-23&#34;&gt;23&lt;/a&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;boto3&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;AWS_REGION&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;eu-west-1&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;session&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;boto3&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Session&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;region_name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AWS_REGION&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;ec2&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;session&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;client&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;ec2&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;main&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;event&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;context&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;ec2_regions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;region&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;RegionName&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;region&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ec2&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;describe_regions&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()[&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Regions&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;# For all AWS Regions&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;region&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ec2_regions&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;conn&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;boto3&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;client&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;ec2&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;region_name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;region&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nb&#34;&gt;print&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Checking AWS Region: &amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;region&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;status&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;conn&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get_ebs_encryption_by_default&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nb&#34;&gt;print&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;====&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;status&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;EbsEncryptionByDefault&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;True&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nb&#34;&gt;print&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Activated, nothing to do&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nb&#34;&gt;print&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Not activated, activation in progress&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;conn&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable_ebs_encryption_by_default&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;vm&#34;&gt;__name__&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;main&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;That&amp;rsquo;s all folks!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Wanacry or Wanasmile?</title>
      <link>/posts/2017-05-29-wannacry/</link>
      <pubDate>Mon, 29 May 2017 22:31:32 +0200</pubDate>
      <guid>/posts/2017-05-29-wannacry/</guid>
      <description>&lt;p&gt;In this article, you will find best practices regarding security and the high availability of your data to prevent the spread of Wanacry and other ransomware.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;alt&#34; loading=&#34;lazy&#34; src=&#34;/posts/resources/images/wanacry.jpg&#34;&gt;&lt;/p&gt;
&lt;h1 id=&#34;what-is-wanacry&#34;&gt;What is wanacry?&lt;/h1&gt;
&lt;p&gt;Wanacry is a ransomware that uses a hole in the SMB protocol called &lt;a href=&#34;https://en.wikipedia.org/wiki/EternalBlue&#34;&gt;EternalBlue&lt;/a&gt;, then &lt;a href=&#34;https://en.wikipedia.org/wiki/DoublePulsar&#34;&gt;DoublePulsar&lt;/a&gt; is installed as a backdoor to run Wanacry. After you get infected, your files begin to be encrypted with the AES-128-CBC cipher, and then a popup asks you for a ransom to get them back. It spreads through the network using port TCP/445 (SMB &lt;strong&gt;v1&lt;/strong&gt;).&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
