Good morning everyone,
I have carefully followed this tutorial (read here) on the vulnerability of some IPCAMs. Not to spy on a CAM but rather I wanted to create my own client that hooked up to the CAM.
I got a good result in the search and identification phase of the CAM. But accessing the credentials there is some hitch.
The sending of the password is encrypted with a second fixed password (macrovideo+*#!^@) and subsequently a third random password.
This is what the tutorial says
Here is the code I used:
Am I wrong or is the tutorial wrong?
It must be said that in the tutorial there is a Pyton code that they say works.
I have carefully followed this tutorial (read here) on the vulnerability of some IPCAMs. Not to spy on a CAM but rather I wanted to create my own client that hooked up to the CAM.
I got a good result in the search and identification phase of the CAM. But accessing the credentials there is some hitch.
The sending of the password is encrypted with a second fixed password (macrovideo+*#!^@) and subsequently a third random password.
The result that is displayed on the site is not what I get.encryptedPassword = encrypt(randomKey2,(encrypt("macrovideo+*#!^@",plainPassword)))
This is what the tutorial says
I get this:Data to be encrypted is: admin
Key is : macrovideo+*#!^@
Data to be encrypted is: ^8â*úeg¯Ê»F (16-byte)
Key is : U0658S51fbM5P60I
Data to be encrypted is: [?62;c (??-Byte)
The last encoding gives a different result.Data: admin
Key is: macrovideo+*#!^@
Data to be encrypted is: ^8â*úeg¯Ê»F <------------ OK 16-Byte
Key is: U0658S51fbM5P60I
Data to be encrypted is: RËRµç.¼NßZµ§)ğO2CĞÓ°SEyP <------------- WRONG 32-byte
Here is the code I used:
B4X:
Dim C As Cipher
Dim pass1() As Byte = "macrovideo+*#!^@".GetBytes("UTF8")
Dim PassDemo() As Byte = "U0658S51fbM5P60I".GetBytes("UTF8")
key1.Initialize("AES")
key1.KeyFromBytes(pass1)
keyDemo.Initialize("AES")
keyDemo.KeyFromBytes(PassDemo)
Dim b() As Byte = C.Encrypt("admin".GetBytes("UTF8"),key1.Key,False)
Dim b2() As Byte = C.Encrypt(b,keyDemo.Key,False)
Log("Data: admin")
Log("Key is: " & BytesToString(pass1,0,pass1.Length,"UTF8"))
Log("Data to be encrypted is: " & BytesToString(b,0,b.Length,"ISO-8859-9""))
Log("Key is: " & BytesToString(PassDemo,0,PassDemo.Length,"UTF8"))
Log("Data to be encrypted is: " & BytesToString(b2,0,b2.Length,"ISO-8859-9"))
Am I wrong or is the tutorial wrong?
It must be said that in the tutorial there is a Pyton code that they say works.
Last edited: