Translate

sexta-feira, 19 de janeiro de 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 articles
  1. Hacker Tools For Pc
  2. Tools 4 Hack
  3. Bluetooth Hacking Tools Kali
  4. Hack Apps
  5. Hacking Tools Software
  6. New Hacker Tools
  7. Android Hack Tools Github
  8. Hack Tools Mac
  9. Hacking Tools For Mac
  10. Hack App
  11. Hacking Tools 2020
  12. Physical Pentest Tools
  13. Hacking Tools 2019
  14. Hacking Tools Hardware
  15. Hacker Tools Software
  16. Hacking Tools Free Download
  17. Hacker
  18. Termux Hacking Tools 2019
  19. Pentest Tools Apk
  20. Game Hacking
  21. Hacking Tools For Pc
  22. Hacker Tools Github
  23. Hacker Techniques Tools And Incident Handling
  24. Hack Tools 2019
  25. Nsa Hacker Tools
  26. Hacking Tools 2020
  27. Hack App
  28. Hacking Tools For Windows
  29. Tools 4 Hack
  30. Best Hacking Tools 2019
  31. Hacker Tools For Ios
  32. Pentest Tools Open Source
  33. Hacking Tools Windows 10
  34. Hacker Tools Online
  35. Free Pentest Tools For Windows
  36. Hack Tools Mac
  37. Nsa Hack Tools Download
  38. Hacking Tools Pc
  39. Hacker Tools Free Download
  40. Hacker Tools Free Download
  41. Hacking Tools Pc
  42. What Are Hacking Tools
  43. Pentest Automation Tools
  44. Hacker Tools 2020
  45. How To Install Pentest Tools In Ubuntu
  46. Pentest Tools Port Scanner
  47. Pentest Tools Tcp Port Scanner
  48. Bluetooth Hacking Tools Kali
  49. Hackers Toolbox
  50. Hacking Tools Mac
  51. Hack Tools Github
  52. Hack Tool Apk No Root
  53. Pentest Box Tools Download
  54. Hacking Tools Pc
  55. Pentest Tools Free
  56. Hacker Tools Mac
  57. Hacks And Tools
  58. Hacking Tools Hardware
  59. Pentest Reporting Tools
  60. Hacking Tools For Windows 7
  61. Hacking App
  62. Bluetooth Hacking Tools Kali
  63. Pentest Tools Website Vulnerability
  64. Hack Website Online Tool
  65. Pentest Tools Port Scanner
  66. Bluetooth Hacking Tools Kali
  67. Hacker Tools For Ios
  68. Hacker Tools Apk Download
  69. Hackrf Tools
  70. Install Pentest Tools Ubuntu
  71. Pentest Tools Website Vulnerability
  72. Hacking Tools For Games
  73. Pentest Tools Download
  74. Hack Tools Mac
  75. Hacker Tools For Pc
  76. Hack Website Online Tool
  77. How To Install Pentest Tools In Ubuntu
  78. Pentest Tools
  79. Hacks And Tools
  80. Hack Tools Download
  81. Hacker Tools For Ios
  82. Pentest Tools Url Fuzzer
  83. Hacking Tools 2019
  84. Pentest Tools Kali Linux
  85. Hackrf Tools
  86. Hack Tools
  87. How To Install Pentest Tools In Ubuntu
  88. Hack Tool Apk No Root
  89. Hack Tools For Pc
  90. Hacker Tools Software
  91. Pentest Tools For Mac
  92. Hacking Tools Download
  93. Hacker Tools Windows
  94. Pentest Tools For Ubuntu
  95. Pentest Tools Android
  96. Pentest Tools For Mac
  97. Hacking Tools Pc
  98. Easy Hack Tools
  99. World No 1 Hacker Software
  100. Hacker Tools Apk
  101. Hacking Tools Kit
  102. Pentest Tools Find Subdomains
  103. Hak5 Tools
  104. Pentest Tools Download
  105. Tools 4 Hack
  106. Beginner Hacker Tools
  107. Pentest Tools Url Fuzzer

Arquivo do blog