Skip to content

rpmverify - Privilege Escalation

ID: privesc-rpmverify

Severity: high

Author: daffainfo

Tags: code,linux,rpmverify,privesc,local

The rpmverify command is used to verify the integrity and authenticity of installed RPM packages on a Linux system. It checks the files in the installed packages against the information stored in the RPM database to detect any modifications or discrepancies. This helps ensure the security and stability of the system by identifying any unauthorized changes to the installed packages.

id: privesc-rpmverify
info:
name: rpmverify - Privilege Escalation
author: daffainfo
severity: high
description: |
The rpmverify command is used to verify the integrity and authenticity of installed RPM packages on a Linux system. It checks the files in the installed packages against the information stored in the RPM database to detect any modifications or discrepancies. This helps ensure the security and stability of the system by identifying any unauthorized changes to the installed packages.
reference:
- https://gtfobins.github.io/gtfobins/rpmverify/
metadata:
verified: true
max-request: 3
tags: code,linux,rpmverify,privesc,local
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
rpmverify --eval '%(whoami 1>&2)'
- engine:
- sh
- bash
source: |
sudo rpmverify --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: 4b0a00483046022100a788526d96e52ff1cc3b258d770579cb7c114eae49babb2fac0c7651022a0463022100a1d63ea06bd3d9134854eeeba7417b3ee2af0150bccd9d351d69df47c6183075:922c64590222798bb761d5b6d8e72950

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.

Terminal window
$ nuclei -u "URL" -t "code/privilege-escalation/linux/binary/privesc-rpmverify.yaml"

View on Github