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

49 lines
1.3 KiB
YAML

id: privesc-csh
info:
name: csh - Privilege Escalation
author: daffainfo
severity: high
description: |
csh stands for C Shell, which is a Unix shell with C-like syntax. It is a command-line interpreter that provides a command-line interface for Unix-like operating systems. It has features similar to other Unix shells such as bash and sh, but with a different syntax and set of features.
reference:
- https://gtfobins.github.io/gtfobins/csh/
metadata:
verified: true
max-request: 3
tags: code,linux,csh,privesc,local
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
csh -c 'whoami'
- engine:
- sh
- bash
source: |
sudo csh -c '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: 4a0a0047304502202776b2a45218e0f408bac8a09800783f984d0f5263d65f4304c36046254535e9022100f7ff92e98d47577366baf47baa75b9a047b5f385964daa66c712176e1365f20a:922c64590222798bb761d5b6d8e72950