<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bleu Boy on Medium]]></title>
        <description><![CDATA[Stories by Bleu Boy on Medium]]></description>
        <link>https://medium.com/@bleuboy?source=rss-a049e0a9643f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wRC8KB-S3z0qOa8UCFkduA.png</url>
            <title>Stories by Bleu Boy on Medium</title>
            <link>https://medium.com/@bleuboy?source=rss-a049e0a9643f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 18:24:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bleuboy/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[LetsDefend: Google Cloud Compromise]]></title>
            <link>https://medium.com/@bleuboy/letsdefend-google-cloud-compromise-8d1019cc9fbb?source=rss-a049e0a9643f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d1019cc9fbb</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[letsdefendio]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Bleu Boy]]></dc:creator>
            <pubDate>Tue, 24 Mar 2026 13:59:57 GMT</pubDate>
            <atom:updated>2026-03-24T13:59:57.679Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*vMGNAFSfAhD5Y4z0vzkdPw.jpeg" /></figure><p>A Google Cloud compromise occurs when an attacker gains unauthorized access to cloud resources, be it virtual machines, storage buckets, databases, or IAM accounts potentially leading to data exfiltration, service disruption, or privilege escalation.</p><h3>Challenge Scenario:</h3><blockquote><strong>A new startup recently decided to store its secret code in a Google Cloud Storage bucket. However, a greedy developer attempted to steal the code by impersonating another Google Cloud identity to perform malicious actions. Investigate the Google Cloud logs to determine what happened.</strong></blockquote><p><strong>Question 1: What’s the name of the project that was compromised?</strong></p><p>In Google Cloud, every resource and action exists within the scope of a <strong>project</strong>, and each project is uniquely identified by a <strong>project_id</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YhHNvY5TpQj_8ih9jVcNbA.png" /></figure><p>Answer: <strong>cryptostartup</strong></p><p><strong>Question 2: What google cloud identity is compromised?</strong></p><p>Google Cloud Identity is Google’s identity and access management service that defines who can authenticate to Google Cloud and what they’re allowed to do.</p><p>It manages identities such as user (e.g human accounts like user@company.com), service accounts (non-human identities used by apps and workloads), groups (collections of users).<br>These identities are granted permissions through <strong>IAM roles</strong>, and every authenticated action they perform in GCP is logged.</p><p>When analyzing Cloud Audit Logs to identify a Google Cloud identity, key fields to examine include authenticationInfo.principalEmail, authenticationInfo.principalSubject, and authenticationInfo.serviceAccountKeyName.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vg62obgut2D_9KB8kt46KQ.png" /></figure><p>The authenticationInfo.principalEmail field hold the Google Cloud identity.</p><p>Answer: <strong>cloud-storage-helper@cryptostartup.iam.gserviceaccount.com</strong></p><p><strong>Question 3: What IP address is the identity authenticated from?</strong></p><p>To know what IP address the identity is authenticated from, it can be gotten from the callerIP field in the Cloud Audit Log.</p><p>The callerIP field represents the source IP address from which a request to a Google Cloud API was made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z4bymhcVMlnrsKiCgSw4QQ.png" /></figure><p>Answer: <strong>178.132.108.38</strong></p><p><strong>Question 4: What country does the IP originate from?</strong></p><p>This can be gotten by investigating the source IP address using threat-intelligence platforms such as <strong>VirusTotal</strong> and <strong>AbuseIPDB</strong>, which help determine whether the address has a history of malicious or suspicious activity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*As1gaxvfrtBMng7Kv2g0Gw.png" /></figure><p>Answer: <strong>Romania</strong></p><p><strong>Question 5: What device did the attack come from?</strong></p><p>The callerSuppliedUserAgent field records the user agent string provided by the client initiating a request to Google Cloud. It typically reveals the device, SDK, browser, or automation framework used such as the Google Cloud SDK (gcloud), a web browser, Terraform, or a custom script. <br>For security analysis, this field helps identify unusual or unauthorized access methods, detect automation where manual access is expected, and correlate activity with known attack tools or misconfigured scripts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QKY7S1oJRvqT3ReXRIlWMA.png" /></figure><p>The device used can be obtained from the field. It is a Macintosh.</p><p>Answer: <strong>Macintosh</strong></p><p><strong>Question 6: What was the first failed API call made by this identity?</strong><br>To get the API call that failed, check the method field.</p><p>The method field refers to the <strong>specific API call or operation</strong> performed on a resource</p><p>Filter the logs for entries with <strong>“Error”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mFn4AXq_XNgcEZnZHel5iw.png" /></figure><p>Answer: <strong>google.api.serviceusage.v1.ServiceUsage.EnableService</strong></p><p><strong>Question 7: What storage bucket was enumerated?</strong></p><p>The storage bucket mentioned can be gotten by searching for the bucket_name field. <br>The bucket_name refers to the specific Cloud Storage bucket involved in an audited action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DDRes6VfVuENjoiyNk_FsQ.png" /></figure><p>The storage bucket enumerated is the importantbucket bucket</p><p>Answer: <strong>importantbucket</strong></p><p><strong>Question 8: What API call was used to exfiltrate an item from this bucket?</strong></p><p>To determine the API call used, check the methodName field. <br>The methodName field records the exact Google Cloud API method executed by an identity, such as creating, updating, reading, or deleting a resource. It provides clear visibility into what action was performed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2U0bRs9u2Qs8oNItRqIW_Q.png" /></figure><p>The storage.objects.get method is used to read or download an object from a Cloud Storage bucket. <br>If abused by an unauthorized or compromised identity, this operation can be leveraged to exfiltrate data by repeatedly retrieving sensitive objects from the bucket and transferring them outside the environment.</p><p>Answer: <strong>storage.object.get</strong></p><p><strong>Question 9: Which Google Cloud command-line tool was used during the exfiltration attempt?</strong></p><p>The command-line tool used can be determined by checking the callerSuppliedUserAgent field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cM0lPfBkZh4DfpZY_i16aA.png" /></figure><p>Answer: <strong>gsutil</strong></p><p><strong>Question 10: What is the name of the file that was exfiltrated from the storage bucket?</strong></p><p>The resource field shows which cloud resource such as a VM instance, storage bucket, or database was targeted or modified by an API request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AQSLDq_IMhC7HTEmXSi8RA.png" /></figure><p>The resource exfiltrated from the storage bucket was possible due to the permission storage.objects.get set that allows the ability to read or download an object from a Cloud Storage bucket by an unauthorized individual</p><p>Answer: <strong>secretcode.java</strong></p><p>Thank you!<br>I’d love to connect with you on <a href="https://x.com/oomootayoo">Twitter</a> | <a href="https://www.linkedin.com/in/umar-mustafa-omotayo/">LinkedIn</a></p><p>See you in my next blog article. <strong>Take care!</strong> 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d1019cc9fbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Secure 3-Tier Architecture in Google Cloud]]></title>
            <link>https://medium.com/@bleuboy/building-a-secure-3-tier-architecture-in-google-cloud-dcae6b8c77f1?source=rss-a049e0a9643f------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcae6b8c77f1</guid>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[vpc]]></category>
            <dc:creator><![CDATA[Bleu Boy]]></dc:creator>
            <pubDate>Tue, 30 Dec 2025 09:26:21 GMT</pubDate>
            <atom:updated>2025-12-31T09:59:53.181Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nkfSbKPqdyZOjGqrQnIyfw.jpeg" /></figure><p>Secure cloud environments don’t happen by default, they’re designed.</p><p>In this guide, you’ll build a secure three-tier application architecture on Google Cloud using a custom VPC. You’ll separate your infrastructure into frontend, application, and database tiers, control exactly how traffic moves between them, and prevent unnecessary exposure to the internet.</p><p>Rather than relying on default settings, you’ll use Cloud NAT for private outbound access, firewall rules for strict network segmentation, IAP for secure SSH access, and least-privilege IAM for workload identity. By the end, you’ll understand how these controls work together to form a practical, production-style cloud network.</p><p>This project is designed for anyone who wants hands-on experience with real-world Google Cloud networking and security fundamentals.</p><h3>What you’ll learn</h3><ul><li>How to design a segmented three-tier network in Google Cloud</li><li>How to restrict traffic using firewall rules and network tags</li><li>How to give private VMs internet access with Cloåud NAT</li><li>How to secure SSH access using Identity-Aware Proxy (IAP)</li><li>How to apply least-privilege access with service accounts</li><li>How to test and validate cloud network security boundaries</li></ul><h3>Step 1: Create and Configure Your Project</h3><ul><li>Login into your <a href="https://console.cloud.google.com/">Google Cloud console</a>.<br>If this is your first time, you’ll need to create an account before getting started.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZJTNXlNTcniQvrDG.png" /></figure><ul><li>Click <strong>“Create or select a project.”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D8xA8DTXZEr5fEtz.png" /></figure><ul><li>A dialog box will appear prompting you to create a new project.</li><li>Click <strong>“New Project”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8_-FusIAt8zFebeCVepYXA.png" /></figure><ul><li>Project name: network-project<br>You can give yours a different name to keep it unique.</li><li>After entering your project name, click <strong>“Create.”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-MPaAxpkHEB23z7THCCXzw.png" /></figure><ul><li>Next, select the project you just created.<br>Click <strong>“Select a project,”</strong> then choose the new project from the list.</li></ul><blockquote>For the project, you have to enable billing to use some resources in google cloud</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aGfl2IuWIM4j_NcIua1p4w.png" /></figure><ul><li>Click <strong>“Billing”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*npPvERDnDgW3KVVJx3oKtQ.png" /></figure><ul><li>Click <strong>“Link a billing account”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xw3Dac8nsaz4aAZbqOtDRA.png" /></figure><ul><li>Choose the billing account for the project. We’ll be using the Google Cloud Platform Trial Billing Account.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H9EGbpOVNYcvoOKp.png" /></figure><ul><li>If you don’t have a billing account, Click <strong>“Start Free”</strong> to claim $300 worth of credits.</li></ul><blockquote>The last configuration is to enable the Compute Engine API</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DCnC7tBpwCosF5tKsDPTyQ.png" /></figure><ul><li>In the search bar, type<strong> “Compute Engine API”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5FI9zyuflTVIp36aQc2Jpg.png" /></figure><ul><li>Click <strong>“Compute Engine API”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F7KCNByrOE6qgxID29eUPw.png" /></figure><ul><li>Click <strong>“Enable”</strong></li></ul><h3>Step 2: Create a Custom VPC</h3><blockquote>A Custom VPC (Virtual Private Cloud) is a private, user-defined network in Google Cloud that lets you control IP address ranges, subnets, routing, and firewall rules instead of using the default network.</blockquote><blockquote>The Custom VPC serves as the secure foundation of the architecture, allowing the frontend, application, and database tiers to be placed in separate subnets and enabling strict control over how traffic is allowed to flow between them.</blockquote><p>In this step, you’ll create a custom VPC with 3 subnets for each architecture (frontend, app and database) for proper segmentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cS0ERnadhBq6lj2GCX0xvQ.png" /></figure><ul><li>Click Navigation menu → VPC network → VPC networks</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iVIemhB8LqhUYwc9GlwMtg.png" /></figure><ul><li>Click <strong>“Create VPC network”</strong> to create a custom VPC.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u9s_Aqnkd6MOau1aTf89wQ.png" /></figure><ul><li>Name: secure-app-vpc as the VPC name.</li><li>Under creating a custom VPC, 3 subnets will be created for each tier (Frontend, App &amp; Database).</li></ul><blockquote>A subnet is a logical subdivision of a VPC network that defines a specific IP address range within a region where resources like virtual machines are deployed.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*puRpBHHA4Tlp2uauxxZjCw.png" /></figure><ul><li>Subnet 1 is for the Frontend Tier. Input the necessary information as seen above.</li><li>Name:frontend-subnet</li><li>Region: us-central1 (Iowa)</li><li>IPv4 range: 10.0.1.0/24</li><li>Click <strong>“Done”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NIco7g9kvHm9TwIEbjJWuw.png" /></figure><ul><li>Click <strong>“Add Subnet</strong>” to add another subnet.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JBO1iCIV4469wmnjNPPwzQ.png" /></figure><ul><li>For Subnet 2 is for the App Tier. Input the necessary information as seen above</li><li>Name:app-subnet</li><li>Region: us-central1 (Iowa)</li><li>IPv4 range: 10.0.2.0/24</li><li>Click <strong>“Done”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xNe-iheEZbZNGSYH1LJXdw.png" /></figure><ul><li>Click <strong>“Add Subnet”</strong> to add another subnet.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q4zQCBB4qg6vhV1QqrNWwQ.png" /></figure><ul><li>Subnet 3 is for the Database Tier. Input the necessary information as seen above</li><li>Name: database-subnet</li><li>Region: us-central1 (Iowa)</li><li>IPv4 range: 10.0.3.0/24</li><li>Click <strong>“Done”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ctl8Bz1pSvRvemRZe0Wzjw.png" /></figure><ul><li>You just created 3 subnets!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eHAp-COYUeDrHM-YGzj93A.png" /></figure><ul><li>Scroll down and click <strong>“Create”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1cfdou2jrLyIsqiCJ-uAPg.png" /></figure><ul><li>You just created a custom VPC!</li></ul><h3>Step 3: Configure Cloud NAT</h3><blockquote>Cloud NAT (Network Address Translation) is a Google Cloud service that allows private VM instances without public IP addresses to access the internet for outbound traffic, such as software updates, without exposing them to inbound internet connections.</blockquote><blockquote>Cloud NAT enables the app and database servers to download updates and required packages while remaining private, ensuring they are not directly reachable from the internet and reducing the overall attack surface.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m2mzgN5M9w2Ts5OnLXsDkQ.png" /></figure><ul><li>Search for <strong>“Cloud NAT”.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BjVzFTQ_uRr1ottsYolmPQ.png" /></figure><ul><li>Click <strong>“Get Started”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w80bD378ypUwj5j2GxPEIg.png" /></figure><ul><li>Gateway name: secure-nat-gateway</li><li>Click <strong>“Network”</strong> dropdown and select secure-app-vpc, the custom VPC created earlier</li><li>Click <strong>“Cloud Router”</strong> dropdown menu</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*18gNgNvT_8yT24C9mMlgIw.png" /></figure><ul><li>Click <strong>“Create new router”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aEX22gPH4ljxBnlKRHvEEw.png" /></figure><ul><li>Name:secure-nat-router</li><li>Click <strong>“Create”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ZiMQQEQc-6p2ES8MXcpJw.png" /></figure><ul><li>You just created a cloud router!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zmhy96cPkU7HQRvYB4KKWQ.png" /></figure><ul><li>Scroll down and click <strong>“Create”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Okz8brGAEkZdjbLy1OQB_Q.png" /></figure><h3>Step 4: Create Firewall Rules</h3><h4>Secure SSH Access with Identity-Aware Proxy (IAP)</h4><blockquote>Identity-Aware Proxy (IAP) is a Google Cloud service that controls access to resources based on user identity and context, allowing SSH access to VM instances without exposing them to the public internet.</blockquote><blockquote>IAP is used to secure SSH access to the virtual machines by allowing connections only from authenticated and authorized users, eliminating the need to open port 22 to the internet and significantly reducing the risk of brute-force or unauthorized access.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5fdsQ4tVm5qYVG-y5cMDQA.png" /></figure><ul><li>Click Navigation menu → VPC network → Firewall</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rVfBwp8fbBg_lLYV6UoIqA.png" /></figure><ul><li>Click <strong>“Create firewall rule”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t_rs6pXVDyu69lBBS7gXng.png" /></figure><ul><li>Name: allow-iap-ssh</li><li>Network:default to secure-app-vpc (custom VPC)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q-ZpwOw2ouvbblMTLXSV6Q.png" /></figure><ul><li>Source IPv4 range: 35.235.240.0/20</li><li>Target tags: ssh-enabled</li><li>Protocol &amp; Ports:TCP 22</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U4Tl8v8U-1sa-FLVvnfWrw.png" /></figure><ul><li>Click <strong>“Create”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nnEVTYYHbyLBERpvDxZjfg.png" /></figure><ul><li>You can see the firewall rule created above</li></ul><h4>Create Tier-to-Tier Firewall Rules</h4><blockquote>Tier-to-tier firewall rules are network rules that explicitly define which application tiers are allowed to communicate with each other and on which ports, based on source and target identities.</blockquote><blockquote>These rules ensure that traffic flows only as intended, allowing the frontend to reach the app tier and the app to reach the database, while blocking all other paths. This enforces network segmentation and limiting the impact of a potential compromise.</blockquote><ol><li><strong>Public → Frontend (HTTP)</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x8fPj87mGvU0X3mrAUvJ3Q.png" /></figure><ul><li>Click <strong>“Create firewall rule”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*coohkTNGmL5HY4l7qv7a8g.png" /></figure><ul><li>Name: allow-public-http</li><li>Network: default to secure-app-vpc (custom VPC)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aOq5naNo1y9nli62KbQt6w.png" /></figure><ul><li>Input the necessary detail as shown in the diagram above<br>- Target tags: frontend<br>- Source: 0.0.0.0.0/0<br>- Protocol &amp; Ports:TCP 80</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aNQiUCxnpoXYP0X1pE5Eqw.png" /></figure><ul><li>Click <strong>“Create”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wNsWqASvmNXfmYjbEo4Gdg.png" /></figure><ul><li>You should see the firewall rule created above</li></ul><p>2. <strong>Frontend → App (Port 8080)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ATdTn0By4Rs1DmTW9x5C8g.png" /></figure><ul><li>Click <strong>“Create firewall rule”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pqkUu7Ga57RthX6-UUyRZw.png" /></figure><ul><li>Name: allow-frontend-to-app</li><li>Network: default tosecure-app-vpc (custom VPC)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pa23o4KcR6CJ7AzO4Jx2jw.png" /></figure><ul><li>Input the necessary detail as shown in the diagram above<br>- Click “Source filter” and select source tagsin the dropdown menu<br>- Source tags: frontend<br>- Target tags: app-server<br>- Protocol &amp; Ports: TCP 8080</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ns3zDVu0wms5sZuLVRe6w.png" /></figure><ul><li>Click <strong>“Create”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O7YqD6mcU4ca__0ttHf2gA.png" /></figure><ul><li>You can see the firewall rule created above</li></ul><p>3. <strong>App → Database (MySQL 3306)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vSpkjzza7iPyQwW424gW1w.png" /></figure><ul><li>Click <strong>“Create firewall rule”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uaEG4UQ3cM4kNY1Z_EECUA.png" /></figure><ul><li>Name: allow-app-to-db</li><li>Network:default tosecure-app-vpc (custom VPC)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mc9M9wOvZp2_Fz3MmaRphg.png" /></figure><ul><li>Input the necessary detail as shown in the diagram above<br>- Click “Source filter” and select source tags in the dropdown menu<br>- Source tags: app-server<br>- Target tags: database <br>- Protocol &amp; Ports: TCP 3306</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2eQH2V3XBVPeyLRJobtZ2g.png" /></figure><ul><li>Click <strong>“Create”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JNSnwWMYn0-hE4SM2cSYjQ.png" /></figure><ul><li>You should see the firewall rule created above</li></ul><p>4. <strong>Deny All Ingress</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nC5icJRrupOs3ob6sNTRKw.png" /></figure><ul><li>Click <strong>“Create firewall rule”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BVB2nD775eWzLJ2YxPyO3g.png" /></figure><ul><li>Name: deny-all-ingress</li><li>Network:default tosecure-app-vpc (custom VPC)</li><li>Priority: 65534</li><li>Action on match: Deny</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ey91lTeAmbUI5AtzAtd-VA.png" /></figure><ul><li>Input the necessary details as shown in the diagram above<br>- Click <strong>“Targets”</strong> and select All instances in the network in the dropdown menu<br>- Source IPv4 ranges: 0.0.0.0/0<br>- Protocol &amp; Ports: Deny all</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9kZInV5BAL9M_yGWXofIjw.png" /></figure><ul><li>You should see the firewall rule created above</li></ul><h3>Step 5: Create a Least Privilege Service Account</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8YxWEVPw_3S8ijTSBTechQ.png" /></figure><ul><li>Click Navigation menu → IAM and admin → Service Accounts</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U8SjEXIrzFSpDmwqATBERA.png" /></figure><ul><li>Click <strong>“Create service account”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kDBnNApKbZRrpVMp0tNB9g.png" /></figure><ul><li>Name : network-vm</li><li>Click <strong>“Done”</strong>. No roles will be assigned to this service account.</li></ul><h3>Step 6: Deploy Instances</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A1CfPth8TB79xM4KF_8sZw.png" /></figure><ul><li>Click Navigation menu → Compute Engine → VM instances</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*doJJBqLed2b-fOKSdV9FGw.png" /></figure><ul><li>Click <strong>“Create Instance”</strong></li></ul><h4>Frontend Server</h4><ol><li><strong>Machine configuration</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Ge1VBVFz1SPxtUCnNYSCg.png" /></figure><ul><li>Name: frontend-server</li><li>Region: us-central1(Iowa)</li><li>Machine: e2-micro</li></ul><p>2. <strong>Networking</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oFH_YdBFtsAjMtAe-pVUxw.png" /></figure><ul><li>Network tags: frontend, ssh-enabled</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EzOpLWng0PEez7m4ZmcZKg.png" /></figure><ul><li>Network: secure-app-vpc</li><li>Subnetwork: frontend-subnetIPv4(10.0.1.0/24)</li><li>Primary Internal IPv4 address: Ephemeral (Automatic)</li><li>External IPv4 address: Ephemeral</li><li>Click <strong>“Done”</strong></li></ul><p>3. <strong>Security</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NhgLJ4yus7m4HkjaCKZGfw.png" /></figure><ul><li>Service account: network-vm</li><li>Click <strong>“Create”</strong></li></ul><h4>App Server</h4><ul><li>Click <strong>“Create Instance”</strong></li></ul><ol><li><strong>Machine configuration</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rIZEJUCekz68N7W5jWuxXA.png" /></figure><ul><li>Name: app-server</li><li>Region: us-central1(Iowa)</li><li>Machine: e2-micro</li></ul><p>2. <strong>Networking</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C1HgX4RVRB_moozgw5stJw.png" /></figure><ul><li>Network tags: app-server, ssh-enabled</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bqQfOtkdAxO_0VPJs0rQQ.png" /></figure><ul><li>Network: secure-app-vpc</li><li>Subnetwork: app-subnetIPv4(10.0.2.0/24)</li><li>Primary Internal IPv4 address: Ephemeral (Automatic)</li><li>External IPv4 address: None</li><li>Click <strong>“Done”</strong></li></ul><p>3. <strong>Security</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l5BVEjl50X7mrf3DIX6JlA.png" /></figure><ul><li>Service account: network-vm</li><li>Click <strong>“Create”</strong></li></ul><h4>Database Server</h4><ul><li>Click <strong>“Create Instance”</strong></li></ul><ol><li><strong>Machine Configuration</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bzhD2uDsUtXS_k_q8kI3Zg.png" /></figure><ul><li>Name: database-server</li><li>Region: us-central1(Iowa)</li><li>Machine: e2-micro</li></ul><p>2. <strong>Networking</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MJO6torOAw1iFOu3bCK4uA.png" /></figure><ul><li>Network tags: database, ssh-enabled</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*czv8sfaX8V4orq1D5ERVsg.png" /></figure><ul><li>Network: secure-app-vpc</li><li>Subnetwork: database-subnetIPv4(10.0.3.0/24)</li><li>Primary Internal IPv4 address: Ephemeral (Automatic)</li><li>External IPv4 address: None</li><li>Click <strong>“Done”</strong></li></ul><p>3. <strong>Security</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hT8QjrVIiTOBRzukFPSwlA.png" /></figure><ul><li>Service account: network-vm</li><li>Click <strong>“Create”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lumb5zLJyKB8astD9um4Xg.png" /></figure><ul><li>You should see the virtual machine instance created in the image above</li></ul><h3>Step 7: Configure the VM Instances</h3><h4>Configure Frontend server</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dAGq2eco1umtjh10ck7blA.png" /></figure><ul><li>Click SSH on frontend-server</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DLMF0T04e6653tUfHEyx-w.png" /></figure><ul><li>A new tab opens</li><li>Run the following commands:</li></ul><pre>sudo apt-get update <br>#Downloads the latest list of available software and versions<br>sudo apt-get install -y nginx<br>#Installs the Nginx web server</pre><ul><li>To verify it works locally, run:</li></ul><pre>curl localhost</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yRagciFE5qtle-O7eWCSFA.png" /></figure><ul><li>Desired result should be what</li></ul><h4>Configure App Server</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iQkVbFFvppW7RF1syoOBpQ.png" /></figure><ul><li>Click SSH on app-server</li><li>A new tab opens</li><li>For this instance, the necessary packages must be installed using this commands:</li></ul><pre>sudo apt-get update<br>#Downloads the latest list of available software and versions<br>sudo apt-get install -y python3-pip python3-flask netcat-traditional<br>#python3-pip:Standard package installer for Python<br>#python3-flask:Package name for the Flask web framework for Python<br>#netcat-traditional:Networking utility that reads and writes data across TCP/IP connections</pre><ul><li>Create a simple app. Copy the code and paste it on your app-server terminal</li></ul><pre>cat &gt; app.py &lt;&lt;EOF<br>from flask import Flask<br><br>app = Flask(__name__)<br><br>@app.route(&#39;/&#39;)<br>def hello():<br>    return &quot;The Private App Tier is up and running!&quot;<br><br>if __name__ == &#39;__main__&#39;:<br>    app.run(host=&#39;0.0.0.0&#39;, port=8080)<br>EOF</pre><ul><li>Run the app using this command</li></ul><pre>python3 app.py &amp;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rT7Y7vHns6fKcUK6KWMQbA.png" /></figure><h4>Configure Database Server</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jO1aai8uUWPg7FI_IjyqNw.png" /></figure><ul><li>Click SSH on database-server</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_76GNR5HmZz6Qmj6NcN3ZA.png" /></figure><ul><li>A new tab opens</li><li>For this instance, the necessary packages must be installed using this commands:</li></ul><pre>sudo apt-get update<br>#Downloads the latest list of available software and versions.<br>sudo apt-get install -y mariadb-server<br>#Installs the MariaDB database server package<br>sudo systemctl start mariadb<br>#Starts the MariaDB service running on the system.<br>sudo systemctl enable mariadb<br>#Automatically start the MariaDB service</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-YNfiJ2e4-uStJqdeBT1w.png" /></figure><h3>Step 8: Test it</h3><h4>Test 1: Public Access</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hCoam1vo-Z_-Gkm7akG8HQ.png" /></figure><ul><li>Open your web browser on your local computer and navigate to http://frontend-server External IP</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z1tMu4F1a96JCb6nE-a_uA.png" /></figure><ul><li>You should see the “Welcome to nginx!” page.</li></ul><h4>Test 2: Tier-to-Tier Access</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B2PB9cpCa0HZ36_xM57fKQ.png" /></figure><ul><li>SSH into frontend-server.</li><li>Note the internal IP of app-server</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9XAwi63qgo4U4ZUsvE3gvg.png" /></figure><ul><li>Run curl 10.0.2.3:8080</li><li>Result: You should see “The Private App Tier is up and running!”.</li><li>If this fails: Check <strong>“allow-frontend-to-app”</strong> firewall rule.</li></ul><h4>Test 3: Security Block (Segmentation)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B2PB9cpCa0HZ36_xM57fKQ.png" /></figure><ul><li>SSH into frontend-server.</li><li>Note the internal IP of database-server</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ULNSkHUfpidEyVGVKU2Oyw.png" /></figure><ul><li>Run nc -zv 10.0.3.3 3306</li><li>Result: The command should hang or timeout.</li><li>Why: We have no firewall rule allowing Frontend to talk to DB directly. This protects your data if the web server is hacked.</li></ul><h3>Step 8: Cleanup</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xNpkTq4QT6mN1HWGGpktXw.png" /></figure><ul><li>Delete the 3 VM instances.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JzkvO60L6zfJw-jvTq9-mQ.png" /></figure><ul><li>Delete the Cloud NAT Gateway and Router.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Ix-YBdjIZFHwkq9Ky-fMA.png" /></figure><ul><li>Delete the VPC Network.</li></ul><p>You’ve now built a secure, segmented three-tier architecture on Google Cloud and seen how intentional network design, access control, and least-privilege principles come together in practice. <br>Don’t worry if some parts felt challenging. That’s how real understanding is built. <br>If you get stuck or have questions, feel free to reach out to me on <a href="https://x.com/oomootayoo"><strong>Twitter</strong></a><strong> or </strong><a href="https://www.linkedin.com/in/umar-mustafa-omotayo/"><strong>LinkedIn</strong></a>. <br>Keep building, keep breaking things safely, and most importantly, keep learning.<br>Bye!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcae6b8c77f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing IAM Role Based Access Control in Google Cloud]]></title>
            <link>https://medium.com/@bleuboy/implementing-iam-role-based-access-control-in-google-cloud-a-walkthrough-65cf8fd74ea2?source=rss-a049e0a9643f------2</link>
            <guid isPermaLink="false">https://medium.com/p/65cf8fd74ea2</guid>
            <category><![CDATA[iam-roles]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[identity-management]]></category>
            <dc:creator><![CDATA[Bleu Boy]]></dc:creator>
            <pubDate>Fri, 31 Oct 2025 15:47:55 GMT</pubDate>
            <atom:updated>2025-11-18T10:26:31.391Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AUGUMLZDAvRDH0qjYDYDtw.png" /></figure><p>IAM is one of the most important parts of cloud security because it determines who can access what and how they can interact with your resources.<br>In this guide, you’ll learn how to set up different service accounts, create custom roles, and use conditional access to control how each one interacts with a Cloud Storage bucket.</p><h3>Objectives</h3><p>By the end of this guide, you&#39;ll learn how to:</p><ul><li>Create service accounts</li><li>Create and assign IAM roles to service accounts in Google Cloud</li><li>Configure custom roles with specific permissions</li><li>Apply conditional policies</li><li>Test access using service accounts</li><li>Use the Google cloud shell</li></ul><p>Before we get into the real deal, I will explain some concepts that you might see many times in this guide;</p><ul><li><strong>IAM (Identity and Access Management): </strong>IAM is a security framework that defines who (the identity) can do what (the access) with which resources.<br>It’s the foundation for enforcing good security practices, especially the principle of least privilege, which means giving every user or service only the permissions they really need.</li><li><strong>Service Account:</strong> A non-human identity used by applications, virtual machines (VMs), or other services to interact with cloud resources.</li><li><strong>Permission:</strong> A fundamental, single authority that allows an identity to perform a specific action on a resource. It’s the smallest unit of authorization.</li><li><strong>Role:</strong> A predefined collection of permissions that can be granted to an identity (like a user or a service account). Instead of giving individual permissions, you grant a role.</li><li><strong>Custom Role:</strong> A role that you create yourself, defining a specific set of permissions tailored to the exact needs of an identity. It’s used when the built-in, predefined roles are too broad (granting more access than necessary) or not specific enough.</li><li><strong>Cloud Storage Bucket:</strong> This is a basic, top-level container used to hold data and files (called objects) in Google Cloud.</li><li><strong>Conditional Access (or IAM Condition):</strong> This is a way to make a role grant only apply when certain conditions are met. It allows you to fine-tune access based on factors like the resource name (e.g., only this specific bucket), the time of day, or the type of request.</li></ul><p>For this guide, I’ll be using the Google Cloud Shell only when necessary. Those commands can be a lot to memorize (I’m still getting the hang of them myself!).<br> Alright, enough talk, let’s dive in!</p><h3>Step 1: Create and Configure Your Project</h3><ul><li>Login into your <a href="https://console.cloud.google.com/">Google Cloud console</a>. <br>If this is your first time, you’ll need to create an account before getting started.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SF4RYZzuFwM_mzoO53GNFA.png" /></figure><blockquote>Click on “Start Free” to claim your $300 worth of credits.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0J_t0pk6nC5B3IG7pdGenA.png" /></figure><ul><li>Click on <strong>“Create or select a project.”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8v5Rr7gGR7KzwALRi45N8A.png" /></figure><ul><li>A dialog box will appear prompting you to create a new project.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CthoUtCDDSRWdx-rou5cBw.png" /></figure><ul><li>Create a new project. We’ll be naming it <strong>“iam-lab-task.”</strong><br> You can give yours a different name to keep it unique.</li><li>After entering your project name, click on <strong>“Create.”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9iQXMmQWDWBbilOMdYsehA.png" /></figure><ul><li>Next, select the project you just created.<br> Click on <strong>“Select a project,”</strong> then choose the new project from the list.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9iQXMmQWDWBbilOMdYsehA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4bLueP8tpa44XrWDGH4qew.png" /></figure><h3>Step 2: Create a Cloud Storage Bucket and Create a Folder in it</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STey1dLN5MCRXfGDSlNgMA.png" /></figure><ul><li>Click on the Navigation menu → Cloud Storage → Buckets</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tI6jle8g8VP09y3932O7RQ.png" /></figure><ul><li>Give your bucket a unique name. We’ll name it <strong>“iam-lab-buckets.”</strong></li><li>Once you’ve done that, click <strong>“Create”</strong> to set up your storage bucket. The default configurations are fine for this task.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lb4Jmn6jkJsJpp2noN6dgA.png" /></figure><ul><li>Click on the newly bucket created</li><li>Click on <strong>“Create folder”</strong> and name the folder <strong>“uploads/”</strong></li><li>Click on <strong>“Create”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6bdd25rYrKpwaEPK3t7nFQ.png" /></figure><h3>Step 3: Create Service Accounts</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8SrDKIMTj7qbYLgnPW7Wtg.png" /></figure><ul><li>Click on the Navigation menu → IAM and admin → Service Accounts.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xCk5yMvt34Q745pI-KGSDA.png" /></figure><ul><li>Click on “Create Service Account”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OZG_xTatHhXmtsxXIXGUKw.png" /></figure><ul><li>The first service account you’ll create is for the <strong>Uploader</strong>.<br>Enter <strong>“upload-sa”</strong> as the service account name. The service account ID will autofill automatically.<br>Once that’s done, click <strong>“Done.”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OKb4GcBw7nw__bA6x5c6cg.png" /></figure><ul><li>Next, create two more service accounts.<br>One for the <strong>Admin</strong> named <strong>“admin-sa”</strong>, and another for the <strong>Viewer</strong> named <strong>“viewer-sa.”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hADgO0IfGSAnm9cysVLLoQ.png" /></figure><h3>Step 4: Create a Custom IAM Role</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nwldK1KJEvhOzHr07LcJVg.png" /></figure><ul><li>Go to Navigation menu → IAM &amp; Admin → Roles → “+ Create Role”.<br>Fill in the required details as shown in the image above.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Z1wKQZbV04dBNdAuaD6aQ.png" /></figure><ul><li>Click on <strong>“+ Add Permissions”</strong> to add the permissions. <br>Add the <strong><em>storage.object.create</em></strong> and <strong><em>storage.object.get </em></strong>permission. <br>The <strong><em>storage.object.create</em></strong> permission grants the ability to upload or create new files (objects) within a bucket. <br>The <strong><em>storage.object.get</em></strong> grants the ability to read the content and metadata of a specific file (object) within a bucket.</li><li>Click on the <strong>“Create” </strong>button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*alHf1ORIQpdgCOeaLI0nmQ.png" /></figure><ul><li>You’ve just made a custom role!</li></ul><h3>Step 5: Assign Roles to Service Accounts</h3><ul><li>Go to Navigation menu → IAM &amp; Admin → Roles → <strong>“+ Grant Access”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KqWCanWi4iTJBju94pQFNg.png" /></figure><h4>For the Uploader Service Account</h4><p>For this account, we’ll be using the custom role we created earlier and add an IAM condition to the role</p><ul><li>To grant access to the <strong>Uploader</strong> service account, go to the service accounts page and copy the uploader’s service account email.<br> Then, paste it into the <strong>“New principals”</strong> field.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*niTipkKjTjTXNUT7DYo6gw.png" /></figure><ul><li>Click on <strong>“Select a role”</strong> → <strong>Custom</strong>, then select the custom IAM role <strong>“CustomStorageUploader”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yHsAUA1XSR6u543wdSfewg.png" /></figure><ul><li>After selecting the custom role, let’s set up an IAM condition for it.<br> Click on <strong>“+ Add IAM Condition.”</strong></li><li>Here’s the IAM condition you’ll use, as shown in the code below.</li></ul><pre>resource.name.startsWith(&quot;projects/_/buckets/YOUR_BUCKET_NAME/objects/uploads/&quot;) &amp;&amp;<br>request.time &lt; timestamp(&quot;2025-12-31T00:00:00Z&quot;)<br> Remember to replace “YOUR_BUCKET_NAME” with the actual name of your storage bucket.</pre><blockquote>This condition means the “uploader-sa” can only upload or read objects inside <em>uploads/</em> and only before Dec 31, 2025</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uPZvVx8Q-Qo-NxnKc0i_Dg.png" /></figure><ul><li>Click on the <strong>“Save”</strong> button</li><li>You just made a made a IAM condition!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n_lI7rzzp-Y4wnjiPEe-Bw.png" /></figure><ul><li>Click on <strong>“+ Add another role”</strong> to assign an additional role.<br>Search for <strong>“Storage Object Viewer”</strong> and add it.<br>This is a predefined Google Cloud IAM role that provides read-only access to the contents and metadata of files (objects) in your bucket.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5psSbFa0gpit4F0rNFAGOQ.png" /></figure><ul><li>Click on <strong>“Save”</strong> to grant the <strong>“uploader-sa”</strong> service account access based on the roles you’ve just assigned.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jyLNYOjrziRaQY30i2k55g.png" /></figure><h4><strong>Assign role for the Admin service account</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPpeSVz4UJ8_-xr12BlhTw.png" /></figure><ul><li>To grant access to the <strong>Admin</strong> service account, go to the service accounts page and copy the admin service account’s email address.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9V5nnGn2i_9itcpmEogtGw.png" /></figure><ul><li>Assign the <strong>“Storage Object Admin”</strong> role to this service account.<br> This role provides full control over objects within the storage bucket, allowing actions like uploading, deleting, and modifying files.</li><li>Click on <strong>“Save”</strong> to grant the <strong>“admin-sa”</strong> service account access based on the role you just assigned.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AemCQFNt0l3VTuxLWuzr3g.png" /></figure><h4><strong>Assign role for the Viewer service account</strong></h4><ul><li>To grant access to the <strong>Viewer</strong> service account, go to the service accounts page and copy the viewer service account’s email address.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4pg7IzE3lFRGxAzD-QaqvQ.png" /></figure><ul><li>To grant access to the <strong>Viewer</strong> service account, go to the service accounts page and copy the viewer service account’s email address.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EOV6KHdc8B-12IMI-haiEQ.png" /></figure><ul><li>Assign the <strong>“Storage Object Viewer”</strong> role to this service account.<br> This role grants read-only access, allowing the user to view objects and their metadata without making any changes.</li><li>Click on <strong>“Save”</strong> to grant the <strong>“viewer-sa”</strong> service account access according to the role you just assigned.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XOML5MYBjUo_v8-zl5YSEA.png" /></figure><h3>Step 6: Create Keys for each Service Account</h3><p>A service account key is a JSON file that contains the service account’s private key. This key acts as the service account’s password, allowing any holder of the file to authenticate as that identity and perform actions based on its IAM roles.</p><ul><li>Click on the Navigation menu → IAM and admin → Service Accounts.</li><li>Click on the service account email of each service account.</li><li>Click on Keys → Add Key → “Create new key”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7b1r98e8OqFipGvNkp5JTg.png" /></figure><ul><li>Click on<strong> “Create”</strong> to download the JSON file.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JwuR6gs9AIeDdrnfLH39TQ.png" /></figure><ul><li>Rename the file so you can recognize it.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ije5wN5JBHPsUwBVyM7BeQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uFuRd8Z87dGWYKuJYm-YfQ.png" /></figure><ul><li>Go through the same process to create a key for the Uploader and Viewer service account.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fr4f3gZgfFhzFNhtZEI_wQ.png" /></figure><ul><li>Keys created for the service accounts</li></ul><h3>Step 7: Upload JSON Files to Google Cloud Shell</h3><p>At this stage of the project, you’ll need to use the <strong>Google Cloud Shell</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*li_u6Cz2Aw2RgzZIbB0ENw.png" /></figure><ul><li>Click on the <strong>“Google Cloud Shell”</strong> icon</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gx_2cbzYj-nr0L6viVnL1g.png" /></figure><ul><li>Your interface should now look similar to the one shown in the image above.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tck_dS2Pom4mrTbnWso7gA.png" /></figure><p>The first thing to do here is upload the keys you downloaded earlier.</p><ul><li>Click on <strong>“Upload.”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fNFrwzWdakUaVyB_0-Epfg.png" /></figure><ul><li>Select the JSON files downloaded earlier and upload the files</li></ul><h3>Step 8: Add the Service Accounts and activate them</h3><p>The step involves adding each service account alongside activating it with the keys.</p><ul><li>To do this, run:</li></ul><pre>gcloud auth activate-service-account &lt;SERVICE_ACCOUNT_EMAIL&gt; --key-file=keyfile.json</pre><p>Replace the “&lt;SERVICE_ACCOUNT_EMAIL&gt;” with the service account email and the “keyfile.json” with the appropriate key for each service account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oMlm8egvsoTq-XLYgR8T2Q.png" /></figure><ul><li>The expected result should look like the image shown above.</li><li>To see all the activated accounts, run the following command:</li></ul><pre>gcloud auth list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vFNhi1W38rsU-7fDWDEXzQ.png" /></figure><ul><li>To set the active account, run the following command<br>Replace <strong>“ACCOUNT”</strong> with the service account’s email address:</li></ul><pre>gcloud config set account `ACCOUNT`</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vn2s-XXrn-qD26cZfNqOBQ.png" /></figure><p>The <strong>Uploader</strong> service account is now active!<br> If you’d like to switch to the <strong>Admin</strong> or <strong>Viewer</strong> service account, simply repeat the same process.</p><h3>Step 9: Test Access</h3><p>In this step, we’ll test whether the assigned roles are working as expected.</p><p>Starting with the <strong>Uploader</strong> service account — it should be able to <strong>upload</strong> and <strong>list</strong> objects, but <strong>not delete</strong> them from the storage bucket.</p><ul><li>To upload an object, run the following command:</li></ul><pre>echo &quot;This is an upload file&quot; &gt; upload.txt<br>#Created an upload.txt file in the lab environment<br>gsutil cp upload.txt gs://YOUR_BUCKET_NAME/uploads/<br>#Copied the file into the Storage bucket</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1d2y_H31umTjj4w3O-DfJQ.png" /></figure><ul><li>It worked exactly as expected. The <strong>Uploader</strong> service account performed actions according to the permissions assigned to it.</li><li>Now, let’s try deleting a file from the storage bucket.<br> To delete an object, run the following command:</li></ul><pre>gsutil rm gs://YOUR_BUCKET_NAME/uploads/upload.txt</pre><blockquote>It returns a 403 error as this service account does not have the <strong>storage.objects.delete</strong> access.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iSU4hBWxCLoc1EqFmCfZ4g.png" /></figure><p>You can also test this using the <strong>Admin</strong> and <strong>Viewer</strong> service accounts.<br>Simply set each one as the active account and verify the level of access they have.</p><p>If you’ve made it this far in the guide, take a moment to pat yourself on the back<br>This hands-on experience not only helps you understand IAM concepts more deeply but also gives you practical exposure to managing access securely in cloud environments.</p><p>If you faced any challenges while following this guide, feel free to reach out to me on <a href="https://www.linkedin.com/in/umar-mustafa-omotayo/"><strong>LinkedIn</strong></a> for clarification.<br> And if you found this helpful, please support me by giving this piece a clap👏</p><p>See you in the next guide! 🚀</p><p>Bye!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65cf8fd74ea2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LetsDefend: SOC338 — Lumma Stealer — DLL Side-Loading via Click Fix Phishing]]></title>
            <link>https://medium.com/@bleuboy/letsdefend-soc338-lumma-stealer-dll-side-loading-via-click-fix-phishing-a202147f96c7?source=rss-a049e0a9643f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a202147f96c7</guid>
            <category><![CDATA[letsdefendio]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[phishing]]></category>
            <dc:creator><![CDATA[Bleu Boy]]></dc:creator>
            <pubDate>Mon, 17 Mar 2025 01:20:39 GMT</pubDate>
            <atom:updated>2025-03-17T01:20:39.584Z</atom:updated>
            <content:encoded><![CDATA[<h3>LetsDefend: SOC338 — Lumma Stealer — DLL Side-Loading via Click Fix Phishing</h3><p>In this blog post, we’ll be analyzing a critical alert from the LetsDefend ticketing system. Our objective is to determine whether this alert is a true positive or a false positive.</p><p><strong>What is Lumma Stealer?</strong><br><em>Lumma Stealer is an advanced information-stealing malware that targets sensitive data such as credentials, browser cookies, cryptocurrency wallets, and system information. It is commonly distributed through phishing emails, malicious downloads, and software cracks. Lumma Stealer operates as Malware-as-a-Service (MaaS), meaning cybercriminals can rent it for malicious campaigns. It is known for its stealth, anti-analysis techniques, and ability to exfiltrate data to command-and-control (C2) servers.</em></p><p>Before diving into the alert report, the first step is to take ownership of the alert to ensure a thorough investigation.</p><h3>Alert Details</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8rnDdZpIUPgkXWcbAfSvpw.png" /><figcaption>Creating a case for the event</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0VYm1UCUOW_zVCtAMvE-EA.png" /></figure><h3>Starting the playbook</h3><p>To streamline the investigation of a SOC alert, it’s essential to gather key information that provides a clearer understanding of the alert’s context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2f6I5OKPObbaIL_b-Q-SbQ.png" /></figure><p><strong>When was it sent? — Mar, 13, 2025, 09:44 AM<br>Email’s SMTP address — 132.232.40.201<br>Sender Address — update@windows-update.site<br>Recipient Address — dylan@letsdefend.io</strong></p><p>Heading over to the email security tab to look for the mail to get information for two questions left.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lte8yMKDKDk9hrQExijFJA.png" /></figure><p><strong>Is the mail content suspicious ?— Yes<br>Are there any attachment? — Yes</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZI86rrs39Mx93O8zluizfA.png" /></figure><p><strong>Are there attachment or URLs in the email? Yes</strong></p><p>The email subject indicates that the recipient is being urged to upgrade their system to Windows 11 for free. Additionally, it includes a URL for the recipient to click on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O3ZFnxN5QKBhWtKMHO_dig.png" /></figure><p>Let’s copy the URL and analyze it<br>The link: <a href="https://www.windows-update.site/">https://www.windows-update.site/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T2u3t1qbpcA4fF8cPPz0gw.png" /><figcaption>The link scanned on VirusTotal</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_hzw1kID42bZfZGFt0XCdA.png" /><figcaption>The link scanned on HybridAnalysis</figcaption></figure><p><strong>URL in the mail is malicious or not? — It is malicious</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nlfpBo1NRRu1FqKMoPEDsg.png" /></figure><p>Checking the alert details of the event, it was stated that it was “Allowed”</p><p><strong>Delivered</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qvT57sWTjfkiaiiaCp00xg.png" /></figure><p><strong>Delete the mail!!!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mB6IhFArtc5SdpDW-d8bVw.png" /></figure><p>Heading to the log Management Tab, an endpoint, <strong>Dylan(IP address: 172.16.20.3) </strong>accessed the malicious address<br><strong>Check if someone opened the malicious file/URL? — Opened</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LAFl7HwqWWrl6VAIOB-I3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kZCKLUu-0jFzomdTkIlzlQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3gutC_5dFtq6qFRzLNYmzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*45x-aewDK-ubmkhjaBnAww.png" /><figcaption>Contained the endpoint</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8rVQpnGucr2HAaWcLAFuaw.png" /><figcaption>Add any other useful artifacts you find when investigating.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nbN8_xLNgPQhk5wQToNsAg.png" /><figcaption>This is the most lengthy analysis that I have written so far😂.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vkaS9AQc7KJEk3-opGQksw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NSuHiVDgTLiG6bDOq0atRQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*swtcLyNCOr3ZTd0NCGOQ3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NqJCrlKE6M7aN9OefNdSpQ.png" /></figure><p>Yay! We earned a full point! 🎉 You can take the investigation further by performing a dynamic analysis to examine how the URL behaves whether it redirects, downloads any files, or triggers suspicious activity.</p><p>This is my first article, and I’d truly appreciate your support! Give it some claps and share it with others</p><p>Thank you!<br>I’d love to connect with you at <a href="https://x.com/oomootayoo">Twitter</a> | <a href="https://www.linkedin.com/in/umar-mustafa-omotayo/">LinkedIn</a></p><p>See you in my next blog article. <strong>Take care!</strong> 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a202147f96c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>