Wednesday, April 9, 2014

THE HEARTBLEED BUG

The Heartbleed Bug is a serious vulnerability in the popular OpenSSL cryptographic software library. This weakness allows stealing the information protected, under normal conditions, by the SSL/TLS encryption used to secure the Internet. SSL/TLS provides communication security and privacy over the Internet for applications such as web, email, instant messaging (IM) and some virtual private networks (VPNs).The Heartbleed bug allows anyone on the Internet to read the memory of the systems protected by the vulnerable versions of the OpenSSL software. This compromises the secret keys used to identify the service providers and to encrypt the traffic, the names and passwords of the users and the actual content.This allows attackers to eavesdrop on communications, steal data directly from the services and users and to impersonate services and users.

For More Details Please visit below link
http://heartbleed.com/
Interesting Video to explain the HeartBleed Bug
http://vimeo.com/91425662

Now most important how to find your server is vulnerable or not

1. Check the openssl version using the command - yum list installed openssl* .  If you're running version 1.0.1e and the last numbers are lower than 5.7, then you're affected.

Eg. You will have to update the openssl in the below case :

[root@abhishek ~]# yum list installed openssl*

Loaded plugins: fastestmirror, priorities, security, update-motd, upgrade-helper
Loading mirror speeds from cached hostfile
* amzn-main: packages.us-east-1.amazonaws.com
* amzn-updates: packages.us-east-1.amazonaws.com
   amzn-main                                                                                                                         | 2.1 kB    
  amzn-updates                                                                                                                     | 2.3 kB    
 2 packages excluded due to repository priority protections
  Installed Packages
  openssl.i686                                                            1:1.0.1e-4.53.amzn1                                                     @amzn-updates
 openssl.x86_64                                                        1:1.0.1e-4.53.amzn1                                                     @amzn-updates
 openssl-devel.x86_64                                               1:1.0.1e-4.53.amzn1                                                     @amzn-updates

2. Use the command yum update -y openssl  to update openssl on the server.
3. Restart crond service.  This step is very important.  service crond restart
4. Verify the version of openssl again (yum list installed openssl* ).  Also verify cron logs in the file /var/log/cron

Saturday, February 22, 2014

Chef OSS-

What is Chef ?

In this blog post we will talk about Open Source Chef Server Installation .

The Open Source Chef server is a free version of the server. Each instance of the Open Source Chef server must be configured and managed locally, including data migrations, applying updates, and ensuring that the local infrastructure scales appropriately. The Open Source Chef server includes support from the community. Support from Chef is optional.

After struggling for so many days with the chef server requirements and dependencies , I have come up with the automated script which will install OSS Chef on RPM based NIX distribution .


Note: Once more Script will only install OSS Chef Server on RPM based Linux.


Once you download the script you can access Chef Server via UI , but for that make sure you

have 443 and 80 ports open.

      https://FQDN or https://PUBLICIP


You need to install Chef Client , please follow below steps to install chef Client for your chef server.


  1. Run the command that appears (for UNIX and Linux environments) or download the omnibus installer (for Microsoft Windows environments). For example, for the Mac OS X:
    curl -L https://www.opscode.com/chef/install.sh | sudo bash
    
    and then enter the password for the local machine.
  2. As the chef-client is being installed, the command window will show something like the following:
    Downloading Chef for mac_os_x...
      % Total    % Received  % Xferd   Average  Speed    Time     Time      Time   Current
                                       Dload   Upload    Total    Spent     Left   Speed
    100 23.9M  100 23.9M     0     0    944k       0   0:00:26  0:00:26  --:--:--   838k
    Installing Chef
    
  3. When the installation is finished enter the following to verify that the chef-client was installed:
    chef-client -v


Also if you are going to use self signed certificate with you Chef Server you
may end in issues while bootstrapping AWS instances with knife gem. Please use --no-check-certificate .

See my below solution on ServerFault , I asked question but noone helped , I found the solution and made some changes in code .


I will be writing another blog post to help you to write cookbooks and define roles in chef.


Some Important points:-

Chef Server Installation Directory 

/opt/chef-server
/etc/chef-server

Enjoy !!

My favorite Quote:-

"I would love to change this world , but they wont give me Source Code."