Sunday, June 4, 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



More info


  1. Hacking Tools Hardware
  2. Hacking App
  3. Hack And Tools
  4. Github Hacking Tools
  5. Hack Tool Apk
  6. Pentest Tools Linux
  7. Pentest Automation Tools
  8. Hacking Tools Online
  9. Hacker Tools For Mac
  10. Pentest Tools Alternative
  11. Beginner Hacker Tools
  12. Pentest Tools Kali Linux
  13. Hacking Tools Download
  14. Hacker Tools Windows
  15. Pentest Tools Github
  16. Hacking Tools Free Download
  17. New Hack Tools
  18. Hacker Tools Github
  19. Pentest Tools Free
  20. Pentest Tools Tcp Port Scanner
  21. Pentest Tools Github
  22. Pentest Tools Free
  23. Pentest Tools
  24. Nsa Hacker Tools
  25. Pentest Tools Nmap
  26. Hacker Tools For Ios
  27. Pentest Tools Subdomain
  28. Hack Website Online Tool
  29. Nsa Hack Tools
  30. Hacking Tools And Software
  31. Hacker Tools Apk Download
  32. World No 1 Hacker Software
  33. Hack Tools
  34. Hacker Tools Online
  35. Nsa Hacker Tools
  36. Wifi Hacker Tools For Windows
  37. Pentest Tools Windows
  38. Hacking Tools For Kali Linux
  39. Pentest Tools Website
  40. Android Hack Tools Github
  41. Hacker Tools Software
  42. Hack Tools 2019
  43. Hackers Toolbox
  44. Hack Tools Pc
  45. Pentest Recon Tools
  46. New Hacker Tools
  47. Underground Hacker Sites
  48. Pentest Tools Review
  49. Hack Tools Mac
  50. Tools Used For Hacking
  51. Hacking Tools For Windows 7
  52. Hacker Tools Linux
  53. Free Pentest Tools For Windows
  54. Beginner Hacker Tools
  55. Hacker Tools Apk
  56. Hacking Tools For Games
  57. Blackhat Hacker Tools
  58. Pentest Tools Find Subdomains
  59. Hacking Tools For Windows
  60. Pentest Tools Find Subdomains
  61. Pentest Tools Find Subdomains
  62. Growth Hacker Tools
  63. Computer Hacker
  64. Ethical Hacker Tools
  65. Hacker Tools Hardware
  66. What Are Hacking Tools
  67. Hack Tools For Mac
  68. Pentest Tools For Windows
  69. Pentest Reporting Tools
  70. Hackers Toolbox
  71. Github Hacking Tools
  72. Hacker Techniques Tools And Incident Handling
  73. Hackers Toolbox
  74. Hack Apps
  75. What Is Hacking Tools
  76. Hacking Tools For Games
  77. Hack Tools For Games
  78. Hacker Tools Hardware
  79. Top Pentest Tools
  80. Hacking App
  81. Tools Used For Hacking
  82. Hacking Tools 2020
  83. Best Hacking Tools 2019
  84. Pentest Tools Subdomain
  85. Hacking Tools Pc
  86. Pentest Tools Open Source
  87. What Are Hacking Tools
  88. Hacking Tools For Mac
  89. Install Pentest Tools Ubuntu
  90. Hacking Tools Kit
  91. Pentest Tools Nmap
  92. Github Hacking Tools
  93. What Are Hacking Tools
  94. Pentest Tools Nmap
  95. Wifi Hacker Tools For Windows
  96. Pentest Tools Subdomain
  97. Ethical Hacker Tools
  98. Hacking Tools Mac

No comments:

Post a Comment