Exploit CVE-2021-25735: Kubernetes Validating Admission Webhook Bypass

Related tags

CSS CVE-2021-25735
Overview

CVE-2021-25735

Exploit CVE-2021-25735: Kubernetes Validating Admission Webhook Bypass

Set the Vulnerable Environment

Let's start with running the script gencerts.sh to generate TLS certificates and keys.
bash gencerts.sh

To deploy the admission controller you need to build the Docker container image locally, tag, and push the image to your Dockerhub using the below commands.
docker login
docker build -t validationwebhook:1.0 .
docker tag validationwebhook:1.0 darryk/dev:1.0
docker push darryk/dev:1.0

Now you can deploy the created image with the Node.js application into your K8s cluster. The webhook-deploy.yaml will deploy all the needed components in your cluster.
kubectl apply -f webhook-deploy.yaml

Let's now register our webhook with Kubernetes API Server. To do that, we create a Base64 of the ca.crt file created before and replace the CA_BUNDLE inside webhook-registration.yaml.
cat ca.crt | base64

Finally, we will register the webhook with the Kubernetes API Server.
kubectl apply -f webhook-registration.yaml

Exploit CVE-2021-25735

We do a change in the node label using edit nodes and we add a new label.
kubectl edit nodes ip-172-20-61-82.ec2.internal

  labels:  
    test: test  
    changeAllowed: "false"

Since the ChangeAllowed is set to "false" we get the following error:

error: nodes "ip-172-20-46-130.ec2.internal" could not be patched: admission webhook "validationwebhook.validationwebhook.svc" denied the request: Validation failed You can run kubectl replace -f /tmp/kubectl-edit-irc64.yaml to try this update again.

If we retry to modify the node performing the following change:\

  labels:  
    test: test  
    changeAllowed: "true"

In this case the edit action has been accepted bypassing the admission controller.

You might also like...

This is a bot for Telegram that can be used to receive webhook notifications from Gitlab. It is built with the Next.js API.

This is a bot for Telegram that can be used to receive webhook notifications from Gitlab. It is built with the Next.js API.

Telegram Bot for Gitlab Webhook đŸĻ‰ Note This project is still in development. Just relax 🙂 This is a bot for Telegram that can be used to receive web

Oct 22, 2022

Bypass YouTube ads! (Web Extensions)

Bypass YouTube ads! (Web Extensions)

bytads Bypass YouTube ads! Supported YouTube Advertising Formats Skippable video ads, Overlay ads! Other ad formats will be supported soon. Usage Inst

Apr 3, 2022

This is a little script that shows how to ddos a website. Can bypass cloudfare & ddos-guard. Ip switcher and random user agent

This is a little script that shows how to ddos a website. Can bypass cloudfare & ddos-guard. Ip switcher and random user agent

Dec 17, 2022

With this script you can bypass both root detection and ssl pinning for your android app.

frida_rootansslbypas ██████╗ ██████╗ ██████╗ ████████╗ █████╗ ███╗ ██╗██████╗ ███████╗███████╗██╗ ██████╗ ██╗ ██╗██████╗ █████╗

Dec 24, 2022

fully selfhosted multi-user web app for externally storing Reddit items (saved, created, upvoted, downvoted, hidden) to bypass Reddit's 1000-item listing limits

expanse fully selfhosted multi-user web app for externally storing Reddit items (saved, created, upvoted, downvoted, hidden) to bypass Reddit's 1000-i

Dec 30, 2022

WAMpage - A WebOS root LPE exploit chain

WAMpage - A WebOS root LPE exploit chain

WAMpage WAMpage - A WebOS root LPE exploit chain This exploit is mainly of interest to other researchers - if you just want to root your TV, you proba

Dec 2, 2022

đŸĻ đŸ”Ŧ Forta agent that detect deployment of smart contracts containing an exploit function

Attack Simulation Bot Description The agent detects deployment of smart contracts containing an exploit function. Using a simulation-based approach, t

Dec 26, 2022

Invadium runs exploit playbooks against vulnerable target applications in an intuitive, reproducible, and well-defined manner.

Invadium Invadium runs exploits against one or more target applications in an intuitive, reproducable, and well-defined manner. It focuses on bridging

Nov 6, 2022

Bookmarklet exploit that can force-disable extensions installed on Chrome. Also has a very fancy GUI to manage all extensions!

Bookmarklet exploit that can force-disable extensions installed on Chrome. Also has a very fancy GUI to manage all extensions!

ext remover Bookmarklet exploit that can force-disable any extension installed on Google Chrome Instructions Here are the instructions to using this e

Jan 6, 2023

Exploit chrome's profile sync for free cloud storage

BookmarkFS - the dumbest project i've ever made Exploits the google chrome bookmark sync service to store files for free Installation and usage Go to

Dec 30, 2022

An experimental webkit-based kernel exploit (Arb. R/W) for the PS5 on 4.03 & 4.50FW

PS5 4.xx Kernel Exploit Summary This repo contains an experimental WebKit ROP implementation of a PS5 kernel exploit based on TheFlow's IPV6 Use-After

Nov 17, 2022

A TypeScript/JavaScript library for working with ASN, IPv4, and IPv6 numbers. It provides representations of these internet protocol numbers with the ability to perform various IP related operations like parsing, validating etc. on them

A TypeScript/JavaScript library for working with ASN, IPv4, and IPv6 numbers. It provides representations of these internet protocol numbers with the ability to perform various IP related operations like parsing, validating etc. on them

ip-num ip-num is a TypeScript library for working with IPv4, IPv6 and ASN numbers. It provides representations of these internet protocol numbers with

Dec 8, 2022

🌐 Text Input Component for validating and formatting international phone numbers.

🌐  Text Input Component for validating and formatting international phone numbers.

React Native Intl Phone Field Try the Expo Snack 👏 🕹ī¸ Demo It's a javascript-only (no native code) component that can run in iOS, Android, Expo & Re

Jul 8, 2022

An API for producing and validating ActivityPub objects.

ActivityHelper A library that exports an API for producing and validating ActivityPub objects. In a federated system bound together by protocols, it's

May 2, 2022

A jQuery-free general purpose library for building credit card forms, validating inputs and formatting numbers.

A jQuery-free general purpose library for building credit card forms, validating inputs and formatting numbers.

Dec 30, 2022

Fully-typed utilities for defining, validating and building your document head

zhead Typed utilities for defining, validating and building best-practice document head's. Status: Pre-release Please report any issues 🐛 Made poss

Dec 21, 2022

✅ Vite plugin for validating your environment variables

✅ Vite plugin for validating your environment variables

This Vite plugin allows you to validate your environment variables at build or dev time. This allows your build/dev-server to fail-fast if your setup

Dec 23, 2022

A JavaScript plugin for entering and validating international telephone numbers

A JavaScript plugin for entering and validating international telephone numbers

International Telephone Input A JavaScript plugin for entering and validating international telephone numbers. It adds a flag dropdown to any input, d

Dec 30, 2022

Little Javascript / Typescript library for validating format of string like email, url, password...

String-Validators Little Javascript / Typescript library for validating format of string like email, url, password... Signaler un Bug ¡ Proposer une F

Oct 14, 2022
Owner
schie
Security Researcher
schie
Chrome extension that uses vulnerabilities CVE-2021-33044 and CVE-2021-33045 to log in to Dahua cameras without authentication.

DahuaLoginBypass Chrome extension that uses vulnerability CVE-2021-33044 to log in to Dahua IP cameras and VTH/VTO (video intercom) devices without au

null 71 Nov 26, 2022
Automagically bypass hcaptcha challenges with http api, with puppeteer, selenium, playwright browser automation scripts to bypass hCaptcha programmatically

Automagically bypass hcaptcha challenges with http api, with puppeteer, selenium, playwright browser automation scripts to bypass hCaptcha programmatically. For help you can message on discord server with the bellow link. You can also create an issue.

Shimul 199 Jan 2, 2023
The first ever MC:BE ForceOP Exploit utilizing a user impersonation exploit within Bedrock Dedicated Server

EliteElixir The first ever MC:BE ForceOP Exploit utilizing a user impersonation exploit within Bedrock Dedicated Server This tool uses the sub_client_

null 28 Jul 27, 2023
Challenge for you all to prove that CVE-2022–29622 is not false

CVE-2022–29622: (In)vulnerability Analysis This codebase was created to help security professionals and developers to understand why I think Formidabl

Zsolt Imre 2 Jul 20, 2022
CVE-2022-22629 Proof of Concept

CVE-2022-22629 Proof of concept This post is about the poc for the WebGL bug that was patched in Safari 15.4 security updates. If you want to learn in

PARS Defense 45 Jan 9, 2023
POC OF CVE-2022-21970

CVE-2022-21970 Description Microsoft Edge (Chromium-based) Elevation of Privilege Vulnerability. This vulnerability allows an attacker to execute java

Warmonger 8 Dec 9, 2022
Gets news from liveuamap.com and sends it to a Discord webhook

Gets news from liveuamap.com and sends it to a Discord webhook

Mohammed Keyvanzadeh 7 Jun 27, 2022
Webhook service built with serverless technologies

Webhook service built with serverless technologies

Luciano Pellacani Franca 10 May 13, 2022
Truemoney Wallet webhook server by express.js

Truemoney webhook gateway Repo ā¸™ā¸ĩāš‰ā¸Ēā¸ŗā¸Ģā¸Ŗā¸ąā¸šāšƒā¸Šāš‰āšƒā¸™ā¸ā¸˛ā¸Ŗā¸¨ā¸ļā¸ā¸Šā¸˛ āš‚ā¸”ā¸ĸā¸‚āš‰ā¸­ā¸Ąā¸šā¸Ĩā¸—ā¸ĩāšˆāš„ā¸”āš‰ā¸Ŗā¸ąā¸šā¸Ąā¸˛ā¸ˆā¸˛ā¸ Webhook ā¸ˆā¸°ā¸–ā¸šā¸āš€ā¸āš‡ā¸šā¸Ĩā¸‡āšƒā¸™ā¸•ā¸ąā¸§āšā¸›ā¸Ŗ ā¸Ģā¸˛ā¸ Restart process āšā¸Ĩāš‰ā¸§ā¸ˆā¸°āš„ā¸Ąāšˆā¸Ēā¸˛ā¸Ąā¸˛ā¸Ŗā¸–ā¸™ā¸ŗā¸‚āš‰ā¸­ā¸Ąā¸šā¸Ĩā¸

Tanakorn Chotayakrit 31 Sep 22, 2022
📟🤖 PagerDuty Discord Webhook Relay

PagerDuty Webhook Relay PagerDuty doesn't natively have Discord webhooks, so we made this CloudFlare worker to relay them to Discord. We use Uptime Ku

Hop 10 Aug 2, 2022