Total Pageviews

Saturday, 20 January 2024

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

No comments:

Post a Comment