32 lines
841 B
YAML
32 lines
841 B
YAML
id: writable-etc-passwd
|
|
|
|
info:
|
|
name: /etc/passwd writable - Privilege Escalation
|
|
author: daffainfo
|
|
severity: high
|
|
reference:
|
|
- https://book.hacktricks.xyz/linux-hardening/privilege-escalation#writable-etc-passwd
|
|
metadata:
|
|
verified: true
|
|
tags: code,linux,privesc
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
[ -w "/etc/passwd" ] && echo "Writable" || echo "Not writable"
|
|
|
|
matchers:
|
|
- type: word
|
|
part: code_1_response
|
|
words:
|
|
- "Writable"
|
|
|
|
- type: word
|
|
part: code_1_response
|
|
words:
|
|
- "Not writable"
|
|
negative: true
|
|
# digest: 4a0a004730450220688d5a0b52ecf69ea46224b683a6ee0c757513641d59b72abb034cc31af73f11022100987335f5bd847f8c382c487b8af7a71c9b156c1e578436f6b0e01f791f229130:922c64590222798bb761d5b6d8e72950 |