2023-12-13 15:07:24 +00:00
|
|
|
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
|
2024-01-31 17:41:31 +00:00
|
|
|
tags: code,linux,privesc,local
|
2023-12-13 15:07:24 +00:00
|
|
|
|
|
|
|
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"
|
2024-01-22 16:20:01 +00:00
|
|
|
negative: true
|
2024-01-31 17:43:39 +00:00
|
|
|
# digest: 4a0a0047304502210096579c1feb0a90bdbb55acc382213a07ed99678c1afdaa1849273657d6292d3c02200903d3d37e2aafed546ff3b5259ecaa046cac660ae9acadb109f4dc694c4a81d:922c64590222798bb761d5b6d8e72950
|