Friday, January 19, 2024

Koppeling - Adaptive DLL Hijacking / Dynamic Export Forwarding


This project is a demonstration of advanced DLL hijack techniques. It was released in conjunction with the "Adaptive DLL Hijacking" blog post. I recommend you start there to contextualize this code.

This project is comprised of the following elements:

  • Harness.exe: The "victim" application which is vulnerable to hijacking (static/dynamic)
  • Functions.dll: The "real" library which exposes valid functionality to the harness
  • Theif.dll: The "evil" library which is attempting to gain execution
  • NetClone.exe: A C# application which will clone exports from one DLL to another
  • PyClone.py: A python 3 script which mimics NetClone functionality

The VS solution itself supports 4 build configurations which map to 4 different methods of proxying functionality. This should provide a nice scalable way of demonstrating more techniques in the future.

  • Stc-Forward: Forwards export names during the build process using linker comments
  • Dyn-NetClone: Clones the export table from functions.dll onto theif.dll post-build using NetClone
  • Dyn-PyClone: Clones the export table from functions.dll onto theif.dll post-build using PyClone
  • Dyn-Rebuild: Rebuilds the export table and patches linked import tables post-load to dynamically prepare for function proxying

The goal of each technique is to successfully capture code execution while proxying functionality to the legitimate DLL. Each technique is tested to ensure static and dynamic sink situations are handled. This is by far not every primitive or technique variation. The post above goes into more detail.


Example

Prepare a hijack scenario with an obviously incorrect DLL

> copy C:\windows\system32\whoami.exe .\whoami.exe
1 file(s) copied.

> copy C:\windows\system32\kernel32.dll .\wkscli.dll
1 file(s) copied.

Executing in the current configuration should result in an error

> whoami.exe 

"Entry Point Not Found"

Convert kernel32 to proxy functionality for wkscli

> NetClone.exe --target C:\windows\system32\kernel32.dll --reference C:\windows\system32\wkscli.dll --output wkscli.dll
[+] Done.

> whoami.exe
COMPUTER\User



More info

  1. Pentest Tools List
  2. Hacking Tools Download
  3. Hacking Tools For Windows Free Download
  4. Android Hack Tools Github
  5. Hacking Tools 2019
  6. Hacker Tools Linux
  7. Hacking Tools
  8. Game Hacking
  9. Hack Tools Online
  10. Hacker Tools Free Download
  11. Hacker Tools Mac
  12. Top Pentest Tools
  13. Hackers Toolbox
  14. Nsa Hack Tools
  15. Pentest Tools Port Scanner
  16. Hack Tools Online
  17. Hacker Tools List
  18. Hacking Tools For Pc
  19. Pentest Tools Subdomain
  20. Usb Pentest Tools
  21. Top Pentest Tools
  22. Pentest Recon Tools
  23. Hack Tools 2019
  24. Hacker Search Tools
  25. Hack Tools Download
  26. Hacker Tools Mac
  27. Install Pentest Tools Ubuntu
  28. Hack Tool Apk No Root
  29. Pentest Tools Port Scanner
  30. Hacker Tools Apk
  31. Pentest Automation Tools
  32. Pentest Tools For Windows
  33. Tools 4 Hack
  34. Hacker Tools Software
  35. Hack Tools
  36. Pentest Tools Apk
  37. Free Pentest Tools For Windows
  38. Pentest Tools Windows
  39. Tools For Hacker
  40. Termux Hacking Tools 2019
  41. Hacker Tools Linux
  42. Hacker Tools
  43. Hack Tools Mac
  44. Pentest Tools List
  45. Pentest Tools Download
  46. Hacking Tools Windows
  47. Best Hacking Tools 2020
  48. Kik Hack Tools
  49. Top Pentest Tools
  50. Github Hacking Tools
  51. Physical Pentest Tools
  52. Hacking Tools Windows
  53. Bluetooth Hacking Tools Kali
  54. Hack Tools
  55. What Are Hacking Tools
  56. Hacking Tools Download
  57. Black Hat Hacker Tools
  58. Hacker Tools Online
  59. How To Hack
  60. Hacker Tools Hardware
  61. Hacker Tools For Windows
  62. Hacking Tools For Windows 7
  63. Pentest Tools For Mac
  64. Pentest Tools For Ubuntu
  65. Hacker Tools For Mac
  66. Hack Tools Download
  67. Hacker Tools Windows
  68. Hacker Search Tools
  69. Hack Apps
  70. Hacking Tools And Software
  71. Nsa Hack Tools
  72. Hack Tools Online
  73. Pentest Tools Nmap
  74. Pentest Tools Find Subdomains
  75. Hacker Tools Windows
  76. Hacking Tools For Beginners
  77. Hacking Tools For Windows
  78. Pentest Tools Linux
  79. What Is Hacking Tools
  80. Hacker Tools For Ios
  81. Tools Used For Hacking
  82. Hack Tool Apk No Root
  83. Hacker Tools Mac
  84. Pentest Tools Download
  85. Hacking Tools For Beginners
  86. Computer Hacker
  87. Hak5 Tools
  88. Hacking Tools Kit
  89. Hacking Tools Software
  90. Pentest Tools Kali Linux
  91. Hacking Tools Usb
  92. Hacker
  93. World No 1 Hacker Software
  94. Hack Tool Apk No Root
  95. Pentest Tools Bluekeep
  96. Hacking Tools For Beginners
  97. Hack Website Online Tool
  98. Nsa Hack Tools Download
  99. Hacking Tools Mac
  100. Usb Pentest Tools
  101. Hacking Tools 2019
  102. Hack Tools For Windows
  103. Free Pentest Tools For Windows
  104. Pentest Tools For Ubuntu
  105. Usb Pentest Tools
  106. Usb Pentest Tools
  107. Hacker Tools Github
  108. Blackhat Hacker Tools
  109. Blackhat Hacker Tools
  110. Hacker Tools Free Download
  111. Hack Tools 2019
  112. Hack Tools For Windows
  113. Easy Hack Tools
  114. Pentest Tools Alternative
  115. Pentest Tools Download
  116. Hacking App
  117. Hacker Tools
  118. Pentest Tools List
  119. Hacker Tools For Ios
  120. Tools For Hacker
  121. Hacker Search Tools
  122. Tools Used For Hacking
  123. Hacking Tools Download
  124. Hack Tools
  125. Hacker Techniques Tools And Incident Handling
  126. Hack And Tools
  127. Hacking Tools For Kali Linux
  128. Hacking Tools
  129. Github Hacking Tools
  130. Hacker Tools Software
  131. Hak5 Tools
  132. What Is Hacking Tools
  133. Nsa Hacker Tools
  134. Hacking Tools Windows 10
  135. Black Hat Hacker Tools
  136. Hacking Tools For Windows 7
  137. Hacker Tools For Mac
  138. Hackers Toolbox
  139. Hack Tools 2019
  140. Hack Tools For Pc
  141. Hacker Security Tools
  142. Game Hacking
  143. Pentest Tools Alternative
  144. Computer Hacker
  145. Pentest Tools Find Subdomains
  146. Hacking Tools For Games
  147. Pentest Tools Bluekeep
  148. Hacking Tools And Software
  149. Hackrf Tools

0 comments