Nsenter - Privilege Escalation
ID: privesc-nsenter
Severity: high
Author: daffainfo
Tags: code,linux,nsenter,privesc,local
Description
Section titled “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.
YAML Source
Section titled “YAML Source”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,local
self-contained: truecode: - 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: 4a0a00473045022100b0fe9d2b38f98694097fd9a21fa5aae8da82af52cc5a08356271f513be48911b02200456e2a5eb63cf7eedb23f5dfdb2a2f451e385fe94a657b9c7dc1a0851ae8b61:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "code/privilege-escalation/linux/binary/privesc-nsenter.yaml"