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

49 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2024-01-22 13:29:57 +00:00
id: privesc-grc
info:
name: grc - Privilege Escalation
author: daffainfo
severity: high
description: |
grc is a command-line utility that enhances the output of other commands with color and style. It is commonly used to improve the readability of command output by adding color highlighting and formatting. grc can be configured to work with various commands and is often used to make log files and command output easier to interpret.
reference:
- https://gtfobins.github.io/gtfobins/grc/
metadata:
verified: true
max-request: 3
tags: code,linux,grc,privesc,local
2024-01-22 13:29:57 +00:00
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
grc --pty whoami
- engine:
- sh
- bash
source: |
sudo grc --pty 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: 490a0046304402201157d0174dbcda2e8968ef3fc2ffb4185c7892c217fad0be4f9c6f7d5076e76202203f73255a3c73317a66097d5a835ea51e0f00e38c38fd2067ac468ad5afa537a9:922c64590222798bb761d5b6d8e72950