Posts

Showing posts from January, 2014

Script to turn your fedora into a tigerbox

Image
Tigerbox is a term used by hackers which refers to a system where they have loaded their hacking software and utilities. In this post I have included a bash script file which will help you turn your Linux operating system into one of a tigerbox. The following script is tested on fedora only while the script was being written so goes the title for fedora you can modify the script to make it work for the Linux distro you use.

Some random tips you would like to know about AWS EC2

Image
I have been writing posts about AWS. And after so long again I am writing yet another post which is a compilation of tips and tricks you would love to do to secure your EC2 instance. Securing and EC2 instance is much more similar like any other operating systems. Here I am writing about some tips I recently did on one of a Linux EC2 instance. Here are gist snippet tips that you can use to secure your Linux Server. Install mod security module SSH configuration to enable keys for some users and passwords for some users Disable mysql history Installing mod_evasive for DOS attack prevention yum install httpd-devel wget wget http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz tar -xzf mod_evasive_1.10.1.tar.gz cd mod_evasive apxs -cia mod_evasive20.c

Installing redis and using in python

This is a post on installing redis and using it in python. If you are unknow about redis then let me tell you: Redis is an open source storage engine which stores data in key/values. It is also reffered as data structure server.  Stings, hashes, lists, sets and sorted sets can be stored in redis server. To install redis, can follow the follwing steps. 1. wget http://download.redis.io/redis-stable.tar.gz 2. tar -xvzf redis-stable.tar.gz 3. cd redis-stable 4. make 5. cd src 6. ./redis-server First step is to download redis. Second to extract the file. Third change the directory to the extracted directory. Fourth to compile redis. Fifth step to change directory to the compiled redis. Then sixth to run redis server. Once redis server is running you're ready to go Below is an example in python interactive shell about how to use redis.  >>> import redis #import redis module >>> r = redis . StrictRedis ( host = 'localhost' , port = 6379 , db = 0 ) #make con

Asymmetric encryption in PHP

Image
Most of us who are writing web application using vanilla PHP or PHP frameworks are using asymmetric encryption. md5, sha1 are asymmetric encryption algorithms. But here I am going to share an example of symmetric algorithm. I never came to this scenario to use symmetric encryption before. May be you may not need more like the asymmetric encryption. Anyways I thought of writing about it. Yes you might have guessed if not, I am talking about mcrypt_encrypt and mcrypt_decrypt, which uses a secret key to encrypt and decrypt texts. So Its pretty clear its up to you to secure the secret key used in encryption and decryption of the encrypted text to plain text. But before you can use mcrypt_encrypt and mcrypt_decrypt make sure you have mycrypt installed. You can use <?php echo phpinfo(); ?> to see if mcrypt is installed or not. Installing mycrypt is pretty easy. You can use yum install php-mcrypt to install it and then load mcrypt module. Not to forget after installing you must restart