quinta-feira, 25 de maio de 2023

Emulating Shellcodes - Chapter 1

 There are many basic shellcodes that can be emulated from the beginning from the end providing IOC like where is connecting and so on. But what can we do when the emulation get stuck at some point?

The console has many tools to interact with the emulator like it was a debugger but the shellcode really is not being executed so is safer than a debugger.

target/release/scemu -f ~/Downloads/shellcodes_matched/drv_shellcode.bin -vv 


In some shellcodes the emulator emulates millions of instructions without problem, but in this case at instruction number 176 there is a crash, the [esp + 30h] contain an unexpected 0xffffffff.

There are two ways to trace the memory, tracing all memory operations with -m or inspecting specific place with -i which allow to use registers to express the memory location:

target/release/scemu -f ~/Downloads/shellcodes_matched/drv_shellcode.bin  -i 'dword ptr [esp + 0x30]'


Now we know that in position 174 the value 0xffffffff is set.

But we have more control if we set the console at first instruction with -c 1 and set a memory breakpoint on write.




This "dec" instruction changes the zero for the 0xffffffff, and the instruction 90 is what actually is changing the stack value.

Lets trace the eax register to see if its a kind of counter or what is doing.


target/release/scemu -f ~/Downloads/shellcodes_matched/drv_shellcode.bin  --reg eax 


Eax is not a counter, is getting hardcoded values which is probably an API name:


In this case this shellcode depend on previous states and crash also in the debugger because of  register values. this is just an example of how to operate in cases where is not fully emulated.

In next chapter will see how to unpack and dump to disk using the emulator.


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

Nenhum comentário: