Martha,

You need to change the ascii translation to specify code pages (e2a is
not reversible), for example:

|xlate from 37 to 819

This ascii is not utf anything.  I think

|vchar 8 16

gets you utf-16; certainly, the utf filter converts between the utf
encodings, it does not convert to/from utf, so you do not want that.

        j.

On 05/07/2015 12:39 AM, Martha McConaghy wrote:
I need a bit of help to get past a final hurdle in a project I've been working
on.  The overall goal is to be able to take a text string and make a NTLM hash
out of it.  Everything I've read says that NTLM is really a UTF-16 string put
through a MD4 hash.  So, that is what I'm trying to do.

I have a MD4 hash generator stage written in REXX (a port from one that was
originally written for OS/2) and it works fine for creating a straight MD4
hash.  (Many thanks to Neale Ferguson for getting me that!)
I convert the string to ASCII first and then put it through the
generator:

'PIPE var String1|' ,
      'xlate e2a |' ,
      'rexx md4|' ,
      'cons'

I've compared the results with web based MD4 generators and the results
match.

Now, the hard part.  Getting the string from ASCII to UTF-16.  I
have John's new PIPELINE module from January and have been playing with
the UTF stage.  However, I'm not sure if I'm doing the right thing, I'm
definitely not getting a result that matches any of the online NTLM
generators.

'PIPE var String1|' ,
      'xlate e2a |' ,
      'utf 8 to 16|' ,
      'fblock 1|' ,
      'spec x00 1 1 n|' ,
      'join *|' ,
      'strip|' ,
      'rexx md4|' ,
      'cons'

Any ideas?  Is a conversion from UTF 8 to 16 even valid for this?  Please, I
am definitely NOT a "code table geek", so use small words...%-)

Martha

Martha McConaghy
System Architect/Technical Lead
Marist College

Reply via email to