Camera Hacking: Using PwnEye to Compromise IP Cameras
Welcome back, aspiring cyberwarriors.Β
Some cameras protect a building, others betray it. Camera hacking isnβt hard, and thatβs the problem. These devices are often the most vulnerable in any environment. Once installed, they arenβt maintained until thereβs a problem. Many βproblemsβ can go unnoticed if you know how vulnerable cameras are. Hackers can use them for persistence or as an entry point into an organization.
We do have different articles on this topic, but this time thereβs something else we want to show. Itβs PwnEye.Β
PwnEye
PwnEye is a newer tool that didnβt get enough attention yet. It works with both ONVIF and RTSP and thatβs pretty much all you need. Once it has compromised a camera, it can reboot it, factory reset and open an interactive shell via ONVIF.
You also black out the operatorβs view. Just like in movies.Β
Setting Up
Letβs set up the tool. Youβll need ffmpeg first.
kali > sudo apt install ffmpeg

Then install pipx and grab the tool.
kali > sudo apt install pipx
kali > pipx install git+https://github.com/Hackerest/pwneye.git
Once itβs ready, you can test it:
kali > pwneye -h

The help menuβs large. The tool can be used to find cameras in a local network with βdiscover, but it can be pointed at any camera IP. Thatβs where weβll start.
ONVIF AttacksΒ
ONVIF is the protocol that lets cameras from different manufacturers talk to each other without buying the same product. Itβs basically a standard, but itβs also an attack vector.
kali > pwneye -t IP

If the cameraβs running default or weak credentials, you get access. The tool extracts everything after compromise. Below you can see the network config, MAC address, DNS entries and configured users. DNS entries may sometimes point to interesting internal servers.

Look at the configured user credentials in the output. Youβll use those to get a shell.
The tool also finds snapshots that the camera captures regularly. You can view them in the browser or wait for PwnEye to open the stream.Β

Some cameras support deface (black the screen), PTZ movement and factory reset through ONVIF. Not all. Depends on the model.
Finally, once it finishes, you get the stream.

Well, itβs just a bus station. Nothing fancy here.
Defacing Cameras
If the camera supports it, you can deface it.
kali > pwneye -t IP --deface [MESSAGE]

Itβs not sophisticated, but it works.Β
Shell
Thatβs probably the most interesting part. Take the credentials from the user profile output and get a shell.
kali > pwneye -t IP -ou admin -op ββ

Once youβre in, run help and see what it has. Some cameras let you do more than others.

RTSP Attacks
ONVIF compromise is worse than RTSP compromise, but RTSP often works when ONVIF doesnβt. The tool tries both by default, but you can skip ONVIF and go straight to RTSP if you want.
kali > pwneye -t IP -so

The tool has more than 450 credentials built in. You can also try common corporate passwords like Company123 or just Company.
Once it gets credentials, you get the stream.

Summary
Some IP cameras might be accessible from the internet and locally. That means compromising them also gives you a foothold on the internal network. They arenβt upgraded regularly and IoT devices in general lack proper software updates. There are dozens of known CVEs on most camera models. Cameras can be used to proxy through them, attack other hosts or maintain persistence.
There are many other attacks on cameras, and it would be a very long article to cover them here. Thatβs why we created our IP Camera Hacking Training. Itβs now part of our Cybersecurity Starter Bundle II. With it you get Wi-Fi Hacking, Python Basics for Hackers, Remaining Anonymous and more.Β
The post Camera Hacking: Using PwnEye to Compromise IP Cameras first appeared on Hackers Arise.