Tuesday, February 4, 2014

Cntlm - Install (Windows)

Cntlm is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy


  1. Downdload from the official website : cntlm.sourceforge.net
  2. Unzip to the destination folder, we will call it CNTLM_HOME, ex.: C:\dev\Cntlm
  3. Create an environment variable (if you don't know how, click here)Name: CNTLM_HOME
    Value: C:\dev\Cntlm (it's only an example, choose your destination's folder)
  4. Add to the PATH this new variable CNTLM_HOME (if you don't know how, click here)
  5. Take a backup of the original configuration file %CNTLM_HOME%\cntlm.ini => cntlm.ini.default
  6. Remplace the content of the file in %CNTLM_HOME%\cntlm.ini by...
    # Cntlm Authentication Proxy Configuration
    Username testuser
    Domain corp-uk

    # List of parent proxies to use. More proxies can be defined
    # one per line in format <proxy_ip>:<proxy_port>
    Proxy proxy-name:8080

    # List addresses you do not want to pass to parent proxies
    # * and ? wildcards can be used
    NoProxy localhost, 127.0.0.*, 10.*, 192.168.*

    # Specify the port cntlm will listen on
    # You can bind cntlm to specific interface by specifying
    # the appropriate IP address also in format <local_ip>:<local_port>
    # Cntlm listens on 127.0.0.1:3128 by default
    Listen 3128

    Auth       NTLMv2
    PassNTLMv2 
  7. Replace by your own personal informations:
    Username testuser
    Domain corp-uk
    Proxy proxy-name:8080
  8. In commande line type this command and enter your password :
    >cntlm -I -M http://test.com  -c C:\dev\Cntlm\cntlm.ini
    [PASSWORD]
    Password:
    Config profile  1/4... OK (HTTP code: 200)
    ----------------------------[ Profile  0 ]------
    Auth            NTLMv2
    PassNTLMv2      AA1A11AAA11AAAA1AA11A1AAAA11A11A
    ------------------------------------------------
    Notice: If you get an HTTP code 302, it's fine too.
  9. Copy the value of PassNTLMv2 from the output AA1A11AAA11AAAA1AA11A1AAAA11A11A to the file cntlm.ini, on the same line as PassNTLMv2 
  10. In commande line:
    > cntlm -f -c C:\dev\Cntlm\cntlm.ini
    cntlm: PID 15264: Cntlm ready, staying in the foreground

No comments:

Post a Comment