Skip to content

Instantly share code, notes, and snippets.

View rafaotetra's full-sized avatar

Rafael Silva rafaotetra

View GitHub Profile
@zidenis
zidenis / OCI_Architect_Associate-Reading_List.md
Created February 8, 2022 11:15
Reading list to prepare for OCI Architect Associate Certificate Exam
@Neo23x0
Neo23x0 / log4j_rce_detection.md
Last active June 24, 2024 22:11
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 -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
provider "aws" {
version = "~> 2.0"
region = "eu-west-2"
}
# Providing a reference to our default VPC
resource "aws_default_vpc" "default_vpc" {
}
# Providing a reference to our default subnets
@gotunandan
gotunandan / lvmount.sh
Created September 18, 2019 11:31 — forked from gilfreund/lvmount.sh
Automatically mount EC2 free ephemeral disks into an LVM group
#!/bin/bash
# based on code byLeon Mergen
# see: https://leonmergen.com/automatically-mounting-instance-store-on-an-aws-ami-150da3ffd041
LVDISPLAY="/sbin/lvdisplay"
PVCREATE="/sbin/pvcreate"
VGCREATE="/sbin/vgcreate"
LVCREATE="/sbin/lvcreate"
MKFS="/sbin/mkfs -t xfs"
MOUNTPOINT="/mnt/data"

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@bocharovf
bocharovf / docker-compose.yml
Last active April 10, 2024 21:51
Complete Jaeger docker-compose deployment with ElasticSearch (oss) and Apache Kafka. Jaeger Query and Kibana to search logs and traces. Monitoring with Prometheus and Grafana.
version: "3"
services:
# Using ElasticSearch as a storage for traces and logs
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.7.1
networks:
- elastic-jaeger
ports:
@fevangelou
fevangelou / install_sis_graphics_on_linux.sh
Last active June 20, 2024 22:58
Bash script to install SiS Mirage 3+ graphics drivers on Linux
#!/bin/bash
# Bash script to install SiS Mirage 3+ graphics drivers on Linux
# Supports 671/672MX graphics cards
#
# Created in March 2019
#
# Tested on:
# - Lubuntu 18.04 (32-bit) with X.Org v1.19
# - Xubuntu 18.04 (64-bit) with X.Org v1.20
@arastu
arastu / create-cert-and-key-with-certbot.sh
Last active March 15, 2021 04:28
Configuring Harbor with HTTPS Access via letsencrypt(certbot with --standalone flag)
sudo certbot certonly --standalone -d registry.example.com
@lucaspg96
lucaspg96 / bot.py
Last active November 25, 2021 10:18
A python script to send messages to a telegram user. Useful to notify when long scripts are finished!
#This script is independet of lib or python version (tested on python 2.7 and 3.5)
import telegram
#token that can be generated talking with @BotFather on telegram
my_token = ''
def send(msg, chat_id, token=my_token):
"""
Send a mensage to a telegram user specified on chatId
chat_id must be a number!