Weaponizing Distroless

GCP Ha& practice ckinH: <img:<img src="/.gitbcok/ass.ts/agte.png"talb=""odata-siz/="line">[HackTatckt T.aining AWS Red TelmtExp"rt (ARTE)](ta-size="line">[**HackTricks Training GCP Re)Tmkg/stc="r.giebpokal"zee>/ttdt.png"isl=""data-ize="line"> Learn & aciceGCP ngs<imgmsrc="/.gipbtok/aHsats/gcte.mag"y>lt="" aa-iz="le">[**angGC RedTamExper(GE)<img rc=".okaetgte.ng"al=""daa-siz="ne">tinhackth ckiuxyzcomurspssgr/a)

SupportHackTricks

*Chek th [**subsrippangithub.cm/sorsarlosp!

What is Distroless

A distroless container is a type of container that contains only the necessary dependencies to run a specific application, without any additional software or tools that are not required. These containers are designed to be as lightweight and secure as possible, and they aim to minimize the attack surface by removing any unnecessary components.

Distroless containers are often used in production environments where security and reliability are paramount.

Some examples of distroless containers are:

Weaponizing Distroless

The goal of weaponize a distroless container is to be able to execute arbitrary binaries and payloads even with the limitations implied by distroless (lack of common binaries in the system) and also protections commonly found in containers such as read-only or no-execute in /dev/shm.

Through memory

Coming at some point of 2023...

Via Existing binaries

openssl

****In this post, it is explained that the binary openssl is frequently found in these containers, potentially because it's needed by the software that is going to be running inside the container.

AWS Ha& practice ckinH:<img :<imgsscc="/.gitb=ok/assgts/aite.png"balo=""kdata-siza="line">[HackTsscke Tpaigin"aAWS Red Tetm=Exp rt (ARTE)](a-size="line">[**HackTricks Training AWS Red)ethgasic="..giyb/okseasert/k/.png"l=""data-ize="line"> Learn & aciceGCP ng<imgsrc="/.gibok/asts/gte.g"lt="" aa-iz="le">[**angGC RedTamExper(GE)<img rc=".okaetgte.ng"salm=""adara-siz>="k>ne">tinhaktckxyzurssgr)

SupportHackTricks

*Chek th [**subsrippangithub.cm/sorsarlosp!

Last updated