Files
nuclei-templates/code/privilege-escalation/linux/binary/privesc-enscript.yaml
pussycat0x b62697a608 lint -fix
2024-01-22 19:39:39 +05:30

47 lines
1.1 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
tags: code,linux,enscript,privesc
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