Search for hundreds of thousands of exploits

"IcoFX 2.5.0.0 - '.ico' Buffer Overflow (PoC)"

Author

Exploit author

"Core Security"

Platform

Exploit platform

windows

Release date

Exploit published date

2013-12-11

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
Core Security - Corelabs Advisory
http://corelabs.coresecurity.com/

IcoFX Buffer Overflow Vulnerability

PoC: https://github.com/offensive-security/exploitdb-bin-sploits/raw/master/bin-sploits/30208.zip

1. *Advisory Information*

Title: IcoFX Buffer Overflow Vulnerability
Advisory ID: CORE-2013-1107
Advisory URL:
http://www.coresecurity.com/advisories/icofx-buffer-overflow-vulnerability
Date published: 2013-12-10
Date of last update: 2013-12-10
Vendors contacted: IcoFX Software
Release mode: User release


2. *Vulnerability Information*

Class: Buffer overflow [CWE-119]
Impact: Code execution
Remotely Exploitable: No
Locally Exploitable: Yes
CVE Name: CVE-2013-4988


3. *Vulnerability Description*

IcoFX [1] is prone to a (client side) security vulnerability when
processing .ICO files. This vulnerability could be exploited by a remote
attacker to execute arbitrary code on the target machine, by enticing
the user of IcoFX to open a specially crafted icon file.


4. *Vulnerable Packages*

   . IcoFX v2.5.0.0 for Windows.
   . Other versions are probably affected too, but they were not checked.


5. *Vendor Information, Solutions and Workarounds*

There was no official answer from vendor after several attempts to
report this vulnerability (see [Sec. 8]). As mitigation action, given
that this is a client-side vulnerability, avoid to open untrusted ICO
files. Contact vendor for further information.


6. *Credits*

This vulnerability was discovered and researched by Marcos Accossatto
from Core Exploit Writers Team. The publication of this advisory was
coordinated by Fernando Miranda from Core Advisories Team.


7. *Technical Description / Proof of Concept Code*

Below is shown the result of opening the maliciously crafted file
'CORE-2013-1107-icofx-poc.ico'[2] on Windows XP SP3 (EN).

The vulnerable function is located in 0x80D9F8. By loading the PoC, the
loop [0x80DA74, 0x80DA93] fills the buffer and overwrite the Exception
Handler:

/-----
0080DA74    8B45 E8           MOV EAX,DWORD PTR SS:[EBP-18]
0080DA77    03C0              ADD EAX,EAX
0080DA79    8D94C5 8CF9FFFF   LEA EDX,DWORD PTR SS:[EBP+EAX*8-674]
0080DA80    B9 10000000       MOV ECX,10                               ;
Will copy 16 bytes from file to buffer
0080DA85    8B45 F8           MOV EAX,DWORD PTR SS:[EBP-8]
0080DA88    8B18              MOV EBX,DWORD PTR DS:[EAX]
0080DA8A    FF53 0C           CALL DWORD PTR DS:[EBX+C]
0080DA8D    FF45 E8           INC DWORD PTR SS:[EBP-18]                ;
Index, will be overwritten with our value in the penultimate loop turn
0080DA90    FF4D DC           DEC DWORD PTR SS:[EBP-24]                ;
Counter, will be overwritten with our value in the penultimate loop turn
0080DA93    75 DF             JNZ SHORT 0080DA74
0080DA95    0FBF45 F0         MOVSX EAX,WORD PTR SS:[EBP-10]
-----/

At the 'MOVSX' of 0x80DA95, the CPU registers are as follows:


/-----
EAX 00000010
ECX 7C80189C kernel32.7C80189C
EDX 00000010
EBX 004617F4 IcoFX2.004617F4
ESP 0012F380
EBP 0012FA08
ESI 005B2CBC IcoFX2.005B2CBC
EDI 02555C80
EIP 0080DA95 IcoFX2.0080DA95
C 1  ES 0023 32bit 0(FFFFFFFF)
P 1  CS 001B 32bit 0(FFFFFFFF)
A 0  SS 0023 32bit 0(FFFFFFFF)
Z 1  DS 0023 32bit 0(FFFFFFFF)
S 0  FS 003B 32bit 7FFDF000(FFF)
T 0  GS 0000 NULL
D 0
O 0  LastErr ERROR_SUCCESS (00000000)
EFL 00200247 (NO,B,E,BE,NS,PE,GE,LE)
ST0 empty -??? FFFF 00F300F3 00F300F3
ST1 empty -??? FFFF 00FE00FE 00FE00FE
ST2 empty -??? FFFF 00000009 00220065
ST3 empty -??? FFFF 0000000A 00240069
ST4 empty 1.2948274137727088000e+16
ST5 empty 2.5896178900861029000e+16
ST6 empty 3.2651492439228483000e+16
ST7 empty 3.1244147623526446000e+16
               3 2 1 0      E S P U O Z D I
FST 0000  Cond 0 0 0 0  Err 0 0 0 0 0 0 0 0  (GT)
FCW 1272  Prec NEAR,53  Mask    1 1 0 0 1 0
-----/

And the stack Exception Handler is overwritten (shellcode starts in
0x12F3A4):


/-----
0012F380   0012FA10  Pointer to next SEH record
0012F384   42424242  SE handler
0012F388   41414141
0012F38C   41414141
0012F390   41414141
0012F394   000502A8
0012F398   7E4188A6  USER32.GetWindowLongW
0012F39C   00000000
0012F3A0   0012F3D8  ASCII "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"...
0012F3A4   41414141
-----/

As a result, the normal execution flow can be altered in order to
execute arbitrary code.


8. *Report Timeline*

. 2013-11-11:
Core Security Technologies attempts to contact the IcoFX team; no reply
received. Publication date is set for Dec 3rd, 2013.

. 2013-11-14:
Core attempts to contact vendor.

. 2013-11-26:
Core attempts to contact vendor.

. 2013-12-03:
Core attempts to contact vendor.

. 2013-12-03:
First release date missed.

. 2013-12-10:
Advisory CORE-2013-1107 published.


9. *References*

[1]  http://icofx.ro/.
[2]
http://www.coresecurity.com/system/files/attachments/2013/12/CORE-2013-1107-icofx-poc.zip


10. *About CoreLabs*

CoreLabs, the research center of Core Security Technologies, is charged
with anticipating the future needs and requirements for information
security technologies. We conduct our research in several important
areas of computer security including system vulnerabilities, cyber
attack planning and simulation, source code auditing, and cryptography.
Our results include problem formalization, identification of
vulnerabilities, novel solutions and prototypes for new technologies.
CoreLabs regularly publishes security advisories, technical papers,
project information and shared software tools for public use at:
http://corelabs.coresecurity.com.


11. *About Core Security Technologies*

Core Security Technologies enables organizations to get ahead of threats
with security test and measurement solutions that continuously identify
and demonstrate real-world exposures to their most critical assets. Our
customers can gain real visibility into their security standing, real
validation of their security controls, and real metrics to more
effectively secure their organizations.

Core Security's software solutions build on over a decade of trusted
research and leading-edge threat expertise from the company's Security
Consulting Services, CoreLabs and Engineering groups. Core Security
Technologies can be reached at +1 (617) 399-6980 or on the Web at:
http://www.coresecurity.com.


12. *Disclaimer*

The contents of this advisory are copyright (c) 2013 Core Security
Technologies and (c) 2013 CoreLabs, and are licensed under a Creative
Commons Attribution Non-Commercial Share-Alike 3.0 (United States)
License: http://creativecommons.org/licenses/by-nc-sa/3.0/us/


13. *PGP/GPG Keys*

This advisory has been signed with the GPG key of Core Security
Technologies advisories team, which is available for download at
http://www.coresecurity.com/files/attachments/core_security_advisories.asc.
Release DateTitleTypePlatformAuthor
2018-10-05"D-Link Central WiFiManager Software Controller 1.03 - Multiple Vulnerabilities"webappsphp"Core Security"
2018-07-27"SoftNAS Cloud < 4.0.3 - OS Command Injection"webappsphp"Core Security"
2018-07-13"QNAP Qcenter Virtual Appliance - Multiple Vulnerabilities"webappshardware"Core Security"
2018-02-22"Trend Micro Email Encryption Gateway 5.5 (Build 1111.00) - Multiple Vulnerabilities"webappsjsp"Core Security"
2018-02-14"Dell EMC Isilon OneFS - Multiple Vulnerabilities"webappslinux"Core Security"
2017-06-28"Kaspersky Anti-Virus File Server 8.0.3.297 - Multiple Vulnerabilities"webappslinux"Core Security"
2017-05-10"SAP SAPCAR 721.510 - Heap Buffer Overflow"doslinux"Core Security"
2016-11-22"TP-LINK TDDP - Multiple Vulnerabilities"doshardware"Core Security"
2016-08-10"SAP SAPCAR - Multiple Vulnerabilities"doslinux"Core Security"
2016-03-16"FreeBSD 10.2 (x64) - 'amd64_set_ldt' Heap Overflow"dosfreebsd_x86-64"Core Security"
2015-12-09"Microsoft Windows Media Center - '.Link' File Incorrectly Resolved Reference (MS15-134)"remotewindows"Core Security"
2015-07-08"AirLive (Multiple Products) - OS Command Injection"webappshardware"Core Security"
2015-07-08"AirLink101 SkyIPCam1620W - OS Command Injection"webappshardware"Core Security"
2015-05-26"Sendio ESP - Information Disclosure"webappsjsp"Core Security"
2015-03-18"Fortinet Single Sign On - Stack Overflow"doswindows"Core Security"
2015-01-29"FreeBSD - Multiple Vulnerabilities"dosfreebsd"Core Security"
2015-01-26"Android WiFi-Direct - Denial of Service"dosandroid"Core Security"
2014-11-24"Advantech EKI-6340 - Command Injection"webappscgi"Core Security"
2014-10-17"SAP NetWeaver Enqueue Server - Denial of Service"doswindows"Core Security"
2014-04-17"SAP Router - Timing Attack Password Disclosure"remotehardware"Core Security"
2014-03-12"Oracle VM VirtualBox - 3D Acceleration Multiple Vulnerabilities"dosmultiple"Core Security"
2014-02-06"Publish-It 3.6d - Buffer Overflow"doswindows"Core Security"
2013-12-17"Microsoft Windows Kernel - 'win32k.sys' Integer Overflow (MS13-101)"doswindows"Core Security"
2013-12-11"IcoFX 2.5.0.0 - '.ico' Buffer Overflow (PoC)"doswindows"Core Security"
2013-11-08"Vivotek IP Cameras - RTSP Authentication Bypass"webappshardware"Core Security"
2013-10-02"PinApp Mail-SeCure 3.70 - Access Control Failure"locallinux"Core Security"
2013-09-09"Sophos Web Protection Appliance - Multiple Vulnerabilities"webappslinux"Core Security"
2013-08-29"AVTECH DVR Firmware 1017-1003-1009-1003 - Multiple Vulnerabilities"doshardware"Core Security"
2013-08-07"Hikvision IP Cameras 4.1.0 b130111 - Multiple Vulnerabilities"webappshardware"Core Security"
2013-08-02"TP-Link TL-SC3171 IP Cameras - Multiple Vulnerabilities"webappshardware"Core Security"
import requests
response = requests.get('https://www.nmmapper.com/api/exploitdetails/30208/?format=json')

For full documentation follow the link above

Cipherscan. A very simple way to find out which SSL ciphersuites are supported by a target.

Identify and fingerprint Web Application Firewall (WAF) products protecting a website.