Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Padding #34

Open
ibigpapa opened this issue Apr 4, 2014 · 13 comments
Open

Incorrect Padding #34

ibigpapa opened this issue Apr 4, 2014 · 13 comments

Comments

@ibigpapa
Copy link

ibigpapa commented Apr 4, 2014

import requests
from requests_ntlm import HttpNtlmAuth
 requests.get("http://moss.company.com",auth=HttpNtlmAuth('domain\\user_name','removed password'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/requests/api.py", line 55, in get
    return request('get', url, **kwargs)
  File "/usr/lib/python2.6/site-packages/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 491, in send
    r = dispatch_hook('response', hooks, r, **kwargs)
  File "/usr/lib/python2.6/site-packages/requests/hooks.py", line 41, in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
  File "/usr/lib/python2.6/site-packages/requests_ntlm/requests_ntlm.py", line 76, in response_hook
    'Authorization', r, kwargs)
  File "/usr/lib/python2.6/site-packages/requests_ntlm/requests_ntlm.py", line 56, in retry_using_http_NTLM_auth
    ServerChallenge, NegotiateFlags = ntlm.parse_NTLM_CHALLENGE_MESSAGE(auth_header_value[5:])
  File "/usr/lib/python2.6/site-packages/ntlm/ntlm.py", line 217, in parse_NTLM_CHALLENGE_MESSAGE
    msg2 = base64.decodestring(msg2)
  File "/usr/lib64/python2.6/base64.py", line 321, in decodestring
    return binascii.a2b_base64(s)
binascii.Error: Incorrect padding

I can run this requests get and get a proper response

requests.get("http://ntlm_protected_site.com",auth=HttpNtlmAuth('domain\\username','password'))
<Response [502]>

as soon as i change the site to the correct one and put in the correct username and password for my domain i get the incorrect padding error.

Here's the installed python info it's python 2.6

argparse (1.1)
Flask (0.10.1)
haufe.sharepoint (0.1.9)
iniparse (0.3.1)
itsdangerous (0.24)
Jinja2 (2.7.2)
kerberos (1.1.1)
MarkupSafe (0.19)
pip (1.5.4)
pycurl (7.19.0)
pygpgme (0.1)
python-ntlm (1.0.1)
requests (2.2.1)
requests-kerberos (0.4)
requests-ntlm (0.0.2.3)
setuptools (3.4.1)
suds (0.4)
urlgrabber (3.9.1)
Werkzeug (0.9.4)
yum-metadata-parser (1.1.2)

Running CentOs 6.5 Minimal

@Lukasa
Copy link
Member

Lukasa commented Apr 5, 2014

Can you show us what the Auth header is?

@ibigpapa
Copy link
Author

ibigpapa commented Apr 7, 2014

Hope this is what you are looking for. I used chrome to capture the headers. Not sure if i needed to pull directly from the box i'm getting the padding error or not on. That box is headless so if we need that let me know best way to capture.

Request:

Authorization:Negotiate YIIUwAYGKwYBBQUCoIIUtDCCFLCgMDAuBgkqhkiC9xIBAgIGCSqGSIb3EgECAgYKKwYBBAGCNwICHgYKKwYBBAGCNwICCqKCFHoEghR2YIIUcgYJKoZIhvcSAQICAQBughRhMIIUXaADAgEFoQMCAQ6iBwMFACAAAACjghLzYYIS7zCCEuugAwIBBaEPGw1BTUVSLkRFTEwuQ09NoiwwKqADAgECoSMwIRsESFRUUBsZaW50cmFuZXQyMDEwLmlucy5kZWxsLmNvbaOCEqMwghKfoAMCARehAwIBAqKCEpEEghKNvMtcPsqz01OpZnzStohceAsfCSLfyKT+lJ0L6+Wfr7FNZKC495SGyLF4QZPeE0/rfhCskbIwQ0imtr9XZnNH2MWHdC129fEGTGaHRM9UfO5Di6xY9GVplkiUecDGE1wOpRpHuEf+u5b0C23K57aL6iN9fopYcjWXtnZaXfAAOFth0saHRCRbM+0/vwzERRY5/kTavhmiFU/yW7sKrVgunLB8JySJW9zWNfsgtq4uYh3NFfClpHK/yRdyuLBiyB90Wx+32IFSaR41qpoaQblN/tNvbTRo8na0rvIwhe+3MhZg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iate oYGyMIGvoAMKAQChCwYJKoZIgvcSAQICooGaBIGXYIGUBgkqhkiG9xIBAgICAG+BhDCBgaADAgEFoQMCAQ+idTBzoAMCAReibARqnIjb09db20DFhrBbWtyaVv5+4yruJCmNih8TYwUydJSU3jSGSCKYbGx8wLvNaag4XlGUw4DxZo2Nvyl24vj6YayMVlbUW1iSKXg4erhCDOJ71CnaR7u5fwMCI44GXu81ChWblMCpwPWfVA==

@Lukasa
Copy link
Member

Lukasa commented Apr 7, 2014

Ah, sorry, I wanted the NTLM challenge.

What I'm getting at is that I suspect there was some invalid base64 character sitting around, and I want to try to find it.

@ibigpapa
Copy link
Author

ibigpapa commented Apr 7, 2014

Do i need to do a packet capture to gather that? I don't see a challenge listed in the headers from chrome developer tools by tracking network.

@ibigpapa ibigpapa closed this as completed Apr 7, 2014
@ibigpapa ibigpapa reopened this Apr 7, 2014
@ibigpapa
Copy link
Author

ibigpapa commented Apr 7, 2014

Accidentally closed

@Lukasa
Copy link
Member

Lukasa commented Apr 7, 2014

A packet capture would probably help, yes.

@ibigpapa
Copy link
Author

ibigpapa commented Apr 7, 2014

Ok here's the packet capture it does look like it stops on the challenge from the server when it errors as that ended the communication with the server.
Frame # 3510 is initial outgoing get
Frame # 3523 is response saying use ntlm
Frame # 3532 is negotiate Out
Frame # 3533 is challeng in

Sorry if the redaction causes problems If full info needed I can work with you via a private form.

No.     Time        Source                Destination           Protocol Length Info
   3510 15.973547   10.14.177.31          1.1.1.1       HTTP     288    GET  http://redacted.redacted.com/sites/RedactedServerLab/default.aspx HTTP/1.1 

Frame 3510: 288 bytes on wire (2304 bits), 288 bytes captured (2304 bits)
Ethernet II, Src: Vmware_90:53:be (00:50:56:90:53:be), Dst: IntelCor_37:1a:6f (00:15:17:37:1a:6f)
Internet Protocol Version 4, Src: 10.14.177.31 (10.14.177.31), Dst: 1.1.1.1 (1.1.1.1)
Transmission Control Protocol, Src Port: 45733 (45733), Dst Port: http (80), Seq: 1, Ack: 1, Len: 222
    Source port: 45733 (45733)
    Destination port: http (80)
    [Stream index: 7]
    Sequence number: 1    (relative sequence number)
    [Next sequence number: 223    (relative sequence number)]
    Acknowledgment number: 1    (relative ack number)
    Header length: 32 bytes
    Flags: 0x018 (PSH, ACK)
    Window size value: 115
    [Calculated window size: 14720]
    [Window size scaling factor: 128]
    Checksum: 0x2540 [validation disabled]
    Options: (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
    [SEQ/ACK analysis]
Hypertext Transfer Protocol
    GET  http://redacted.redacted.com/sites/RedactedServerLab/default.aspx HTTP/1.1\r\n
        [Expert Info (Chat/Sequence): GET  http://redacted.redacted.com/sites/RedactedServerLab/default.aspx HTTP/1.1\r\n]
        Request Method: GET
        Request URI:  http://redacted.redacted.com/sites/RedactedServerLab/default.aspx
        Request Version: HTTP/1.1
    Host: redacted.redacted.com\r\n
    Accept-Encoding: gzip, deflate, compress\r\n
    Accept: */*\r\n
    User-Agent: python-requests/2.2.1 CPython/2.6.6 Linux/2.6.32-431.el6.x86_64\r\n
    \r\n
    [Full request URI: http://redacted.redacted.com http://redacted.redacted.com/sites/RedactedServerLab/default.aspx]
    [HTTP request 1/1]
    [Response in frame: 3523]

No.     Time        Source                Destination           Protocol Length Info
   3523 15.994903   1.1.1.1       10.14.177.31          HTTP     511    HTTP/1.1 401 Unauthorized 

Frame 3523: 511 bytes on wire (4088 bits), 511 bytes captured (4088 bits)
Ethernet II, Src: IntelCor_37:1a:6f (00:15:17:37:1a:6f), Dst: Vmware_90:53:be (00:50:56:90:53:be)
Internet Protocol Version 4, Src: 1.1.1.1 (1.1.1.1), Dst: 10.14.177.31 (10.14.177.31)
Transmission Control Protocol, Src Port: http (80), Dst Port: 45733 (45733), Seq: 1, Ack: 223, Len: 445
    Source port: http (80)
    Destination port: 45733 (45733)
    [Stream index: 7]
    Sequence number: 1    (relative sequence number)
    [Next sequence number: 446    (relative sequence number)]
    Acknowledgment number: 223    (relative ack number)
    Header length: 32 bytes
    Flags: 0x018 (PSH, ACK)
    Window size value: 4602
    [Calculated window size: 4602]
    [Window size scaling factor: 1]
    Checksum: 0x0dc4 [validation disabled]
    Options: (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
    [SEQ/ACK analysis]
Hypertext Transfer Protocol
    HTTP/1.1 401 Unauthorized\r\n
        [Expert Info (Chat/Sequence): HTTP/1.1 401 Unauthorized\r\n]
        Request Version: HTTP/1.1
        Status Code: 401
        Response Phrase: Unauthorized
    Via: 1.1 RedactedHost\r\n
    Connection: Keep-Alive\r\n
    Proxy-Support: Session-Based-Authentication\r\n
    Connection: Proxy-Support\r\n
    Content-Length: 0\r\n
    Date: Mon, 07 Apr 2014 16:20:19 GMT\r\n
    Server: Microsoft-IIS/7.5\r\n
    SPRequestGuid: ab8198d1-b250-4a42-9862-27b4543f0ca1\r\n
    WWW-Authenticate: Negotiate\r\n
    WWW-Authenticate: NTLM\r\n
    X-Powered-By: ASP.NET\r\n
    MicrosoftSharePointTeamServices: 14.0.0.7102\r\n
    X-MS-InvokeApp: 1; RequireReadOnly\r\n
    \r\n
    [HTTP response 1/1]
    [Time since request: 0.021356000 seconds]
    [Request in frame: 3510]

No.     Time        Source                Destination           Protocol Length Info
   3532 16.012010   10.14.177.31          1.1.1.1       HTTP     442    GET  http://redacted.redacted.com/sites/RedactedServerLab/default.aspx HTTP/1.1 , NTLMSSP_NEGOTIATE

Frame 3532: 442 bytes on wire (3536 bits), 442 bytes captured (3536 bits)
Ethernet II, Src: Vmware_90:53:be (00:50:56:90:53:be), Dst: IntelCor_37:1a:6f (00:15:17:37:1a:6f)
Internet Protocol Version 4, Src: 10.14.177.31 (10.14.177.31), Dst: 1.1.1.1 (1.1.1.1)
Transmission Control Protocol, Src Port: 45734 (45734), Dst Port: http (80), Seq: 1, Ack: 1, Len: 376
    Source port: 45734 (45734)
    Destination port: http (80)
    [Stream index: 8]
    Sequence number: 1    (relative sequence number)
    [Next sequence number: 377    (relative sequence number)]
    Acknowledgment number: 1    (relative ack number)
    Header length: 32 bytes
    Flags: 0x018 (PSH, ACK)
    Window size value: 115
    [Calculated window size: 14720]
    [Window size scaling factor: 128]
    Checksum: 0x25da [validation disabled]
    Options: (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
    [SEQ/ACK analysis]
Hypertext Transfer Protocol
    GET  http://redacted.redacted.com/sites/RedactedServerLab/default.aspx HTTP/1.1\r\n
        [Expert Info (Chat/Sequence): GET  http://redacted.redacted.com/sites/RedactedServerLab/default.aspx HTTP/1.1\r\n]
        Request Method: GET
        Request URI:  http://redacted.redacted.com/sites/RedactedServerLab/default.aspx
        Request Version: HTTP/1.1
    Host: redacted.redacted.com\r\n
    Connection: Keep-Alive\r\n
    Accept: */*\r\n
    Accept-Encoding: gzip, deflate, compress\r\n
    Authorization: NTLM TlRMTVNTUAABAAAAB7IIoggACABIAAAAIAAgACgAAAAFASgKAAAAD1RST1kuSEFSUklTT04uREhDUC5TQ0FOLk9LQy5FRVJDQU1FUklDQVM=\r\n
        NTLM Secure Service Provider
            NTLMSSP identifier: NTLMSSP
            NTLM Message Type: NTLMSSP_NEGOTIATE (0x00000001)
            Flags: 0xa208b207
                1... .... .... .... .... .... .... .... = Negotiate 56: Set
                .0.. .... .... .... .... .... .... .... = Negotiate Key Exchange: Not set
                ..1. .... .... .... .... .... .... .... = Negotiate 128: Set
                ...0 .... .... .... .... .... .... .... = Negotiate 0x10000000: Not set
                .... 0... .... .... .... .... .... .... = Negotiate 0x08000000: Not set
                .... .0.. .... .... .... .... .... .... = Negotiate 0x04000000: Not set
                .... ..1. .... .... .... .... .... .... = Negotiate Version: Set
                .... ...0 .... .... .... .... .... .... = Negotiate 0x01000000: Not set
                .... .... 0... .... .... .... .... .... = Negotiate Target Info: Not set
                .... .... .0.. .... .... .... .... .... = Request Non-NT Session: Not set
                .... .... ..0. .... .... .... .... .... = Negotiate 0x00200000: Not set
                .... .... ...0 .... .... .... .... .... = Negotiate Identify: Not set
                .... .... .... 1... .... .... .... .... = Negotiate Extended Security: Set
                .... .... .... .0.. .... .... .... .... = Target Type Share: Not set
                .... .... .... ..0. .... .... .... .... = Target Type Server: Not set
                .... .... .... ...0 .... .... .... .... = Target Type Domain: Not set
                .... .... .... .... 1... .... .... .... = Negotiate Always Sign: Set
                .... .... .... .... .0.. .... .... .... = Negotiate 0x00004000: Not set
                .... .... .... .... ..1. .... .... .... = Negotiate OEM Workstation Supplied: Set
                .... .... .... .... ...1 .... .... .... = Negotiate OEM Domain Supplied: Set
                .... .... .... .... .... 0... .... .... = Negotiate 0x00000800: Not set
                .... .... .... .... .... .0.. .... .... = Negotiate NT Only: Not set
                .... .... .... .... .... ..1. .... .... = Negotiate NTLM key: Set
                .... .... .... .... .... ...0 .... .... = Negotiate 0x00000100: Not set
                .... .... .... .... .... .... 0... .... = Negotiate Lan Manager Key: Not set
                .... .... .... .... .... .... .0.. .... = Negotiate Datagram: Not set
                .... .... .... .... .... .... ..0. .... = Negotiate Seal: Not set
                .... .... .... .... .... .... ...0 .... = Negotiate Sign: Not set
                .... .... .... .... .... .... .... 0... = Request 0x00000008: Not set
                .... .... .... .... .... .... .... .1.. = Request Target: Set
                .... .... .... .... .... .... .... ..1. = Negotiate OEM: Set
                .... .... .... .... .... .... .... ...1 = Negotiate UNICODE: Set
            Calling workstation domain: REDACTED
                Length: 8
                Maxlen: 8
                Offset: 72
            Calling workstation name: REDACTEDHOSTNAME
                Length: 32
                Maxlen: 32
                Offset: 40
            Version 5.1 (Build 2600); NTLM Current Revision 15
    User-Agent: python-requests/2.2.1 CPython/2.6.6 Linux/2.6.32-431.el6.x86_64\r\n
    \r\n
    [Full request URI: http://redacted.redacted.com http://redacted.redacted.com/sites/RedactedServerLab/default.aspx]
    [HTTP request 1/1]
    [Response in frame: 3533]

No.     Time        Source                Destination           Protocol Length Info
   3533 16.034461   1.1.1.1       10.14.177.31          HTTP     856    HTTP/1.1 401 Unauthorized , NTLMSSP_CHALLENGE

Frame 3533: 856 bytes on wire (6848 bits), 856 bytes captured (6848 bits)
Ethernet II, Src: IntelCor_37:1a:6f (00:15:17:37:1a:6f), Dst: Vmware_90:53:be (00:50:56:90:53:be)
Internet Protocol Version 4, Src: 1.1.1.1 (1.1.1.1), Dst: 10.14.177.31 (10.14.177.31)
Transmission Control Protocol, Src Port: http (80), Dst Port: 45734 (45734), Seq: 1, Ack: 377, Len: 790
    Source port: http (80)
    Destination port: 45734 (45734)
    [Stream index: 8]
    Sequence number: 1    (relative sequence number)
    [Next sequence number: 791    (relative sequence number)]
    Acknowledgment number: 377    (relative ack number)
    Header length: 32 bytes
    Flags: 0x018 (PSH, ACK)
    Window size value: 4756
    [Calculated window size: 4756]
    [Window size scaling factor: 1]
    Checksum: 0x1fc3 [validation disabled]
    Options: (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
    [SEQ/ACK analysis]
Hypertext Transfer Protocol
    HTTP/1.1 401 Unauthorized\r\n
        [Expert Info (Chat/Sequence): HTTP/1.1 401 Unauthorized\r\n]
        Request Version: HTTP/1.1
        Status Code: 401
        Response Phrase: Unauthorized
    Via: 1.1 REDACTEDSERVER\r\n
    Connection: Keep-Alive\r\n
    Proxy-Support: Session-Based-Authentication\r\n
    Connection: Proxy-Support\r\n
    Content-Length: 0\r\n
    Date: Mon, 07 Apr 2014 16:20:17 GMT\r\n
    Server: Microsoft-IIS/7.5\r\n
    SPRequestGuid: b9075de8-2410-489d-910d-02eda4908337\r\n
    [truncated] WWW-Authenticate: NTLM TlRMTVNTUAACAAAAEAAQADgAAAAFgomio4DbB+7lxdQAAAAAAAAAALoAugBIAAAABgGxHQAAAA9BAE0ARQBSAEkAQwBBAFMAAgAQAEEATQBFAFIASQBDAEEAUwABABwAQQBVAFMAUABXAEMAUwBGAFAAQwAxADcAMQA1AAQAGgBhAG0AZQByAC4AZABlAGwAbAAuAGMAbwBt
        NTLM Secure Service Provider
            NTLMSSP identifier: NTLMSSP
            NTLM Message Type: NTLMSSP_CHALLENGE (0x00000002)
            Target Name: AMERICAS
                Length: 16
                Maxlen: 16
                Offset: 56
            Flags: 0xa2898205
                1... .... .... .... .... .... .... .... = Negotiate 56: Set
                .0.. .... .... .... .... .... .... .... = Negotiate Key Exchange: Not set
                ..1. .... .... .... .... .... .... .... = Negotiate 128: Set
                ...0 .... .... .... .... .... .... .... = Negotiate 0x10000000: Not set
                .... 0... .... .... .... .... .... .... = Negotiate 0x08000000: Not set
                .... .0.. .... .... .... .... .... .... = Negotiate 0x04000000: Not set
                .... ..1. .... .... .... .... .... .... = Negotiate Version: Set
                .... ...0 .... .... .... .... .... .... = Negotiate 0x01000000: Not set
                .... .... 1... .... .... .... .... .... = Negotiate Target Info: Set
                .... .... .0.. .... .... .... .... .... = Request Non-NT Session: Not set
                .... .... ..0. .... .... .... .... .... = Negotiate 0x00200000: Not set
                .... .... ...0 .... .... .... .... .... = Negotiate Identify: Not set
                .... .... .... 1... .... .... .... .... = Negotiate Extended Security: Set
                .... .... .... .0.. .... .... .... .... = Target Type Share: Not set
                .... .... .... ..0. .... .... .... .... = Target Type Server: Not set
                .... .... .... ...1 .... .... .... .... = Target Type Domain: Set
                .... .... .... .... 1... .... .... .... = Negotiate Always Sign: Set
                .... .... .... .... .0.. .... .... .... = Negotiate 0x00004000: Not set
                .... .... .... .... ..0. .... .... .... = Negotiate OEM Workstation Supplied: Not set
                .... .... .... .... ...0 .... .... .... = Negotiate OEM Domain Supplied: Not set
                .... .... .... .... .... 0... .... .... = Negotiate 0x00000800: Not set
                .... .... .... .... .... .0.. .... .... = Negotiate NT Only: Not set
                .... .... .... .... .... ..1. .... .... = Negotiate NTLM key: Set
                .... .... .... .... .... ...0 .... .... = Negotiate 0x00000100: Not set
                .... .... .... .... .... .... 0... .... = Negotiate Lan Manager Key: Not set
                .... .... .... .... .... .... .0.. .... = Negotiate Datagram: Not set
                .... .... .... .... .... .... ..0. .... = Negotiate Seal: Not set
                .... .... .... .... .... .... ...0 .... = Negotiate Sign: Not set
                .... .... .... .... .... .... .... 0... = Request 0x00000008: Not set
                .... .... .... .... .... .... .... .1.. = Request Target: Set
                .... .... .... .... .... .... .... ..0. = Negotiate OEM: Not set
                .... .... .... .... .... .... .... ...1 = Negotiate UNICODE: Set
            NTLM Server Challenge: a380db07eee5c5d4
            Reserved: 0000000000000000
            Target Info
            Version 6.1 (Build 7601); NTLM Current Revision 15
    WWW-Authenticate: Negotiate\r\n
    X-Powered-By: ASP.NET\r\n
    MicrosoftSharePointTeamServices: 14.0.0.7102\r\n
    X-MS-InvokeApp: 1; RequireReadOnly\r\n
    \r\n
    [HTTP response 1/1]
    [Time since request: 0.022451000 seconds]
    [Request in frame: 3532]


@Lukasa
Copy link
Member

Lukasa commented Apr 7, 2014

Hmm, I don't see anything obviously wrong with that. I'm a little concerned that the Negotiate challenge is still present, but I don't think that could be causing this bug.

@ibigpapa
Copy link
Author

ibigpapa commented Apr 7, 2014

Hrmm are there built-in debug commands or do I need to go in and add them to further trace ?

@Lukasa
Copy link
Member

Lukasa commented Apr 7, 2014

The place we really want diags from is python-ntlm. I genuinely have no idea what diags they have.

@ibigpapa
Copy link
Author

ibigpapa commented Apr 7, 2014

Looks like there might be a fixhttps://code.google.com/p/python-ntlm/issues/detail?id=17&q=padding. Have to get the non Repo version

@Lukasa
Copy link
Member

Lukasa commented Apr 7, 2014

Try updating locally in your system and see what you can find. =)

@ibigpapa
Copy link
Author

ibigpapa commented Apr 8, 2014

I attempted to do so and no change. I'm posting on that issue for Python-Ntlm to make sure i did it right and verify or continue to work with them. I'll revert in the event they say all is good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants