49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
id: privesc-nsenter
|
|
|
|
info:
|
|
name: Nsenter - Privilege Escalation
|
|
author: daffainfo
|
|
severity: high
|
|
description: |
|
|
nsenter is a command-line utility in Linux that allows a user to enter into an existing namespace. It is commonly used for troubleshooting and managing namespaces in containerized environments. By using nsenter, users can enter into a specific namespace and execute commands within that namespace, which can be helpful for various system administration tasks.
|
|
reference:
|
|
- https://gtfobins.github.io/gtfobins/nsenter/
|
|
metadata:
|
|
verified: true
|
|
max-request: 3
|
|
tags: code,linux,nsenter,privesc
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
whoami
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
nsenter whoami
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
sudo nsenter 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: 4b0a00483046022100ebd504b5ffe1fb32e77e71e63070cf97285e497266711213e9d3d63ea2902d31022100fa4a7b0c9dc0d684cde26ca4b4c86f8a7baf2ae2fe2bbfba666ac183ddf17a4e:922c64590222798bb761d5b6d8e72950 |