# Title: Windows 10 'scrrun.dll' Multiple vulnerabilities # Author: Nassim Asrir # Contact: wassline@gmail.com / https://www.linkedin.com/in/nassim-asrir-b73a57122/ # Vendor: https://www.microsoft.com/ Test ENV: ======== Browser : IE 11 OS: Windows 10 - x64 Details: ======== scrrun.dll (C:\Windows\SysWOW64\scrrun.dll) contains 3 vulnerable functions. 1 - CreateTextFile: With this function the attacker will be able to create text files on the victim machine 2 - CreateFolder: With this function the attacker will be able to create folders on the victim machine 3 - DeleteFolder: And with this the attacker will be able to delete any file system on victim machine like ( bootvid.dll ) or any file or folder on system32 Attack scenario =============== The attacker will not need to use a MITM attack or Social engineering So as a scenario: 1 - The attacker will create a website and he will inject the exploit code on his file (index.php) and if the victime navigate his website he will be affected with malicious code. 2 - The attacker will be able to target big organization because this dll is installed by default on Windows so any Windows OS is affected . 3 - The attacker will be able to affect lots of people by sharing his link via Any social website or in chat room. Impact: ===== So as i said first there a vulnerable function named 'DeleteFolder' and using this function the attacker will be able to delete any file or folder on victime machine and if the attacker targeted intersting files in system32 folder the victime will loss his machine. Exploits: ========= 1- CreateTextFile function ========================== ; Attributes: bp-based frame ; int __stdcall CFileSystem__CreateTextFile(int, BSTR, int, unsigned __int16 *, __int16) ?CreateTextFile@CFileSystem@@UAGJPAGFFPAPAUITextStream@@@Z proc near var_110= dword ptr -110h Memory= dword ptr -10Ch var_108= byte ptr -108h var_4= dword ptr -4 arg_4= dword ptr 0Ch arg_8= dword ptr 10h arg_C= dword ptr 14h arg_10= word ptr 18h ; FUNCTION CHUNK AT .text:1000BF9D SIZE 0000005E BYTES mov edi, edi push ebp mov ebp, esp sub esp, 110h mov eax, ___security_cookie xor eax, ebp mov [ebp+var_4], eax push esi mov esi, dword ptr [ebp+arg_10] push edi mov edi, [ebp+arg_4] test esi, esi jz short loc_10009700 Note: I used the 'onload Event' to work the exploit automatically. This function contain 3 args and the attacker will be able to control the value: Function CreateTextFile ( ByVal FileName As String , ByVal Overwrite As Boolean , ByVal Unicode As Boolean ) in our poc we controlled the FileName Parameter.