Monday, May 11, 2015

Indicators - Geodo Malware

I have been seeing an influx of Geodo malware and have compiled some data on finding this infection on your network.

Threat Name: Geodo

File Download Locations:

These are live malware files, download with caution.

hXXp://altvramagazine.com:80/wp-content/themes/altura/cr_mss3.exe
hXXp://aqua-system.com.ua/AXMqjiFob
hXXp://arasshahintools.com:80/wp-content/themes/darya/cr_mss3.exe
hXXp://bicycle.ns.ca:80/wp-content/themes/shadow/cr_mss3.exe
hXXp://conservation-wildlife.asn.au/eSxai7o0d/Status_zu_Sendung_916907832086.zip
hXXp://cucifineart.com/wp-content/Z5LIHdweGyb/Status_zu_Sendung_916907832086.zip
hXXp://dpsharma.com/wp-content/themes/twentyfifteen/Hvcmrq2un/Status_zu_Sendung_916907832086.zip
hXXp://fcmtravel.co.ke/7HTCkvNV
hXXp://www.allcameras.tk:80/wp-content/themes/twentyfifteen/cr_mss3.exe
hXXp://www.hairlosstreatments4u.com:80/4KVHAGFUPB/949.exe
hXXp://www.hertzlease.com.mt:80/mCVXg3ucvfG/949.exe

Virustotal File Analysis:


Command and Control Servers:

Request Method: POST

121.50.46.81:8080
173.230.130.252:8080
188.165.235.13:8080
192.126.123.10:8080
192.163.204.172:8080
200.159.128.189:8080
200.75.7.92:8080
201.175.17.35:8080
42.62.40.103:8080

User-agent Strings:

I have yet to determine if these are unique to the malware or not, so please be careful using them to block and/or detect malicious network traffic. If anyone has anymore information on these, then please leave a comment.

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)
Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)

Further Reading:

Geodo Tracker - website dedicated to tracking all Geodo information. The owner of the site has a blog as well and is well worth the reading.
Hybrid Analysis Results - sandbox analysis results for the executable of the zip file listed above.

Thursday, April 16, 2015

Houdini / h-worm / njRAT Tracking List

I added a tracking list for the Houdini malware (njRAT, h-worm, etc...). This list is best used in a monitoring tool rather than a blocking tool as some of the domains will most likely be out-of-date. If you are not familiar with this malware, then please check out the links listed below.

This list has grown over the past year since I have been tracking it, so I hope it serves you well. I will continue to update the list as I find new variants or indicators, and if you wish to contribute then please feel free to send me an email.

Click here to go to the page. Enjoy!

Further reading:

Tuesday, April 14, 2015

Incoming Houdini Tracking List

I have been seeing a good amount of Houdini traffic in the past, and it seems to be picking up steam again: for a quick refreshed, check out this FireEye report. So I decided to create a list of command and control servers used by the malware.

The list will not be an active/live list such as the ones you find on Abuse.ch, rather it will contain historical data of hosts, as well as other useful information such as user-agent string values, HTTP URI paths, destination ports, and other data.

The list should be posted within the week, so please check back.

Friday, March 20, 2015

Indicators - Zbot Variant

Apologies for not updating for a while, but I think this post willThis one has been showing up pretty frequently. I have labeled it as Zbot, but it is most likely Dridex or Upatre; if anyone has clarification then please let me know.

Threat Name: Zbot / Upatre / Dridex

Indicators: The malware will attempt a connection to the "checkip.dyndns.org" domain in order to ensure connectivity. If successful, then it will attempt to connect to several IP addresses (direct to IP over HTTP) using high level ports. It's hard to nail down exact domain names and IP addresses, but thankfully there are other indicators.

HTTP Indicators:
  • Request Methods
    • CONNECT - this method will be used to connect to "checkip.dyndns.org" to determine network connectivity.
    • POST - will connect to a domain with a URI path of "/gate.php".
    • GET
  • User-agent Strings:
    • Mazilla/4.0
    • Mazilla/5.0
  • HTTP URI Paths:
    • /gate.php
    • /1802us21/
    • /1902us21/
    • /2101us21/
    • /2901us21/
    • /mandoc/
    • /images/
    • /news/
    • /files/
    • /fla/
    • /ar/file/
    • /menu/
    • /dhl/
  • HTTP URI Filenames:
    • /factj.pdf
    • /gunter.pdf
    • /hone.pdf
    • /sdocc.pdf
Dear malware authors, please continue to use unique user-agent strings. Since the malware uses exploits to download the payload, ensure that Java and Adobe is up-to-date. Preventing the above user-agent string values to access the internet is also an effective means, if your web filtering appliance of choice allows you this option.

Friday, February 6, 2015

Indicators - Word Document Macro Virus

There have been may write-ups about these macro viruses on other security blogs and traffic analysis sites. However, I wanted to add a few that I have observed so far.

Threat Name: The macro virus has been seen downloading multiple malware types and names.

Indicators: The email subject may contain the word 'Invoice' along with the invoice number. The file attachment will be a Word document, but will contain the extension of .docm which indicates a macro enabled document. The document may also contain the word 'Invoice' in its name.

Post Infection: The user will only get infected if they allow the macro to run. Microsoft Word will warn the user that enabling macros could damage your computer, which is very true in this case.

Domains Contacted: The following domains were contacted after the macro was allowed to run.

  • drevenak.cz - 217.31.49.20
  • vivercomrequinte.com.br - 174.36.74.119
  • jamesdev.co.uk
  • www.otmoorelectrical.co.uk - 84.22.163.83
  • api.ipify.org
  • *.tor2web.org
  • *.tor2web.ru
Files Downloaded: The following files were observed being downloaded after the macro was enabled.
  • bin.exe - https://www.virustotal.com/en/file/63224095c15ff1206e65d0b8e69a0f7ffc75025d6e5427b206503a5f3e9cf24b/analysis/
  • vv.exe - https://www.virustotal.com/en/file/b261f19aab21889d256266bdeb8c1e3e408d495ef4a5648c4f237696f120706b/analysis/1423149772/
Network Indicators:
  • URI: GET /js/bin.exe
  • URI: GET /wp-content/uploads/vv.exe
  • URI: POST /gate.php
Prevention: Block all .docm file on your email server, if possible. Trying to blacklist the domains may be a futile effort as they can easily change, same with trying to block the executable files.

Links:

Thursday, January 22, 2015

User-agent Strings

A user-agent string is a value used by an application that identifies itself to the server. There are many sites that go into this a bit deeper, so I won't harp on it here. The purpose here is to identify malware that uses unique user-agent string values, which makes it terribly easy to find malicious traffic being generated by certain malware.

The best place to find these values are proxy logs, so you will need to know the field name that your proxy server uses to identify the user-agent string: I believe the field in BlueCoat proxy logs is cs(User-Agent) but yours may be different. Below is a list of user-agent strings that I have seen in our logs and have confirmed that they have been used by malware; there are many other out there, but I will not include those. I have also included a line that you can use to dig through old logs in order to locate past infections.

Malware: Houdini / Iniduoh / njRAT
This one should pop right out in your logs. It uses the below characters as a field separator, so there will be several of these in the user-agent field.
  • User-agent contains: <|>
  • Regex: <\|>
  • Regex: ((\w+)|(\W+))((<\|>)|(\\))((\w+)|(\W+))((<\|>)|(\\))((\w+)|(\W+))((<\|>)|(\\))[^<|\\]+((<\|>)|(\\))((\w+)|(\W+))[^<|\\]+((<\|>)|(\\))[^<|\\]+((\w+)|(\W+))((\w+)|(\W+))+
    • I did not write the above regex for this one and I cannot remember where I found it, so I am unable to give credit. If it's yours then please let me know.
Malware: Zero Access
  • User-agent: nsis_inetc (mozilla)
  • Regex: nsis_inetc\s\(mozilla\)
Malware: Generic Trojan
  • User-agent: Mozilla/5.0 WinInet
  • Regex: Mozilla\/5\.0\sWinInet
Malware: Dyre / Upatre
The following string was found on a Windows machine.
  • User-agent: Wget/1.9+cvs-stable (Red Hat modified)
  • Regex: Wget\/1\.9\+cvs-stable\s\(Red\sHat\smodified\)
Malware: Generic password stealing Trojan
  • User-agent: RookIE/1.0
  • Regex: RookIE\/1\.0
The following two user-agent strings will require the use of Log Parser. Attempting to do a regex search with these will return a large amount of results.

Malware: Tupym
Although AutoIt is legitemate, finding this user-agent may be malicious. Make sure you investigate this a bit further if you find it in your log files.
  • User-agent: AutoIt
  • SQL: SELECT [user-agent column name] FROM [file path] WHERE [user-agent column name] = 'AutoIt'
Malware: HkMain
Yes, this was actually found in proxy logs.
  • User-agent: M
  • SQL: SELECT [user-agent column name] FROM [file path] WHERE [user-agent column name] = 'M'
The agents listed below have a high certainty of being malicious, but investigate further as they are very close to being legitimate user-agent values.

Malware: Egamipload
  • User-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
  • Regex: Mozilla\/4\.0\s\(compatible;\sMSIE\s8\.0;\sWindows\sNT\s5\.1;\sTrident\/4\.0\)
Malware: Botnet / Adware
This was found in a known botnet as well as some adware.
  • User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
  • Regex: Mozilla\/4\.0\s\(compatible;\sMSIE\s6\.0;\sWindows\sNT\s5\.1;\sSV1\)
Malware: Yakes
Notice the lack of spacing within the parantheses.
  • User-agent: Mozilla/4.0 (compatible;MSIE 7.0;Windows NT 6.0)
  • Regex: Mozilla\/4\.0\s\(compatible;MSIE\s7\.0;Windows\sNT\s6\.0\)
That is it for now. I will add a separate page for these in the future as I continue to find more malicious user-agent strings.

Further reading:

Monday, January 19, 2015

Using SQL to Sift Through Data

Many things that I have found in the past was accomplished through trial and error, and when I find something that works I get really excited. SQL is lovely and it ranks right up there with regex as one of the need-to-know skills in anyone's tool box.

The problem: tons of log files with multiple columns and thousands of rows, and you only need two or three of those columns.

So what do you do, open every single file, select the columns you want, copy and paste the columns into a new spreadsheet? No.

The solution: SQL, or more specifically Log Parser. It already comes with many queries and scripts you can use, and it also allows you to use SQL to sift through many different types of files. Don't know SQL? No problem, it's easy and the below command will start you off in the right direction (make sure you select the correct file type next to the Log Type option):
  • SELECT hostname, ipaddress FROM '\Files\*.csv'
It may ask you to specify a folder when you attempt to run the query. SQL uses three basic commands to search for data; SELECT, FROM, and WHERE. The above command is basically asking to select the hostname and ipaddress columns from the following files (in this case the files are in the \Files folder), and returning the results.

After the query is finished the results will be displayed in the top window, which you can then export the to a new file. No more opening every single file and searching for columns; this simple tool and query can be used for many different purposes.

Further reading:

Wednesday, January 14, 2015

Indicators - Houdini RAT

Threat Name: Houdini

Variants or Other Possible Names: njRAT, Iniduoh.

This RAT (Remote Access Trojan) has been around for a while, and was first posted by FireEye. It is a pretty nasty RAT, but is quite easy to find in log files. I will brush over the indicators on FireEye's website, as well as some other indicators not listed.

Remote Host Connections:

The author is fascinated with no-ip.info and zapto.org, so start your search with those domains. Below are several other domains used by the RAT:
  • introworld.zapto.org
  • j2w2d.no-ip.biz (31.186.179.230)
  • qwqhack.no-ip.biz (37.239.116.223)
  • paltalk.servequake.com
  • terminator9.zapto.org
  • basss.no-ip.info
  • bg1337.zapto.org
  • ronaldo-123.no-ip.biz

HTTP URI Indicators:
  • /is-ready
HTTP Request Methods:
  • POST
User-agent String Values:

This is an easy catch. The below value is used as a separator in the user-agent string field:
  • <|>
Associated Snort Rule:
  • alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:"MALWARE-CNC Win.Backdoor.Iniduoh variant outbound connection"; flow:to_server,established; content:"/is-ready"; fast_pattern:only; http_uri; content:"User|2D|Agent|3A 20|"; http_header; content:"|3C 7C 3E|"; within:3; distance:8; http_header; content:"|3C 7C 3E|"; within:18; http_header; content:"|3C 7C 3E|Microsoft Windows"; within:84; http_header; metadata:impact_flag red, policy balanced-ips drop, policy security-ips drop, service http; reference:url,www.virustotal.com/en/file/220b551d9381fb56b48511b622a0bbc15482378396b3e83f708379f460f3347a/analysis/; classtype:trojan-activity; sid:28817; rev:3;)
Regex:

Search in the user-agent string field.
  • <\|>
Conclusion:

I was never able to find much information for this RAT and I hope it helps you out in your searches.

Friday, January 9, 2015

Indicators - Mudrop Malware

Threat Name: Mudrop

Mudrop has been around for awhile. There are plenty of Snort rules for it and I am pretty sure that many anti-virus applications can find and remove the infection. However, it is always good to know what to look for no matter how old the data. This information can be used for alerting, blocking, or digging through old logs.

Remote Host Connections:

  • api.batbrowse.com (70.186.131.145)
  • api.jotzey.net (70.186.131.34)
  • api.kozaka.net (70.186.131.178)
  • api.linkswift.co (70.186.131.183)
  • api.luckyleap.net (70.186.131.184)
  • api.myfindright.com (70.186.131.61)
  • api.plurpush.net (70.186.131.198)
  • api.secretsauce.biz (70.186.131.214)
  • api.webconnect.co (70.186.131.230)
  • api.whilokii.net (70.186.131.234)
  • api.lemurleap.info (70.186.131.186)
  • api.a-tu-zi.com (70.186.131.16)

HTTP URI Indicators:

The following can be found in the URI:
  • /gdp?alpha=
  • /gdi?alpha=
  • /gcs?alpha=
  • /gmi?alpha=
  • /rs
The URI's containing "alpha" will be followed by Base64 values. The URI containing "/rs" will not be followed by other characters.

HTTP Request Methods:
  • POST
  • GET
POST methods will contact the host with the "/rs" in the URI, while GET methods will contact the other hosts with "alpha" in the URI.

Regex:

The following is a good start at locating Mudrop infections in log files:
  • \/([a-z]{3})\?alpha=
Conclusion:

Feel free to ask questions or comment on the information. Thank you for reading!

Monday, January 5, 2015

Finding Malicious Activity

Prior to going crazy with tons of network indicators, we need to know how to search through many text based log files in order to find malicious activity. How do we doing this? Regular expressions (regex) are the answer. Knowing how to write a regex query is not required (so long as you already have a query you can use), but it is certainly helpful (seriously though, learn it). A trend with this blog is that most of my work will be done on a Windows machine, unless there is no Windows alternative to a piece of software.

In order to dig through thousands of lines of text we will use a tool called grepWin. As its name implies, it is a Windows based grep tool and will allow us to dig through files using regex or text based searches. As we know, finding threats is never a one-shot deal. We may find a new indicator and we will need to dig through old logs files (again, and again, and...) to see if there has been past activity that we may have missed.

So where do we find pre-made regex queries? There are a few sites, such as; MalwareSigs, CoffeeShopSecurity, and many Snort rules. Grab those expressions, toss them into grepWin and press the search button. Too easy right? OK, grepWin is pretty straight forward. Make sure you enter the location of the files in the "Search in" field (preferably these files should be in a comma separated format). In the "Search" section, choose "Regex search" and enter the regex query into the "Search for" field; if you click the / button it will allow for multiple lines of regex which comes in very useful. Under the "Limit search" section, select "All sizes" and "Include subfolders."

Before you press that search button, you want to make sure your regex will work. The grepWin application allows you to test the query, but I prefer something a bit more visual https://regex101.com. It tests your query against a text string and will also give you an explanation of the regex query, which is great when you are learning, and it will let you know if there is a match. Let's do a quick test run on that website and use the following information:
Regular Expression: \/([a-z]{3})\?alpha=
Test String: hXXp://api.browseburst.com/gdi?alpha=0/
The regex query will search for the Mudrop infection, and the test string is/was an actual host used by Mudrop (don't go to the site). Read through the explanation on the right if you are unfamiliar with regex. Also, notice how it matched on "/gdi?alpha=" in the URI. Now that we know the regex will work, go ahead and click the search button in grepWin and, depending on how many files you have, grab a cup of coffee.

If grepWin found any hits, it will display them in the "Search results" window. On the bottom right of the application you will see "Files" and "Content." Files will show all of individual files with content that matched the query, and Content will show each individual line within those files. You can open each file by right clicking the line and selecting Open. After digging through your search results you can grab any unique indicators to create new alerts and use those indicators to dig deeper to find more malicious activity.

That's it, pretty straight forward. There are, of course, many other tools that can be used to find malicious activity but this is a good start if you are fresh. When performing these kinds of searches, always keep notes of the regex strings you have used as well as any unique indicators. If you really want to have some fun, grab about 10 through 20 regex strings and run a multi-line search on your log files. You may be surprised, or saddened, by what you find.