10.08.2016 Views

MONSOON – ANALYSIS OF AN APT CAMPAIGN

monsoon-analysis-apt-campaign?utm_source=Labs&utm_medium=blog&utm_content=monsoon_whitepaper&utm_campaign=monsoon

monsoon-analysis-apt-campaign?utm_source=Labs&utm_medium=blog&utm_content=monsoon_whitepaper&utm_campaign=monsoon

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Forcepoint Security Labs | Special Investigations<br />

Keylogger. When BADNEWS first starts it will spawn a new thread to log keystrokes to a file. The header<br />

of the file contains the marker "KLTNM:" and the system language. The rest of the file contains information<br />

about the active window and the keys pressed:<br />

KLTNM: 崐 ခခ00000409<br />

2016/06/01 09:42:18 - {Window Name}<br />

[SHIFT]c[SHIFT];<br />

The malware will only send the keylog file to the C&C when instructed to by the "kl" command.<br />

Document Crawler. When BADNEWS first starts it will spawn a new thread to check all local & mapped<br />

drives for document files with the following extensions:<br />

<br />

<br />

<br />

<br />

<br />

doc<br />

docx<br />

pdf<br />

ppt<br />

pptx<br />

<br />

txt<br />

Any documents under 15MB will be copied to the user's %temp%\SMB\ folder. The malware will only send<br />

these documents to the C&C when instructed to by the "ustr" command.<br />

Window Message Processor. BADNEWS will also check for any new hard-drives that are added to the<br />

machine such as USB devices. It does this in an interesting way by creating a window and listening for the<br />

WM_DEVICECH<strong>AN</strong>GE window message:<br />

LRESULT CALLBACK WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)<br />

{<br />

// Window message 23 is defined by the malware as a code to disable the document crawler<br />

}<br />

if ( Msg > WM_QUERYENDSESSION )<br />

{<br />

if ( Msg == WM_ENDSESSION )<br />

return 23;<br />

// Has a new device been added to the machine? If so, try to find documents<br />

if ( Msg == WM_DEVICECH<strong>AN</strong>GE )<br />

CrawlDrivesForDocuments();<br />

}<br />

else<br />

{<br />

switch ( Msg )<br />

{<br />

case WM_QUERYENDSESSION:<br />

return 23;<br />

case WM_CREATE:<br />

return 0;<br />

case WM_DESTROY:<br />

return 23;<br />

}<br />

}<br />

return DefWindowProcW(hWnd, Msg, wParam, lParam);<br />

Figure 25 - Device Change Listener<br />

<strong>MONSOON</strong> <strong>–</strong> <strong><strong>AN</strong>ALYSIS</strong> <strong>OF</strong> <strong>AN</strong> <strong>APT</strong> <strong>CAMPAIGN</strong> Revision: 1.07 | TLP-WHITE | 29/57

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!