Files
nuclei-templates/code/privilege-escalation/linux/binary/privesc-rake.yaml
2024-01-22 18:59:57 +05:30

49 lines
1.0 KiB
YAML

id: privesc-rake
info:
name: Rake - Privilege Escalation
author: daffainfo
severity: high
description: |
Rake is a build automation tool written in Ruby. It is similar to Make, Ant, or MSBuild, but uses a Ruby syntax. Rake is often used for automating tasks in software development, such as building, testing, and deploying applications.
reference:
- https://gtfobins.github.io/gtfobins/rake/
metadata:
verified: true
tags: code,linux,rake,privesc
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
#SUID
- engine:
- sh
- bash
source: |
rake -p '`whoami 1>&0`'
#SUDO
- engine:
- sh
- bash
source: |
sudo rake -p '`whoami 1>&0`'
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