Author Archives: Nitin J Mutkawoa

Signal – Privacy is possible with SMS encryption

Phone calls and SMS privacy are now possible with Signal. What is ‘Signal‘? “Signal has been designed for the mobile environment from the ground up. Messages and incoming calls are fully asynchronous; push notifications to let you know when new messages have arrived, so they’ll be waiting for you if the app is in the background, your battery dies, or you temporarily lose service.” – WhisperSystems

Photo credits: Mike Williamson
Photo credits: Mike Williamson

It is believed that the Government of Mauritius and other government entities around the world have been tapping into phone lines since a while and some years back this issue has also been revealed on Mauritian newspapers.  So, how do you get away from these entities trying to peak their noes into your private life? The ultimate answer is “Signal” which has been developed by the Open Whisper Systems Team.

“Use anything by Open Whisper Systems”Edward Snowden, whistleblower, and privacy advocate

“I am regularly impressed with the thought and care put into both the security and the usability of this app. It’s my first choice for an encrypted conversation.” – Bruce Schneier, internationally renowned security technologist.

The signal is freely available and compatible for almost all Android devices as well as Apple mobile phones. It supports SMS and voice calls encryption even if you are on a 3G/4G network. However, you need to assure yourself that all parties engaged in a conversation are using Signal to be secure on all sides.

You cannot assure yourself to be secure if encrypted communication is one-sided.

My next article is going to be dedicated to the cyberstorm.mu team of Mauritius.

Starting up with some basics of C programming – Hello world- Part 1

phoTo get started with C programming language, there are several basics to grasp in the code structure. In this article, I will elaborate on the anatomy of a simple “hello world” program. The program will just display the words “hello world” through the code. There is also a free book available by Dennis Ritchie, who is the inventor of the C programming language.

Starting up with some basics of C programming - Hello world- Part 1 1

Let us see this piece of code :

Starting up with some basics of C programming - Hello world- Part 1 2

#include <stdio.h>

#include <stdlib.h>

int main()

{

   printf("hello world!\n");

   return 0;

}

The int main () is a function and the line printf(“hello world!\n”); and return 0; are instructions within the function.

The ‘include’ lines #include <stdio.h> and #include <stdlib.h> are files which are included to get some basic functions within the code itself. The aim is to include some built-in functionality into the hello world program.

On your Linux terminal, you just need to save the file as hello.c, set it as executable and run it with the command gcc -o hello hello.c You will notice a file called hello has been created! You can run it as ./hello to find the result ‘hello world’.

GhostBSD for home and office users

GhostBSD is a super user-friendly FREE operating system based on FreeBSD. Whilst FreeBSD is more for server and network administration side, GhostBSD is much more pretty for workstations. If you are thinking of having a much more secure desktop environment, I would surely advise GhostBSD.


bsdghost
Photo credits ghostbsd.org

GhostBSD shares many of the same features as FreeBSD, including:


  • Integrated Firewalls, Jails, Linux emulation, Network Virtualization, and bhyve.
  • KMS and new drm2 video drivers
  • The FreeBSD ports collection
  • The New Binary Packaging System pkgng

GhostBSD added a few extra features of its own, including:

  • A user-friendly installation process
  • Automatic detection of your computer’s hardware
  • Automatic configuration of your network card
  • Pre-installed desktop environments
  • Pre-installed codecs to play multimedia files

Let’s see how to install GhostBSD on a Virtual Box Virtual machine. You can also try it on a virtual machine.

1. Download the ISO at the official website.

2. Create your Virtual machine and boot your ISO. It will prompt you for Graphical Install only, Failsafe mode and ACPI off. Well, choose the Graphical Install mode.

Screenshot from 2015-11-25 18:46:40

3. After some minutes, it would log in automatically on the GUI interface. You also choose your ISO as per your best desktop environment.

Screenshot from 2015-11-25 18:49:02

4. Double click on the GhostBSD Installer icon. Then choose your language, keyboard, time zone and use the entire disk partition if you are not familiar with disk partitioning on BSD. You will need to complete some formalities about the User Setup. And GhostBSD is going to install pretty much easily.


What is most interesting is that by default on GhostBSD, you have the FISH shell. There are several features with FISH such as auto-completion and color readable commands suggesting you, for example, a directory path. This is much pretty useful for beginners using BSD to be able to cope with all the commands easily. Welcome to GhostBSD. The adventure starts now.

 More article on BSD:

Adding a new disk on FreeBSD from VirtualBox

Tips:

Sometimes, on Virtualbox, you need to remove the ISO after installation as it will prompt you to install again. I noticed that after installing GhostBSD compared to a CentOS installation which ejects the ISO automatically after installation.

Some basics of UEFI and BIOS

The BIOS (Basic Input Output Settings) and UEFI (Unified Firmware Extensible Interface) are two different types of firmware interface that enable the interaction between the mechanisms of your machine hardwSome basics of UEFI and BIOS 3are and its firmware. It is a type of “program” or “firmware” that initialize the boot process through your hardware. Your machine cannot boots up without this mechanism. Let’s see the main differences between BIOS and UEFI.


BIOS

When a machine boots up with BIOS, it reads the first boot sector in a hard disk followed by the normal boot process. One interesting thing is that BIOS basically runs a 16-bit (in real mode), 32-bit (protected mode) and 64 bit (Long mode) and during the boot up the BIOS is assigned 1MB of address space where it reads the MBR (Master Boot Record) file to understand the Machine partitions. You can activate the BIOS interface on VMware by clicking on VM -> Power -> Power on BIOS.

UEFI

So, UEFI is a sort of the next generation “firmware” replacing BIOS. It has been built with a better graphical interface since it performs in 32 bit or 64-bit mode. UEFI on the other hand when boots up uses the GPT (GUID Partition table); GUID is another abbreviation stands for Globally Unique IDs. With UEFI, you have the following advantages:

  • Managing disk of size more than 2.2 TB
  • Partition entries backup
  • Advanced network functionality
  • 64 Bit architecture support

In brief, UEFI boots up by loading several .efi files from a partition to the hard disk ESP (EFI system partition) which is a partition in itself.

Ruby on Rails deployment on Ubuntu Server

Ruby on Rails is a web application framework that enables you to develop web applications. It uses the Mobile-View-Controller (MVC) mechanism by providing default structures for the databases, web services and web pages. This article will be based on the installation and brief overview of Rails, Ruby, Ruby Version Manager (RVM) and Rubygem. I am using an Ubuntu Server 15.10 for the deployments.



Ruby_on_Rails.svg

To install Rails, you need to have Ruby which is an open source programming language. There are different ways to install Ruby. You can install it with your apt-get or yum tools which will not give you the latest version by default. You can download and compile it from source or you can also use the RVM Ruby Version Manager. The RVM permits you to switch between environments and different Ruby versions within the same machine easily. The community of Ruby developers is moving at a fast pace. It’s very difficult to manage your Ruby applications without having proper control over the different environments especially when an application is migrated from the Dev to Prod environment. There is another tool called Rbenv which can use to switch between environments. Let’s install Ruby on Rails! 🙂

1. Basically, an apt-get install ruby will install ruby with all dependencies. However, from the Ubuntu repo, the version is 2.1 To install it with RVM, you need to install RVM itself first. I installed it using CURL


apt-get install curl

2. install mpapis public key as per official documentation.

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

3. Install RVM – stable version. You would notice several dependencies being installed such as g++, gcc, make etc..

curl -sSL https://get.rvm.io | bash -s stable --ruby

4. To start using RVM, you need to run


source /usr/local/rvm/scripts/rvm

5. You can check your RVM version and update your RVM version with the commands below. More information is also available on  GitHub rvm repo

rvm -v

rvm get head

rvm reload

rvm get stable

6. You can check if all dependencies are installed with the command

rvm dependencies

7. Install Ruby with the command


rvm install ruby. 

8. To use the default version of ruby, you just need to do a

rvm use ruby --default. 

Note that when RVM is installed,  by default it installs a version of Ruby.

9. Normally, after installing RVM, RubyGems, which is a package management framework for Ruby will also be installed alongside. Verify it with the command

rvm rubygems current. 

10. However, if you need to upgrade to the latest RubyGems you need to do a

gem update --system. 

11. Rubygem itself can be updated provided you install the rubygems-update gem. Do a

gem install rubygems-update 
update_rubygems.

12. To install Rails alongside with all documentation

gem install rails

13. At this stage, we have already installed Ruby on Rails on our Ubuntu server. I will now get into some more details. Since we downloaded the default Ruby, through RVM at step 8, you would notice that you do not have the latest Ruby version! To download the latest stable release which is Ruby-2.2.3 at the time I am writing this article.

rvm install 2.2.3

14. You switch on to the new Ruby-2.2.3 with the command

rvm use ruby-2.2.3

15. Right now, I have Ruby-2.2.1 which is the default version that I have to install alongside RVM and Ruby-2.2.3 which I have manually downloaded at step 13. Supposed we have to test an application with Ruby-2.1.7, lets now download another Ruby i.e; Ruby-2.1.7

rvm install 2.1.7

16. Once the Ruby-2.1.7 is downloaded, we switch on to it (see step 14). At this stage, you would also notice that the PATH of your ENV has changed. Each time you change the Ruby version, you would notice a change in the path.

Screenshot from 2015-11-11 18:14:28

17. Assuming we no longer need this version, lets now purge and uninstall Ruby-2.1.7 After uninstalling repeat the version you want to use at step 14


rvm uninstall 2.1.7

There are other tools such as Rbenv and Chruby which you can use instead of RVM to manipulate Ruby version. There are however its pros and cons when it comes to Rbenv VS RVM.