2024-01-22 13:29:57 +00:00
id : privesc-view
2023-12-13 15:07:24 +00:00
info :
name : View - Privilege Escalation
author : daffainfo
severity : high
2024-01-22 13:29:57 +00:00
description : |
view is a command that is often associated with the vi text editor. When invoked as "view," vi starts in read-only mode, allowing users to view files without the ability to modify them.
reference :
- https://gtfobins.github.io/gtfobins/view/
2023-12-13 15:07:24 +00:00
metadata :
verified : true
2024-03-04 08:20:22 +00:00
max-request : 3
2024-01-31 17:41:31 +00:00
tags : code,linux,view,privesc,local
2023-12-13 15:07:24 +00:00
self-contained : true
code :
- engine :
- sh
- bash
source : |
2024-01-22 13:29:57 +00:00
whoami
2023-12-13 15:07:24 +00:00
- engine :
- sh
- bash
source : |
2024-01-22 13:29:57 +00:00
view -c ':!whoami'
2023-12-13 15:07:24 +00:00
- engine :
- sh
- bash
source : |
2024-01-22 13:29:57 +00:00
sudo view -c ':!whoami'
2023-12-13 15:07:24 +00:00
matchers-condition : and
matchers :
2024-01-22 13:29:57 +00:00
- type : word
part : code_1_response
words :
- "root"
negative : true
2023-12-13 15:07:24 +00:00
- type : dsl
dsl :
- 'contains(code_2_response, "root")'
- 'contains(code_3_response, "root")'
2024-01-22 16:20:01 +00:00
condition : or
2024-03-04 09:35:31 +00:00
# digest: 4a0a00473045022100ed64ed48009962a92006b2ce803d0c5189e91ced727a841bc8c31e5d98d1a9b5022009f19b7df531fecde9b1303555d1ec29ba63a49ca1c439b6f48f46552d2d4bb4:922c64590222798bb761d5b6d8e72950