Simple Reverse - 0x25(2023 Lab - WinMalware - 作業)
Description
在 next stage payload 的 my_start 導出函數中,惡意程式透過 dynamic API resolution 手法取得了一些 APIs。請問其從 user32.dll 取得的 API 的名稱為何? A list of all exported functions of user32.dll
Flag format: FLAG{WindowsAPIname}
Background
Dynamic API Resolution Background
Recon
根據前一個筆記,我們已經知道他怎麼找API,只是我們還不知道他用的到底是哪一個API,因為他有事先用過hash,題目也是要我們找到這一個部分,最簡單的做法是把user32.dll的所有API都用作者自定義的hash function做一遍,直到找到他要的那一個,目前問題最大的應該是不知道__ROL4__
的意思,根據x86 and amd64 instruction reference
The rotate left (ROL) and rotate through carry left (RCL) instructions shift all the bits toward more-significant bit positions, except for the most-significant bit, which is rotated to the least-significant bit location. The rotate right (ROR) and rotate through carry right (RCR) instructions shift all the bits toward less significant bit positions, except for the least-significant bit, which is rotated to the most-significant bit location.
所以很明顯的,這一段就是把hash左移11次,然後加上1187和api_name的字元
1 |
|
Exploit
1 |
|
1 |
|
結果如上