|By Cory Marchand||
|June 27, 2012 07:00 AM EDT||
Malware analysis can be a time consuming process, especially when dealing with a sample from skilled attackers with time and money on their side . There is no doubt that fully reversing malware and finding out how it works is the most effective way to learn how to defend against it, but most businesses don't have the time or the professional resources to do it.
There are ways in which you, a Computer Network Defender, can glean enough information from malware to be used in IDS and AV signature creation, DNS poisoning and blocking as well as sharing with the CND community. This can be accomplished in a cost effective manner (maybe even free) and in an efficient manner that can rival very long code based analysis. There are even cases where in depth knowledge of how to fully reverse the sample is not needed.
It should be noted that this is a low tech, high level mechanism for capturing indicators from malware. It should not be considered a substitute for fully analyzing malicious software, as sophisticated samples can defeat a lab environment similar to this quite easily. I will not be covering anything related to debugging the malware, that is outside of the intention of this "How-to".
Before we start, you will need to procure a few bits and pieces:
- Host machine with enough storage and memory to run at least 2 virtual machines concurrently, 4GB of ram and at least 30GB would be the minimum requirement.
- A virtualization platform, there are several on the market, some of them are free to use, VirtualBox and Xen to name a couple. I will be using VMWare Fusion for this demonstration.
- A copy of "REMNUX", a reverse-engineering malware linux distribution available at http://zeltser.com/remnux/.
- A licensed copy of MS Windows (this will be your victim host). I will be using WindowsXP for this demonstration.
- Free and open source tools for analysis of the Windows host (Putty, RegShot, Sysinternals, etc etc)
Setting Up the Victim Host Machine
Something to consider when setting up your victim host machine is system and software patches. Depending on what you are testing on your victim host, it may only affect a certain version of Windows, or possibly only to a certain patch level. Something I like to do is to "snapshot" my "victim" host machines through various patch stages, that way if I need to roll back, it's as easy as choosing a snapshot and "rolling back". This also applies to the types of software you install on your victim, snapshot your host with different versions of java, flash and adobe reader to be able to quickly select a vulnerable configuration. Consider outfitting your malware analysis lab setup with hosts that mimic your native operating environment. If you only utilize Windows 7 and do not allow Firefox on your network, then set up your victim machines to match that configuration.
Once you have finished patching your host, downloading and installing various types of software to aid in allowing successful exploitation you are going to setup a new network adapter, and set it for "host-only". This will keep your host from accidentally reaching the Internet once infected. It will also allow you to send the traffic to another machine to analyze what your victim is trying to do once successful exploitation has taken place.
- Set the IP on your victim host to a non-routable address, for instance 10.1.1.10.
- Set your router or gateway to be 10.1.1.1, this will the IP address of your REMNUX virtual machine.
Setting Up the REMNUX Host Machine
One of the main purposes for the REMNUX virtual machine in this demonstration is simply to act as a catch-all for network traffic originating from your now exploited victim host. REMNUX has many uses and capabilities both for the beginner and advanced malware reverse engineer, but we want fast indicators from our malware sample so that we can start defending against it immediately.
The REMNUX virtual machine is ready to go once imported into your virtualization platform with minimal modifications. We are simply going to add a network adapter in "host-only" mode and set the IP address to a non-routable IP. REMNUX will act as the internet "gateway" and DNS server for our victim machine. This will allow us to see all network requests and DNS requests that come from our infected victim host.
Infecting the Host
Now that you have the infrastructure in place, test your connectivity between the victim virtual machine and the gateway virtual machine. Have Wireshark running on the gateway box to verify successful connectivity. Attempt to SSH from your victim host to the gateway using putty. You can use "pscp.exe" within the Putty suite to move the original malware, and any malicious files the malware creates or drops onto your victim. Once you have moved the file over to your REMNUX host, you can take the MD5 of the original malware, before it is run. This will help in creating virus signatures and give you the required information for sharing within the CND community.
Utilizing "Regshot", take a snapshot of the "C:" drive pre infection, that way you will have something to compare after your host is infected. Regshot will record the current windows registry, all windows directories and files before infection, allow you to record again after infection, and then compare the changes made to the host.
You can now move your malware sample to the victim host. Ensure that you are running the necessary services and tools on your REMNUX host to capture the traffic. If you are not looking to interact with the malware, Wireshark can provide a wealth of data with not much in-depth knowledge. If you are looking to interact however, please consult the REMNUX readme for more information on "honeyd", "farpd" and "fakedns".
I also recommend running some kind of process explorer on the victim host to monitor what the malware does, any new processes it may spawn or kill. Sysinternals suite has several great tools, Process Explorer and Process Monitor are my two favorites.
Capturing the Indicators
Once executed on your victim host, you can record the information being fed to ProcMon, allowing you to watch what the malware does. You may see new applications start, processes get killed and new processes start. These are all indicators of the malware, and essential data to capture.
Watch your REMNUX host, check to see if any callouts are being made by the malware and see if it attempts to resolve DNS addresses. Often times once the DNS has successfully resolved, you will witness the malware attempt to connect to the Command & Control domain over an HTTP/HTTPS port.
A Note on DNS Resolution with Malware
The malware may attempt to resolve a known good website, this can be for internet connectivity checking as well as an attempt to fool someone monitoring it. If the malware is unable to resolve lets say “google.com” it may simply die on the victim host, and never try to reach the real command and control domain (CnC). This is when you want to have “fakedns” running on your REMNUX host, it will resolve any domain asked, this will then give the malware the positive connectivity test it is looking for, at which point may try to resolve the actual CnC domain.
Once you are satisfied with the length of time you have let the malware run, 10 minutes or less usually suffices, you can take the second “Regshot’ of the system. This will capture any changes made to the system by the malware. Once it has completed the second pass, compare the two and analyze the output. “Regshot” will reveal any new files created, deleted or modified. It will show you if any new registry keys were added or changed and any services that were created. It is an essential tool in the analysis toolbox.
As you can see with the "dir /ah" command, the files that were hidden on the victim. These files were all dropped from the malicious word document.
Once you have located the dropped or newly added malware on the victim host, you should move them over to your "REMNUX" host for analysis. These files are also indicators of a positive infection and should be included in your analysis of the initial malware. The MD5 hashes of these files are just as relevant for blocking and signature development as the principle delivery of these files, e.g. malicious word document, can easily change in future attempts.
Share Your Findings - One of the Most Important Pieces to Computer Network Defense
From this quick, and high level analysis of the malicious word document you were presented with several indicators that can benefit other Computer Network Defenders. One thing that I have learned is that not everyone catches or sees something the way I may I see it. So when I look at a piece of malware, no matter how simple I think it may be, I share it with the hopes that the indicators could assist others.
It is essential that you share as much information as you are comfortable with, as it may help to thwart future attempts against other targets. Collaboration amongst teams can help to stop these types of infections and identify current infections if they exist within your network. If possible, share any Command & Control Domains, MD5 Hashes, IP addresses, File Names and Sizes and anything else you feel is relevant to the infection.
What if you could build a web application that could support true web-scale traffic without having to ever provision or manage a single server? Sounds magical, and it is! In his session at 20th Cloud Expo, Chris Munns, Senior Developer Advocate for Serverless Applications at Amazon Web Services, will show how to build a serverless website that scales automatically using services like AWS Lambda, Amazon API Gateway, and Amazon S3. We will review several frameworks that can help you build serverle...
Mar. 24, 2017 01:30 PM EDT Reads: 1,486
SYS-CON Events announced today that Linux Academy, the foremost online Linux and cloud training platform and community, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Linux Academy was founded on the belief that providing high-quality, in-depth training should be available at an affordable price. Industry leaders in quality training, provided services, and student certification passes, its goal is to c...
Mar. 24, 2017 01:15 PM EDT Reads: 3,767
SYS-CON Events announced today that Interoute, owner-operator of one of Europe's largest networks and a global cloud services platform, has been named “Bronze Sponsor” of SYS-CON's 20th Cloud Expo, which will take place on June 6-8, 2017 at the Javits Center in New York, New York. Interoute is the owner-operator of one of Europe's largest networks and a global cloud services platform which encompasses 12 data centers, 14 virtual data centers and 31 colocation centers, with connections to 195 add...
Mar. 24, 2017 01:15 PM EDT Reads: 358
What sort of WebRTC based applications can we expect to see over the next year and beyond? One way to predict development trends is to see what sorts of applications startups are building. In his session at @ThingsExpo, Arin Sime, founder of WebRTC.ventures, will discuss the current and likely future trends in WebRTC application development based on real requests for custom applications from real customers, as well as other public sources of information,
Mar. 24, 2017 12:45 PM EDT Reads: 219
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 20th International Cloud Expo, which will take place on June 6–8, 2017, at the Javits Center in New York City, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
Mar. 24, 2017 12:45 PM EDT Reads: 1,799
FinTech is the sum of financial and technology, and it’s one of the fastest growing tech industries. Total global investments in FinTech almost reached $50 billion last year, but there is still a great deal of confusion over what it is and what it means – especially as it applies to retirement. Building financial startups is not simple, but with the right team, technology and an innovative approach it can be an extremely interesting domain to disrupt. FinTech heralds a financial revolution that...
Mar. 24, 2017 12:30 PM EDT Reads: 2,939
Keeping pace with advancements in software delivery processes and tooling is taxing even for the most proficient organizations. Point tools, platforms, open source and the increasing adoption of private and public cloud services requires strong engineering rigor - all in the face of developer demands to use the tools of choice. As Agile has settled in as a mainstream practice, now DevOps has emerged as the next wave to improve software delivery speed and output. To make DevOps work, organization...
Mar. 24, 2017 12:15 PM EDT Reads: 1,317
SYS-CON Events announced today that Loom Systems will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Founded in 2015, Loom Systems delivers an advanced AI solution to predict and prevent problems in the digital business. Loom stands alone in the industry as an AI analysis platform requiring no prior math knowledge from operators, leveraging the existing staff to succeed in the digital era. With offices in S...
Mar. 24, 2017 12:15 PM EDT Reads: 872
SYS-CON Events announced today that T-Mobile will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. As America's Un-carrier, T-Mobile US, Inc., is redefining the way consumers and businesses buy wireless services through leading product and service innovation. The Company's advanced nationwide 4G LTE network delivers outstanding wireless experiences to 67.4 million customers who are unwilling to compromise on ...
Mar. 24, 2017 12:00 PM EDT Reads: 1,812
SYS-CON Events announced today that Cloudistics, an on-premises cloud computing company, has been named “Bronze Sponsor” of SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Cloudistics delivers a complete public cloud experience with composable on-premises infrastructures to medium and large enterprises. Its software-defined technology natively converges network, storage, compute, virtualization, and management into a ...
Mar. 24, 2017 12:00 PM EDT Reads: 1,571
Deep learning has been very successful in social sciences and specially areas where there is a lot of data. Trading is another field that can be viewed as social science with a lot of data. With the advent of Deep Learning and Big Data technologies for efficient computation, we are finally able to use the same methods in investment management as we would in face recognition or in making chat-bots. In his session at 20th Cloud Expo, Gaurav Chakravorty, co-founder and Head of Strategy Development ...
Mar. 24, 2017 11:30 AM EDT Reads: 3,271
Interoute has announced the integration of its Global Cloud Infrastructure platform with Rancher Labs’ container management platform, Rancher. This approach enables enterprises to accelerate their digital transformation and infrastructure investments. Matthew Finnie, Interoute CTO commented “Enterprises developing and building apps in the cloud and those on a path to Digital Transformation need Digital ICT Infrastructure that allows them to build, test and deploy faster than ever before. The int...
Mar. 24, 2017 10:55 AM EDT Reads: 355
SYS-CON Events announced today that CA Technologies has been named “Platinum Sponsor” of SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY, and the 21st International Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CA Technologies helps customers succeed in a future where every business – from apparel to energy – is being rewritten by software. From ...
Mar. 24, 2017 10:45 AM EDT Reads: 1,342
In today's enterprise, digital transformation represents organizational change even more so than technology change, as customer preferences and behavior drive end-to-end transformation across lines of business as well as IT. To capitalize on the ubiquitous disruption driving this transformation, companies must be able to innovate at an increasingly rapid pace. Traditional approaches for driving innovation are now woefully inadequate for keeping up with the breadth of disruption and change facing...
Mar. 24, 2017 10:45 AM EDT Reads: 10,565
SYS-CON Events announced today that Infranics will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Since 2000, Infranics has developed SysMaster Suite, which is required for the stable and efficient management of ICT infrastructure. The ICT management solution developed and provided by Infranics continues to add intelligence to the ICT infrastructure through the IMC (Infra Management Cycle) based on mathemat...
Mar. 24, 2017 09:45 AM EDT Reads: 2,679