Selamat Datang

Kamis, 25 Januari 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.





More information
  1. Hacking Tools And Software
  2. Pentest Tools For Android
  3. What Are Hacking Tools
  4. Hacker Tools Online
  5. Hacker Tools For Ios
  6. Hacker Tools Apk
  7. Hacking Apps
  8. Hacker
  9. Hacking Tools 2020
  10. Hack And Tools
  11. New Hack Tools
  12. Hack Tools For Ubuntu
  13. Hacker Tools Mac
  14. Hack Tools
  15. Pentest Tools Review
  16. Tools Used For Hacking
  17. Wifi Hacker Tools For Windows
  18. Best Hacking Tools 2020
  19. Pentest Tools Port Scanner
  20. Top Pentest Tools
  21. Best Pentesting Tools 2018
  22. Pentest Tools Alternative
  23. Nsa Hacker Tools
  24. Hacking Tools Github
  25. Hacking Tools Free Download
  26. Pentest Tools Alternative
  27. Pentest Tools Framework
  28. Hacking Tools Usb
  29. Pentest Tools Review
  30. Hacker Tools Linux
  31. Hacker Hardware Tools
  32. Hack Tools Mac
  33. Top Pentest Tools
  34. Wifi Hacker Tools For Windows
  35. Hacking Tools For Beginners
  36. Pentest Tools Apk
  37. Hacking Tools For Beginners
  38. How To Hack
  39. Bluetooth Hacking Tools Kali
  40. Hacking Tools Usb
  41. Hack Tools Online
  42. Hack Tools For Windows
  43. Hacking Tools Pc
  44. Hacking Tools Windows
  45. Hack Apps
  46. What Are Hacking Tools
  47. Computer Hacker
  48. Pentest Tools Find Subdomains
  49. Hack Tool Apk No Root
  50. Hacking Tools Windows 10
  51. Hack Tools For Games
  52. Tools 4 Hack
  53. Hack Tools For Ubuntu
  54. Hacking Tools And Software
  55. How To Install Pentest Tools In Ubuntu
  56. Hacks And Tools
  57. Hacker
  58. Hacking Tools Mac
  59. Hacker Tools For Ios
  60. Hacking Tools
  61. Pentest Tools List
  62. New Hack Tools
  63. Hacking Tools For Beginners
  64. Hacking Tools Windows 10
  65. Pentest Box Tools Download
  66. Hacker Tools Linux
  67. Hacking Tools Download
  68. Hacker Tools Linux
  69. Nsa Hacker Tools
  70. Hacking Tools For Pc
  71. Usb Pentest Tools
  72. Pentest Recon Tools
  73. Hack Tools Download
  74. Pentest Recon Tools
  75. Termux Hacking Tools 2019
  76. Hacking App
  77. Pentest Tools Framework
  78. Pentest Tools For Windows
  79. Pentest Tools Open Source
  80. Pentest Tools For Windows
  81. Hacker Tools 2019
  82. Nsa Hack Tools Download
  83. Hack Tools
  84. Hack Tools
  85. Hacker Tools 2020
  86. Hacker Tools Apk Download
  87. Pentest Tools Subdomain
  88. How To Hack
  89. Hacker Tools Apk Download
  90. Hacker Tools Software
  91. Underground Hacker Sites
  92. Hacker Tools Apk
  93. Hacker Tools Software
  94. Pentest Tools Linux
  95. Hack Tools Download
  96. Nsa Hack Tools Download
  97. Hack Tools For Windows
  98. Hacking Tools For Beginners
  99. Pentest Tools For Mac
  100. Hacker Techniques Tools And Incident Handling
  101. Hack Tools Online
  102. Hacker Hardware Tools
  103. Hack Rom Tools
  104. Hacking Tools Download
  105. Hacker Tools List
  106. Pentest Tools Alternative
  107. Growth Hacker Tools
  108. Hacker Tools Apk
  109. How To Hack
  110. Hacking Tools Download
  111. Hack Tools Online
  112. Hacker Tools Linux
  113. Pentest Tools Nmap
  114. Pentest Tools For Mac
  115. World No 1 Hacker Software
  116. Hacker Search Tools
  117. Termux Hacking Tools 2019
  118. Hacker Search Tools
  119. Hack Tool Apk No Root
  120. Hacker Tools Mac
  121. Pentest Reporting Tools
  122. Hacking Tools Name
  123. Hacker Techniques Tools And Incident Handling

Tidak ada komentar:

Posting Komentar