openlens-fw
Hardened, open-source replacement firmware for the Anpviz IPC-D240W-S IP camera.
The Anpviz IPC-D240W-S is an inexpensive PoE camera. Its stock firmware had 24 published vulnerabilities, disclosed through CISA and CERT/CC in 2026, and the vendor stopped answering. openlens-fw replaces that firmware’s whole userland with a small one written for this camera: video, RTSP, ONVIF, a web UI over HTTPS, day/night with IR, and signed updates, with nothing left of the stock software but the kernel and the drivers it needs.
You build the image yourself, sign it with your own key, and install it on a camera you own. It records to Synology Surveillance Station every day on the developer’s cameras.
What it does
Video for your NVR
No shared credentials
Updates only you can sign
HTTPS with its own CA
Nothing on the network runs as root
SSH done properly
How it works
The camera keeps its stock bootloader and kernel. openlens-fw replaces only the rootfs
partition with its own programs, which drive the SigmaStar video hardware through raw
ioctls instead of the vendor’s media server. Settings, accounts and keys live on the data
partition and survive updates. How it works has the parts and
the security design.
What it leaves to you
- Network isolation. Surveillance Station can’t use TLS with a generic ONVIF camera, so it talks plain RTSP and ONVIF (Digest logins, unencrypted video). Put the cameras on their own VLAN.
- Physical protection. The stock bootloader doesn’t check signatures: anyone with a serial console or a flash clip can run any firmware.
- Time. NTP isn’t authenticated; use a time server inside the camera network.
The security model lists each limit and what to do about it.
Links
- mlaify/openlens-fw: source and issues. Our code is MIT; the stock files it runs on keep their own terms.
- Documentation: build, sign, install, claim, and every setting.
- The Anpviz research that started it.
- Contributing · Code of Conduct · Security policy
openlens-fw is not affiliated with or endorsed by Anpviz, Anjoy or SigmaStar. “Anpviz” names the hardware it runs on.