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

49 lines
1.3 KiB
YAML
Raw 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
2024-01-22 13:29:57 +00:00
tags: code,linux,grc,privesc
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: 4b0a00483046022100fbfe9ab30c673045a65014b518befe5b8d9e73dcf1d5c624e94520747d565c7b022100c4a9a3d7d63acad9fe8c3efcb5158b0222b6e819126b4c91cac42ab43c931ef1:922c64590222798bb761d5b6d8e72950