An unpatched vulnerability in the Magento e-commerce platform could allow hackers to upload and execute malicious code on web servers that host online shops.

 

The flaw was discovered by researchers from security consultancy DefenseCode and is located in a feature that retrieves preview images for videos hosted on Vimeo. Such videos can be added to product listings in Magento.

 

The DefenseCode researchers determined that if the image URL points to a different file, for example a PHP script, Magento will download the file in order to validate it. If the file is not an image, the platform will return a “Disallowed file type” error, but won’t actually remove it from the server.

 

An attacker with access to exploit this flaw could achieve remote code execution by first tricking Magento to download an .htaccess configuration file that enables PHP execution inside the download directory and then downloading the malicious PHP file itself.

 

Once on the server, the PHP script can act as a backdoor and can be accessed from an external location by pointing the browser to it. For example, attackers could use it to browse the server directories and read the database password from Magento’s configuration file. This can expose customer information stored in the database, which in the case of online shops, can be very sensitive.

 

The only limitation is that this vulnerability cannot be exploited directly because the video-linking functionality requires authentication. This means attackers need to have access to an account on the targeted website, but this can be a lower-privileged user and not necessarily an administrator.

 

The authentication obstacle can also be easily overcome if the website doesn’t have the “Add Secret Key to URLs” option turned on. This option is intended to prevent cross-site request forgery (CSRF) attacks and is enabled by default.

 

CSRF is an attack technique that involves forcing a user’s browser to perform an unauthorized request on a website when visiting a different one.

 

“The attack can be constructed as simple as <img src=… in an email or a public message board, which will automatically trigger the arbitrary file upload if a user is currently logged into Magento,” the DefenseCode researchers said in an advisory. “An attacker can also entice the user to open a CSRF link using social engineering.”

 

This means that by simply clicking on a link in an email or by visiting a specifically crafted web page, users who have active Magento sessions in their browser might have their accounts abused to compromise websites.

 

The DefenseCode researchers claim that they’ve reported these issues to the Magento developers back in November, but received no information regarding patching plans since then.

 

Several versions of the Magento Community Edition (CE) have been released since November, the most recent one being 2.1.6 on Tuesday. According to DefenseCode, all Magento CE versions continue to be vulnerable, which is what prompted them to go public about the flaw.

 

“We have been actively investigating the root cause of the reported issue and are not aware of any attacks in the wild,” Magento, the company that oversees development of the e-commerce platform, said in an emailed statement. “We will be addressing the issue in our next patch release and continue to consistently work to improve our assurance processes.”

“All users are strongly advised to enforce the use of ‘Add Secret Key to URLs’ which mitigates the CSRF attack vector,” the DefenseCode researchers said. “To prevent remote code execution through arbitrary file upload the server should be configured to disallow .htaccess files in affected directories.”

 

Magento is used by over 250,000 online retailers, making it an attractive target for hackers. Last year, researchers found thousands of Magento-based online shops that had been compromised and infected with malicious code that skimmed payment card details.

Share

Microsoft released its monthly security-patch bundle Tuesday, fixing 45 unique vulnerabilities, three of which are publicly known and targeted by hackers.

The top priority this month should be given to the Microsoft Office security update because one of the fixed flaws has been actively exploited by attackers since January to infect computers with malware. Over the past few days this vulnerability, tracked as CVE-2017-0199, has seen widespread exploitation.

The CVE-2017-0199 vulnerability can be exploited through maliciously crafted RTF (Rich Text Format) documents when such documents are opened with either Microsoft Word or WordPad. Because WordPad is bundled with Windows by default, a patch for this flaw is also included in the security updates for Windows.
According to security vendor Qualys, the next priority should go to the updates for Microsoft’s Internet Explorer and Edge browsers. These update address several remote code execution vulnerabilities.

One flaw patched in IE allows attackers to bypass the cross-domain policies enforced by the browser. The flaw makes it possible to take information from one domain and inject it into another, violating an important security barrier.

Microsoft’s notes for this vulnerability mention that it has already been exploited in the wild, but don’t include other details about the attacks.

Critical vulnerabilities have also been patched in Hyper-V, Microsoft’s virtualization hypervisor that’s included in Windows Server 2008, 2012 and 2016, as well as in Windows 8.1 and 10. These vulnerabilities can allow applications running inside a guest operating system to escape the virtual machine and execute malicious code on the host OS.

Finally, a remote code execution vulnerability has been fixed in the Microsoft .NET Framework. This flaw potentially can be exploited by attackers to take complete control of a system running a vulnerable deployment of the framework.

Microsoft has also released a defense-in-depth update for Microsoft Office that disables the Encapsulated PostScript (EPS) filter by default. That’s because the company is aware of limited, targeted attacks that try to take advantage of an unpatched vulnerability in this filter.

The Microsoft updates also include third-party critical patches for Flash Player, which is bundled with Internet Explorer 11 and Edge.

This Patch Tuesday bundle is also notable because it marks the end of support for Windows Vista, which will no longer receive security updates after this round of patches.

Share
March 13, 2017

Talos has observed a new Apache vulnerability that is being actively exploited in the wild. The vulnerability (CVE-2017-5638) is a remote code execution bug that affects the Jakarta Multipart parser in Apache Struts, referenced in this security advisory. Talos began investigating for exploitation attempts and found a high number of exploitation events. The majority of the exploitation attempts seem to be leveraging a publicly released PoC that is being used to run various commands. Talos has observed simple commands  as well as more sophisticated commands including pulling down a malicious ELF executable and execution.

With exploitation actively underway Talos recommends immediate upgrading if possible or following the work around referenced in the above security advisory.
Exploitation Attempts

In searching through data Talos was able to find ample examples of the vulnerability being targeted and detection was covered by signatures that were released on 3/7/2017 (41818, 41819).

 

Vulnerability Analysis

 

Apache uses org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest to upload file.

 

 

In the exploit, #nike=’multipart/form-data’ will make the expression as true. Then function getMultiPartRequest() will be executed. It will configure struts.multipart.parser attribute using org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.

 

 

The struts.multipart.parser used by the fileUpload interceptor to handle HTTP POST requests, encoded using the MIME-type multipart/form-data, can be changed out. Currently there are two choices, jakarta and pell. The jakarta parser is a standard part of the Struts 2 framework and needs only its required libraries added to a project. The pell parser uses Jason Pell’s multipart parser instead of the Commons-FileUpload library. The pell parser is a Struts 2 plugin, for more details see: pell multipart plugin. There was a third alternative, cos, but it was removed due to licensing incompatibilities.

 

 

Finally, Struts2 uses LocalizedTextUtil.findText in function buildErrorMessage to build the error message while the exploit takes advantage of LocalizedTextUtil.findText to execute OGNL commands.

 

 

Simple Probing

Below is an example of some simple probing attacks that are ongoing just checking to see if a system is vulnerable by executing a simple Linux based command.

 

 

Running the PoC will create a text file in /tmp folder in the target:

 

 

Attack Mitigation

One way to mitigate these targeted attacks is via Apache Struts patches. Patching the web server can be a never-ending race. New patches are released much faster than organizations can run them through staging, testing and then push them into production. An alternative solution is virtual patching through an external security tool like a Web Application Firewall (WAF), which provides immediate protection to the web servers and applications maintaining business continuity while the right patch is developed, staged and tested.

Share

Google Dorks for Data Mining

Author: Martin Voelk,
March 1, 2017

Who doesn’t know the problem. You have a basic LinkedIn account and you want to do business development. Your searches are limited to X numbers, you don’t get the full search interface like Premium users and all that annoying stuff.

To the rescue once again comes Google and shell scripting. Google indexes like no other search engine.

Simple Google searches reveal the prospects you are looking for:

site:linkedin.com intext:”IT Manager” AND “Singapore” -jobs
site:linkedin.com intext:”IT Director” AND “Singapore” -jobs
site:linkedin.com intext:”CISO” AND “Singapore” -jobs
site:linkedin.com intext:”IT Manager” AND “Singapore” -jobs “Healthcare”
site:linkedin.com intext:”IT Manager” AND “Singapore” -jobs “Banking”
site:linkedin.com intext:”IT Manager” AND “Singapore” -jobs “Finance”
site:linkedin.com intext:”IT Manager” AND “Singapore” -jobs “Retail”
site:linkedin.com intext:”IT Manager” AND “Singapore” -jobs “Utilities”

Job titles can be changed, so can be countries and industries.

Now for everyone with a bit of shell / python experience, these dorks can be fully automated and will then report into an Excel sheet in minutes. Business development with Google 🙂

Share

IoT Teddy Bear Hacked

Author: Martin Voelk,
March 1, 2017

Whilst this sounds funny at first, it’s yet another serious data breach of customer data. IoT is becoming hacker’s first choice even before web applications these days. So don’t forget to have your IoT devices Pen Tested.

https://arstechnica.com/security/2017/02/creepy-iot-teddy-bear-leaks-2-million-parents-and-kids-voice-messages/ 

Share
February 6, 2017

 

Last weekend a security researcher publically disclosed a zero-day vulnerability in Windows 10, Windows 8.1 and Server editions after Microsoft failed to patch it in the past three months.

 

The zero-day memory corruption flaw resides in the implementation of the SMB (server message block) network file sharing protocol that could allow a remote, unauthenticated attacker to crash systems with denial of service attack, which would then open them to more possible attacks.

 

According to US-CERT, the vulnerability could also be exploited to execute arbitrary code with Windows kernel privileges on vulnerable systems, but this has not been confirmed right now by Microsoft.

 

Without revealing the actual scope of the vulnerability and the kind of threat the exploit poses, Microsoft has just downplayed the severity of the issue, saying:

 

“Windows is the only platform with a customer commitment to investigate reported security issues, and proactively update impacted devices as soon as possible. We recommend customers use Windows 10 and the Microsoft Edge browser for the best protection.”

 

However, the proof-of-concept exploit code, Win10.py, has already been released publicly for Windows 10 by security researcher Laurent Gaffie and does not require targets to use a browser.

 

The memory corruption flaw resides in the manner in which Windows handles SMB traffic that could be exploited by attackers; all they need is tricking victims to connect to a malicious SMB server, which could be easily done using clever social engineering tricks.

 

“In particular, Windows fails to properly handle a server response that contains too many bytes following the structure defined in the SMB2 TREE_CONNECT Response structure,” CERT said in the advisory.

 

“By connecting to a malicious SMB server, a vulnerable Windows client system may crash (BSOD) in mrxsmb20.sys.”
Since the exploit code is now publicly available to everyone and there is no official patch from Microsoft, all Windows users are left open to potential attacks at this time.

 

Until Microsoft patches the memory corruption flaw (most probably in the upcoming Windows update or out-of-band patch), Windows users can temporarily fix the issue by blocking outbound SMB connections (TCP ports 139 and 445 and UDP ports 137 and 138) from the local network to the WAN.

 

The vulnerability has been given Common Vulnerability Scoring System (CVSS) score of 7.8. Proof-of-concept code has been published on GitHub.

Share
February 5, 2017

 

United States Computer Emergency Readiness Team (US-CERT) has discovered a zero-day vulnerability in the SMB service of Microsoft Windows which lets attackers carry out Denial of Service attacks and crash the entire system leading to Blue Screen of Death (BSOD).

 

CERT’s advisory specifies that “by connecting to a malicious SMB server (Server Message Block), a vulnerable Windows client system may crash BSOD in mrxsmb20.sys.”

 

Furthermore, using this vulnerability, an attacker can launch all sorts of attacks such as executing arbitrary code. This vulnerability makes Windows 8.1 and Windows 10 exposed to exploitation and may also affect the Windows Server systems.

 

The advisory also states that Microsoft Windows has failed to handle traffic coming from a malicious or infected server properly and also it cannot handle server response that contains too many bytes “following the structure defined in the SMB2 TREE_CONNECT Response structure.”

 

The CERT team also reproduced the attack method by conducting a denial of service attack onto computers running patched versions of Windows 8.1 and Windows 10. However, the team could not successfully run arbitrary code.

https://t.co/xAsDOY54yl

 

 

The problem may worsen now since the exploit code that may let attackers take advantage of this zero-day vulnerability is already available online and therefore, a patch for the flaw is required badly. Until then, US-CERT cannot provide a solution to keep the users safe. It, however, has provided a temporary fix in the form of blocking outbound SMB connections on the local network.

Share

 

WordPress is one of the most used content management system (CMS) in the world. So when there is a security flaw in its system, it affects millions of users on the Internet. That is exactly what has been discovered by security researchers at Sucuri, an Internet security company which revealed that WordPress websites are vulnerable to a critical and easily exploitable zero-day Content Injection vulnerability.

Sucuri found a Content Injection or Privilege Escalation vulnerability affecting the REST API allowing an attacker to modify the content of any post or page within a WordPress site. However, there is good news since Sucuri discretely reported the vulnerability to WordPress security team who handled the matter professionally and informed as many security providers and hosts and implemented a patch before this became public.
If you are using WordPress on your website the only way you may be at risk is if you have not updated your WordPress to the latest version 4.7.2. The update was issued on January 26th.

In their blog post, Marc Alexandre Montpas from Sucuri stated that “This privilege escalation vulnerability affects the WordPress REST API that was recently added and enabled by default on WordPress 4.7.0. One of these REST endpoints allows access (via the API) to view, edit, delete and create posts. Within this particular endpoint, a subtle bug allows visitors to edit any post on the site. The REST API is enabled by default on all sites using WordPress 4.7.0 or 4.7.1. If your website is on these versions of WordPress, then it is currently vulnerable to this bug.”

Montpas further stated that “This is a serious vulnerability that can be misused in different ways to compromise a vulnerable site. We are hiding some technical details to make it harder for the bad guys, but depending on the plugins installed on a site, it can lead to a RCE (remote command execution). Also, even though the content is passed through wp_kses, there are ways to inject Javascript and HTML through it. Update now!”

If you or your friends are using WordPress, it is highly advisable to update your website and inform others about the issue so they can also update their WordPress to the latest version.

WordPress has also acknowledged the issue and published a blog post earlier today urging users to update their WordPress since it poses a “severe security risk” for users.

 

Share

IoT – the popular attack vector

Author: Martin Voelk,
January 23, 2017

Evolving technologies such a IoT (Internet of Things) enable IP based Internetworking with devices previously not part of the network. Fitness machines, Home Protection Systems, Automation systems, Industrial processing systems, medical equipment, Burglary systems, temperature controls etc.

The downside to IoT is that it opens up a whole new attack vector. Not only can poorly protection IoT machines be compromised, they also can serve as a jump host to further penetrate the customer network.

Shodan is the tool of choice these days. A lot of the underground community is actively exchanging scripts with the best IoT dorks. Only because there is a treadmill on the web doesn’t mean that you can leave the default username and password!

https://www.shodan.io

Share
January 9, 2017

 

Groups of attackers have adopted a new tactic that involves deleting publicly exposed MongoDB databases and asking for money to restore them. In a matter of days, the number of affected databases has risen from hundreds to more than 10,000.

 

The issue of misconfigured MongoDB installations, allowing anyone on the internet to access sensitive data, is not new. Researchers have been finding such open databases for years, and the latest estimate puts their number at more than 99,000.

 

On Monday, security researcher Victor Gevers from the GDI Foundation reported that he found almost 200 instances of publicly exposed MongoDB databases that had been wiped and held to ransom by an attacker or a group of attackers named Harak1r1.

 

The attackers left a message behind for the database administrators asking for 0.2 bitcoins (around US $180) to return the data.

 

A day later, the number of databases wiped by Harak1r1 had reached 2,500 and by Friday, more than 8,600 had been affected and contained the ransom message.

 

In addition, other attackers have joined the scheme, researchers counting at least five groups with different ransom messages so far. Together, the groups deleted 10,500 databases, and in some cases, they’ve replaced each other’s ransom messages.

 

The bad news is that most of them don’t even bother copying the data before deleting it, so even if the victims decide to pay, there’s a high chance they won’t get their information back.

 

Gevers said he has helped some victims and there was no evidence in the logs that the data had been exfiltrated. He advises affected database owners not to pay and to get help from security professionals.

 

MongoDB administrators are advised to follow the steps on the security checklist from the MongoDB documentation in order to lock down their deployments and prevent unauthorized access.

Share