Git Product home page Git Product logo

Comments (4)

jschwartzenberg avatar jschwartzenberg commented on July 23, 2024 1

It seems that PR had two issues:

  1. it was quite big, trying to tackle multiple problems
  2. it broke authentication in some environments

My proposal would be to have a PR with just this fix and to introduce the structs refactoring in a separate PR. Then both can be tested independently for compatibility with different implementations. As they might touch the same code, you may have to provide one after the other. Smaller PRs with independent fixes have a much higher chance than getting merged than large PRs.

from cntlm.

fralken avatar fralken commented on July 23, 2024

Thanks @arminfelder. Can you provide a PR with just the fix (how to retrieve the userDom and use it instead of target), and after another PR with the code refactoring?

from cntlm.

fralken avatar fralken commented on July 23, 2024

Indeed the equivalent of NTOWFv2 in cntlm is correct, because it is passntlm2 that is computed by this function:

cntlm/ntlm.c

Lines 200 to 224 in 83f7c54

char *ntlm2_hash_password(const char *username, const char *domain, const char *password) {
char *tmp;
char *buf;
char *passnt;
char *passnt2;
int len;
passnt = ntlm_hash_nt_password(password);
const size_t buf_len = strlen(username) + strlen(domain) + 1;
buf = zmalloc(buf_len);
strlcat(buf, username, buf_len);
strlcat(buf, domain, buf_len);
uppercase(buf);
len = unicode(&tmp, buf);
passnt2 = zmalloc(16 + 1);
hmac_md5(passnt, 16, tmp, len, passnt2);
free(passnt);
free(tmp);
free(buf);
return passnt2;
}

from cntlm.

fralken avatar fralken commented on July 23, 2024

It turns out that the actual issue was that the authentication message is not complete when the target info is missing from the challenge. This is fixed with commit 533f137.

from cntlm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.