Browsed by
Category: Security

CiviCRM: Mixed content error

CiviCRM: Mixed content error

Recently I encountered an error on a CiviCRM profile page, where the reCaptcha gave me a mixed content notification. The whole site is running on https. I solved it by adding this to the CiviCRM config. define(‘FORCE_SSL_ADMIN’, true); $_SERVER[‘HTTPS’]=’on’; // (provided the SSL Certificate is working correctly) Found this here.

Keyset does not exist error in .NET application

Keyset does not exist error in .NET application

When using WCF to communicate with a web service that required a client certificate, I couldn’t get the solution to run unless I started Visual Studio as an administrator. The error that I got was : System.Security.Cryptography.CryptographicException Keyset does not exist I knew full well the private key did exist (you can see this in MMC > Certificates). So it had to be a security related issue, seeing that when I run it as admin I have no issues. After…

Read More Read More

Multiple https websites on one IIS 7.5

Multiple https websites on one IIS 7.5

I wanted to use IIS 7.5 to host multiple sites under https. The only way I found so far is to have multiple IP addresses link to one server or configure multiple IP addresses on the server and use the IIS site bindings to listen to these alternate IP addresses. First of we need to configure our network card and add the new IP address to it. Go to the properties of your network card and select IPv4, then click…

Read More Read More

Certificate chain error fix on Linux

Certificate chain error fix on Linux

When checking your certificate on a site like the one from digicert. I’m often confronted with the following error: This means that your certificate doesn’t contain the full certification path (and that some parts can’t even be found in the default trusted authority store). To fix this error on a linux PC, navigate to your directory where you saved your .crt file and make sure you also have the other .crt files, that make up the chain, present there. Next…

Read More Read More

Optimize SSL settings in Windows Server 2008

Optimize SSL settings in Windows Server 2008

SSL labs provides, through it’s website, a thorough free testing of an https enabled site. It has different rankings based on the (American) school grading system, where F is the lowest score and A++ the highest. Numerical Score Grade score >= 80 A score >= 65 B score >= 50 C score >= 35 D score >= 20 E score < 20 F In this post I will try and go through the steps to achieve an “A” rating for…

Read More Read More

Useful Drupal “drush” commands

Useful Drupal “drush” commands

Drush is a command line utility to provide a scripting interface for Drupal. Install the latest Drupal version drush dl drupal #downloads the latest Drupal drush dl drupal-7.35 #downloads the specified Drupal version drush site-install standard –account-name=[username] –account-pass=[userpassword] –db-url=mysql://[mysqluser]:[mysqluserpassword]@localhost/[mysqldatabase] When you’re locked out of your site because you enabled clean URL’s. drush vset clean_url 0 –yes Update a Drupal installation to the latest version, including installed extentions. drush pm-update

Create certificate request with SHA256 on IIS 7

Create certificate request with SHA256 on IIS 7

Creating a CSR (or Certificate Singing Request) on an IIS 7 is pretty straight forward, but you end up with a request which uses the old SHA1 hashing method. Your certificate request will work, but the end result will be that your site might be vulnerable to SSL/TLS related attacks. So how to create a CSR that uses the SHA256 algorithm? All the information bellow can be found on ServerFault. First make a request.inf file. (Just use a text editor…

Read More Read More

Shell detector app detects webshells (aspx, php)

Shell detector app detects webshells (aspx, php)

Shell detector is a great little application to, like the name suggests, detect (malicious) shells. I recently had the misfortune of having to deal with a so called web shell. Basically it created a backdoor by uploading a malicious file and its client application uses this file to send commands to be executed on the server. Looking at the capabilities of this malware I couldn’t believe what was possible. In short they owned the server. Now I know that the…

Read More Read More

Block WordPress login attempts when no WordPress is present

Block WordPress login attempts when no WordPress is present

I’ve set up LogWatch and saw these entries turning up every day. 404 Not Found /admin/wp-login.php: 2 Time(s) /administrator/index.php: 2 Time(s) /blog/wp-login.php: 2 Time(s) /section/wp-login.php: 2 Time(s) /site/wp-login.php: 2 Time(s) /wordpress/wp-login.php: 2 Time(s) /wp-login.php: 2 Time(s) /wp-login/: 2 Time(s) /wp/wp-login.php: 2 Time(s) /www.google.com/chrome: 1 Time(s) I decided to ban them using fail2ban, seeing as there is no reason to try and use a WordPress login, when there is no wp running on that server. I based this on https://github.com/miniwark/miniwark-howtos/wiki/Fail2Ban-setup-for-Apache. vi…

Read More Read More

Mounting file system over SSH then decrypt with EncFS on Arch Linux

Mounting file system over SSH then decrypt with EncFS on Arch Linux

I have a remote folder on my NAS (that is actually a dropbox folder my NAS syncs) encrypted with EncFS, which I would like to open on my Arch Linux box. I’m a long time fan of TrueCrypt, but for this particular setup, where the size of the encrypted data can vary (it is not a disk or a container with a fixed size), I found EncFS to suit my needs better. Now from my understanding (and general tinkering with the…

Read More Read More