47 lines
1.1 KiB
YAML
47 lines
1.1 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
|
||
|
tags: code,linux,nice,privesc
|
||
|
|
||
|
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
|