• This repository has been archived on 05/Nov/2022
  • Stars
    star
    546
  • Rank 78,453 (Top 2 %)
  • Language
    PowerShell
  • License
    GNU Affero Genera...
  • Created about 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Security auditing tool for Azure environments

Read-only project

Please, be aware that this project is no longer maintained. Please, consider use our ScoutSuite tool.

Introduction

Azucar is a multi-threaded plugin-based tool to help you assess the security of your Azure Cloud environment.

The script will not change or modify any assets deployed in an Azure subscription.

Operating System Support

As the script uses the .NET ADAL library for authenticating a user and calling REST APIs, it only supports Windows OS.

Features

  • Return a number of attributes on computers, users, groups, contacts, events, etc... from Azure Active Directory.
  • Search for High Level Accounts in a specific Azure Tenant, including Azure Active Directory, classic administrators, and Directory Roles (RBAC).
  • Multi-Threading support.
  • Plugin Support.
  • The following assets are supported by Azucar:
    • Azure SQL Databases, including MySQL and PostgreSQL databases,
    • Azure Active Directory,
    • Storage Accounts,
    • Classic Virtual Machines,
    • Virtual Machines V2,
    • Security Status,
    • Security Policies,
    • Role Assignments (RBAC),
    • Missing Security Patches,
    • Missing Security Baseline,
    • Web Application Firewall,
    • Network Security Groups,
    • Classic Endpointsy,
    • Azure Security Alerts,
    • Azure KeyVault.

Screenshots

azucar

Reporting

Support for exporting data to popular formats like CSV, XML or JSON.

The following screenshot shows an example report in JSON format:

threat

Office Support

Although there is already support for a variety of file formats, you could export data to Excel 2010/2013/2016. At the time of writing Azucar supports style modification, chart creation, company logo, and a range of languages.

excel

Sample reports

An example of report generated by Azucar can be downloaded from Azucar_Report_20170308.xlsx.

Prerequisites

Azucar works straight out of the box with PowerShell version 3.x and .NET4.5. To check a Windows PowerShell version, open a console and run the command $PsVersionTable:

PS C:\Users\silverhack> $psversiontable

Name                           Value
----                           -----
PSVersion                      5.1.14393.693
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.693
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

You should use an account with at least read-permission on the assets you want to access. More information about Role-Based Access Control in Azure can be found by clicking here.

Installation

You can either download the latest zip by clicking this link or download Azucar by cloning the repository:

git clone https://github.com/nccgroup/azucar.git

Once you have unzipped the zip file, you can use the PowerShell V3 Unblock-File cmdlet to unblock files:

Get-ChildItem -Recurse c:\Azucar_V10 | Unblock-File

Write your own plugin

The plugin mechanism introduced in Azucar provides an easy method for PowerShell developers to dynamically add new functionality, so if you want to extend Azucar you can do so by writing your own plugin(s) in PowerShell.

To use your custom plugin, add it to the Plugins\Custom folder. For those not familiar with plugins, it's basically self-contained PowerShell code that is passed as a scriptblock class. The variable names and return values stay the same throughout all plugins, so they can be generically loaded.

The following sample shows the basic structure of a Azucar PowerShell plugin:

#Sample skeleton PowerShell plugin code
[cmdletbinding()]
    Param (
            [Parameter(HelpMessage="Background Runspace ID")]
            [int]
            $bgRunspaceID,

            [Parameter(HelpMessage="Not used in this version")]
            [HashTable]
            $SyncServer,

            [Parameter(HelpMessage="Azure Object with valuable data")]
            [Object]
            $AzureObject,

            [Parameter(HelpMessage="Object to return data")]
            [Object]
            $ReturnPluginObject,

            [Parameter(HelpMessage="Verbosity Options")]
            [System.Collections.Hashtable]
            $Verbosity,

            [Parameter(Mandatory=$false, HelpMessage="Save message in log file")]
	        [Bool] $WriteLog

        )
    Begin{
        #Import Azure API
        $LocalPath = $AzureObject.LocalPath
        $API = $AzureObject.AzureAPI
        $Utils = $AzureObject.Utils
        . $API
        . $Utils

        #Import Localized data
        $LocalizedDataParams = $AzureObject.LocalizedDataParams
        Import-LocalizedData @LocalizedDataParams;
    }
    Process{
        #Do things here
        $ReturnValue = [PSCustomObject]@{Name='myCustomType';Expression={"NCCGroup Labs"}}
		
    }
    End{
        if($ReturnValue){
            #Work with SyncHash
            $SyncServer.$($PluginName)=$ReturnValue
            $ReturnValue.PSObject.TypeNames.Insert(0,'AzureRM.NCCGroup.myDecoratedObject')
            #Create custom object for store data
            $MyVar = New-Object -TypeName PSCustomObject
            $MyVar | Add-Member -type NoteProperty -name Section -value $Section
            $MyVar | Add-Member -type NoteProperty -name Data -value $ReturnValue
            #Add data to object
            if($MyVar){
                $ReturnPluginObject | Add-Member -type NoteProperty -name Example -value $MyVar
            }
        }
        else{
            Write-AzucarMessage -WriteLog $WriteLog -Message ($message.AzureADGeneralQueryEmptyMessage -f "My Super Plugin", $AzureObject.TenantID) `
                                -Plugin $PluginName -Verbosity $Verbosity -IsWarning
        }
    }

Once you have your plugin prepared and located into the Plugins\Custom directory, it should be ready to be loaded by using the -Custom flag as shown below:

I already created various plugins within the Plugins\Custom folder which you can use to get you started.

Usage

To get a list of basic options and switches use:

get-help .\azucar.ps1

To get a list of examples use:

get-help .\azucar.ps1 -Examples

To get a list of all options and examples with detailed info use:

get-help .\azucar.ps1 -Detailed

Remarks

Due to the amount of work we will not always be able to respond quickly to new issues, but eventually you will get a response and if needed a fix.

More Repositories

1

ScoutSuite

Multi-Cloud Security Auditing Tool
Python
6,173
star
2

Scout2

Security auditing tool for AWS environments
Python
1,728
star
3

sobelow

Security-focused static analysis for the Phoenix Framework
Elixir
1,601
star
4

Winpayloads

Undetectable Windows Payload Generation
Python
1,519
star
5

demiguise

HTA encryption tool for RedTeams
Python
1,326
star
6

house

A runtime mobile application analysis toolkit with a Web GUI, powered by Frida, written in Python.
JavaScript
1,321
star
7

PMapper

A tool for quickly evaluating IAM permissions in AWS.
Python
1,279
star
8

redsnarf

RedSnarf is a pen-testing / red-teaming tool for Windows environments
PowerShell
1,182
star
9

featherduster

An automated, modular cryptanalysis tool; i.e., a Weapon of Math Destruction
Python
1,074
star
10

SocksOverRDP

Socks5/4/4a Proxy support for Remote Desktop Protocol / Terminal Services / Citrix / XenApp / XenDesktop
C++
990
star
11

singularity

A DNS rebinding attack framework.
JavaScript
962
star
12

exploit_mitigations

Knowledge base of exploit mitigations available across numerous operating systems, architectures and applications and versions.
812
star
13

AutoRepeater

Automated HTTP Request Repeating With Burp Suite
Java
742
star
14

fuzzowski

the Network Protocol Fuzzer that we will want to use.
Python
702
star
15

aws-inventory

Discover resources created in an AWS account.
Python
690
star
16

BurpSuiteHTTPSmuggler

A Burp Suite extension to help pentesters to bypass WAFs or test their effectiveness using a number of techniques
Java
654
star
17

Sniffle

A sniffer for Bluetooth 5 and 4.x LE
C
648
star
18

nmap-nse-vulnerability-scripts

NMAP Vulnerability Scanning Scripts
Lua
618
star
19

TriforceAFL

AFL/QEMU fuzzing with full-system emulation.
C
615
star
20

LoggerPlusPlus

Advanced Burp Suite Logging Extension
Java
608
star
21

nccfsas

Information released publicly by NCC Group's Full Spectrum Attack Simulation (FSAS) team.
C
598
star
22

sadcloud

A tool for standing up (and tearing down!) purposefully insecure cloud infrastructure
HCL
593
star
23

freddy

Automatically identify deserialisation issues in Java and .NET applications by using active and passive scans
Java
570
star
24

phantap

Phantom Tap (PhanTap) - an β€˜invisible’ network tap aimed at red teams
C
560
star
25

tracy

A tool designed to assist with finding all sinks and sources of a web application and display these results in a digestible manner.
JavaScript
549
star
26

VCG

VisualCodeGrepper - Code security scanning tool.
Visual Basic .NET
506
star
27

Cyber-Defence

Information released publicly by NCC Group's Cyber Incident Response Team
Python
470
star
28

autochrome

This tool downloads, installs, and configures a shiny new copy of Chromium.
HTML
431
star
29

scrying

A tool for collecting RDP, web and VNC screenshots all in one place
Rust
425
star
30

wssip

Application for capturing, modifying and sending custom WebSocket data from client to server and vice versa.
JavaScript
425
star
31

blackboxprotobuf

Blackbox protobuf is a Burp Suite extension for decoding and modifying arbitrary protobuf messages without the protobuf type definition.
Python
380
star
32

autopwn

Specify targets and run sets of tools against them
Python
374
star
33

idahunt

idahunt is a framework to analyze binaries with IDA Pro and hunt for things in IDA Pro
Python
373
star
34

CrossSiteContentHijacking

Content hijacking proof-of-concept using Flash, PDF and Silverlight
HTML
372
star
35

Solitude

Solitude is a privacy analysis tool that enables anyone to conduct their own privacy investigations. Whether a curious novice or a more advanced researcher, Solitude makes the process of evaluating user privacy within an app accessible for everyone.
CSS
370
star
36

vlan-hopping---frogger

Easy 802.1Q VLAN Hopping
Shell
346
star
37

DriverBuddy

DriverBuddy is an IDA Python script to assist with the reverse engineering of Windows kernel drivers.
Python
331
star
38

shocker

A tool to find and exploit servers vulnerable to Shellshock
Python
330
star
39

WMIcmd

A command shell wrapper using only WMI for Microsoft Windows
C#
319
star
40

acCOMplice

Tools for discovery and abuse of COM hijacks
PowerShell
272
star
41

umap

The USB host security assessment tool
Python
265
star
42

keimpx

Check for valid credentials across a network over SMB
Python
260
star
43

SusanRTTI

Another RTTI Parsing IDA plugin
Python
258
star
44

metasploitavevasion

Metasploit AV Evasion Tool
Shell
257
star
45

UPnP-Pentest-Toolkit

UPnP Pentest Toolkit for Windows
C#
244
star
46

umap2

Umap2 is the second revision of NCC Group's python based USB host security assessment tool.
Python
240
star
47

GTFOBLookup

Offline command line lookup utility for GTFOBins (https://github.com/GTFOBins/GTFOBins.github.io), LOLBAS (https://github.com/LOLBAS-Project/LOLBAS), WADComs (https://wadcoms.github.io), and HijackLibs (https://hijacklibs.net/).
Python
238
star
48

G-Scout

Google Cloud Platform Security Tool
Python
232
star
49

asatools

Main repository to pull all NCC Group Cisco ASA-related tool projects.
Shell
220
star
50

cisco-SNMP-enumeration

Automated Cisco SNMP Enumeration, Brute Force, Configuration Download and Password Cracking
Shell
216
star
51

depthcharge

A U-Boot hacking toolkit for security researchers and tinkerers
Python
212
star
52

thetick

A simple embedded Linux backdoor.
Python
195
star
53

AWS-recipes

A number of Recipes for AWS
Python
195
star
54

kube-auto-analyzer

Kubernetes Auto Analyzer
HTML
192
star
55

TPMGenie

TPM Genie is an I2C bus interposer for discrete Trusted Platform Modules
C++
189
star
56

BinProxy

BinProxy is a proxy for arbitrary TCP connections. You can define custom message formats using the BinData gem.
Ruby
172
star
57

DetectWindowsCopyOnWriteForAPI

Enumerate various traits from Windows processes as an aid to threat hunting
C++
168
star
58

TriforceLinuxSyscallFuzzer

A linux system call fuzzer using TriforceAFL
C
167
star
59

BKScan

BlueKeep scanner supporting NLA
Shell
167
star
60

pybeacon

A collection of scripts for dealing with Cobalt Strike beacons in Python
Python
167
star
61

typofinder

A finder of domain typos showing country of IP address
Python
166
star
62

BLESuite

BLESuite is a Python package that provides an easier way to test Bluetooth Low Energy (BLE) device
Python
165
star
63

tcpprox

A small command-line TCP proxy utility written in Python
Python
156
star
64

libslub

Python
155
star
65

LazyDroid

bash script to facilitate some aspects of an Android application assessment
Shell
151
star
66

chuckle

An automated SMB relay exploitation script.
Shell
151
star
67

requests-racer

Small Python library that makes it easy to exploit race conditions in web apps with Requests.
Python
150
star
68

whalescan

Whalescan is a vulnerability scanner for Windows containers, which performs several benchmark checks, as well as checking for CVEs/vulnerable packages on the container
Python
143
star
69

gitpwnd

GitPwnd is a network penetration tool that lets you use a git repo for command and control of compromised machines
Python
139
star
70

CollaboratorPlusPlus

Java
139
star
71

Carnivore

Tool for assessing on-premises Microsoft servers authentication such as ADFS, Skype, Exchange, and RDWeb
C#
139
star
72

Change-Lockscreen

Offensive tool to trigger network authentications as SYSTEM
C#
134
star
73

Decoder-Improved

Improved decoder for Burp Suite
Java
134
star
74

Wubes

Qubes containerization on Windows
Python
131
star
75

OutlookLeakTest

The Outlook HTML Leak Test Project
C#
131
star
76

port-scan-automation

Automate NMAP Scans and Generate Custom Nessus Policies Automatically
Shell
128
star
77

Hodor

Hodor! Fuzzer..
Python
126
star
78

Zulu

The Zulu fuzzer
Python
125
star
79

WinShareEnum

Windows Share Enumerator
C#
121
star
80

memscan

Searches for strings, regex, credit card numbers of magnetic stripe card tracks in a Windows process's memory space
C#
120
star
81

ebpf

eBPF - extended Berkeley Packet Filter tooling
Python
116
star
82

cq

Python
115
star
83

argumentinjectionhammer

A Burp Extension designed to identify argument injection vulnerabilities.
Python
114
star
84

DroppedConnection

Python
113
star
85

SCOMDecrypt

SCOMDecrypt is a tool to decrypt stored RunAs credentials from SCOM servers
C#
112
star
86

GOATCasino

This is an intentionally vulnerable smart contract truffle deployment aimed at allowing those interested in smart contract security to exploit a wide variety of issues in a safe environment.
JavaScript
112
star
87

OneLogicalMyth_Shell

A HTA shell to assist with breakout assessments.
HTML
111
star
88

BLE-Replay

BLE-Replay is a Bluetooth Low Energy (BLE) peripheral assessment tool
Python
110
star
89

ccs

Python
107
star
90

web3-decoder

Python
106
star
91

WindowsDACLEnumProject

A collection of tools to enumerate and analyse Windows DACLs
C++
105
star
92

DIBF

Windows NT ioctl bruteforcer and modular fuzzer
C++
103
star
93

raccoon

Salesforce object access auditor
Python
103
star
94

go-pillage-registries

Pentester-focused Docker registry tool to enumerate and pull images
Go
103
star
95

cloud_ip_ranges

Identify IP addresses owned by public cloud providers
Python
101
star
96

DatajackProxy

Datajack Proxy allows you to intercept TLS traffic in native x86 applications across platforms
JavaScript
100
star
97

pcap-burp

Pcap importer for Burp
Java
100
star
98

jwt-reauth

Java
100
star
99

KilledProcessCanary

A canary designed to minimize the impact from certain Ransomware actors
C#
99
star
100

Berserko

Burp Suite extension to perform Kerberos authentication
Java
99
star