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

47 lines
1.0 KiB
YAML
Raw Normal View History

2024-01-22 13:29:57 +00:00
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.
2024-01-22 14:09:39 +00:00
reference:
2024-01-22 13:29:57 +00:00
- https://gtfobins.github.io/gtfobins/csh/
metadata:
verified: true
tags: code,linux,csh,privesc
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