Skip to content

Instantly share code, notes, and snippets.

View Esonhugh's full-sized avatar
💭
I may be slow to respond.

Esonhugh Skyworship Esonhugh

💭
I may be slow to respond.
View GitHub Profile
@Esonhugh
Esonhugh / README.md
Last active June 14, 2024 09:48
Bloodhound Kubernetes Configuration

Bloodhound as a service (Kubernetes Deployments/Docker Compose)

Usage

  1. Change password (default password: default_admin_passwords)
  2. Change user (default user: esonhugh)
  3. Change ingress host name to your team server
  4. Deploy it!
  5. kubectl apply -f deployment-service.yaml -f ingress.yaml -f configmap.yaml # -n <change namespace you deploy>
  6. use pipx install git+https://github.com/exploide/bloodhound-cli.git
@Esonhugh
Esonhugh / aws_auto_assume.sh
Last active May 28, 2024 09:43
automatically assume role with aws cli
# automatically set the AWS environment variables from the json output of `aws sts assume-role`
aws_sts_env () {
if [[ -n "$1" ]]
then
local cred=$1
fi
if [[ -z "$cred" ]]
then
echo "Usage: $0 \`json\`"
echo "Example: export cred=\`aws sts assume-role --role-arn xxxx --role-session-name xxxx|jq ".Credentials"\`"
@Esonhugh
Esonhugh / gitdumper.sh
Created April 22, 2024 05:50
git dumper.sh --path-as-is allow path ../
#!/bin/bash
#$1 : URL to download .git from (http://target.com/.git/)
#$2 : Folder where the .git-directory will be created
function init_header() {
cat <<EOF
###########
# GitDumper is part of https://github.com/internetwache/GitTools
#
# Developed and maintained by @gehaxelt from @internetwache
@Esonhugh
Esonhugh / log_parser.py
Last active April 2, 2024 07:23
AWS cloud trail log analysis
import os
SOURCE_FILE="merged_cloudtrail_logs.json"
'''
Sample Event
{
"eventVersion": "1.08",
"userIdentity": {
"type": "Root",
@Esonhugh
Esonhugh / tasks.json
Created January 25, 2024 04:01
vscode task based msfvenom payload generation
{
"version": "2.0.0",
"tasks": [
{
"label": "msfvenom payload creating",
"type": "shell",
"detail": "msfvenom payload creating task",
"problemMatcher": [],
"command": [
"msfvenom",
@Esonhugh
Esonhugh / README.md
Created December 11, 2023 07:42
SaaS like System attack.

Origin of Injection

When Kubernetes CRD controller which is responsible to analyzing a specific CR is vulnerable, attackers may control certain custom resources and inject malicious payloads, which could trigger malicious behaviors when the controller parses, processes, stores the CRs, or generates other related resources.

Injection Classification

Injections can be classified via 3 different way.

By injection points

@Esonhugh
Esonhugh / maltrail-command-injection.nuclei.yaml
Created July 10, 2023 17:28
Maltrail <= v0.54 is vulnerable to unauthenticated OS command injection during the login process.
id: maltrail-os-command-injection
info:
author: Esonhugh
name: Unauthenticated OS Command Injection in stamparm/maltrail
severity: critical
description: |
Maltrail <= v0.54 is vulnerable to unauthenticated OS command injection during the login process.
reference:
- "https://huntr.dev/bounties/be3c5204-fbd9-448d-b97c-96a8d2941e87/"
@Esonhugh
Esonhugh / docker_cme.sh
Created June 7, 2023 07:09
using docker crackmapexec and make command alias
function docker_cme() {
if [[ -z "$1" ]]
then
if [[ -n `sudo docker ps -a|grep crackmapexec` ]]
then
sudo docker start crackmapexec
sudo docker exec -it crackmapexec sh
else
sudo docker run -it --entrypoint=/bin/bash --name crackmapexec byt3bl33d3r/crackmapexec
fi
@Esonhugh
Esonhugh / ruoyi-default-pass.yaml
Created June 1, 2023 07:58
Ruoyi Weak password admin -> admin123
id: Ruoyi-default-password
info:
name: Ruoyi default password admin/admin123
author: Esonhugh-self-maintained
severity: critical
description: |
Ruoyi default password admin admin123
tags: password,default,ruoyi
stop-at-first-match: true
@Esonhugh
Esonhugh / kubectl-hack
Last active April 5, 2023 13:55
kubectl api token abuse function named kube
#!/usr/bin/env $SHELL
# Author: Esonhugh
# Date: 2023/04/05 21:01
function kube() {
if [[ "$1" == "help" ]]
then
echo "============================================ KubeHack ============================================"
echo "version\t\tkubectl hack plugin version."
echo "server\t\tset env var.value is the kube api server endpoint. Example: https://127.0.0.1:6443"