striptls: proxy poc implementation of STARTTLS stripping attacks
striptls – auditing proxy
proxy poc implementation of STARTTLS stripping attacks.
A generic tcp proxy implementation and audit tool to perform protocol independent ssl/tls
interception and STARTTLS
stripping attacks on SMTP
, POP3
, IMAP
, FTP
, NNTP
, XMPP
, ACAP
and IRC
.
🏆 Trophies
- CVE-2016-0772 – python: smtplib
- CVE-2016-10027 – Smack XMPP library
Vectors
- GENERIC
- Intercept – protocol independent ssl/tls interception. peeks for TLS Handshake, converts socket to tls (tls-to-tls proxy)
- InboundIntercept – protocol independent ssl/tls interception for the inbound channel only (tls-to-plain proxy)
- SMTP
- SMTP.StripFromCapabilities – server response capability patch
- SMTP.StripWithInvalidResponseCode – client STARTTLS stripping, invalid response code
- SMTP.UntrustedIntercept – STARTTLS interception (client and server talking ssl) (requires server.pem in pwd)
- SMTP.StripWithTemporaryError
- SMTP.StripWithError
- SMTP.ProtocolDowngradeStripExtendedMode
- SMTP.InjectCommand
- SMTP.InboundStarttlsProxy – (starttls-to-plain proxy)
- POP3
- POP3.StripFromCapabilities
- POP3.StripWithError
- POP3.UntrustedIntercept
- IMAP
- IMAP.StripFromCapabilities
- IMAP.StripWithError
- IMAP.UntrustedIntercept
- IMAP.ProtocolDowngradeToV2
- FTP
- FTP.StripFromCapabilities
- FTP.StripWithError
- FTP.UntrustedIntercept
- NNTP
- NNTP.StripFromCapabilities
- NNTP.StripWithError
- NNTP.UntrustedIntercept
- XMPP
- XMPP.StripFromCapabilities
- XMPP.StripInboundTLS
- XMPP.UntrustedIntercept
- ACAP (untested)
- ACAP.StripFromCapabilities
- ACAP.StripWithError
- ACAP.UntrustedIntercept
- IRC
- IRC.StripFromCapabilities
- IRC.StripWithError
- IRC.UntrustedIntercept
- IRC.StripWithNotRegistered
- IRC.StripCAPWithNotregistered
- IRC.StripWithSilentDrop
Download
git clone https://github.com/tintinweb/striptls.git
cd striptls
setup.py install
Usage
Example
local smtp-client
-> localhost:8825
(proxy) -> mail.gmx.net:25
Generic SSL/TLS Interception
--generic-ssl-intercept
is a global switch to enable generic ssl/tls handshake detection and session conversion. Can be combined with any mangle/vector.
GENERIC.Intercept
is a mangle/vector implementation of the ssl/tls handshake detect and convert feature.
# python striptls.py -l 0.0.0.0:9999 -r mail.gmx.com:465 -x GENERIC.Intercept
Audit Mode
iterates all protocol specific cases on a per client basis and keeps track of clients violating the starttls protocol. Ctrl+C to abort audit and print results.
#> python striptls –listen localhost:8825 –remote=mail.gmx.net:25
Source: https://github.com/tintinweb/