Tar Wildcard Injection PrivEsc
Tar command with wildcard injection may lead to privilege escalation (PrivEsc).
For example, below command can be executed as root.
We need to check the content in the file.
The above tar command means that it creates an arvhived file from any input file because it passes wildcard (*).
Now create a payload for privilege escalation.
We've created three files.
Now execute "tar" command as root with wildcard.
Wait until "tar" command will be executed. After a while, we should see the current user switch to root.
Last updated