Vim - Privilege Escalation
ID: privesc-vim
Severity: high
Author: daffainfo
Tags: code,linux,vim,privesc,local
Description
Section titled “Description”Vim is a highly configurable, modal text editor based on the vi editor.
YAML Source
Section titled “YAML Source”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: truecode: - 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:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "code/privilege-escalation/linux/binary/privesc-vim.yaml"