الثلاثاء، 23 يناير 2024

Vlang Binary Debugging

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.





Read more


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

ليست هناك تعليقات:

إرسال تعليق