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 news


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

Comments