sábado, 3 de junio 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.


More information


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

No hay comentarios: