Monday, January 22, 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.


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

0 comments:

Post a Comment