<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: jas'scyberspace</title>
    <description>The latest articles on Forem by jas'scyberspace (@leejasaispace).</description>
    <link>https://forem.com/leejasaispace</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3169669%2F3dbe4c25-237e-4a80-aec2-996603334e97.png</url>
      <title>Forem: jas'scyberspace</title>
      <link>https://forem.com/leejasaispace</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/leejasaispace"/>
    <language>en</language>
    <item>
      <title>walkthrough 1</title>
      <dc:creator>jas'scyberspace</dc:creator>
      <pubDate>Fri, 29 Aug 2025 14:47:18 +0000</pubDate>
      <link>https://forem.com/leejasaispace/walkthrough-1-3de8</link>
      <guid>https://forem.com/leejasaispace/walkthrough-1-3de8</guid>
      <description>&lt;h2&gt;
  
  
  What is path traversal?
&lt;/h2&gt;

&lt;p&gt;Path traversal is when someone can manipulate a file path to break out of the folder they’re supposed to be limited to. Instead of just accessing a safe file, they can reach other parts of the server and potentially view or change files they shouldn’t have access to. That means things like app data or behavior can be altered just by tweaking the path.&lt;/p&gt;




&lt;h2&gt;
  
  
  Walkthrough: Simulating Path Traversal on My Site
&lt;/h2&gt;

&lt;p&gt;Now that we’ve got a basic understanding of what path traversal is, let’s walk through a real-world(ish) example. I intentionally added this vulnerability (a safe and fun version) to my site, l1nuxbutt3rfly (&lt;a href="https://l1nuxbutt3rfly.squarespace.com/" rel="noopener noreferrer"&gt;https://l1nuxbutt3rfly.squarespace.com/&lt;/a&gt;), it’s both a portfolio and an experimental space where I practice and document real-world cybersecurity scenarios. This walkthrough is part of my ongoing project to simulate realistic vulnerabilities in a safe, controlled environment. &lt;/p&gt;

&lt;p&gt;Here’s how I recreated a classic path traversal bug using a custom download button and a bit of creative URL manipulation:&lt;/p&gt;

&lt;p&gt;Basically, the download feature doesn't properly clean up what the user types into the URL, so you can trick it into grabbing files it shouldn’t. Instead of just giving you a safe file, it lets you “traverse” up directories and access other stuff—like hidden flags or system files—by using ../ in the path.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqcca8ajjzkh45e7qn0sk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqcca8ajjzkh45e7qn0sk.png" alt=" " width="611" height="636"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqtvinn9ndui6nwtncxnt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqtvinn9ndui6nwtncxnt.png" alt=" " width="800" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How the Path Traversal Works on My Site
&lt;/h3&gt;

&lt;p&gt;The fake “Download” button you see is tied to a URL that includes a query string like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/downloads?token=pt-demo&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;On the surface, it just looks like a normal link to a downloadable file. But behind the scenes, it mimics a common web application mistake: &lt;strong&gt;trusting user input in the file path&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step-by-Step Breakdown
&lt;/h4&gt;

&lt;p&gt;The Setup&lt;br&gt;
I placed a link on the site that mimics a typical file download endpoint. It uses a token parameter that appears to validate access to a specific file—something like a brochure, .zip file, or demo content.&lt;/p&gt;

&lt;p&gt;The Simulated Mistake&lt;br&gt;
Instead of restricting access to just one file, the URL accepts manipulated paths. The idea is to simulate an application that takes whatever path the user supplies (in the query) and serves it back without sanitizing or validating it.&lt;/p&gt;

&lt;p&gt;The Exploit&lt;br&gt;
By tweaking the token parameter, you can simulate a traversal attack. For example, you might change it to:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/downloads?token=../../../../secret/flag.txt&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
This tricks the server into “walking up” the file tree and accessing something outside the intended directory. In this case, it simulates grabbing a hidden flag file.&lt;/p&gt;

&lt;p&gt;The Flag Reveal&lt;br&gt;
If done right, instead of a clean download, you get access to the simulated "flag" file, which represents unauthorized access to sensitive data—just like in a real path traversal attack.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Prevent This
&lt;/h2&gt;

&lt;p&gt;Sanitize Like You Mean It&lt;/p&gt;

&lt;p&gt;Never trust user input. If someone gives you a file name or path, clean it like it’s radioactive. Strip out characters like ../, backslashes, or anything that screams “I’m trying to break out of this folder.”&lt;/p&gt;

&lt;p&gt;Think of it like giving a guest access to your living room, not the keys to your bedroom, kitchen, and locked drawer full of secrets.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use Whitelisting&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Only allow access to specific, known-good files or paths. If it’s not in your approved list, don’t even consider serving it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Lock Down Your Directories&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Set strict permissions on your server. Even if someone does try path traversal, they should hit a dead end—preferably a big bold 403 Forbidden wall.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Monitor &amp;amp; Alert&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Add logging and alerts for weird file path activity. If someone’s tossing around a lot of ../, it’s not because they’re lost.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use Built-In Path Libraries&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Languages like Python, Node, and others have safe ways to resolve file paths (e.g., path.resolve() in Node.js). Don’t reinvent the wheel—use tools that help block sneaky behavior.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building an Azure Misconfiguration Scanner: Starting Over</title>
      <dc:creator>jas'scyberspace</dc:creator>
      <pubDate>Thu, 31 Jul 2025 13:54:34 +0000</pubDate>
      <link>https://forem.com/leejasaispace/building-an-azure-misconfiguration-scanner-starting-over-2oc7</link>
      <guid>https://forem.com/leejasaispace/building-an-azure-misconfiguration-scanner-starting-over-2oc7</guid>
      <description>&lt;p&gt;I am learning Azure security architecture, IAM, and policy-driven detection by completing a 90-Day challenge to build an Azure Misconfiguration Scanner.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I'm breaking things, detecting misconfigurations, and building a tool to find them. Until I really broke something—my Azure account.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  What Happened
&lt;/h3&gt;

&lt;p&gt;At the end of July, I hit a wall working on day 8 tasks. What started out as a learning exercise quickly turned into an Azure tenant lockout.&lt;/p&gt;

&lt;p&gt;After completing most of the tasks for day 8, my Azure account hit a critical issue. I attempted to clean up some identify settings in Entra ID which led to me accidentally removing my access and changing the login identify. While I can login to the account, I can no longer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Assign permissions &lt;/li&gt;
&lt;li&gt;Contact support through the portal&lt;/li&gt;
&lt;li&gt;Disable or modify active, assigned policies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It feels like a ghost tenant.&lt;/p&gt;




&lt;h3&gt;
  
  
  Starting Over
&lt;/h3&gt;

&lt;p&gt;Rather than waste time contacting support (which I will eventually have to do), I created a new Azure account where I have a new subscription and tenant. I rebuilt everything I had done in the first eight days in one focused sprint.&lt;/p&gt;

&lt;p&gt;I have successfully:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Assigned &lt;strong&gt;Audit NICs with Public IPs&lt;/strong&gt; policy and &lt;strong&gt;Audit Storage Public Network Access&lt;/strong&gt; policy&lt;/li&gt;
&lt;li&gt;Created &lt;strong&gt;Test Resource Groups&lt;/strong&gt; with and without policy and a &lt;strong&gt;public storage account&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Deployed a &lt;strong&gt;non-compliant NIC&lt;/strong&gt; to validate detection&lt;/li&gt;
&lt;li&gt;Verified results using 'az policy state list' and CLI filters&lt;/li&gt;
&lt;li&gt;Detected and confirmed compliance using CLI outpu
t
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az policy assignment create \
    --name "AuditStorage PublicAccess" \
    --policy "/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf801975c4c" \
    --params "{ \"listOfAllowedLocations\": { \"value\": [\"eastus\"] } }" \
    --scope "/subscriptions/&amp;lt;new-sub-id&amp;gt;/resourceGroups/RG-SecureAccess"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Changes
&lt;/h3&gt;

&lt;p&gt;I decided to make and stick to a few changes that will help this second time around. I am designating a review day after 1 full week is completed. I will not edit user principal names and now confirm Owner access on correct subscriptions before assignments. Lastly, I keep a dedicated RG-PolicyExempt group to simulate misconfigs freely. These changes exposed a few lessons I needed to learn about myself while working on this project which includes policy fatigue, avoid lockouts, role clarity, and testing safely. &lt;/p&gt;




&lt;p&gt;Have you ever completely locked yourself out of a cloud environment? Or made any critical mistakes on a production level environment? Did it set you back or push you forward? Comment below.&lt;/p&gt;

</description>
      <category>azure</category>
      <category>security</category>
    </item>
    <item>
      <title>Building an Azure Misconfiguration Scanner: Week 1 of My 90-Day Challenge</title>
      <dc:creator>jas'scyberspace</dc:creator>
      <pubDate>Wed, 30 Jul 2025 17:36:46 +0000</pubDate>
      <link>https://forem.com/leejasaispace/building-an-azure-misconfiguration-scanner-week-1-of-my-90-day-challenge-37bn</link>
      <guid>https://forem.com/leejasaispace/building-an-azure-misconfiguration-scanner-week-1-of-my-90-day-challenge-37bn</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;“I wanted to learn Azure security in a way that certifications alone couldn’t teach me—by breaking things, detecting misconfigurations, and building a tool to find them.”&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Week 1 was baseline setup + first policy detection&lt;/li&gt;
&lt;li&gt;Hit CLI/PowerShell quirks and Azure Policy delays&lt;/li&gt;
&lt;li&gt;Repo + workflow started coming together&lt;/li&gt;
&lt;li&gt;Next week → storage misconfigurations + tenant chaos&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;This is Week 1 of my 90-Day challenge to build an Azure Misconfiguration Scanner while deeply learning Azure security architecture, IAM, and policy-driven detection. With the help of James Lee's AZ-104 Course, Microsoft Learn, and ChatGPT, I am learning and building. &lt;/p&gt;

&lt;p&gt;Azure security concepts often make sense on paper, but in practice, misconfigurations happen fast. So instead of passively studying, I:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Created an Azure security lab from scratch&lt;/li&gt;
&lt;li&gt;Intentionally misconfigured resources&lt;/li&gt;
&lt;li&gt;Detected those misconfigs with Azure Policy + automation&lt;/li&gt;
&lt;li&gt;Built toward a custom misconfiguration scanner by Day 90&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Week 1 Goals
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Set up a baseline Azure environment&lt;/li&gt;
&lt;li&gt;Understand Azure Policy basics&lt;/li&gt;
&lt;li&gt;Trigger the first noncompliance detection&lt;/li&gt;
&lt;li&gt;Start organizing everything in a GitHub repo&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What I Accomplished
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;✅ Created Resource Group RG-SecureAccess as my main test scope&lt;/li&gt;
&lt;li&gt;✅ Built test users, groups, and a custom insecure RBAC role&lt;/li&gt;
&lt;li&gt;✅ Learned how to assign built-in Azure Policies&lt;/li&gt;
&lt;li&gt;“Network interfaces should not have public IPs”&lt;/li&gt;
&lt;li&gt;✅ Created a misconfigured NIC to test detection&lt;/li&gt;
&lt;li&gt;✅ Saw Azure Policy deny a VM creation (cool moment!)&lt;/li&gt;
&lt;li&gt;✅ Started repo scaffolding with queries/nics-with-public-ips.cli&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Early Struggles
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Azure CLI vs PowerShell quoting:
Multi-line CLI commands and JSON parameters broke constantly until I learned to use JSON files for parameters.&lt;/li&gt;
&lt;li&gt;Azure Policy evaluation delay:
I expected instant results but policies take ~5-10 minutes to evaluate resources.&lt;/li&gt;
&lt;li&gt;Tenant confusion (EXT# accounts):
Guest vs. internal accounts behave differently for RBAC &amp;amp; CLI. I hit weird auth issues early on but didn’t know they’d come back to bite me harder in Week 2.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Hands-On Example
&lt;/h3&gt;

&lt;p&gt;Here’s the CLI command I used to create a policy that&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; az policy assignment create `
   --name "AuditStoragePublicAccess" `
   --display-name "Audit public network access on storage accounts" `
   --policy e56962a6-4747-49cd-b67b-bf8b01975c4c `                                                       
   --params '{\"listOfAllowedLocations\":{\"value\":[\"eastus\"]}}' `      
   --scope "/subscriptions/5d4b8df0-f30a-4bc3-b350-1ace90d201b8/resourceGroups/RG-SecureAccess"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, I had to create a storage account with public access enabled to trigger the policy violation&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az storage account create `
  --name "publicstoragedemo$((Get-Random -Maximum 9999))" `
  --resource-group "RG-SecureAccess" `
  --location "eastus" `
  --sku "Standard_LRS" `
  --kind "StorageV2" `
  --allow-blob-public-access true `
  --public-network-access Enabled

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;*&lt;em&gt;Follow me here if you want to see how this experiment evolves weekly.&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Series Index
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Week 1: Baseline Setup &amp;amp; First Detection&lt;/li&gt;
&lt;li&gt;Week 2: Learning Azure Security the Hard Way&lt;/li&gt;
&lt;li&gt;(Week 3 coming soon: Key Vault misconfigurations)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>azure</category>
      <category>security</category>
    </item>
  </channel>
</rss>
