Friday, June 2, 2023

Vsftpd Backdoor - Ekoparty Prectf - Amn3S1A Team

It's a 32bits elf binary of some version of vsftpd, where it have been added a backdoor, they don't specify is an authentication backdoor, a special command or other stuff.

I started looking for something weird on the authentication routines, but I didn't found anything significant in a brief period of time, so I decided to do a bindiff, that was the key for locating the backdoor quickly. I do a quick diff of the strings with the command "strings bin | sort -u" and "vimdiff" and noticed that the backdoored binary has the symbol "execl" which is weird because is a call for executing elfs, don't needed for a ftp service, and weird that the compiled binary doesn't has that symbol.





Looking the xrefs of "execl" on IDA I found that code that is a clear backdoor, it create a socket, bind a port and duplicate the stdin, stdout and stderr to the socket and use the execl:



There are one xrefs to this function, the function that decides when trigger that is that kind of systems equations decision:


The backdoor was not on the authentication, it was a special command to trigger the backdoor, which is obfuscated on that systems equation, it was no needed to use a z3 equation solver because is a simple one and I did it by hand.



The equation:
cmd[0] = 69
cmd[1] = 78
cmd[1] + cmd[2] = 154
cmd[2] + cmd[3] = 202
cmd[3] + cmd[4] = 241
cmd[4] + cmd[5] = 233
cmd[5] + cmd[6] = 217
cmd[6] + cmd[7] = 218
cmd[7] + cmd[8] = 228
cmd[8] + cmd[9] = 212
cmd[9] + cmd[10] = 195
cmd[10] + cmd[11] = 195
cmd[11] + cmd[12] = 201
cmd[12] + cmd[13] = 207
cmd[13] + cmd[14] = 203
cmd[14] + cmd[15] = 215
cmd[15] + cmd[16] = 235
cmd[16] + cmd[17] = 242

The solution:
cmd[0] = 69
cmd[1] = 75
cmd[2] = 79
cmd[3] = 123
cmd[4] = 118
cmd[5] = 115
cmd[6] = 102
cmd[7] = 116
cmd[8] = 112
cmd[9] = 100
cmd[10] = 95
cmd[11] = 100
cmd[12] = 101
cmd[13] = 106
cmd[14] = 97                    
cmd[15] = 118
cmd[16] = 117
cmd[17] = 125


The flag:
EKO{vsftpd_dejavu}

The binary:
https://ctf.ekoparty.org/static/pre-ekoparty/backdoor


More info


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

No comments:

Post a Comment