Skip to content

Instantly share code, notes, and snippets.

View austinsonger's full-sized avatar
🙃
Localhost

Austin Songer, CISSP austinsonger

🙃
Localhost
View GitHub Profile
@justinyoo
justinyoo / 01-get-inbound-ip-address.ps1
Last active October 26, 2020 13:02
Updating Azure DNS and SSL Certificate on Azure Functions via Github Actions
$AppResourceGroupName = "[RESOURCE_GROUP_NAME_FOR_AZURE_FUNCTION_APP]"
AppName = "[NAME_OF_AZURE_FUNCTION_APP]"
$app = Get-AzResource `
-ResourceType Microsoft.Web/sites `
-ResourceGroupName $AppResourceGroupName `
-ResourceName $AppName
$newIp4Address = $app.Properties.inboundIpAddress
@JDSileo
JDSileo / AD-TeamsSync.ps1
Created October 9, 2020 19:05
This script will sync an AD Group with a Microsoft Team.
##This script will sync an AD Group with a Microsoft Team. (Tested on Windows Server 2019)
##This script should be run in a user context that has read access to a Windows Active Directory domain.
##To make it easier I have it run every 30 minutes starting about 5 minutes after an expected ADSync.
##This works with Microsoft Business Basic subscriptions. P1 licensing is not required.
##MSTeams Powershell Module: https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-overview
##AADSync: https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-sync-whatis
$Disabled = Get-ADUser -Filter {Enabled -eq $false};#Get List of Disabled Users.
$Teams_Admin_User = "<Admin Username Here>";#Teams Administrator Username.
$Teams_Admin_Password = "<Admin Password Here>";#Teams Administrator Password.
@pkhabazi
pkhabazi / AlertRules.tests.ps1
Last active October 25, 2020 05:42
Deploying and Managing Azure Sentinel – Ninja style
Describe "Azure Sentinel AlertRules Tests" {
$TestFiles = Get-ChildItem -Path .\SettingFiles\AlertRules.json -File -Recurse | ForEach-Object -Process {
@{
File = $_.FullName
ConvertedJson = (Get-Content -Path $_.FullName | ConvertFrom-Json)
Path = $_.DirectoryName
Name = $_.Name
}
}
<#
CSV FORMAT
+------------+--------------+--------------+
| Group Name | Group Owner1 | Group Owner2 |
+------------+--------------+--------------+
| group1 | user@domain | user@domain |
| group2 | user@domain | user@domain |
| group3 | user@domain | user@domain |
@rdc-112
rdc-112 / UpdateAzureFirewallRule.ps1
Created September 22, 2020 21:19
Update SQL Server Firewall Rule Using Powershell
param
([Parameter(Mandatory)][string]$resourceGroupName,
[Parameter(Mandatory)][string]$sqlServerName,
[Parameter(Mandatory)][string]$ruleName)
<#
TODO:
- Add option to create firewall rule if it doesn't exist already
- Wrap wxternal method calls in try/catch blocks
- Add option to use PC name as rule name. Reduces the number of params that need to be provided
- Improve log messages
@PlagueHO
PlagueHO / Get-AzureArcOnboardingScript.ps1
Last active October 25, 2020 05:45
PowerShell Function to create a Service Principal and return the script to onboard a machine to Azure Arc
[CmdletBinding()]
param (
[Parameter()]
[System.String]
$ServicePrincipalName = 'AzureArcMachineOnboarding',
[Parameter()]
[ValidateSet('Linux','Windows')]
[System.String]
$OperatingSystem = 'Linux',
@ppartarr
ppartarr / rmGroups.ps1
Created July 15, 2020 21:25
Remove all Azure AD groups starting with a given prefix
# This script requires :
# 1. the Azure AD Powershell module: Install-Module -Name AzureADPreview
# 2. an authenticated user: Connect-AzureAD
$uid = ""
$groupPrefix = "GroupNamePrefix"
$groups = Get-AzureADMSGroup
$groups | Select-Object -Skip 3 | Where-Object {
$_ -match '(\d+)\s+(\d+)\s+(.*?)\s+([a-z]+(?:-[a-z0-9]+){2,})\s+(.*)'
@ppartarr
ppartarr / mkGroups.ps1
Created July 15, 2020 21:24
Create Azure AD groups and add a given user
# This script requires :
# 1. the Azure AD Powershell module: Install-Module -Name AzureADPreview
# 2. an authenticated user: Connect-AzureAD
$uid = ""
$numberOfGroupsToCreate = 200;
for($i = 0; $i -lt $numberOfGroupsToCreate; $i++)
{
$displayName = "GroupNamePrefix" + $i
@98lenvi
98lenvi / Create website in darkweb.md
Last active March 10, 2025 17:38
steps to host dark web website

Create your own site in the dark web.

There is a lot of misconception around the dark web, and most of the people think that it is not possible to create their own website on Dark web (The Onion network). Today we will set up a website in the Onion/Tor network for free.

Screenshot of my dark website

As you can see above, I have created my own website in the Tor network, and I've accessed it using the Tor Browser.

This tutorial consists of three steps

@comitieutu
comitieutu / Connect-AzureAD.ps1
Created June 17, 2020 04:29
Connect-AzureAD
# Install module
Install-Module -Name AzureAD -AllowClobber
# Sign in. Connect to Azure with a browser sign in token
Connect-AzureAD