mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-02-03 09:13:22 +08:00
28 lines
862 B
YAML
28 lines
862 B
YAML
id: root-path-dot
|
||
|
||
info:
|
||
name: Root PATH Contains Current Directory
|
||
author: songyaeji
|
||
severity: high
|
||
description: |
|
||
root user’s PATH environment variable included the current directory (“.”).This allowed scripts or binaries in the working directory to be executed with root privileges. The misconfiguration resulted in potential privilege escalation and unsafe behavior.
|
||
reference:
|
||
- https://isms.kisa.or.kr/main/csap/notice/
|
||
- https://www.hackingarticles.in/linux-privilege-escalation-using-path-variable/
|
||
metadata:
|
||
verified: true
|
||
tags: local,linux,audit,privesc,kisa
|
||
|
||
self-contained: true
|
||
|
||
code:
|
||
- engine:
|
||
- sh
|
||
source: |
|
||
echo $PATH | grep -Eq '(^\.?:|:.:|:\.$|^\.$)' && echo "dot-in-path" || echo "safe-path"
|
||
|
||
matchers:
|
||
- type: word
|
||
part: response
|
||
words:
|
||
- "dot-in-path" |