Hikvision camera admin password reset tool

It depends on what firmware vulnerabilities can be exploited.
These do eventually get fixed.

What firmware version does SADP show that the camera is using?
 
Hi everyone, I managed to reset 12 out of 16 cameras, they had firmware 5.4.0 build 160530 so the wonderful reset utility worked a treat !!! Thank you so much to the creator. I'm now stuck on 4 remaining camera's, they have IP's but no gateway address and they are running firmware :-

Can anyone help me to reset these ? The code utility won't work, i suspect because of the new firmware....

1765835779988.png

ANY help appreciated , I'm going grey trying to get this sorted !!
 

Attachments

I'm now stuck on 4 remaining camera's, they have IP's but no gateway address and they are running firmware
Does the NVR have new enough firmware that in the VGA/HDMI interface (and the newest in the web GUI) it has the facility to show in plaintext the password that has been configured to 'activate' the cameras on first connection?

Don't these cameras have a reset button next to the microSD holder?
 
  • Like
Reactions: gwminor48
I have fogot password hikvision ip camera DS-2CD1345V2-LA. How can I reset? It has no reset button and china version. Help me please...
 
Good morning, I've rediscovered a video surveillance system, which I'm attaching. I'd like to install it in a house in the mountains, but unfortunately I don't remember the administrator password I set. I tried adding a new user, but I don't have administrator rights. Is there a way to reset the password? I don't want to throw it away and buy a new one. Can anyone help me?
 

Attachments

  • 20260317_114404.jpg
    20260317_114404.jpg
    1.4 MB · Views: 3
If you have ever locked yourself out of a Hikvision camera or NVR by forgetting the admin password, and had to beg Hikvision or anyone else for an unlock code, you will appreciate this. I present a small tool that lets you generate your own unlock codes which can be entered into SADP to reset the admin password on any of your Hikvision cameras. This tool is written in HTML/CSS/JavaScript so it runs in any modern web browser and you can view the complete source code easily.

/
Update (September 13, 2017)

It is now possible to reset passwords on some cameras that won't work with the reset code tool, by exploiting a backdoor that was recently made public.

I've built a tool for that. It only works with cameras (not NVRs. If you need to reset an NVR, click here.

GitHub - bp2008/HikPasswordHelper: A tool which exploits a backdoor in Hikvision camera firmwares circa 2014-2016 to help the owner change a forgotten password.



/

Disclaimer: This tool may or may not work for your camera or NVR. Please follow the instructions very carefully and be precise in all your inputs into the tool. Devices on newer firmware require a more secure password reset procedure which I can not help with. I think this tool will only work with cameras running firmware older than 5.3.0. I do not know what version is the cutoff for NVRs.

Some Hikvision devices (perhaps only NVRs) show their model number appended to the beginning of their serial numbers. You may need to remove this from the serial number that you enter into the tool. For example, if the serial number shows as DS-7208HVI-ST0123456789AAWR987654321WCVU and the device's model number is DS-7208HVI-ST, then the true serial number is 0123456789AAWR987654321WCVU

Without further ado, here is a link so you can use it without downloading anything: Hikvision Password Reset Tool



Inside this spoiler block is the complete source code which you can write to a .html file on your computer, allowing you to use it offline.
HTML:
<html>
<head>
    <title>Hikvision Password Reset</title>
    <script type="text/javascript">
        function padLeft(str, l, c) { str = str + ""; return Array(l - str.length + 1).join(c || " ") + str }
        function initialize()
        {
            document.getElementById("year").value = new Date().getYear() + 1900;
            document.getElementById("month").value = padLeft(new Date().getMonth() + 1, 2, '0');
            document.getElementById("day").value = padLeft(new Date().getDate(), 2, '0');

            document.getElementById("serialNumber").onchange = GenerateSerialCode;
            document.getElementById("year").onchange = GenerateSerialCode;
            document.getElementById("month").onchange = GenerateSerialCode;
            document.getElementById("day").onchange = GenerateSerialCode;
        }
        function GenerateSerialCode()
        {
            var serialNumber = document.getElementById("serialNumber").value;
            var year = document.getElementById("year").value;
            var month = document.getElementById("month").value;
            var day = document.getElementById("day").value;
            var plainText = serialNumber + year + month + day;

            var magicNumber = 0;
            for (var i = 0; i < plainText.length; i++)
                magicNumber += (plainText.charCodeAt(i) * (i + 1)) ^ (i + 1);

            magicNumber *= 1751873395;
            magicNumber = magicNumber >>> 0; // convert to 32 bit integer

            var magicWord = magicNumber + "";
            var serialCode = "";
            for (var i = 0; i < magicWord.length; i++)
            {
                var c = magicWord.charCodeAt(i);
                if (c < 51)
                    serialCode += String.fromCharCode(c + 33);
                else if (c < 53)
                    serialCode += String.fromCharCode(c + 62);
                else if (c < 55)
                    serialCode += String.fromCharCode(c + 47);
                else if (c < 57)
                    serialCode += String.fromCharCode(c + 66);
                else
                    serialCode += String.fromCharCode(c);
            }

            document.getElementById("output").innerHTML = serialCode;
        }
        window.onload = initialize;
    </script>
    <style type="text/css">
        body
        {
            width: 450px;
        }
        .description
        {
            margin: 20px 0px;
        }
        .label
        {
            margin: 10px 0px;
        }
        .input
        {
            margin-bottom: 10px;
        }
        #output
        {
            font-weight: bold;
            border: 1px solid black;
            padding: 10px;
            font-size: 2em;
            max-width: 100%;
        }
    </style>
</head>
<body>
    <div><h2>Hikvision Camera Password Reset Utility</h2></div>
    <div class="description">This tool will generate a <b>password reset code</b> which you may use to reset a forgotten admin password for a Hikvision camera.</div>
    <div class="label">Enter your camera's complete CASE SENSITIVE serial number, as seen in the <a href="http://www.google.com/search?q=Hikvision%20SADP">Hikvision SADP</a> tool:</div>
    <div class="input"><input type="text" id="serialNumber" style="width: 100%" placeholder="Hikvision Camera Serial Number" /></div>
    <div class="label"><b>Important:</b> The date you enter below much match with the camera's clock. <b>Most likely it is not today's date!</b> To find out what date your camera thinks it is, power cycle your camera, give it time to boot up, and then refresh your camera list in SADP and check the Start Time column.</div>
    <div class="label">Enter the <b>4 digit</b> year the camera thinks it is:</div>
    <div class="input"><input type="text" id="year" style="width: 20%" /></div>
    <div class="label">Enter the <b>2 digit</b> month the camera thinks it is:</div>
    <div class="input"><input type="text" id="month" style="width: 20%" /></div>
    <div class="label">Enter the <b>2 digit</b> day the camera thinks it is:</div>
    <div class="input"><input type="text" id="day" style="width: 20%" /></div>
    <div class="label">Your <b>password reset code</b> will appear below.</div>
    <div id="output"></div>
    <div class="label">The code must be entered into the <a href="http://www.google.com/search?q=Hikvision%20SADP">Hikvision SADP</a> tool in the <b>Serial code</b> box (called <b>Security Code</b> in later SADP versions). The camera will compare its internal date and time with the date and time you have entered above. The Serial Number and date much match perfectly or else the code will not work.</div>
</body>
</html>
Some will say it is irresponsible to publish this. I disagree. Evidently a number of people outside of Hikvision have possessed the ability to generate these codes for a while now. I found this (similar) functionality freely available for download elsewhere, so I really don't feel bad about releasing this and making it a bit easier to recover your cameras.
Hi everyone, great guide, I wanted to know if it is also valid for my devices because I tried but it doesn't work, unfortunately I reset the NVR and I don't remember the password for the cameras! :(
my camera:
DS-2CD1323G0-I20200321AAWRE17899115
DS-2CD1323G0-I20200321AAWRE17899342
DS-2CD1323G0-I20200321AAWRE17899507
Thank you
 

Attachments

  • Immagine 2026-03-27 155859.png
    Immagine 2026-03-27 155859.png
    191.7 KB · Views: 3
Hi everyone, I have 4 Hikvision cameras DS-2CD1041-I with firmware V5.5.5 build 180111 and DSP version 7.3 build180111 and I can't reset the password. I tried generating the XML file with SADP, but it's corrupted. I tried your tools (), but it doesn't work. I tried the reset tool by entering the serial number and date, but it doesn't work. What can I do to reset the password? Thanks.
 
Hi everyone, I have 4 Hikvision cameras DS-2CD1041-I with firmware V5.5.5 build 180111 and DSP version 7.3 build180111 and I can't reset the password. I tried generating the XML file with SADP, but it's corrupted. I tried your tools (), but it doesn't work. I tried the reset tool by entering the serial number and date, but it doesn't work. What can I do to reset the password? Thanks.
I solved it by flashing the firmware. Bye
 
  • Like
Reactions: Flintstone61