2024-01-22 18:59:57 +05:30
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 19:39:39 +05:30
reference :
2024-01-22 18:59:57 +05:30
- https://gtfobins.github.io/gtfobins/csh/
metadata :
verified : true
2024-01-29 11:58:34 +00:00
max-request : 3
2024-01-31 23:11:31 +05:30
tags : code,linux,csh,privesc,local
2024-01-22 18:59:57 +05:30
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-12-01 13:57:55 +00:00
# digest: 4a0a00473045022100d14624ddb65c1e37232e31de9e39dd8266d3235f68e6c85f98cee56fb77ef3f302200fde2894a996ba8f9c62906918380586cf9da4831e373cfc6086a656bf50184c:922c64590222798bb761d5b6d8e72950