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

No comments:

Post a Comment