####################################################################### Luigi Auriemma Application: Sybase M-Business Anywhere http://www.sybase.com/products/allproductsa-z/m-businessanywhere Versions: <= 7.0 ESD #5 Platforms: Windows, Solaris, Linux Bug: heap-overflow in agd.exe (agsync.dll) Exploitation: remote, versus server Date: probably found 06 Nov 2010 Author: Luigi Auriemma e-mail: aluigi@autistici.org web: aluigi.org ####################################################################### 1) Introduction 2) Bug 3) The Code 4) Fix ####################################################################### =============== 1) Introduction =============== ??? ####################################################################### ====== 2) Bug ====== The M-Business Sync Server (agd.exe) listens on ports 80 and 443 for handling the soap and sync requests. At address 601272d3 of agsync.dll happens an heap overflow caused by the copying of the username provided by the client in an allocated buffer having the fixed size of 256 bytes. Additionally the instructions that perform this copy (60127360) handle the bytes with a value above 0x7f as a double character occupying 2 destination bytes instead of one. ####################################################################### =========== 3) The Code =========== http://aluigi.org/poc/agd_1.zip agd_1 SERVER ####################################################################### ====== 4) Fix ====== http://www.zerodayinitiative.com/advisories/ZDI-11-156/ #######################################################################