Novel malvertising attack leads to drive by ransomware

Today Kaspersky issued a Threatpost: regarding the evolving malvertising and ransomware threat.

It can be incredibly distuptive, costly, and in some cases devastating in its consequences so we at Sec-1 Ltd have taken a look at what it means in terms of: – is there anything about this news that is surprising, unique or novel? – what is the real threat from this? – how should users and organisations respond?

Taking a look at the ThreatPost article we didn’t find this surprising at all; it’s reminiscent of another article (​) posted in 2014 referencing attacks from 2012.

Exploitation toolkits give attackers an easy method of deploying malicious payloads to victims to allow a large degree of control over their machines. Couple that with the fact that ​ransomware has been proven to be profitable to criminals. Add this to the fact that malvertising is an effective method of hitting a large and varied number of potential victims and it’s unsurprising that they are continuing to utilise these tactics. Given its profitability ransomware has evolved, as has been the case with malware trends for the past 2 decades, into ‘toolkits’. These toolkits allow the chaining of exploitation and evasion tactics allowing them to get around traditional security defences such as anti-virus and firewalls. The usual tactics of ‘script src=’ or hidden iframes are well known techniques for issuing a browser redirection for malvertising – this 302 ‘cushioning’ (what seems to be essentially 302 redirects over iframes) is a new technique – and when coupled with domain shadowing, also used by this toolkit, can lead to an effective compromise of a target.

The real threat here to end-users is the potential impact of the ransomware payloads. Regardless of how they are delivered if users are hit with ransomware they risk losing all of their data: – that includes all of those family photos stored on your laptop, or that assignment you’re working on for university. The files that each user has that they consider critical differs greatly, but all users have something on their machines that would be a terrible loss to them if they couldn’t access it. That’s what ransomware does, it encrypts your harddisk and denies you access to your files until you pay the ransom.

Generally speaking, exploitation toolkits do not deploy “Zero day exploits” but utilise well known payloads, in this case a payload from 2013. This means that not all hope is lost for end users are there are steps, to back up the tried and tested “defence in depth” policy, they can take to ensure they are protected:

Patch as soon as you can!

Configure your computer to automatically install updates for both your web browser and your operating system. The challenge here is not to wait until day 30 of the “accepted” window for applying patches but to do it closer to the day the patch is released. In this example the ransomware was launched well before the patches are commonly applied – as such, the threat is more immediate, especially given our natural inclination to click on a link in an email or other communication, without necessarily having done our background checking for the link’s validity.

Back-ups and Separation of Storage

Backup important data on external hard disks that are not usually connected to your machine. If the disk isn’t connected then the malware can’t encrypt it and deny access! Backup regularly.

Update your antivirus, regularly!

The URL in the Email won’t be the only route to what you want if its legitimate

Employ good practices when receiving email, if it’s asking to you to “click” think twice before you do! In the corporate world there are many more ways to apply controls using Digital Signing of emails, broad scale and regular awareness training programs that engender good habits of not clicking on malware links and help enforce corporate policy. Given the rise in Advanced Persistent Threats this clearly has benefits wider than just holding sensitive data to ransom.

Stop and think before you Click

The reality is that phishing emails and malvertising are looking to exploit our trust in brands so that we just click, resulting in us walking into these types of attack. There is a simple way of avoiding these attacks simply by using the more formal way of arriving at the same information. If you like what the malvertisment is offering then use a search engine to find the destination rather than click the advert. In the same way as in email, if amazon or ebay are emailing you there will be an email in the message board withtin their application. Rather than follow the link in the email, login to the application and find a different route to the same info.

Other links…

SC Magazine – Novel malvertising attack leads to drive by ransomware


Posted in News | Tagged , , | Comments Off on Novel malvertising attack leads to drive by ransomware

Tool: Group Policy Passwords Exploit Tool – gp3finder

Group Policy preferences were introduced by Microsoft in Windows 2008 allowing administrators to configure unmanaged settings (settings which the user can change) from a centrally managed location – Group Policy Objects (GPO) [1].

Among the preference items configurable through Group Policy preferences are several that can contain credentials: Local Groups and User Accounts, Drive Mappings, Schedule Tasks, Services, and Data Sources.

These credentials are stored within the preference item in SYSVOL in the GPO containing that preference item. In order to obscure the password from casual users it is encrypted in the XML file of the preference item [2]. However anyone who gains access to SYSVOL can decrypt the passwords because Microsoft published the Advanced Encryption Standard (AES) encryption key [1]:

4e 99 06 e8  fc b6 6c c9  fa f4 93 10  62 0f fe e8
f4 96 e8 06  cc 05 79 90  20 9b 09 a4  33 b6 6c 1b

Microsoft addressed this issue in MS14-025 [4] however this update only prevented the creation of new Group Policy Preference items containing credentials; it did not remove any existing instances as this was considered too disruptive. Therefore network administrators must take action to find and remove these vulnerable items.

Several tools exist to exploit this vulnerability including:

Get-GPPPassword (PowerShell –

gpp (Metasploit Post Module – (Python –

gpp-decrypt-string.rb (Ruby –

However each of these existing tools have a significant weakness. Get-GPPPassword must be run from a Windows machine, the gpp Metasploit post module requires a meterpreter session, and gpp-decrypt-string.rb require you to manually extract the cpassword for decryption, and finally the version of available for download no longer works at the time of writing (due to an update to PyCrypto that removed the default Initialisation Vector (IV) of 16 bytes of zeros).

Sec-1 Penetration Tester Oliver Morton therefore wrote a new cross platform tool, dubbed GP3Finder (Group Policy Preference Password Finder), to automate the process of finding, extracting and decrypting passwords stored in Group Policy preference items. This tool is written in Python (2.7) and depends on PyCrypto and PyWin32 on Windows or subprocesses on *nix based operating systems.

GP3Finder has been released open source under the GPL2 license here and a compiled executable for Windows is also available here.

Update v4.0

On a recent test, Oliver had compromised a single Windows host and had remote desktop access as a low privilege user. Since he couldn’t map the C$ share remotely, and didn’t want to search through the dozens of Group Policy Preference items using built in Windows utilities, he quickly added the required functionality to gp3finder instead.

Note: Group Policy Preferences are cached locally under the (hidden) directory: “C:\ProgramData\Microsoft\Group Policy\History\” by default.

In this update the option to specify the start path when searching a remote share was added. This allows you to quickly search for Group Policy Preference passwords when you have access to the C$ share without searching the entire drive.

Another significant change is that you can now specify multiple hosts to search – ideal if you have access to C$ on a number of hosts and want to check all of them. Note, this functionality is not threaded (yet) so can take some time to complete.

Finally some of the command line options have been changed to ensure they are as intuitive as possible (see below or –help).

Example Usage

Decrypt a given cpassword: -D CPASSWORD

The following commands output decrypted cpasswords (from Groups.xml etc) and list of xml files that contain the word ‘password’ (for manual review) to a file (‘gp3finder.out’ by default, this can be changed with -o FILE).

Find and decrypt cpasswords on domain controller automatically: -A -t DOMAIN_CONTROLLER -u DOMAIN\USER
 Password: PASSWORD

Maps DOMAIN_CONTROLLER’s sysvol share with given credentials.

Find and decrypt cpasswords on the local machine automatically: -A -l

Searches through “C:\ProgramData\Microsoft\Group Policy\History” (by default) this can be changed with -lr PATH

Find and decrypt cpasswords on a remote host: -A -t HOST -u DOMAIN\USER -s C$ -rr "ProgramData\Microsoft\Group Policy\History"

Find and decrypt cpasswords on hosts specified in a file (one per line): -A -f HOST_FILE -u DOMAIN\USER -s C$ -rr "ProgramData\Microsoft\Group Policy\History"

Note: the user this script is run as must have permission to map/mount shares if running against a remote host.

Additional options are available: --help


[1] [Online]. Available:
[2] [Online]. Available:
[3] [Online]. Available:
[4] [Online]. Available:

Posted in Tools | Comments Off on Tool: Group Policy Passwords Exploit Tool – gp3finder

Critical Vulnerability in Magento Platform

Researchers have identified a serious vulnerability in Magento, the popular e-commerce platform owned by eBay. This critical flaw in the Magento eCommerce platform exposes online shops to serious risk by allowing malicious hackers to access credit card data or execute arbitrary PHP code on the web server. This vulnerability should be considered a high risk factor for businesses making use of the Magento platform, and should be addressed as a matter of priority.

Our SaaS scanning platform has already written a plugin to detect this vulnerability

eBay has made a patch available to remediate this issue, which is available here:

Posted in Advisories, News | Comments Off on Critical Vulnerability in Magento Platform

Helping the Community

One of the things we like to do at Sec-1 is contribute back to the community wherever possible. As full time Penetration Testers, we often perform Research and Development to identify new vulnerabilities, adding checks to our scanning tools to help organisations highlight areas of concern.

As well as this, we often create tools to aid the rest of our teams and to contribute back to the pen testing and general security community.

Recently, one of Sec-1’s penetration testers, Matthew Hall, made a significant contribution to the Metasploit project.

Continue reading

Posted in News, Tools | Comments Off on Helping the Community

Goodbye 2014 & PCI DSS 2.0

pci_security_logoAs of the 1st Jan 2015 you cannot validate against PCI DSS Version 2 and must submit all validations against PCI DSS Version 3.0.

With this in mind we’ve produced an insightful new 8-page ‘Christmas-themed’ whitepaper, written by a Sec-1 Ltd Qualified Security Assessor (QSA): PCI DSS 3.0: A Christmas Carol.

Continue reading

Posted in News, White Papers | Comments Off on Goodbye 2014 & PCI DSS 2.0

Government Supply Chain to request Cyber Essentials from suppliers

cyber-essentials-logo-high-res‘Government Supply Chain to use Cyber Essentials to better manage the security risks presented by third parties.’

Cyber Essentials is the Governments standard to encourage UK companies to attain a minimum level of security. Importantly, as of the 1st October 2014 any organisation bidding on projects published after this date will have to demonstrate that they comply with the standard.

Continue reading

Posted in Uncategorized | Comments Off on Government Supply Chain to request Cyber Essentials from suppliers