WebJan 30, 2024 · Tar has an argument called –checkpoint, which allows to display a “progress” message every time X number of files have been archived. This can be used in concatenation with the –checkpoint-action flag, which allows to execute an action, in form of a binary or script, whenever a checkpoint is reached. WebOct 22, 2024 · By using tar with –checkpoint-action options, a specified action can be used after a checkpoint. This action could be a malicious shell script that could be used for executing arbitrary commands under the user who starts tar. “Tricking” root to use the specific options is quite easy, and that's where the wildcard comes in handy. ...
Linux Privilege Escalation by Exploiting Cronjobs - Armour Infosec
WebDec 12, 2024 · tar -c --checkpoint=1000 --checkpoint-action=dot /var 还有一个操作“sleep”,将tar暂停指定的秒数。 以下示例将在每个检查点停止30秒: tar -c - … Webtar cf archive.tar * --checkpoint=1 --checkpoint-action=exec=sh We consider a test file which is used to realize an archive of all files present on the directory. user@host:~$ cat test.sh tar cf archive.tar * Here are the steps to exploit this … graphic women t shirt
tar checkpoint action exec write to file - Ask Ubuntu
WebNov 24, 2024 · Instead of using the * from the tar injection via wildcards example, we can just supply the arguments directly as --checkpoint=1 and --checkpoint-action=ACTION. Unfortunately this doesn’t work, as the = is also escaped by shellwords. This means we need to find another argument or set of arguments which lead to a code path for command … Web$ tar -c --checkpoint=1000 --checkpoint-action=sleep=30 Finally, the exec action executes a given external program. For example: $ tar -c --checkpoint=1000 --checkpoint-action=exec=/sbin/cpoint This program is executed using /bin/sh -c, with no additional arguments. Its exit code is ignored. WebJun 23, 2024 · –checkpoint-action=ACTION execute ACTION on each checkpoint. There is a ‘–checkpoint-action’ option, that will specify the program which will be executed when the checkpoint is reached. Mainly, … graphic women shirts