Skip to content

Instantly share code, notes, and snippets.

@invictus-ir
invictus-ir / CloudTrail.csv
Last active October 10, 2025 15:40
An overview of CloudTrail events that are interesting from an Incident Response perspective
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 10 columns, instead of 9 in line 7.
"Initial Access","Execution","Persistence","Privilege Escalation","Defense Evasion","Credential Access","Discovery","Lateral Movement","Exfiltration","Impact"
ConsoleLogin,StartInstance,CreateAccessKey,CreateGroup,StopLogging,GetSecretValue,ListUsers,AssumeRole,CreateSnapShot,PutBucketVersioning
PasswordRecoveryRequested,StartInstances,CreateUser,CreateRole,DeleteTrail,GetPasswordData,ListRoles,SwitchRole,ModifySnapshotAttributes ,RunInstances
,Invoke,CreateNetworkAclEntry,UpdateAccessKey,UpdateTrail,RequestCertificate,ListIdentities,,ModifyImageAttribute,DeleteAccountPublicAccessBlock
,SendCommand,CreateRoute,PutGroupPolicy,PutEventSelectors,UpdateAssumeRolePolicy,ListAccessKeys,,SharedSnapshotCopyInitiated,
,,CreateLoginProfile,PutRolePolicy,DeleteFlowLogs,,ListServiceQuotas,,SharedSnapshotVolumeCreated,
,,AuthorizeSecurityGroupEgress,PutUserPolicy,DeleteDetector,,ListInstanceProfiles,,ModifyDBSnapshotAttribute,
,,AuthorizeSecurityGroupIngress,AddRoleToInstanceProfile,DeleteMembers,,ListBuckets,,PutBucketP
@indian-runner
indian-runner / dockerfile-ci-kubernetes.yaml
Last active October 19, 2020 16:37
A Gitlab CI build job reusing a former docker image for cache
build:
stage: build
image: docker:19.03.11
services:
- docker:19.03.11-dind
variables:
DOCKER_IMAGE: my-image-repository.com/my-image
script:
- docker pull ${DOCKER_IMAGE}:latest || true
- docker build
@johannesprinz
johannesprinz / Readme.md
Last active June 13, 2024 06:55
Migrating GitLab issues + history to Azure DevOps

Migrate-GitlabToDevops

Dependencies

You will need an access token from azure devops. Get yours here. This script will need contributor access to the project in question.

How to run

# populate user map in Map-IssueToWorkitem
@jamesrcounts
jamesrcounts / azure-create-terraform-backend.sh
Last active August 19, 2024 12:27
Snippets to illustrate getting started with Terraform in Azure DevOps
#!/usr/bin/env bash
set -euo pipefail
ID=$(uuidgen)
LOCATION=westus
RG=terraformrg
# Create unique name for storage account
STORAGE_ACCOUNT=$(echo "terraform-${ID}" | tr '[:upper:]' '[:lower:]' | sed 's/-//g' | cut -c1-24)
@hatan4ik
hatan4ik / backup-github-repos.pl
Created January 24, 2019 20:19 — forked from njh/backup-github-repos.pl
Script to download/clone all of your Github repos
#!/usr/bin/perl
#
# Script to download/clone all of your Github repos
#
# Copyright Nicholas Humfrey, 22nd August 2017
#
# License: http://unlicense.org
#
use JSON;
@kesor
kesor / setup-helm.sh
Last active January 24, 2019 20:26
Setup HELM/Tiller with TLS verification and Cluster Admin RBAC role link
#!/bin/bash
HELM_TILLER_SA=tiller
HELM_TILLER_NS=kube-system
tiller_tls() {
[ ! -f tiller-ca.crt ] && \
openssl req -x509 -new -newkey rsa:2048 -keyout tiller-ca.key -nodes -sha256 -days 3650 -out tiller-ca.crt -subj "/CN=tiller-ca"
[ ! -f tiller.crt ] && {
echo subjectAltName=IP:127.0.0.1 > extfile.cnf
@erdincay
erdincay / sugh.sh
Last active October 8, 2025 17:41
su GitHub (downloading all repositories from a given user)
#!/bin/bash
if [ -z "$1" ]; then
echo "waiting for the following arguments: username + max-page-number"
exit 1
else
name=$1
fi
if [ -z "$2" ]; then
@kesor
kesor / test-peer-discovery.go
Created August 28, 2018 08:05
peer discovery
package main
import (
"fmt"
"os"
"strings"
"time"
)
func printFatal(e error) {