CKSKubernetes 1.35

Exercises

Exercise: find the tampered binary

updated 2026-10-22 by seed

Host: controlplane · Time: 5 min · Domain: Cluster Setup

Task

  • Verify /usr/local/bin/kubectl, /usr/local/bin/kubelet and /usr/local/bin/kubeadm against the official v1.35.0 checksums.
  • Write the names of the failing binaries, one per line, to /root/tampered.txt. Write none if all pass.

Acceptance criteria

  • The file exists and names exactly the bad binary (or none).
  • You used a checksum comparison, not a size or date comparison.

Solution

cd /tmp && : > /root/tampered.txt
for f in kubectl kubelet kubeadm; do
  curl -sLO https://dl.k8s.io/v1.35.0/bin/linux/amd64/$f.sha256
  if echo "$(cat $f.sha256)  /usr/local/bin/$f" | sha256sum --check >/dev/null 2>&1; then
    echo "$f OK"
  else
    echo "$f FAILED" && echo "$f" >> /root/tampered.txt
  fi
done
[ -s /root/tampered.txt ] || echo none > /root/tampered.txt
cat /root/tampered.txt