View - Privilege Escalation
ID: privesc-view
Severity: high
Author: daffainfo
Tags: code,linux,view,privesc,local
Description
Section titled “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.
YAML Source
Section titled “YAML Source”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: truecode: - 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: 4a0a00473045022100abd512b65ea9f643e21ac38c37cc255850a34bcebb616ea24b9c4457c5b37aff022008a00fee816b1d34deba5d2a865978315093adea5f7829a0c8aeb00c837a3f75: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-view.yaml"