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

48 lines
1.1 KiB
YAML

id: privesc-tcsh
info:
name: tcsh - Privilege Escalation
author: daffainfo
severity: high
description: |
tcsh is a Unix shell based on and compatible with the C shell (csh). It provides a command-line interface for interacting with the operating system and executing commands.
reference:
- https://gtfobins.github.io/gtfobins/tcsh/
metadata:
verified: true
tags: code,linux,tcsh,privesc
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
tcsh -c 'whoami'
- engine:
- sh
- bash
source: |
sudo tcsh -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: 4a0a0047304502206b01d2dba89b176065d1cda636fef106909c915bd5b1c3f2a78fe684210a06cc022100cc011ce84840a655454a0e77710665e50152dbacfcd4d3ef0aa99dd8c644033b:922c64590222798bb761d5b6d8e72950