Apologies. I have had multiple items coming down the pipeline at work that have required my spare time and attention, so I was unable to continue this posting. Hopefully, I can share some of that work with you all soon, but for now, let's continue where we left off.
When we last left off, I was just about to access the infected machine and begin analysis and cleanup. Let us start after I have contacted the client, let them know they have an active infection, and have gained access to the machine.
The first thing I do before anything else, while the user is still logged and nothing has been touched by me on the system, is create a dump of the system's memory. There are plenty of tools out there to do this, but because I have been playing around with Volatility lately, I chose to use winpmem to create the dump this time. Once the dump is saved, I copy it to a safe location on the HDD to be extracted after cleanup.
Next, while the user is still logged in, I run Fiddler just to see if I can catch the same HTTP requests my firewall packet capture caught. This endeavor was very successful. There were literally hundreds of requests being made per minute, but I am only going to include the results that were relevant to my search. We need to touch on the the memory dump analysis first, though, because it will provide us with a narrower scope for examining what was going on in the Fiddler session (when it comes to large sets of data, and that is very much so the nature of incident response, correlating data is extremely helpful, unless you want to wade through hundreds, thousands, or millions of requests by hand.)
Now, I stated earlier that I have been playing with Volatility lately, but I am by no means an expert, so for this analysis I used Mandiant's Redline analysis tool. Once my analysis session had been created, I set about sorting the processes that were running in memory when the dump was created. As a personal choice, I sorted them based on their arguments. After reviewing the list, 2 processes stuck out right away to me. Let's review these in turn.
First, I saw the below process (copied the entire row's contents as displayed by Redline):
So, breaking this down, we notice 2 things. Firstly, that powershell.exe ran the following command (and it ran windowless, hence the -windowstyle hidden -noninteractive switches when powershell.exe was launched):
So, powershell.exe is being launched windowless and is grabbing a string as a new object via the System.Net.WebClient module and the DownloadString function. It is then passing that string into iex (Internet Explorer). Remember, this is all happening in the background. Beyond that, we also notice the process that spawned powershell.exe, in this case taskeng.exe, which has a PID of 3132. If we follow the spawning chain, we find that taskeng.exe was called by svchost.exe, which was called by services.exe, which was called by wininit.exe, which was called by wfcrun32.exe. Here is the full path for wfcrun32.exe, along with the argument it was launched with:
That will become important later. For now, let's leave it be.
Next, let's review the second process I noted:
So, cmd.exe is executing the below command:
The URL is encoded, so let's decode it:
A referrer header and user agent string were also included, so let's decode them as well:
Well, clckurl isn't a Windows command that I am aware of, however, when you review the spawning chain, selfserviceplugin.exe is launching cmd.exe, and selfserviceplugin.exe is launched by receiver.exe, which is launched by concentr.exe, and that is launched by explorer.exe. There are some arguments and paths that are important to note here, so let's look at them:
C:\Program Files\Citrix\Receiver\Receiver.exe -autoupdate -startplugins C:\Program Files\Citrix\ICA Client\concentr.exe /startup
C:\Program Files\Citrix\Receiver\Receiver.exe -autoupdate -startplugins
C:\Program Files\Citrix\ICA Client\concentr.exe /startup
Interestingly enough, we see yet more Citrix folder paths. If I had my guesses, clckurl is being inherited from a library used by one of those processes, or DLL injection is taking place. Can we locate the specific library or process supplying that command? Well, I am sure that somebody could, but from my stance I am missing two crucial things—experience and a better view into the client's machine. For now, let's just move on. I will try to swing back around to deeper analysis here if I can.
I had stated that a Fiddler analysis of the system had really shown what was going on behind the scenes. Surely enough, see below:
Well, we definitely have some click-jacking/ad fraud going on. That is a certainty.
Again, I don't have the stance/experience to do much more analysis at this exact moment. Unfortunately, forensics is not my primary job description, so there is only so much time I can spend gathering and preserving data for later examination before I need to move on to cleaning the infected machine. I will tell you that Malwarebytes Anti-Malware cleaned up instances of Trojan.Clicker.FMS, so the click-jacking/ad fraud guess was right.
I'll cycle back around to this topic when I have more time/information. For now, there are other topics to be addressed.