|By David Dodd||
|July 22, 2014 09:30 AM EDT||
Having your network environment protected with the latest virus protection, control what software is installed and allowed to run, restrict ingress and egress network access, protect web browsing, limit user account access, update security patches, change management practices, etc. All these efforts are critical to follow in the corporate environment but all will fall short if you don't have the proper monitoring in place to detect badness on your network and to respond quickly and effectively when it happens. When your network has the proper monitoring in place and knowledgeable engineers to monitor for outbreaks you will begin to have better visibility of how network traffic flows in your environment. When you understand how traffic flows on your network you can respond better when badness happens.
I will demonstrate how to use a number of tools to analyze a memory image file from an infected windows machine. I will demonstrate how to acquire a memory image from a windows machine that is currently running will malware infection and the process of memory analysis using various tools.
To gather an image file from an infected machine can be performed a number of ways. If you have an enterprise version of EnCase you can acquire evidence very fast and from various devices such as laptop, desktop, and mobile devices like smartphones and tablets. For most of us our IT budget is limited and this option is not viable. Using something like F-Response TACTICAL is a solution and requires only two usb sticks. One is labeled TACTICAL Subject and the other is TACTICAL Examiner, you put the Examiner one in the box you are researching malware. Next you put the Subject on the box that is infected with Malware. Below I demonstrate how this is performed with the subject on a windows box (infected with malware) and the examiner installed on a Linux platform (SANS SIFT workstation) to acquire the image.
Once the usb stick is loaded on the windows box install the program so it can listen on its external interface (see Figure #1).
Running the subject program on the infected windows box, remember to enable physical memory
On your SIFT workstation insert the usb stick examiner, make sure it shows up as loaded on your workstation (See Figure #2). Next execute the program f-response-tacex-lin.exe using the following syntax (see Figure #3). Notice that it connects to the following:
- · iqn.2008-02.com.f-response.cr0wn-d00e37654:disk-0
- · iqn.2008-02.com.f-response.cr0wn-d00e37654:disk-1
- · iqn.2008-02.com.f-response.cr0wn-d00e37654:vol-c
- · iqn.2008-02.com.f-response.cr0wn-d00e37654:vol-e
- · iqn.2008-02.com.f-response.cr0wn-d00e37654:pmem
Make sure the examiner usb is loaded on the SIFT workstation
Perform the connection between the SIFT workstation and the infected windows box
Next we are going to login to iqn.2008-02.com.f-response.cr0wn-d00e37654:disk-0 with the following command (see Figure #4):
# iscsiadm -m node -targetname=iqn.2008-02.com.f-response.cr0wn-d00e37654:disk-0 --login
Successfully connected to windows box at 192.168.1.129
The iscsiadm command is an open-iscsi administration utility that allows discovery and login to iSCSI targets, as well as access and management of the open-iscsi database. The -m specify the mode which is node it can also be defined as: discoverydb, fw, host iface or session. With the mode selected as node we use the -targetname= and specify the location of the target drive.
After successfully connecting to the remote machine run fdisk -l and see our new device located at /dev/sdd1 (see Figure #5)
Results after running fdisk -l
Next we will mount the partition /dev/sdd1 which is located in the screenshot above (Figure #5) using the following mount command.
# mount -o ro,show_sys_files,streams_interface=windows /dev/sdd1 /mnt/windows_mount
Using the mount command with the -o option: ro - mount the file system read-only, show_sys_files - show all system files as normal files, streams_interface=windows - this option controls how named data streams in WIMfiles are made available with "windows" the named data stream. This will mount the memory from our windows box to /mnt/windows_mount. After changing into that directory and list files you will see the following (see Figure #6)
List of files after mounting the memory from our target windows box following by login to the pmem location
Now we need to login to the process memory of the target which is the pmem location (see Figure #3 ‘F-Response Target = iqn.2008-02.com.f-response.cr0wn-d00e37654:pmem'). We will use the iscsiadm open-iscsi administration utility to perform this task with the following command:
# iscsiadm -m node -targetname=iqn.2008-02.com.f-response.cr0wn-d00e37654:pmem -login
Again we are using the isciadm utility specifying the node with targetname of where the pmem file is located. Now we will run fdisk -l and see the partition tables (see Figure #7).
Results after running fdisk -l notice the HPFS/NTFS system at /dev/sdd1. This is the result after login to the pmem location.
Now we can image the remote systems memory using dc3dd which was developed by Jesse Komblum at the DoD Cyber Crime Center. Dc3dd is similar to dd but allows us to use for forensic work, allowing you to take hashes and split an image all from one command. Open up a terminal and type the following:
# dc3dd if=/dev/sde of=/cases/remote-system-memory8.img progress=on hash=md5 hashlog=/cases/remote-system-memory8.md5
Here is a breakdown of the command:
- · if=DEVICE or FILE - Read input from a device or a file, in this case /dev/sde (see Figure #7 ‘Disk /dev/sde: 2466 MB, 2466250752 bytes
- · of=FILE or DEVICE - Write output to a file or device, in this case /cases/remote-system-memory8.img
- · progress=on - Will show progress on screen
- · hash=ALGORITHM - Compute an ALGORITHM hash of the input and also of any outputs specified using hof=, hofs=, phod=, or fhod=, where ALGORITHM is one of md5, sha1, sha256, or sha512
- · hashlog=FILE - Log total hashes and piecewise hashes to FILE.
This will do a forensic copy of the windows memory file to your computer; you can see a screenshot of the progress (see Figure #8).
Performing a forensic copy of the windows memory file using dc3dd
Now that we have an image file of the windows memory we can analysis for existence of malware. There are a couple of tools that you can use one is for the windows platform called Redline by Mandiant which I will be going over in greater detail later. The second tool which is open source is Volatility implemented in Python for the extraction of digital artifacts from volatile memory (RAM) samples. I will be discussing both in very limited bases in this month's article.
If the memory image was acquired from an unknown system and although this was a closed lab environment and I know what system it came from you will need to identify the operation system using Volatility (see Figure #9).
Using Volatility to identify what operation system the dump came from
We use the imageinfo plug-in for Volatility to find out the operation system the memory dump belongs to. Here we see in the suggested profile portion of the output it is a WinXP SP2x86 system, you will need this information to perform more work using Volatility on this memory image file.
To look at the running processes we use the following command:
$ vol.py -profile=WinXPSP2x86 pslist -f remote-system-memory8.img
You can also use the psscan plugin to scan the memory image for EPROCESS blocks with the following command:
$ vol.py -profile=WinXPSP2x86 psscan -f remote-system-memory8.img
Use the psscan to enumerate processes using pool tag scanning that can find processes that previously terminated (inactive) and processes that have been hidden or unlinked by a rootkit (see Figure #10).
Volatility with the psscan invoked
Now for a quick view of Mandiant Redline application we copy the windows memory images off our SANS Investigate Forensic Toolkit (SIFT) and on to a separate Windows workstation where you have Mandiant Redline installed. Next you will analysis your memory image with Redline (see Figure #11).
Loading memory image to be analyzed by Mandiant Redline followed by choosing ‘I am Reviewing a Full Live Response or Memory Image'.
Mandiant Redline is a free tool that provides host investigative capabilities to users and finds signs of malicious activity through memory and file analysis to develop a threat assessment profile. After I infected the test windows box with a known malware variant and allowed the system to react the machine wanted to restart at that moment I acquired a memory image and loaded it into Redline. I then allowed the machine to reboot and took another memory image. The total processes that are running on the system are in Figures #12 (left before reboot & right after reboot).
Total numbers of processes running after installing of malware then list of processes running after reboot
After comparing the two different lists we see that after reboot we have new processes running (jh MRI Score 61 PID - 38533 and svchost.exe MRI Score 61 PID - 1560). MRI Score is the Redline analyzes of each process and memory section to calculate a Malware Risk Index (MRI) score for each process.
Next month I will dive deeper into further information you can learn from analysis of memory images using both Mandiant Redline and Volatility.
SYS-CON Events announced today that MobiDev, a software development company, will exhibit at the 17th International Cloud Expo®, which will take place November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. MobiDev is a software development company with representative offices in Atlanta (US), Sheffield (UK) and Würzburg (Germany); and development centers in Ukraine. Since 2009 it has grown from a small group of passionate engineers and business managers to a full-scale mobi...
Jul. 31, 2015 02:30 PM EDT Reads: 266
There are many considerations when moving applications from on-premise to cloud. It is critical to understand the benefits and also challenges of this migration. A successful migration will result in lower Total Cost of Ownership, yet offer the same or higher level of robustness. In his session at 15th Cloud Expo, Michael Meiner, an Engineering Director at Oracle, Corporation, analyzed a range of cloud offerings (IaaS, PaaS, SaaS) and discussed the benefits/challenges of migrating to each offe...
Jul. 31, 2015 02:30 PM EDT
Chuck Piluso presented a study of cloud adoption trends and the power and flexibility of IBM Power and Pureflex cloud solutions. Prior to Secure Infrastructure and Services, Mr. Piluso founded North American Telecommunication Corporation, a facilities-based Competitive Local Exchange Carrier licensed by the Public Service Commission in 10 states, serving as the company's chairman and president from 1997 to 2000. Between 1990 and 1997, Mr. Piluso served as chairman & founder of International Te...
Jul. 31, 2015 02:00 PM EDT Reads: 362
Mobile, social, Big Data, and cloud have fundamentally changed the way we live. “Anytime, anywhere” access to data and information is no longer a luxury; it’s a requirement, in both our personal and professional lives. For IT organizations, this means pressure has never been greater to deliver meaningful services to the business and customers.
Jul. 31, 2015 01:45 PM EDT
In their session at 17th Cloud Expo, Hal Schwartz, CEO of Secure Infrastructure & Services (SIAS), and Chuck Paolillo, CTO of Secure Infrastructure & Services (SIAS), provide a study of cloud adoption trends and the power and flexibility of IBM Power and Pureflex cloud solutions. In his role as CEO of Secure Infrastructure & Services (SIAS), Hal Schwartz provides leadership and direction for the company.
Jul. 31, 2015 11:45 AM EDT Reads: 125
In a recent research, analyst firm IDC found that the average cost of a critical application failure is $500,000 to $1 million per hour and the average total cost of unplanned application downtime is $1.25 billion to $2.5 billion per year for Fortune 1000 companies. In addition to the findings on the cost of the downtime, the research also highlighted best practices for development, testing, application support, infrastructure, and operations teams.
Jul. 31, 2015 11:45 AM EDT Reads: 117
Puppet Labs has announced the next major update to its flagship product: Puppet Enterprise 2015.2. This release includes new features providing DevOps teams with clarity, simplicity and additional management capabilities, including an all-new user interface, an interactive graph for visualizing infrastructure code, a new unified agent and broader infrastructure support.
Jul. 31, 2015 10:00 AM EDT Reads: 142
For IoT to grow as quickly as analyst firms’ project, a lot is going to fall on developers to quickly bring applications to market. But the lack of a standard development platform threatens to slow growth and make application development more time consuming and costly, much like we’ve seen in the mobile space. In his session at @ThingsExpo, Mike Weiner, Product Manager of the Omega DevCloud with KORE Telematics Inc., discussed the evolving requirements for developers as IoT matures and conducte...
Jul. 31, 2015 08:45 AM EDT Reads: 301
Container technology is sending shock waves through the world of cloud computing. Heralded as the 'next big thing,' containers provide software owners a consistent way to package their software and dependencies while infrastructure operators benefit from a standard way to deploy and run them. Containers present new challenges for tracking usage due to their dynamic nature. They can also be deployed to bare metal, virtual machines and various cloud platforms. How do software owners track the usag...
Jul. 31, 2015 08:00 AM EDT Reads: 159
Explosive growth in connected devices. Enormous amounts of data for collection and analysis. Critical use of data for split-second decision making and actionable information. All three are factors in making the Internet of Things a reality. Yet, any one factor would have an IT organization pondering its infrastructure strategy. How should your organization enhance its IT framework to enable an Internet of Things implementation? In his session at @ThingsExpo, James Kirkland, Red Hat's Chief Arch...
Jul. 30, 2015 07:30 PM EDT Reads: 1,401
Providing the needed data for application development and testing is a huge headache for most organizations. The problems are often the same across companies - speed, quality, cost, and control. Provisioning data can take days or weeks, every time a refresh is required. Using dummy data leads to quality problems. Creating physical copies of large data sets and sending them to distributed teams of developers eats up expensive storage and bandwidth resources. And, all of these copies proliferating...
Jul. 30, 2015 06:30 PM EDT Reads: 892
Malicious agents are moving faster than the speed of business. Even more worrisome, most companies are relying on legacy approaches to security that are no longer capable of meeting current threats. In the modern cloud, threat diversity is rapidly expanding, necessitating more sophisticated security protocols than those used in the past or in desktop environments. Yet companies are falling for cloud security myths that were truths at one time but have evolved out of existence.
Jul. 30, 2015 06:00 PM EDT Reads: 1,804
Digital Transformation is the ultimate goal of cloud computing and related initiatives. The phrase is certainly not a precise one, and as subject to hand-waving and distortion as any high-falutin' terminology in the world of information technology. Yet it is an excellent choice of words to describe what enterprise IT—and by extension, organizations in general—should be working to achieve. Digital Transformation means: handling all the data types being found and created in the organizat...
Jul. 30, 2015 05:00 PM EDT Reads: 1,090
Public Cloud IaaS started its life in the developer and startup communities and has grown rapidly to a $20B+ industry, but it still pales in comparison to how much is spent worldwide on IT: $3.6 trillion. In fact, there are 8.6 million data centers worldwide, the reality is many small and medium sized business have server closets and colocation footprints filled with servers and storage gear. While on-premise environment virtualization may have peaked at 75%, the Public Cloud has lagged in adop...
Jul. 30, 2015 04:00 PM EDT Reads: 2,206
SYS-CON Events announced today that HPM Networks will exhibit at the 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. For 20 years, HPM Networks has been integrating technology solutions that solve complex business challenges. HPM Networks has designed solutions for both SMB and enterprise customers throughout the San Francisco Bay Area.
Jul. 30, 2015 03:45 PM EDT Reads: 452