Saturday, January 20, 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.


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

No comments:

Post a Comment