Hikvision camera admin password reset tool

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
It would have been interesting if it had been the newer Hikvision-specific code generator - I did wonder.
 

samir

n3wb
Joined
Sep 1, 2016
Messages
7
Reaction score
0
It looks like this is the same code generation method as the web-based version in this thread. I'm just pointing that out so people having trouble don't waste their time trying two tools... if one doesn't work the other won't either.
Yes it is the same method and same result nothing new but the simplicity and in case you do not have internet or laptop in the site .
Thanks
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,902
Reaction score
21,274
@bp2008, does this generator work for cams with the latest firmware?
 
Last edited by a moderator:

samir

n3wb
Joined
Sep 1, 2016
Messages
7
Reaction score
0
Yes It should be i attached reset manual from Hikvision and the manual said How to reset password IPC/PTZ/DVR/NVR but i try this App with last version firmware DVR not with camera the confuse come from hikvision cause they disconnect remote reset over network for new firmware so you should reset it locally like my DVR i could not reset it remotely even over my LAN and we can be more sour below the Hikvision support send him your camera serial number and he will send you a key like our generator do and compare the result and please let me know
Kim.Chan
chenhengnan@hikvision.com
 

Attachments

Enabler

Getting the hang of it
Joined
Oct 11, 2015
Messages
265
Reaction score
41
Location
Bolton
The new(ish) method uses RSA so unless you have Hikvision's private RSA key you can't generate a signed message that would be verified and accepted by the camera over SADP for password reset.

They've done that so you can't make a generator for the new method.
 

samir

n3wb
Joined
Sep 1, 2016
Messages
7
Reaction score
0
Thank you for sharing information
finally any solution over SADP with key generator was discounted with new firmware but still key generator work locally on DVR and NVR I test it myself as it in the manual I attached before
The dvr info
ID
Device Type
Software Version
002
DS-7332HGHI-SH
V3.3.3build 160716

even with the last firmware version they made
so the only way to reset camera password because there is no local access is to export XML and send it to Kikvision support and they will send you xml file then you can import and reset your camera from SADP tool


Best Regards For all
 

dusanr

n3wb
Joined
Oct 20, 2016
Messages
1
Reaction score
0
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: http://www.ipcamtalk.com/hik-pw-reset.php



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 already generator for version 5.3 and above ... I can't unlock my HIKVision camera (password forgotten)
If someone can generate pass for me : DS-2CD2355-I20160704AACH621040505
Date on camera (Start Time) : 1970-01-04
DSP Version : 7.3 build 160401
Software Version : V5.4build 160401
And here is EXported settings : https://drive.google.com/open?id=0Bya0rC8oL112SzBNNzhCcjNvZjg

Thank you for unlocking my HIKVision
 

samir

n3wb
Joined
Sep 1, 2016
Messages
7
Reaction score
0
Is there already generator for version 5.3 and above ... I can't unlock my HIKVision camera (password forgotten)
If someone can generate pass for me : DS-2CD2355-I20160704AACH621040505
Date on camera (Start Time) : 1970-01-04
DSP Version : 7.3 build 160401
Software Version : V5.4build 160401
And here is EXported settings : https://drive.google.com/open?id=0Bya0rC8oL112SzBNNzhCcjNvZjg

Thank you for unlocking my HIKVision


for new version DVR NVR this generator and similar working only locally which mean you should connect your mouse and HDMI cable and have direct access to local screen from dvr or nvr , and old version still this generator work over SADP for all device

for new version dvr and nvr you should export your XML file from your dvr and nvr and send it to hikvision Tec. Support then they will send you again xml file you can import to your device by SADP and unlock your device for unlocking

your case IP camera new version unlock by SADP is closed and there is no local access it is all over network cable so there is no generator work with you so the only solution is to export xml file by SADP and send it to Hikvision support and when they send you unlock xml file import it to your camera and make a new admin password
 

samir

n3wb
Joined
Sep 1, 2016
Messages
7
Reaction score
0
Sorry i forget to tell you if you can get this xml file i can send it to hikvision for you and send you back the xml key file
 

valst

n3wb
Joined
Oct 20, 2016
Messages
1
Reaction score
0
Hello! I need to reset admin password for dvr:
Hikvision DS-7216HFI-SH / DS-7216HFI-SH1620130114AAWR415773561WCVU
Software Version: V2.2.1build 121214

DSP Version:
V5.0, build 121212

Start Time: 2016-10-20 14:19:59
 

samir

n3wb
Joined
Sep 1, 2016
Messages
7
Reaction score
0
Hello! I need to reset admin password for dvr:
Hikvision DS-7216HFI-SH / DS-7216HFI-SH1620130114AAWR415773561WCVU
Software Version: V2.2.1build 121214

DSP Version:
V5.0, build 121212
Start Time: 2016-10-20 14:19:59
Hello :
your is key : Sezddq9rqy
Note password is case sensitive:
and how to do this yourself in the attached file all you need to do
Best Regards
View attachment How to reset hikvision password.docx
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,676
Reaction score
14,023
Location
USA

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
I don't know for sure as I haven't tried the firmware yet, but that would be logical.
Maybe Hikvision have got a bit overloaded with their middleman role in the existing recovery method.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,676
Reaction score
14,023
Location
USA
I always say there should not be a middleman role. What security does it add, really? All the information they require can be obtained by an opponent / hacker with network access, and if they ask for further information like where the cameras were bought, you could just make something up and they'd have no way to verify. All they end up doing is making the reset procedure take a long time, and that is something they could do without involving middlemen. For example the cameras/NVRs could force you to wait 24-72 hours after starting the password reset procedure before you can complete it, and effectively the same level of "security" would be achieved.
 

sbm

n3wb
Joined
Oct 28, 2016
Messages
3
Reaction score
0
Hi

Looks like the reset tools don't work here for my setup, can anyone help please:

NVR:
DS-7616N-E21620160614AARR611725384WCVU
Firmware: V3.4.62 build 160503
Start time: 2016-10-28 15:12:32

The camera too:

DS-2CD2035-I20160625AACH615891395
Firmware: V5.4.0_160401
Start date: 2016-10-28 15:42:50

We pay for reliable equipment which causes to set and forget! :D

I did also use the latest version of SDAP (3.0.x)
 
Last edited by a moderator:

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
With those versions of firmware - you will need to use the Forgot Password link in SADP and do the 'Export file' option, sending it to Hikvision tech support, for them to return a file for import.
Later - you could update the NVR firmware to version 3.4.90 which has some self-service password reset capabilities.
 

sbm

n3wb
Joined
Oct 28, 2016
Messages
3
Reaction score
0
Thanks Alastair

Looks like I'm in for a wait until respond....mind you, if I do upgrade the NVR to that firmware, would that not also force the password to be reset again? I see on the Ethernet that the NVR sends out a TFTP request once in a while, so there's that possibly.
 
Top