Hikvision camera admin password reset tool

This saved me headaches! Thanks heaps!
 
Hi all

I am having DS-2CD2T42WD-I8 (V5.4.0)
i want to reset password of my own..

No response from hikvision team,

Kindly guide me how to reset the password...
 
Awesome. Thanks, much appreciated.

Despite repeated warnings, a client had left his password at the default and his box was seemingly held for a ransom demand that never came. They locked him out, put privacy screens up on all the cameras. Hikvision's tech support were seemingly on holiday and can't read an email.

This tool however saved the day. Thanks again.
 
  • Like
Reactions: alastairstevenson
HELPPP PLEASEEEEE. I have contacted Hikvision but they are so slow to come back to me. I have forgotten the password for one camera and need to reset it. I have tried the tool and it wont work. Can anybody please help.

My camera details are:

Camera - DS-2CD2342WD-I
Serial Number - 20160722BBWR626404318
Start Time - 2017-04-25 03:55:10

Many Thanks in advance

John
 
A suggestion to try, assuming the camera was working OK in the NVR, but you'd just forgotten the password you'd set on it.
And assuming the camera password is not the same as that of the NVR, if the (unspecified) NVR is not using the option to manage the camera password.

Plug the camera back in the NVR.
It should presumably start working again.
In the NVR web GUI, in the System | Maintenance page, use 'Export IP camera parameters' and save the resultant file.
It's in Excel format, open it with Excel or equivalent, and inspect if to see the camera password, which should show in plaintext.
 
The NVR can't find the camera as it was first plugged into the home network, which was where I set the password and forgot it! Annoyingly!!! hHikvision sent me the same codes I got from the generator on here. Both of which don't seem to work. I just want to restore the camera back to factory settings. Is there another way around this?
 
hi folks
i have wasted better part of 2 days trying to reset teh passwords on 2 hikvision cameras i got off ebay this week. Well little did i know that the ebay guy was selling chinese market cameras into the usa and hikvision usa wont help me at all this software tool will not work as this camera has the new firmware i am at aloss here can anybody offer any suggestions i have tryied all the passwords and combos and get locked out and have to wait any help would be appreaiated the cameras are "smart 265" cameras i have tryied the software tools the ipaddress to get into the camera nothing banging my head here im out 160 bucks so far



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.

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. Some 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.

Update:
Some Hikvision devices (perhaps only NVRs) show their model number appended to the beginning of their serial numbers. You must 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.
 
Is there can hikvision DS-7108HQHI-F1/N Reset tools? I forget password, and my GUID file lost gone.
What can i do?

Thank you
 
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.

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. Some 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.

Update:
Some Hikvision devices (perhaps only NVRs) show their model number appended to the beginning of their serial numbers. You must 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.


Head scratching here, i cant find the security code or serial code, am i missing something?
Trying on a DS7608NI-I2/8P

cheers
 
Head scratching here, i cant find the security code or serial code, am i missing something?
Trying on a DS7608NI-I2/8P

cheers

The same here.. I don't see any Security Code section to enter in the SADP app.

Strange that the IP Cameras says, username and password don't match, but I never set it in the first place. I am able to access the Local GUI just fine just the cameras are locked out, except for 1 of 4 is active. How did this happened in the first place? Makes no sense... it makes it a bit creepier as well.

I was able to get the password reset code but where do I put it? The SADP doesn't show, again, the Security Code. Running version 3.0.0.10.. I'm confused..
 
The same here.. I don't see any Security Code section to enter in the SADP app.
I was able to get the password reset code but where do I put it?
The 'Forgot password' link at the bottom right of the SADP window.
except for 1 of 4 is active.
but I never set it in the first place.
If they show as 'Inactive' then you are required to create your own strong password to 'Activate' them.
 
The 'Forgot password' link at the bottom right of the SADP window.


If they show as 'Inactive' then you are required to create your own strong password to 'Activate' them.

Strange how the "Forgot password" is an exception to "Security Code."

The cameras after logging in says: "Attention: The user name or the password is wrong."

It was set as Plug-n-Plug and it was working fine for a year, then it started this all on its own and decided to take it offline?? That's odd...

Also, there is no "inactive" on these cameras. It just says "not connected" and even if I put in a password, it still shows up the same. Makes no sense.
 
Also, there is no "inactive" on these cameras. It just says "not connected" and even if I put in a password, it still shows up the same. Makes no sense.
I'd assumed as you were mentioning SADP that the 'active' reference was to the SADP status info.
Have you done any port forwarding to enable external access?
These symptoms are consistent with the on-going Hikvision remote admin vulnerability exploits from the internet.
 
I'd assumed as you were mentioning SADP that the 'active' reference was to the SADP status info.
Have you done any port forwarding to enable external access?
These symptoms are consistent with the on-going Hikvision remote admin vulnerability exploits from the internet.

Yes I have. But, this is not a question for port forwarding/external/web access. They work just fine. This is a case of "No Link" on 3 of my 4 cameras with security status of "N/A" as it has for over a year.

So, I ran the Reset Password in the "Forgot Password" like you said, exported the QR Code in step 1, then import it in step 2, then select "Reset Network Cameras." After that, It rebooted on its own. Yet, it still doesn't work.

Update: The secret code, is this the place to put in the "New Password?" I tried this, doesn't work.
Although, on the SADP interface, it says: Security is "Active."
 
Last edited:
Yes I have. But, this is not a question for port forwarding/external/web access. They work just fine. This is a case of "No Link" on 3 of my 4 cameras with security status of "N/A" as it has for over a year.
Sure. However - if it is a consequence of being exploited due to port forwarding exposing their vulnerabilities to the internet, some of the intrusions attempt to disable the devices as well as mess with the users and passwords.
But I am speculating a bit here.
 
Sure. However - if it is a consequence of being exploited due to port forwarding exposing their vulnerabilities to the internet, some of the intrusions attempt to disable the devices as well as mess with the users and passwords.
But I am speculating a bit here.

Understood. I would assume the same idea as you're saying. It happened all on its own, who knows if it was exploited and password was reset? I wouldn't be all too surprised if the "whoever hacked" the Hikvision cameras are seeing all they wanted to see in my home/business.

So, I tried the online HikVision password reset tool for the cameras, it's not working. I tried it on the SADP, it rejected it. I wonder if it's hard coded and refused to be changed or it has been seized by the hacker/perpetrator?

I spent hours factory resetting everything... everything is how it should be but cameras are still not showing any link.

BTW, again, when I receive the password reset code, even going in the Forgot Password, the ggenerated code didn't even work.

So confused...