Hiding Behind A Cctv Turning A Hikvision Rce Into A Covert Network Proxy
A Hikvision CCTV camera was vulnerable to an unauthenticated command injection (CVE-2021-36260), allowing remote execution of commands as root. The author used this to install a Meterpreter payload and turn the camera into a covert SOCKS proxy, so that traffic appeared to originate from the camera's IP address.
Published on systemweakness.com
In this blog, I’ll show how a single unauthenticated vulnerability in a Hikvision CCTV camera gave me not just a root shell on the device, but a covert network proxy, routing my traffic through the camera so every packet appeared to come from a surveillance device instead of my machine.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the web server passed user input directly to a system command without sanitising it, enabling command injection.
Impact
An attacker could gain root command execution on the camera and use it as a proxy to hide their origin, making their traffic appear to come from the camera's IP address.
What the attacker needed
Camera reachable on internal network; unpatched firmware; no authentication required
The fix
Hikvision patched the vulnerability in September 2021; updating firmware and segmenting camera networks are recommended.
How it was found
- Run the public proof-of-concept tool in check mode against the camera to confirm exploitability.
- Execute an arbitrary command (e.g., directory listing) to verify root-level command execution.
- Generate an ARM Meterpreter bind_tcp payload with msfvenom.
- Upload the payload to the camera via the RCE, make it executable, and run it.
- Set up a Metasploit handler to connect to the bind payload and obtain a Meterpreter session.
- Use autoroute and a SOCKS proxy to route traffic through the camera, then configure a browser to use the proxy.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A security camera had a flaw in its web server that let anyone on the network run commands on it without logging in. The attacker used this to install a small program that made the camera act as a relay, so their internet traffic looked like it came from the camera instead of their own computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.