You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There appears to be a cron job running as root. It is running the program `/usr/bin/ansible-playbook /opt/backups/playbook/run.yml` as the user *luis*.
230
+

239
231
240
232
Inspect the contents of /opt/backups/playbook/run.yml
233
+
234
+
This ansible playbook makes a backup up of `/var/lib/tomcat9/webapps/ROOT/admin/dashboard` and saves it to `/opt/backups/archives/backup-{{ansible_date_time.date}}-{{ansible_date_time.time}}.gz`. According to the [ansible documentation](https://docs.ansible.com/ansible/latest/collections/ansible/posix/synchronize_module.html), the flag `copy_links=yes` will "Copy symlinks as the item that they point to (the referent) is copied, rather than the symlink".
This ansible playbook makes a backup up of `/var/lib/tomcat9/webapps/ROOT/admin/dashboard`and saves it to `/opt/backups/archives/backup-{{ansible_date_time.date}}-{{ansible_date_time.time}}.gz` while preserving symlinks. View the contents of the dashboard. Everyone has full write access to the uploads directory.
252
+
Visit the directory `/var/lib/tomcat9/webapps/ROOT/admin/dashboard`to see what the playbook is making a copy of. Note that the directory `uploads` has full write permissions, which means anyone can attatch a symlink to it.
259
253
```
260
254
tomcat@seal:/tmp$ cd /var/lib/tomcat9/webapps/ROOT/admin/dashboard
261
255
tomcat@seal:/var/lib/tomcat9/webapps/ROOT/admin/dashboard$ ls -la
Since the ansible playbook saves the backup to the `/opt/backups/archives/` directory, the .gz file should be located there. It appears that there are new backups every minute. Download the most recent archive, which should contain the archived directory `/home/luis/.ssh` under the uploads. This reveals the archived `dashboard` with luis's ssh key.
276
+

293
277
294
-
This reveals the archived `dashboard` with luis's ssh key
0 commit comments