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.





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

Tidak ada komentar:

Posting Komentar