Browsed by
Tag: Security

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

Enable web deploy on IIS 8 running on 2012 R2

Enable web deploy on IIS 8 running on 2012 R2

Web deploy enables a developer (or anyone with sufficient privileges) to build and deploy a website using visual studio or via the command line using MSBuild. An example of such a build command can be found in my previous posts. We use it mainly in our continuous integration environment to automatically build, test and deploy new code if a new commit to the git master branch was detected. Installation via web platform installer First you will need administrator rights to…

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

Sudo !! Tips and tricks

Sudo !! Tips and tricks

I recently discovered some cool sudo tricks. First of sudo is a way to get elevated privileges but not get full root access. As root you can do system administration tasks, that you are not allowed to as a normal user. The things you can “sudo” are defined in the so called sudoers file and can be edited by the following command: visudo It will look for a program to open the sudoers file with in the EDITOR variable. Now…

Read More Read More

SSH config file

SSH config file

I learned a neat trick lately that has to do with SSH. If you are like me and use secure shell to connect to a remote box or for git push/pulls then you most likely be interested in this next little configuration file. As you probably know, all your ssh configurations and keys probably reside in the .ssh folder of your home directory. Go to this directory and use vim to create a file named config. vim ~/.ssh/config Lets add…

Read More Read More

Copy And Paste in Java Applets

Copy And Paste in Java Applets

Taken from this article. Recently I found it impossible to use cut and past from any java app. Turns out this is a security setting which is turned off by default. Navigate to C:\Program Files (x86)\Java\jre6\lib\security And edit a file called¬†java.policy Add this line just below // “standard” properies that can be read by anyone permission java.awt.AWTPermission “accessClipboard”; Save the file to your desktop and cut and past it back into the folder (windows prevents programs not running as admin…

Read More Read More