Saturday, June 3, 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.


Read more


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

No comments:

Post a Comment