Files
nuclei-templates/code/privilege-escalation/linux/binary/privesc-nice.yaml
2024-01-31 23:11:31 +05:30

49 lines
1.3 KiB
YAML

id: privesc-nice
info:
name: Nice - Privilege Escalation
author: daffainfo
severity: high
description: |
In Unix-like operating systems, the nice command is used to execute a program with a modified scheduling priority. It allows users to start a process with a specified priority level, which can influence the allocation of CPU resources. This can be useful for managing system resources and controlling the impact of a process on system performance.
reference:
- https://gtfobins.github.io/gtfobins/nice/
metadata:
verified: true
max-request: 3
tags: code,linux,nice,privesc,local
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
nice whoami
- engine:
- sh
- bash
source: |
sudo nice 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: 4a0a0047304502210083c82fb5045f95b20b32e290659271ee25e79207996bcfc3b1a58ec7e9d2f7fd02202afd08bf734c8661560a78c4470155d9ccf5171b6b8025c281008011e950bfa6:922c64590222798bb761d5b6d8e72950