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

49 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2024-01-22 13:29:57 +00:00
id: privesc-unshare
2023-12-13 15:07:24 +00:00
info:
name: Unshare - Privilege Escalation
author: daffainfo
severity: high
2024-01-22 13:29:57 +00:00
description: |
The unshare command is used to run a command in a new namespace, which can isolate various aspects of the system, such as the mount namespace, network namespace, user namespace, and more.
reference:
- https://gtfobins.github.io/gtfobins/unshare/
2023-12-13 15:07:24 +00:00
metadata:
verified: true
max-request: 3
tags: code,linux,unshare,privesc,local
2023-12-13 15:07:24 +00:00
self-contained: true
code:
- engine:
- sh
- bash
source: |
2024-01-22 13:29:57 +00:00
whoami
2023-12-13 15:07:24 +00:00
- engine:
- sh
- bash
source: |
2024-01-22 13:29:57 +00:00
unshare whoami
2023-12-13 15:07:24 +00:00
- engine:
- sh
- bash
source: |
2024-01-22 13:29:57 +00:00
sudo unshare whoami
2023-12-13 15:07:24 +00:00
matchers-condition: and
matchers:
2024-01-22 13:29:57 +00:00
- type: word
part: code_1_response
words:
- "root"
negative: true
2023-12-13 15:07:24 +00:00
- type: dsl
dsl:
- 'contains(code_2_response, "root")'
- 'contains(code_3_response, "root")'
condition: or
# digest: 4b0a004830460221008089aba3a614ad70901d62d2611e3a01a42cb1d918eac6315a938c392890768f022100867c33eb6a50e6df63d5adfb3438ef308341581f474ebabe50624c470a77ad90:922c64590222798bb761d5b6d8e72950