Skip to content

Instantly share code, notes, and snippets.

View rabuchaim's full-sized avatar
✔️
<advertise here>

Ricardo Abuchaim rabuchaim

✔️
<advertise here>
View GitHub Profile
@rabuchaim
rabuchaim / colors.py
Created January 3, 2022 12:38 — forked from rene-d/colors.py
ANSI color codes in Python
# SGR color constants
# rene-d 2018
class Colors:
""" ANSI color codes """
BLACK = "\033[0;30m"
RED = "\033[0;31m"
GREEN = "\033[0;32m"
BROWN = "\033[0;33m"
BLUE = "\033[0;34m"
@rabuchaim
rabuchaim / aws-creds.bash
Created December 26, 2021 12:56 — forked from ddgenome/aws-creds.bash
Fetch AWS STS keys and set environment variables
#!/bin/bash
# Fetch 24-hour AWS STS session token and set appropriate environment variables.
# See http://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html .
# You must have jq installed and in your PATH https://stedolan.github.io/jq/ .
# Add this function to your .bashrc or save it to a file and source that file from .bashrc .
# https://gist.github.com/ddgenome/f13f15dd01fb88538dd6fac8c7e73f8c
#
# usage: aws-creds MFA_TOKEN [OTHER_AWS_STS_GET-SESSION-TOKEN_OPTIONS...]
function aws-creds () {
local pkg=aws-creds
@rabuchaim
rabuchaim / log4j_rce_detection.md
Created December 10, 2021 20:53 — forked from Neo23x0/log4j_rce_detection.md
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -i -r '\$\{jndi:(ldap[s]?|rmi|dns):/[^\n]+' /var/log
@rabuchaim
rabuchaim / JENKINS_GROOVY_HACKS.md
Created May 14, 2021 23:00 — forked from bzon/JENKINS_GROOVY_HACKS.md
JENKINS GROOVY HACKS