mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-02-01 00:03:39 +08:00
49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
id: privesc-vim
|
|
|
|
info:
|
|
name: Vim - Privilege Escalation
|
|
author: daffainfo
|
|
severity: high
|
|
description: |
|
|
Vim is a highly configurable, modal text editor based on the vi editor.
|
|
reference:
|
|
- https://gtfobins.github.io/gtfobins/vim/
|
|
metadata:
|
|
verified: true
|
|
max-request: 3
|
|
tags: code,linux,vim,privesc,local
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
whoami
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
vim -c '!whoami'
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
sudo vim -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: 4a0a00473045022100e48b5cbc8de2580f705670e12b7323e839dbe936de0868445a43e927aa049b9f0220370a556d8f4e7308bc742cbf16a52e63eb4f383f1c71611cd2d3732bfc8bd70e:922c64590222798bb761d5b6d8e72950 |