📄 readme
字号:
SSLsniffer.----------------------------------------------Written by: Eu-Jin Goh (eujin@cs.stanford.edu) Stanford University April 2001 ----------------- GNU Public License -----------Copyright (C) 2001 Eu-Jin GohThis program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or (atyour option) any later version.This program is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUGeneral Public License for more details. You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.INSTALLATION:-------------First type 'tar zxvf sslsniffer-1_2.tar.gz' to extract the files.Just use the Makefile. You might have to change the paths of theheaders and libraries for openSSL.USAGE:-----sslsniffer [-p <local port>] [-np <remote port> <remote hostname/ip>]-p <local port>specifies which port the sslsniffer will listen to on the localmachine.-np <remote port> <remote hostname/ip>no means no proxy which means that the CONNECT message is notsent. Instead the remote host name (it also accepts numerical ipaddresses) and the remote port number is specified.If not options are given, the sslsniffer listens on the default port8888 and assumes that a CONNECT message will be sent as the firstpacket.----------------------------------------------------------------PROGRAM NOTES:Version 1.21------------Bug fixes. The version number of a connection would not be updated if the firstpacket is not a V2 packet. This doesn't break anything except thatcertificates will not be parsed in that connection.Forgot to place a break statement in a switch while parsing certainhandshake packet types. Symptoms were that the sniffer would try toparse more than it should and print out garbage values. Fortunately,the packet that triggers this was not a common one.Version 1.2-----------Main changes in this version is that support for parsing SSLV2 packetshas been implemented. It took a lot less time than I thought it wouldbecause the rewritten code base makes it easy to add this in and alsobecause sslv2 is a much simpler protocol to parse than TLS.It seems that SSLV2 doesn't offer support for certificate chains.I removed a couple of structs from the sslsniffer.h because I forgotthat C doesn't guarantee how structs are laid out in memory and henceI shouldn't be relying on structs to typecast network data for pointeraccess.Version 1.1-----------I totally rewrote the entire sslsniffer so that it handles fragmentedpackets in a cleaner fashion. The entire structure is changed and I'mmuch happier with the current incarnation now. It's also a lot moreflexible and I plan to add support for SSLV2 very soon. I've alreadywritten that part but it's under the old style and I want to rewriteit as well.It now handles those multiple handshake packets in one record caseperfectly (I think!) and also those fragmented packets. The style ofthe code has been changed to make it a lot more readable.Also, the no connect case where you want to connect directly to theserver without sending a CONNECT request has been made as a flagrather than spinning it off to another program.Version 1.02.------------I was printing out the reverse of session ID for a V3 hello and alsofor the RSA encrypted premaster secret. the function extractParamssuffered from this problem too. there was a one by off error in thesesame functionsVersion 1.01 / 1.00 ------------------- This program uses the OpenSSL libraries and Dan Boneh's code for theprocessing of the certificates. Other than that, everything else wascoded from scratch.The proxy handles SSLV3/TLS servers only. It deals with the firstclientHello packet being in SSLV2 format but other than that, no otherSSLV2 packets are handled. You can typically recognise when the siteis using SSLV2 when the first byte of the error messages that theproxy prints out are -128 or -126. try it on wellsfargo to see. Thiswas developed in RedHat linux 6.1 using glibc 2.1.3-8 and openssl0.94. Works best in linux using x86 architecture. On some machines,the print outs in hex will appear to have either leading or trailingzeros.Please send all bug reports to me. It would be great if you couldattach the output when the bug ocurred too. I typically use 'sslproxy>! out' and read the out file later because there is usually too muchoutput to read at one go.NOTE: I have not ported this to big endian architectures yet, i think it'snot too hard since all that is needed is to change the functionthreeBytesToInt so that it converts the handshake length field to froma three byte number in network byte order to the host byte order.If the server returns a cipher suite that is unknown, currently myproxy doesn't handle it too well. it still works but doesn't parse themessages properly.Occasionally (very rarely), the multiple application data fragmentsaren't handled properly and invalid type errors keeping appearing butthe proxy should still work properly after that connection.Netscape enterprise servers were rather flakey on the proxy and iadded some code so that it works properly. I tested on strongholdservers and this proxy works best with those. This is due to the factthat enterprise servers place multiple handshake messages within asingle TLS record while stronghold sends out handshake messages withtheir own TLS record.The application data and certificate messages might be split up overseveral packets and the code that i have currently handles this finebut is rather ugly. Given more time, i would rewrite it so that it'scleaner.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -