6.02.2023

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



Related links


  1. Game Hacking
  2. Hacking Tools Pc
  3. What Is Hacking Tools
  4. Hack Website Online Tool
  5. Hack Tools For Ubuntu
  6. Pentest Tools For Windows
  7. Hacking Tools
  8. Hack Tools For Pc
  9. Hack Tools For Games
  10. Hack Apps
  11. Hacker Tools Free Download
  12. Hacks And Tools
  13. Hacking Tools Software
  14. Pentest Recon Tools
  15. Hacking Tools 2019
  16. Pentest Tools Download
  17. Hacker Tools For Ios
  18. Hacker Tools For Pc
  19. Hacker Security Tools
  20. Hacker Tools Linux
  21. Hak5 Tools
  22. Hacker Tools For Mac
  23. Pentest Tools Review
  24. Pentest Tools Port Scanner
  25. Hacker Tools Free Download
  26. Hack Tool Apk No Root
  27. Pentest Tools Website Vulnerability
  28. Hacking Tools Online
  29. Hacking Tools Pc
  30. Hack Tool Apk No Root
  31. Hacking Tools Online
  32. Hacker Tools Hardware
  33. Hacking Tools Usb
  34. Pentest Tools Framework
  35. Pentest Tools Tcp Port Scanner
  36. New Hacker Tools
  37. Usb Pentest Tools
  38. Hack Tools For Games
  39. Pentest Tools Free
  40. Hacker Tool Kit
  41. Nsa Hack Tools Download
  42. Hacking App
  43. Wifi Hacker Tools For Windows
  44. Hacking Tools For Kali Linux
  45. Wifi Hacker Tools For Windows
  46. New Hack Tools
  47. Hacking Tools For Windows 7
  48. Pentest Tools Download
  49. Hack Tools Download
  50. What Are Hacking Tools
  51. Hack Tools Github
  52. Hacker Tools Software
  53. Hacker Tools Apk
  54. Usb Pentest Tools
  55. Pentest Tools Find Subdomains
  56. Hacking Tools Free Download
  57. Hacking Tools Pc
  58. Hacking Tools Pc
  59. Pentest Tools Kali Linux
  60. Hacker Tools For Mac
  61. Pentest Tools Download
  62. Growth Hacker Tools
  63. Bluetooth Hacking Tools Kali
  64. Hack Tool Apk
  65. Physical Pentest Tools
  66. Pentest Automation Tools
  67. Hacking Tools For Windows 7
  68. Pentest Tools Framework
  69. Hacking Tools For Windows 7
  70. Pentest Tools Port Scanner
  71. Hack Tools Mac
  72. Hack Tools For Ubuntu
  73. Pentest Recon Tools
  74. Pentest Tools Find Subdomains
  75. Tools Used For Hacking
  76. Hacking Tools Windows 10
  77. Best Pentesting Tools 2018
  78. Best Pentesting Tools 2018
  79. Hack Tools
  80. World No 1 Hacker Software
  81. Tools For Hacker
  82. New Hack Tools
  83. Hacker Search Tools
  84. Hacking Tools For Mac
  85. Blackhat Hacker Tools
  86. New Hacker Tools
  87. Hacker Tools
  88. Hacking Tools 2019
  89. Hacker Tools Free
  90. New Hacker Tools
  91. Hacking Tools Windows 10
  92. Pentest Tools Port Scanner
  93. Hacking App
  94. Hack Tools Online
  95. Hacker Techniques Tools And Incident Handling
  96. Hack Tools For Pc
  97. Hacking Tools For Mac
  98. Hacker Tools 2020
  99. Pentest Tools Url Fuzzer
  100. Hacker Security Tools
  101. Pentest Tools Framework
  102. Hack Tools For Mac
  103. Pentest Tools Download
  104. Hacking Tools Kit
  105. Hak5 Tools
  106. Hacker Security Tools
  107. Hacker
  108. Install Pentest Tools Ubuntu
  109. Hack Apps
  110. Hackers Toolbox
  111. Hacking Tools Free Download
  112. New Hack Tools
  113. Kik Hack Tools
  114. Pentest Reporting Tools
  115. Hacker Tools Hardware

No comments: