cntlm

NTLM / NTLM SR / NTLMv2 authenticating HTTP proxy. It stands between your applications and the corporate proxy, adding NTLM authentication on-the-fly.

Installation

apt install cntlm

Configuration

Generate hash for a password

cntlm -H -u username -d domain

Edit /etc/cntlm.conf

nano /etc/cntlm.conf

Username        myuser
Domain          MYDOMAIN
#Password               
PassNTLMv2      hash obtained previously

Don’t forget to configure tools to use cntlm (FoxyProxy, Burp, etc.):

  • Host: 127.0.0.1
  • Port: 3128
nano ~/.bashrc
export http_proxy="http://127.0.0.1:3128"
sudo nano /etc/apt/apt.conf
Acquire::http::proxy "http://127.0.0.1:3128"; 
#Acquire::ftp::proxy "ftp://proxy:port/"; 
#Acquire::https::proxy "https://proxy:port/";

Help

cntlm -h

Usage

# Start in foreground
cntlm -f

# Verbose (displays all requests)
cntlm -v

# Start in foreground, no proxy
cntlm -f -N "*"

Script to automate appropriate proxy

proxy.sh