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

49 lines
1.2 KiB
YAML
Raw Normal View History

2024-01-22 18:59:57 +05:30
id: privesc-env
2023-12-13 22:07:24 +07:00
info:
name: env - Privilege Escalation
author: daffainfo
severity: high
2024-01-22 18:59:57 +05:30
description: |
In Linux, the env command is used to display or modify the environment variables for a command. It can be used to set environment variables for a specific command or to print the current environment variables.
reference:
- https://gtfobins.github.io/gtfobins/env/
2023-12-13 22:07:24 +07:00
metadata:
verified: true
max-request: 3
tags: code,linux,env,privesc,local
2023-12-13 22:07:24 +07:00
self-contained: true
code:
- engine:
- sh
- bash
source: |
2024-01-22 18:59:57 +05:30
whoami
2023-12-13 22:07:24 +07:00
- engine:
- sh
- bash
source: |
2024-01-22 18:59:57 +05:30
expect -c 'spawn whoami;interact'
2023-12-13 22:07:24 +07:00
- engine:
- sh
- bash
source: |
2024-01-22 18:59:57 +05:30
sudo expect -c 'spawn whoami;interact'
2023-12-13 22:07:24 +07:00
matchers-condition: and
matchers:
2024-01-22 18:59:57 +05:30
- type: word
part: code_1_response
words:
- "root"
negative: true
2023-12-13 22:07:24 +07:00
- type: dsl
dsl:
- 'contains(code_2_response, "root")'
- 'contains(code_3_response, "root")'
condition: or
# digest: 490a0046304402207dac7db6e92f9149122ac4e7f725350cf0468f92e66716464588d570627ee4d802204ba57aaa26eca8123aeef474c5cf3a8310a4cfe108bae30307745a5df57762f0:922c64590222798bb761d5b6d8e72950