0

For a project I'm doing in ruby, I need to create an NTLM version 2 authentication against a remote server, I'm using ruby, not ruby on rails. The client (my project) is on a Linux Machine (Ubuntu server 14.04), the remote server is a windows 2008R2 , with IIS 7.5. After hours of searching, googling and IRCing I have not found any support for NTLM version 2 in ruby (not ruby on rails), no Gems or libraries.

Does one exist or is there some technical issue that wont allow NTLMv2 to be supported in ruby ?

Ba7a7chy
  • 1,471
  • 4
  • 14
  • 29
  • Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, [describe the problem](http://meta.stackoverflow.com/questions/254393) and what has been done so far to solve it. – the Tin Man Oct 29 '14 at 17:29
  • I'll edit as necessary, thanks. – Ba7a7chy Oct 29 '14 at 17:38
  • It would help if you'd clarify what *type* of remote server you're talking to. We can guess it's HTTPd but you should specify. If it is HTTPd, check into the various libcurl based gems like Typhoeus, Curb, et al, since there are hints that libcurl is supposed to get NTMLv2 support. – the Tin Man Oct 29 '14 at 19:33
  • Added remote and local OS information. – Ba7a7chy Oct 29 '14 at 19:59

3 Answers3

1

Found this project on GitHub: https://github.com/wimm/rubyntlm.

According to the Readme: "Supports NTLM and NTLMv2 reponses." Unfortunately it hasn't been updated since 2010, although you could probably fork the project and have a relatively good base to work from.

Joel Brewer
  • 1,622
  • 19
  • 30
  • To be honest I'm looking for something that can be used without building it from the ground up or I'll just build a lib my self (this is something I'm trying to avoid ;), but , thanks for the reference ! ) Edit: Also looking at the code, the NTLMv2 support is only for the Type 3 message which means it is not implemented fully (the first Type 1 message is NTLMv1) – Ba7a7chy Oct 29 '14 at 17:14
1

Recently when I had to get a Ruby app navigating through an NTLMv2 proxy I ended up using cntlm to interface with the NTLMv2 proxy. Cntlm then provides a simple HTTP proxy on localhost which I use in my Ruby application, and can also use when installing gems, using bundler etc...

There isn't a native Ruby NTLMv2 solution available that I'm aware of.

Richard Viney
  • 957
  • 16
  • 31
0

I found this one recently that support NTLMv2.

https://github.com/at-point/net-http-ntlm

It is basically a drop-in replacement for ruby-ntlm with NTLMv2 support.

Harsh Raj
  • 190
  • 1
  • 10