Skip to content

Instantly share code, notes, and snippets.

@willseward
willseward / find-passwords.sh
Last active May 28, 2019
Find Docker containers with a NULL root password
View find-passwords.sh
#!/bin/bash
# https://talosintelligence.com/vulnerability_reports/TALOS-2019-0782
# Finds containers running with the root password set to NULL
# William Ward <willseward@sbcglobal.net>
cnrs=$(docker ps -q)
for id in $cnrs
do
pwl=$(docker exec -it $id cat /etc/shadow | grep root)