mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-02-06 18:53:16 +08:00
minor -update
This commit is contained in:
57
code/privilege-escalation/linux/binary/privesc-python.yaml
Normal file
57
code/privilege-escalation/linux/binary/privesc-python.yaml
Normal file
@@ -0,0 +1,57 @@
|
||||
id: privesc-python
|
||||
|
||||
info:
|
||||
name: PHP - Privilege Escalation
|
||||
author: daffainfo
|
||||
severity: high
|
||||
description: |
|
||||
Python is a high-level, general-purpose programming language known for its readability and simplicity. It is widely used for web development, scientific computing, artificial intelligence, and system automation. Python's versatility, extensive standard library, and large community make it a popular choice for a wide range of applications.
|
||||
reference:
|
||||
- https://gtfobins.github.io/gtfobins/python/
|
||||
metadata:
|
||||
verified: true
|
||||
tags: code,linux,php,privesc
|
||||
|
||||
self-contained: true
|
||||
code:
|
||||
- engine:
|
||||
- sh
|
||||
- bash
|
||||
source: |
|
||||
whoami
|
||||
|
||||
#SUID
|
||||
- engine:
|
||||
- sh
|
||||
- bash
|
||||
source: |
|
||||
python -c 'import os; os.system("whoami")'
|
||||
|
||||
#SUDO
|
||||
- engine:
|
||||
- sh
|
||||
- bash
|
||||
source: |
|
||||
sudo python -c 'import os; os.system("whoami")'
|
||||
|
||||
#Capabilities
|
||||
- engine:
|
||||
- sh
|
||||
- bash
|
||||
source: |
|
||||
python -c 'import os; os.setuid(0); os.system("whoami")'
|
||||
|
||||
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")'
|
||||
- 'contains(code_4_response, "root")'
|
||||
condition: or
|
||||
Reference in New Issue
Block a user