Encrypt Windows Password

P

Peter.Kramer

Hello,
I want to write a perl module that encrypts a clear password to a windows
hash.
I didnt find any algorithm that builds the hash expect copypwd.exe which
works, but is an external program that does not run as scheduled task.

"cleartextpassword " ->
"52616e646f6d4956dc110786f80987daa99d164016ba7d72b24eb2a2931e0ff7"

Thanks
 
R

Reinhard Pagitsch

Hello,

Peter.Kramer said:
Hello,
I want to write a perl module that encrypts a clear password to a windows
hash.
I didnt find any algorithm that builds the hash expect copypwd.exe which
works, but is an external program that does not run as scheduled task.

"cleartextpassword " ->
"52616e646f6d4956dc110786f80987daa99d164016ba7d72b24eb2a2931e0ff7"

Copypwd uses the functions from the "Windows Management API" (MS
Platform SDK) and from the samsrv.dll. First Dump the passwords
(encrypted not in clear text) from a domain to a text file and than you
can use this file to import it on an other domain.
I do not belive that MS made the algorithm available. But that can be
asked in a MS news group, I guess.

regards,
Reinhard
 
B

Ben Morrow

Quoth (e-mail address removed):
Hello,



Copypwd uses the functions from the "Windows Management API" (MS
Platform SDK) and from the samsrv.dll.

....in which case if you *really* want to you can use Win32::API or XS to
get at them from Perl.

Ben
 
R

Reinhard Pagitsch

Ben said:
Quoth (e-mail address removed):

...in which case if you *really* want to you can use Win32::API or XS to
get at them from Perl.

Not really, the functions are only to get the password hashes from
existing user accounts of a domain and not to pass them a clear text
password and get the encrypted hash. But maybe there are some functions
todo so, but till now I did not find them.


regards,
Reinhard
 
P

Peter J. Holzer

I want to write a perl module that encrypts a clear password to a windows
hash.
I didnt find any algorithm that builds the hash expect copypwd.exe which
works, but is an external program that does not run as scheduled task.

"cleartextpassword " ->
"52616e646f6d4956dc110786f80987daa99d164016ba7d72b24eb2a2931e0ff7"

Take a look at Crypt::SmbHash.

hp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,200
Messages
2,571,046
Members
47,646
Latest member
xayaci5906

Latest Threads

Top