Recently I have been going thru the malware traffic exercises created by Brad Duncan of “malware-traffic-analysis.net”.
In my last post on a exercise I started wondering about the User-Agent strings used with malware as a way to possibly narrow in on the malware. The malware in the last post put a User-Agent string in the registry in it’s configuration key. I did not run down if that user agent string was used in the traffic or not do to a lack of an easy way to get a list of unique User-Agent strings.
As with a normal web page if the malware calls out to a certain page with a specially crafted User-Agent string it will respond a certain way. If a researcher try’s to look at that same page and uses a different User-Agent string then the page could respond totally different.
Over the last couple of days I’ve been working on a program that would get a list of unique User-Agent strings from a pcap file. Of course as I was writing the program I ended up with “scope creep”, I wanted it to do more that just return a list. It will now either get a full list of all locations where it finds the term “User-Agent” or will by default return just what it determines is a unique list along with the index location in hex where it was found.
What I found surprised me. There were also errors in the frames found.
Here is what it looks like using the latest exercise pcap from malware-traffic-analysis.net.