47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
|
id: privesc-softlimit
|
||
|
|
||
|
info:
|
||
|
name: softlimit - Privilege Escalation
|
||
|
author: daffainfo
|
||
|
severity: high
|
||
|
description: |
|
||
|
The softlimit command is used in conjunction with the daemontools software to set resource limits for a process. It is commonly used to control the resource usage of a process, such as limiting its memory or CPU usage. The softlimit command helps in managing and controlling the resource consumption of a process, which can be useful for ensuring system stability and preventing resource exhaustion.
|
||
|
reference:
|
||
|
- https://gtfobins.github.io/gtfobins/softlimit/
|
||
|
metadata:
|
||
|
verified: true
|
||
|
tags: code,linux,softlimit,privesc
|
||
|
|
||
|
self-contained: true
|
||
|
code:
|
||
|
- engine:
|
||
|
- sh
|
||
|
- bash
|
||
|
source: |
|
||
|
whoami
|
||
|
|
||
|
- engine:
|
||
|
- sh
|
||
|
- bash
|
||
|
source: |
|
||
|
softlimit whoami
|
||
|
|
||
|
- engine:
|
||
|
- sh
|
||
|
- bash
|
||
|
source: |
|
||
|
sudo softlimit 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
|