Posts

Azure Policy - Subnets should have an Network Security Group

Image
 I often find it useful to create a proof for a security control and demonstrate how it works and pick up some useful techniques on the way.  Download the Postman export here . The issue with this fine policy is in the way the latest Terraform works. It creates the subnet prior to associating the NSG which means it is blocked from creating the subnet. Use the Terraform in the initial_env directory to create the starting point for the lab work. Attach the Policy to the Resource Group Obtain the 'Subnets should have a Network Security Group' policy definition from here  and add to your subscription. The name may conflict with a built-in policy so add something to the end - I added Andy on the end to differentiate it.  Attach the policy to a resource group. In this example the resource group 'az-900'. Azure Policy Definition Assigned to the Resource Group az-900 Azure Policy Assignment Postman Create Subnet Use the HTTP API to create a subnet and associate an NSG in a sin

CI/CD Pipeline Security & Shifting Left Part 2

Image
 A follow-up to my previous post I wanted to go back and remove the vulnerable code from  and update the included libraries to fix any dependencies that were vulnerable.  First, let's have a look at what has changed simply with the passage of time... Dependency-Track has not had a new SBOM for quite some time as the pipeline hasn't been run.  However, it has continued to track vulnerabilities in the included components. Dependency-Track Apr 23 The summary view shows the included versions with the number of vulnerabilities by severity. Not only has Dependency-Track continued to do it's job quietly in the background but it has also been updating Defect Dojo as new vulnerabilities have been notified through it's vulnerability database feeds.  Defect Dojo Apr 23 All of this happens based on the last SBOM ingested by Dependency-Track. Even if the pipeline has not been run in years and no new SBOM produced, it will continue to surface new vulnerabilities in the software compo

My favourite podcasts

Image
 Keeping up with industry news, and the latest research and developments from Information Security is no small task. Over the years I listened to many InfoSec podcasts. Some are great and I have stuck with them for many years, others have come and gone. In this post, I'm going list my personal favourites. Daily News Read all about it. Get the latest, up to date InfoSec news from around the world.  ISC Stormcast If you only have 5-10 mins to listen during your morning coffee then this is the one. I try to listen to this one every day. Chances are if something big is breaking you're going to hear about it here first.  Often the shows point the way to further information for interesting research and features the latest malware techniques you should be aware of.    Presented by the  Dr. Johannes Ullrich Dean of Research for SANS Technology Institute and SANS Faculty Fellow, and founder of the SANS Internet Storm Center (ISC),  with frequent contributions from the ISC Incident Hand

CI/CD Pipeline Security & Shifting Left

Image
Recently I have been doing far more AppSec work in Agile, Lean environment. I also took the SANS SEC 540 course Cloud Security and DevSecOps Automation  which has lots of really great exercises but I like to try to create some of my own examples.  In this one I wanted to create a CI/CD (Continuous Integration/Delivery) pipeline that integrates Static Analysis Software Testing (SAST) and Software Composition Analysis (SCA) and finally some Postman testing of API endpoints that include negative test (more on this later). To start with I needed some example code so I found an example and adapted it to my own needs. The code along with the other supporting files like the Jenkinsfile can found on my GitHub under Planetary-API . Please note, I don't claim to be the best coder in the world :-) I chose an API partly for simplicity of the examples and partly because there are things I wanted to explore further later in terms of bearer authentication and the use of JWTs (for another project

Find and list Unsecured Azure Storage Blobs

Image
Unsecured cloud storage are often the cause of breaches. It regularly makes the headlines when an Amazon S3 bucket is found with public access and contains tens of thousands or even  millions of records including PII (Personally Identifiable Information) such as addresses, phone numbers and email addresses. The same problem can beset Azure, or I guess, any cloud platform, and while defaults have improved it is still a common misconfiguration that can lead to a breach.  Recently I found myself needing to examine some Azure storage to check for misconfigured public access on some Azure storage accounts. A colleague suggested a script he'd come across Invoke-EnumerateAzureBlobs  (thanks Stephen). The PowerShell script can be used to find storage accounts and then enumerate files within that storage account if the permissions allow it. The original article can be found here and the github repo here . I would recommend reading the original post.  On this occasion I used the this to