mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-02-12 13:43:24 +08:00
47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
id: privesc-env
|
|
|
|
info:
|
|
name: env - Privilege Escalation
|
|
author: daffainfo
|
|
severity: high
|
|
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/
|
|
metadata:
|
|
verified: true
|
|
tags: code,linux,env,privesc
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
whoami
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
expect -c 'spawn whoami;interact'
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
sudo expect -c 'spawn whoami;interact'
|
|
|
|
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 |