Skip to content

Instantly share code, notes, and snippets.

View namishelex01's full-sized avatar
🎯
Focusing

Namish namishelex01

🎯
Focusing
View GitHub Profile
@namishelex01
namishelex01 / container_security_exploit_chaining.md
Last active December 17, 2025 20:08
Container security exploit chaining guide covering real-world Docker and Kubernetes attack paths. Explains how attackers chain container misconfigurations, ServiceAccount token theft, RBAC privilege escalation, privileged pods, hostPath mounts, Docker socket abuse, kubelet exposure, supply-chain attacks, and Linux kernel privilege-escalation bug…

Attack Chains: Step-by-Step Exploits (Containers + Kubernetes)

“In theory, theory and practice are the same. In production, attackers get a vote.”
These chains are realistic sequences attackers use. They’re written from a defender’s perspective: entry → escalation → persistence → impact → detection points.


Chain 1 — “The Docker Socket Is My Root Shell”

Theme: Mounting docker.sock (or other runtime socket) turns a container into a host admin.

@namishelex01
namishelex01 / kubernetes_security.md
Last active December 17, 2025 20:23
Kubernetes security guide for cloud-native environments, covering control plane and workload security from a security engineer’s perspective. Explains Kubernetes threat models, API server risks, RBAC and ServiceAccount security, admission controllers, pod security standards, container runtime security, kubelet exposure, etcd protection, network …

Kubernetes Security — Detailed Notes (Basic → Advanced)

Kubernetes Cluster-2025-12-17-202325

1. Core Kubernetes Security Principles

1.1 Kubernetes is an API-driven operating system

Kubernetes behaves like a distributed OS where the API server is the system call interface.

@namishelex01
namishelex01 / container_security_questions.md
Last active December 17, 2025 20:09
Container security interview questions and answers covering Docker, Linux containers, Kubernetes security, and cloud-native runtime protection. Includes intermediate to expert-level questions on container isolation, namespaces, cgroups, capabilities, seccomp, SELinux/AppArmor, container escapes, runtime security, RBAC, ServiceAccount tokens, Kub…

Linux Kernel Evolution — Container Security Interview Q&A (Intermediate → Expert)

1. Kernel Architecture & Threat Modeling

Q1. From a kernel perspective, what actually enforces container isolation?

Answer: Container isolation is enforced by multiple independent kernel subsystems, not a single boundary:

  • Namespaces restrict visibility (what a process can see)
@namishelex01
namishelex01 / container_security.md
Last active December 17, 2025 20:17
Comprehensive container security guide covering Docker and Kubernetes security from a security engineer’s perspective. Explains container isolation fundamentals, Linux namespaces and cgroups, capabilities, seccomp, SELinux/AppArmor, runtime security, container escape risks, RBAC and ServiceAccount security, Kubernetes control-plane threats, supp…

History of Containers (Through a Security Engineer’s Lens)

“Those who forget history are doomed to repeat it — usually in production.”
This document traces the evolution of containers, focusing not on hype, but on what actually broke, why it broke, and what attackers really abused.


Container Runtime Security-2025-12-17-201354
#!/usr/bin/env bash
# bb-min-setup.sh — Minimal bug bounty setup for Raspberry Pi 5 (Raspberry Pi OS 64‑bit, ARM64)
# Focus: web app recon + vuln discovery ONLY (no pentest/forensics/heavy stuff).
# PEP 668 safe (pipx / per-tool venvs). Prefers official linux_arm64 binaries to avoid Go-compat hiccups.
# Idempotent: safe to re-run.
set -euo pipefail
if [[ $EUID -eq 0 ]]; then
echo "Run as a normal user (will sudo as needed), not root." >&2
# world.gd
extends Node2D
class_name World
const TILE_SIZE = 32
const SEA_LEVEL = 0.0
const RENDER_DISTANCE = 16.0
@export var altitude_noise: FastNoiseLite
@namishelex01
namishelex01 / g2
Last active July 11, 2023 21:57
network_scanner
import socket
import ipaddress
import json
import time
def save_results(results):
with open("last_scan_results.json", "w") as file:
json.dump(results, file)
def load_results():
@namishelex01
namishelex01 / play-with-pdfs.py
Created July 19, 2021 12:57
Merge pdfs, create pdf from images(jpg, png, etc)
import PyPDF2
from PIL import Image
def mergePdfs():
pdfs = ['sf_1.pdf', 'sf_2.pdf']
merger = PyPDF2.PdfFileMerger()
for pdf in pdfs:
merger.append(pdf)
@namishelex01
namishelex01 / Scenario-based Interview Questions
Last active August 19, 2024 15:04
Scenario-based interview questions for security engineers/analysts
What are the consequences if private keys of a Root CA gets compromised?
If you have rogue certificates of a well-known company, as an attacker, how can you use it for you own benefit?
As a security threat analyst, what will be your approach to respond to this incident? Securing Infra, servers and people!
> https://darknetdiaries.com/transcript/3/
How would you check the signature of a binary and restrict any unsigned binaries to run on a machine(Win/Linux/Mac)
> https://docs.microsoft.com/en-us/windows/win32/seccrypto/using-signtool-to-verify-a-file-signature
> (Rogue) https://blog.rapid7.com/2019/01/03/santas-elfs-running-linux-executables-without-execve/
How can I restrict the normal user to run only limited set of commands in Linux?
https[:]//docs.microsoft.com/en-us/archive/msdn-magazine/2002/march/inside-windows-an-in-depth-look-into-the-win32-portable-executable-file-format-part-2
https[:]//blahcat.github.io/2019/03/17/small-dumps-in-the-big-pool/
https[:]//www.fuzzysecurity.com/tutorials/16.html
https://blog.ropnop.com/hosting-clr-in-golang/
https[:]//evasions.checkpoint.com/
http[:]//www.catb.org/esr/faqs/hacker-howto.html
https[:]//vx-underground.org/
http[:]//sq.ro/malwarez.htm#
https[:]//github.com/d30sa1/RootKits-List-Download
https[:]//github.com/christian-roggia/open-myrtus