Tuesday, May 30, 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



Read more


  1. Hacker Hardware Tools
  2. Underground Hacker Sites
  3. Hacking Tools For Kali Linux
  4. Pentest Tools Find Subdomains
  5. Hacking Tools For Windows 7
  6. Hacker Tools For Windows
  7. Pentest Tools Find Subdomains
  8. Hacking Tools Pc
  9. Pentest Box Tools Download
  10. Hacking Tools 2020
  11. Beginner Hacker Tools
  12. Pentest Tools Nmap
  13. Hacker Tools 2020
  14. Pentest Tools Website
  15. Easy Hack Tools
  16. Best Hacking Tools 2020
  17. Hacking Tools Kit
  18. Hacker Tools Free Download
  19. How To Hack
  20. Pentest Tools List
  21. Pentest Tools Linux
  22. Top Pentest Tools
  23. Hacker Tools Free
  24. Hacking Tools Download
  25. Hak5 Tools
  26. Black Hat Hacker Tools
  27. Hacker Tools Online
  28. Pentest Tools Github
  29. Hacker Tools Free
  30. Hack Tool Apk No Root
  31. Top Pentest Tools
  32. What Are Hacking Tools
  33. Hack Rom Tools
  34. Tools 4 Hack
  35. Best Pentesting Tools 2018
  36. Hack Tools Online
  37. Hack Tools For Mac
  38. Pentest Tools Alternative
  39. Hacking Tools Name
  40. Nsa Hacker Tools
  41. Hack Apps
  42. Hack Tools Mac
  43. Hacking Tools Name
  44. Github Hacking Tools
  45. Pentest Tools Website Vulnerability
  46. Hack Tools For Mac
  47. Pentest Tools Github
  48. What Is Hacking Tools
  49. Pentest Tools Free
  50. Hacker Search Tools
  51. Pentest Reporting Tools
  52. Hacking Tools
  53. Hacks And Tools
  54. Hacker Tools List
  55. What Are Hacking Tools
  56. Hacking Tools Windows 10
  57. Blackhat Hacker Tools
  58. Hack Tools For Windows
  59. Hacker Tools Software
  60. Free Pentest Tools For Windows
  61. Hacker Tools Free Download
  62. Github Hacking Tools
  63. What Are Hacking Tools
  64. Hacking Tools Free Download
  65. Pentest Tools Github
  66. Hacker Tools Free Download
  67. Underground Hacker Sites
  68. Hacking Tools Usb
  69. Hacking Tools 2020
  70. Hacker Tool Kit
  71. Hacking Tools For Windows
  72. Hacking App
  73. Pentest Tools Port Scanner
  74. Pentest Box Tools Download
  75. Pentest Tools Url Fuzzer
  76. Hacker Tools For Pc
  77. Hak5 Tools
  78. Hacker Tools List
  79. Pentest Tools Subdomain
  80. Ethical Hacker Tools
  81. Hacker Tools For Ios
  82. Hacker Tools Apk Download
  83. Hacker Tools 2019
  84. Hacking App
  85. Hacker Security Tools
  86. Hacker Tools 2019

No comments:

Post a Comment