Created the Tuesday 13 October 2020. Updated 2 months ago.
Edit controls are a type of user interface element that allows a user to enter and edit text in a graphical user interface (GUI). They are commonly used in Windows applications and can be embedded directly into a GUI or subclassed as a separate window. Edit controls can be set to display text in multiline mode, in which case they use a special callback function called the EditWordBreakProc to handle word wrapping.
The EditWordBreakProc callback function is called anytime the control needs to perform an operation related to word wrapping. In some cases, it may be possible to manipulate this callback function to achieve a desired effect, such as injecting code into the host system.
One method that has been used to manipulate the EditWordBreakProc callback function is to send the EM_GETOLECALLBACK message to the edit control window using the SendMessage function. This message is not well documented and can cause the rich edit window to crash if the LPARAM parameter does not point to locally accessible memory. Additionally, the EM_GETOLECALLBACK message does not return a pointer to the IRichEditOleCallback interface as expected, but rather to the IRichEditOle interface. As a result, the EM_SETOLECALLBACK message cannot be used to modify the callback function.
Instead, it may be possible to modify the IRichEditOle.lpVtbl heap memory, which holds a table of methods that can be called on the IRichEditOle interface. By overwriting the address of one of these methods with the address of the payload, it may be possible to execute the payload when the method is called. In this case, the payload is the GetClipboardData function. It is important to note that manipulating the EditWordBreakProc callback function and modifying heap memory in this way is likely to be detected by security systems and may result in the host system being compromised.
Featured Windows API's
Below, you will find a list of the most commonly used Windows API's that are currently utilized by malware authors for current evasion technique. This list is meant to provide an overview of the API's that are commonly used for this purpose. If there are any API's that you feel should be included on this list, please do not hesitate to contact us. We will be happy to update the list and provide any additional information or documentation that may be helpful.
The resources provided below are associated links that will give you even more detailed information and research on current evasion technique. It is important to note that, while these resources may be helpful, it is important to exercise caution when following external links. As always, be careful when clicking on links from unknown sources, as they may lead to malicious content.