24 January 2024

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


Related posts


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

No comments:

Post a Comment