Skip to content

Instantly share code, notes, and snippets.

@andreswebs
andreswebs / CloudTrail.csv
Created April 24, 2024 02:12 — forked from invictus-ir/CloudTrail.csv
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
@andreswebs
andreswebs / aws-ec2-ubuntu-desktop.md
Last active April 19, 2024 03:22
Set up a desktop environment accessible via RDP on an AWS EC2 instance running Ubuntu

add a non-root user with sudo permissions

(The username in this example is desktop.)

sudo addgroup --gid 2000 desktop
sudo adduser \
    --gid 2000 \
    --uid 2000 \
    --gecos "" \
@andreswebs
andreswebs / 00_README.md
Created December 7, 2023 23:07 — forked from md5/00_README.md
Demonstration Docker config for Wordpress on PHP-FPM behind Nginx

Proof of concept setup for Wordpress running under PHP-FPM with an Nginx frontend

Usage

Build a copy of this image:

git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-nginx-fpm
cd docker-nginx-fpm
docker build -t nginx-fpm .
@andreswebs
andreswebs / AWS Images.md
Created December 1, 2023 15:08 — forked from anthonygrees/AWS Images.md
How to find AWS AMI's for Terraform

Centos

aws ec2 describe-images \
    --owners aws-marketplace \
    --filters '[
        {"Name": "name",                "Values": ["CentOS Linux 7*"]},
        {"Name": "virtualization-type", "Values": ["hvm"]},
        {"Name": "architecture",        "Values": ["x86_64"]},
        {"Name": "image-type",          "Values": ["machine"]}
@andreswebs
andreswebs / list.txt
Created December 22, 2021 21:06 — forked from shortjared/list.txt
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@andreswebs
andreswebs / visual_studio_msbuild_manual.md
Created December 14, 2021 15:09 — forked from nicolasdao/visual_studio_msbuild_manual.md
Visual Studio & MSBuild manual. Keywords: msbuild visual studio visualstudio
#!/bin/sh
set -eufo pipefail
if [ "$#" -ne 2 ]; then
echo "usage: $0 source_repo_url target_repo_url" >&2
exit 1
fi
SOURCE_URL="$1"
@andreswebs
andreswebs / Clean Samsung Galaxy A40 bloatwares
Created June 2, 2021 01:10 — forked from joaofl/Clean Samsung Galaxy A40 bloatwares
Script I used to clean preinstalled shit out of my brand new Samsung A40 (while there is still no LineageOS for it)
#!/bin/sh
# ref: https://piunikaweb.com/2019/03/25/samsung-galaxy-s10-remove-bundled-bloatwares-without-root/
# install the following app to see the packages names:
# use the following command to generate the unistall command, for easy copy and paste:
# adb shell 'pm list packages' | sed -e 's/^/adb uninstall --user 0 /' | grep FILTER_HERE | sort
#things to install if removing keyboard
# F-Droid
# APK Analyser
@andreswebs
andreswebs / android-backup-apk-and-datas.md
Created June 2, 2021 00:43 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Fetch application APK

To get the list of your installed applications:

@andreswebs
andreswebs / import-tsv-sqlite.md
Created May 8, 2021 14:11
How to import a TSV file into a SQLite database

How to import a TSV file into a SQLite database

Example:

.mode tabs
.import data.tsv my-table

If the TSV file contains a header row, SQLite will create the table.