Giter VIP home page Giter VIP logo

azure_workshop's Introduction

Azure Red Team Attack and Detect Workshop

This is a vulnerable-by-design Azure lab containing 2 x attack paths with common misconfigurations. These vulnerabilities are intended to represent those found in live production environments and the attack vectors are intended to be as realistic as possible to real Threat Actors TTPs. If you would like to see what detections and alerts these attack path vectors are causing, I recommend signing up for a Microsoft E5 trial which has Microsoft Defender for Cloud and Azure AD premium P2 plan. Links for signing up to an Azure Developer account can be found in the resources.txt file.

Author - Roxana Kovaci (@RoxanaKovaci)

Requirements

  • Azure tenant
  • Azure CLI
  • Terraform version 1.2.2 or above
  • Azure User with Global Admin role in the AAD tenant
  • add your external IP on lines 248-249 in kc1.tf

Deployment

az login
git clone https://github.com/mandiant/Azure_Workshop.git
cd Azure_Workshop
cd kc1

terraform init
terraform validate

terraform plan -out kc1.tfplan
terraform apply kc1.tfplan

cd ../kc2

terraform init
terraform validate

terraform plan -out kc2.tfplan
terraform apply kc2.tfplan

Get started

  • the entry point for each kill-chain is user1. To get the initial user's credentials, run the following query:
terraform output

Kill-Chain objectives and other resources

Kill-Chain #1:

  • Objective: Gain access to the Customers PII data.

  • Solutions: The full attack path solutions can be found in kc1/kc1_solution.txt

Kill-Chain #2:

  • Objective: Gain access to the super secret file.

  • Solutions: The full attack path solutions can be found in kc2/kc2_solution.txt

Each kill-chain has in its folder the Terraform script (and other pre-reqs files needed for deployment) and the solutions to the challenges.

Other resources and useful links to learn more can be found in resources.txt file.

Clean up

After finishing with each kill-chain scenario, you can remove all resources previously added in your tenant:

az login

cd kc1
terraform destroy

cd ../kc2
terraform destroy

azure_workshop's People

Contributors

freddy1020 avatar lhazy avatar ocel0tsec avatar roxanakovaci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure_workshop's Issues

Unable to acquire token for tenant 'organizations' with error 'Operation returned invalid status code 'BadRequest'

Hello! Am working through KC1. Have logged into a Linux VM, and connected to azure with the Peter Williams account. I'm able to extract an access token. When I use this token on my Windows VM, I'm getting "Unable to acquire token for tenant 'organizations' with error 'Operation returned invalid status code 'BadRequest'". Connect-AzAccount : Operation returned invalid status code 'BadRequest'.

Using the below connection string with AccessToken.

Would great appreciate any help or insight to this error.

Additionally -- I thought it might have been related to my other MFA enforcement policy, and so have turned that off temporarily. Do these scenarios (as a base assumption need MFA off or disabled?).

The Linux user CA policy is working as intended :)


  • from PW user department field, he's expected to log in from a Linux machine (Conditional Access rules)

  • extract access token from Linux machine or using az on Windows (az seems to bypass the application type)
    az account get-access-token

  • import the above access token and login on a Windows machine
    Connect-AzAccount -AccountId <\UserName> -AccessToken $token


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.