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
2024-01-29 11:58:34 +00:00
max-request : 3
2024-01-31 17:41:31 +00:00
tags : code,linux,csh,privesc,local
2024-01-22 13:29:57 +00:00
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")'
2024-01-22 16:20:01 +00:00
condition : or
2024-01-31 17:43:39 +00:00
# digest: 4a0a0047304502202776b2a45218e0f408bac8a09800783f984d0f5263d65f4304c36046254535e9022100f7ff92e98d47577366baf47baa75b9a047b5f385964daa66c712176e1365f20a:922c64590222798bb761d5b6d8e72950