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

49 lines
1.2 KiB
YAML
Raw Normal View History

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
max-request: 3
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")'
condition: or
# digest: 4a0a00473045022100ed64ed48009962a92006b2ce803d0c5189e91ced727a841bc8c31e5d98d1a9b5022009f19b7df531fecde9b1303555d1ec29ba63a49ca1c439b6f48f46552d2d4bb4:922c64590222798bb761d5b6d8e72950