PenTest Information: ==================== ~Remove discover a remote Stack-Overflow Vulnerability for Fish Encrpytion on Internet Relay Chat(IRC). A remote attacker is able to crash XChat with a remote Stack-Overflow and get privilegs on the victim(client) system. Details ======= Tested on OS: Windows Vista, Windows XP, Gentoo & OpenBSD Tested with Software: Debugger(ODBG;GDB) & different IRC Clients (Xchat, Xchat2 , Irssi & Mirc) Vulnerable Products: Fish Encryption Suite Affected Versions: v1.29.x & v0.98.x Vulnerability Type: Stack-Overflow Security-Risk: Critical Vendor-URL: http://fish.secure.la/ Source-URL: http://fish.secure.l...98-binaries.zip (Windows/MacOSX/Linux/BSD) Vendor-Status: Informed Patch/Fix-Status: Fixed version not released Advisory-Status: Published | 08.09.2009 Advisory-URL: http://www.global-ev...isory-FISHX.txt Report-URL: http://www.global-ev...nfo/news/?p=636 Introduction ============ FiSH ist die gängigste Umsetzung für Verschlüsselung auf der Anwenderseite. Es ermöglicht sowohl in Privatfenstern (Queries) mit zwei Benutzern, als auch in Channels mit einer unbegrenzten Benutzeranzahl die Anwendung von Verschlüsselung. Anders als die asymmetrische Kryptoverfahren, die andere Umsetzungen (beispielsweise OTR) für diesen Zweck verwenden, steht hinter dem FiSH-Konzept eine symmetrische Lösung. Der Grund ist einfach wie plausibel: asymmetrische Verschlüsselung ist spezifisch für einen Empfänger bestimmt. Es ist also nicht möglich einen Text zu verschlüsseln, der von mehreren Teilnehmern gleichzeitig gelesen werden kann. Gerade dies ist aber in Channels mit mehreren, womöglich Hunderten, Benutzern aber unumgänglich. Vor jeder Benutzung von FiSH steht in Channels also die (einmalige) Einigung auf ein gemeinsames, geheimes Passwort um die Kommunikation dort zu verschlüsseln. Dies muss im Vorfeld über einen sicheren Kanal stattfinden, damit die Verbindung nicht von vornherein kontaminiert ist. Symmetrische Verschlüsselung kann nämlich jederzeit nachträglich entschlüsselt werden, sobald das Kennwort dafür bekannt ist. In Privatfenstern mit zwei Teilnehmern, den Queries, entfällt dieser lästige Zwang, da sich FiSH hier automatisch mit dem anderen Teilnehmer auf einen Schlüssel einigen kann, der über den DH-Schlüsselaustausch sicher erfolgen kann. Plugins im verwendeten IRC-Klienten sorgen von da an dafür, dass die Kommunikation transparent verschlüsselt erfolgen kann. Gegenwärtig wird mIRC, irssi und xchat (einschließlich xchat Aqua und xchat für Windows) unterstützt. Das mIRC Plugin für Windows bringt ein grafisches Menü mit, die irssi und xchat Variante ein gutes, züchtiges Kommandozeileninterface, das über IRC-Kommandos (”/befehl”) gesteuert werden kann. (From the Vendor's Homepage http://burnachurch.c...esselt-ins-irc/ ) More Details ============ Due to the lack of a over-sized sended presshare, an attacker is able to crash the XChat. For demonstration ... Problemereignisname: APPCRASH Anwendungsname: xchat.exe Anwendungsversion: 2.8.7.5 Anwendungszeitstempel: 4972edbc Fehlermodulname: StackHash_0c33 Fehlermodulversion: 0.0.0.0 Fehlermodulzeitstempel: 00000000 Ausnahmecode: c0000005 Ausnahmeoffset: 39393939 Betriebsystemversion: 6.0.6002.2.2.0.768.3 Gebietsschema-ID: 1031 Zusatzinformation 1: 0c33 Zusatzinformation 2: 199cc907df8a4654c8ebf31545ec3b64 Zusatzinformation 3: b80a Zusatzinformation 4: ac932fb721b478be6e53cf5b63cba0e7 Proof of Concept ================ Insert a key with command /setkey AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+ "..." Key got saved and App crashs directly ... Now restart Client and use the /keyx command for the Diffie-Hellman-Keyexchange to the person in query. When the target make a exchange with the victim, the client crashs because of a over-sized key. The result is a Stack-Overflow. - /keyx [] Perform DH1080 KeyXchange with target. If no target specified, the KeyXchange takes place with the current query window. |23:27:35| * rm (~rm@EclipticX-71284D9.dip.t-dialin.net) Quit (Input/output error) Screenshot: http://img5.imageban...dschirmfoto.png http://img6.imagesha...15/overflow.png http://i32.tinypic.com/zmh2mq.jpg http://img5.imageban...whk9ba/asd2.JPG http://img5.imageban...rt8hgic/asd.JPG Fix or Patch ======== Restrict the max. keysize & stringsize what can be inserted by users. Set a own exception-handling when somebody insert higher strings & locate the stack with a mem restriction. Security Risk ============= As an attacker is able to crash the XChat & Mirc & Irssi Clients over a remote way with a Stack-Overflow. A remote attacker is able to crash XChat, Mirc & Irssi with a remote Stack-Overflow and get higher privilegs on the victim system. The risk is estimated as very critical. The Vulnerability can be exploited by potencial attackers. Author ======= The Authors & Writers are a Part of the Global-Evolution Security Group. __________ \______ \ ____ _____ _______ __ ____ | _// __ \ / \ / _ \ \/ // __ \ | | \ ___/| Y Y ( <_> ) /\ ___/ ~remove |____|_ /\___ >__|_| /\____/ \_/ \___ > \/ \/ \/ \/ NFO: This Bug is deticated to GovernmentSecurity & MdP from Compass-Security