Vlang Binary Debugging

Posted by iNoticiero on viernes, 26 de mayo de 2023 0

Why vlang? V is a featured, productive, safe and confortable language highly compatible with c, that generates neat binaries with c-speed, the decompilation also seems quite clear as c code.
https://vlang.io/

After open the binary with radare in debug mode "-d" we proceed to do the binary recursive analysis with "aaaa" the more a's the more deep analys.



The function names are modified when the binary is crafted, if we have a function named hello in a module named main we will have the symbol main__hello, but we can locate them quicly thanks to radare's grep done with "~" token in this case applied to the "afl" command which lists all the symbols.


Being in debug mode we can use "d*" commands, for example "db" for breakpointing the function and then "dc" to start or continue execution.


Let's dissasemble the function with "pD" command, it also displays the function variables and arguments as well, note also the xref "call xref from main"


Let's take a look to the function arguments, radare detect's this three 64bits registers used on the function.


Actually the function parameter is rsi that contains a testing html to test the href extraction algorithm.


The string structure is quite simple and it's plenty of implemented methods.




With F8 we can step over the code as we were in ollydbg on linux.


Note the rip marker sliding into the code.


We can recognize the aray creations, and the s.index_after() function used to find substrings since a specific position.


If we take a look de dissasembly we sill see quite a few calls to tos3() functions.
Those functions are involved in string initialization, and implements safety checks.

  • tos(string, len)
  • tos2(byteptr)
  • tos3(charptr)

In this case I have a crash in my V code and I want to know what is crashing, just continue the execution with "dc" and see what poits the rip register.



In visual mode "V" we can see previous instructions to figure out the arguments and state.


We've located the crash on the substring operation which is something like "s2 := s1[a..b]" probably one of the arguments of the substring is out of bounds but luckily the V language has safety checks and is a controlled termination:



Switching the basic block view "space" we can see the execution flow, in this case we know the loops and branches because we have the code but this view also we can see the tos3 parameter "href=" which is useful to locate the position on the code.



When it reach the substr, we can see the parameters with "tab" command.



Looking the implementation the radare parameter calculation is quite exact.


Let's check the param values:


so the indexes are from 0x0e to 0x24 which are inside the buffer, lets continue to next iteration,
if we set a breakpoint and check every iteration, on latest iteration before the crash we have the values 0x2c to 0x70 with overflows the buffer and produces a controlled termination of the v compiled process.





More articles


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

Tagged as:
About the Author

Write admin description here..

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

Related posts

0 comentarios:

What they says

© 2013 ECOLOGÍA. WP Theme-junkie converted by BloggerTheme9
Blogger templates. Proudly Powered by Blogger.
back to top