Security Advisory: New Email Scam claiming hackers have your password

Over the past few weeks, some people have received emails from themselves claiming that a hacker has stolen their passwords and hacked their webcam, threatening to expose your data, as well as browsing habits if you do not remit to them some bitcoins valued between $1000-$1500 US dollars.

The hackers use publicly exposed data from massive breaches that have happened across various popular services including Yahoo, LinkedIn and others.

In this new type of email scam, the hacker spoofs your email address appearing as if he has logged into your email account and sent yourself an email. This can be easily achieved and could be minimized following best practices detailed in my earlier post about preventing email spoofing with SPF.

The hackers claim they have your password, which they get from publicly exposed data, and hope to intimidate you into paying them a ransom.

The hackers deploy automated processes to mass email and spoof the users addresses appearing to be sent from their own mailboxes.

Security Best Practices

Whether you are a victim of this email scam, or not — you should follow some best practices to avoid being compromised:

  • Check your password on Have I Been Pwned. It will let you know if the password exists in publicly exposed data from previous breaches.
  • Change your passwords immediately.
  • Ensure the use of strong passwords which contain lower case, upper case, numbers and symbols
  • Ensure your password is unique for every website or service that you use.
  • Use multi factor authentication wherever available.
  • Always make sure you are entering your passwords on secure websites. Learn more on how to check if a website is secured or not here.
  • Make sure you’re using SSL/TLS in your email clients.

SSL is no longer optional for your website.

Your website should most likely be labelled with “Not Secure”. What does it mean, and how do you get it fixed?



Background

Nearly two years ago, Google announced that Chrome would eventually start marking all sites that are not encrypted with HTTPS as ‘Not Secure’ as an attempt to motivate site owners to improve the security of their websites.

On July 24th 2018, Google officially launched Chrome 68 and with it rolled out the warning labels on all websites.

Chrome is a widely used browser accounting to about 80% based on statistics by W3Schools, where their website receives 50 million visitors a month.

What do these labels mean?

As seen above, there are three (3) types of labels.

i) Not Secure

This means that you do not have an SSL certificate installed on your website. I’ll explain what that is, and how it helps in a bit.

ii) Secure

This means that everything is good – and you don’t need to do anything more.

iii) Notice

This usually means that while the site itself is secured, there may be some content that has been loaded on the website which is not secure. If you’re getting this, your website developer or webmaster will need to fix it. The most common things that cause these are external links using http:// instead of https:// or preferred simply as // to support both.

Some examples include:

  • External images shown on your website.
  • External links to javascript files such as jQuery.
  • External links to CSS files such as Bootstrap.
  • Embedding of Google Fonts, Analytics and pretty much any other services.

Note that, using https:// on any of these require the external service/server to have a valid SSL installed on their end too!

What does Secure mean?

Any communication over the internet could either be secured, or not. A secured communication means that the data that is received or transmitted is encrypted which prevents prying eyes from looking at it.

Let’s say – you’ve typed in your username and password on a website. If that information, when sent over the internet is not secure – then anyone between your computer — and the server/service — could potentially “see” that data. However, if the website is secured, then the same information is encrypted making it extremely difficult for someone to see it.

Should I care if my website doesn’t have any login forms?

Yes, you should. Login forms are just one example. Maybe, you have a contact form where you ask your website visitors to fill in a message to reach you. The information that they type in there would be transmitted insecurely which could allow someone to see it.

SSL is no longer optional. Add SSL to your website today to avoid losing visitor confidence and sales. Plus, with SSL you get all these benefits too:The other benefits of having your website secure include:

  • More secure user experience
  • Protect user privacy
  • Increased conversions
  • Boost search rankings
  • Increased user trust
  • Show you care about users’ data

How do I secure my website?

You’ll need to get an SSL certificate installed for your website. This could be done by yourself, your webmaster, website developer or your web host.

What is an SSL certificate?

SSL is short for “Secure Sockets Layer”. It was introduced in the mid 90’s as a protocol to secure traffic. While SSL itself is depreciated, the newer versions of SSL protocols are actually known as “Transport Layer Security” (TLS). The certificates however are still commonly referred to as SSL certificates.

An SSL certificate is used by the browsers such as Chrome, Firefox, Safari or Edge to establish trust, validate that it is valid with a Certificate Authority (CA) and use it to encrypt the communication between you — and the server/service that you are communicating with.

These certificates are issued by Certificate Authorities (CA) who vet and issue the certificates. There are a few types of SSL certificates:

  • Domain Validation (DV) SSL Certificate
    Domain Validation SSL certificates are the cheapest provided by well known SSL brands. They are also freely available through Let’s Encrypt, a free – automated – and open certificate authority sponsored by big names in the internet industry.Free SSL certificates are also included in some hosting plans offered by web hosting companies like Extreme Web Technologies. They are ideal for basic security for websites and blogs, and are usually issued in minutes.
  • Organisation Validation (OV) SSL Certificate
    Organisation Validation certificates are slightly expensive as have some documentation processes required such as verifying your organisation legal information. The certificate authorities usually ask for your business incorporation documents, as well as physical address and sometimes identities of website/business owners. These are always purchased separately — and are a must have for serious businesses. These could take about a week to be issued, sometimes a bit more.
  • Extended Validation (EV)

    Extended Validation certificates are the most expensive certificates available. They could cost unto $2000 per year and go through extended validation processes including credit checks. These certificates also include a special feature supported across browsers which makes the address bar green showing your company name. These certificates are a must have for internet banking portals, as well as other applications to ensure user trust in the service. These certificates take the longest time to be issued, generally between 2-4 weeks.

I have a certificate, but my website still shows Not Secure when accessed.

When website visitors type in your website link on the address bar, they end up on the non-secure version of your site. You may need to consult your website developer or hosting company to assist you with this. 

How to fix Not Secure on WordPress.

If your website is built on WordPress, then the simplest way to make the switch is by going to your WordPress Admin (wp-admin), under the Settings > General screen, update your WordPress Address (URL) and Site Address (URL) to include https://.

How to fix Not Secure on my website which is NOT built on WordPress.

This will work on pretty much any basic website on cPanel hosting, such as the hosting plans offered by Extreme Web Technologies.

Log into your cPanel, find the File Manager, under public_html folder, look for a file named .htaccess and edit it. If it doesn’t exist, you can create it and paste the following snippet.

Make sure to update your domain name in it:

# BEGIN SSL
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain\.co\.tz [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.co.tz/$1 [L,R=301]
</IfModule>
# END SSL 

I’m stuck and need someone to do this for me.
Please contact our customer happiness team at Extreme Web Technologies to assist you get your website secured.

This blog post was written by Mohsin Sumar (@mohsinsumar) who is the Founder and CEO of Extreme Web Technologies. Mohsin with his Customer Happiness team constantly strive to deliver top notch quality web hosting in Tanzania.

Image credits: Creativeart – Freepik.com

Preventing email spoofing with SPF

The very first email was sent about 45 years ago, in 1971 by Ray Tomlinson. Tomlinson is internationally known and credited as the inventor of email. The Internet Hall of Fame in account of his work commented “His email program brought about a complete revolution, fundamentally changing the way people communicate”.

Fast forward 45 years…

Over the last two decades, email has indeed revolutionised the way we communicate.

There are over 4.3 billion email accounts in the world and of all the emails being sent, about 141 million emails were classified as spam by SpamCop in the last 12 months alone!

Email is abused every day in the form of spam or phishing emails which may distribute viruses, malware, spyware, ransomware or attempt to steal information by disguising as someone else.

Make the Internet work better.

The Internet is best defined by Wikipedia as a global system of interconnected computer networks to link billions of devices worldwide. Every server on the internet can make the internet work better by following some standards to prevent abuse.

What most don’t know of, is the existence of Internet Engineering Task Force (IETF). IETF develops and promotes voluntary internet standards with the mission to make the Internet work better. These internet standards are published as RFC’s which stand for Request for Comments.

35 years after the first email, IETF published RFC 4408 in 2006 which describes Sender Policy Framework, commonly known as SPF. The original SPF document was then replaced by another version RFC 7208 published in 2014.

Sender Policy Framework (SPF) is amongst the widely adopted ways of preventing email abuse.

So, what does SPF do?

SPF is a simple email validation system designed to detect email spoofing and provides a mechanism for email servers to check the incoming email to verify whether it originated from a trusted source.

It allows your domain name administrator to publish your authorised email source servers, and provides a way for receiving email servers verify the email origin. It then evaluates the test and produces results such as Pass, Neutral, Fail amongst others and lets the servers email policies decide what to do.

Email Policies

Anyone setting up or managing an email server needs to set some sort of policies. These policies help protect the email system from abuse of resources. Luckily, most of these policies already come bundled in with the mail server software including Exim and Microsoft Exchange Server or hosted services such as cPanel hosting, Office 365 and Google Apps for Work.

However, SPF fail policy needs to be configured. There are 3 choices:

  1. Reject the email (recommended)
  2. Accept and deliver the email with additional actions (move to Junk Mail, change the subject line, and so on)
  3. Accept, but delete the email (not recommended)

This is well documented in Appendix G2 of RFC 7208.

What is the best way to handle unauthorised email messages?

The most logical way to handle unauthorised email messages (SPF fail) is to reject it before it is received. This protects the system from unnecessary handling of incoming email including data transfer of the email content as well as other processes such as spam filtering and email delivery.

Doing this, also notifies the sender that their email was rejected because it failed SPF check and, if the sender is legitimate, they will appropriately rectify their systems.

Can someone spoof my emails, even after deploying SPF?

Yes, someone can still spoof your emails. SPF does not define the standard of sending email itself, but rather a standard for checking if the sender server is trusted.

Prevent unauthorised emails to go out in the first place.

It’s unfortunate to see many servers allow emails to be sent without authentication, either through website scripts or SMTP. Any email that goes out from an email system should be authenticated to prevent abuse. Doing so makes it easier for system administrators to block that user in the event of a SPAM outbreak.

At Extreme Web Technologies, we block a simple PHP mail function that is commonly used to send out unauthenticated emails. It is widely used in contact forms. When a website is compromised, a spammer can leverage that function to send out large volumes of spam email.

We also properly reject emails that are not from a trusted source. I have come across some email servers that do not have the appropriate reject policy set for SPF failure. They are putting their users at risk of receiving spoofed emails from untrusted sources.

I hope that future RFC revisions will be in favor of rejecting the email message, instead of allowing the option for it to be handled by email policies. Till then, the best way to prevent email abuse is to use a strong SPF record, and have DKIM setup too, host your emails & website with a professional hosting company and HOPE that the recipients use a mailserver with realistic mail policies!

This blog post was written by Mohsin Sumar (@mohsinsumar) who is the co-founder and CEO of Extreme Web Technologies. Mohsin with his Customer Happiness team constantly strive to deliver top notch quality web hosting in Tanzania.

Image credits: Background vector designed by Dooder – Freepik.com; modified by Mohsin Sumar.

Securing PHP application from malicious scripts

If you’ve stumbled across this post, then you’ve recently become a victim of the most famous way of uploading a malicious script to a website – PHP file uploads.

Many websites and web applications that are developed using PHP & MySQL allow users to upload files, photos and documents to the server. Normally, the upload script receives the files and moves (or writes) it to a directory (folder) with write permissions. If you are on Linux, then this would mean that your folder CHMOD value is 0777.

The Problem
The changing of CHMOD value to 0777 practically allows anyone in the WORLD to write to your folder and is therefore not recommended. However, many a times we are left with no option but to do so – depending on the servers’ environment.

How can this be a problem?
This allows attackers to upload upload a malicious PHP script to your directory, which they will then execute by accessing it. This script could either be a mass-mailing script or a malicious script to gain access to your account (or web server).

The Solution
It is said that prevention is better than cure – and therefore, it is important to prevent these scripts from being executed by the server. This can very simply be done by adding a few lines of code to your .htaccess file. If your directory is supposed to hold photo files only, then the following code is recommended to prevent scripts from being executed.

It is also important to disable directory listing on these folders.

# Disable Directory Listing
Options All -Indexes

# Allow access to these file extensions only
<FilesMatch ".(htaccess|htpasswd|ini|php|cgi|pl|phps|sh)$">
 Order Allow,Deny
 Deny from all
</FilesMatch>

The above will add an extra layer of security to your web application.