Saturday, November 9, 2013

Linux Distribution

A Linux distribution is a collection of (usually open source) software on top of a Linux kernel. A distribution (or short, distro) can bundle server software, system management tools, documentation and many desktop applications in a central secure software repository. A distro aims to provide a common look and feel, secure and easy software management and often a specific operational purpose.
Let's take a look at some popular distributions. 
1.Red Hat
Red Hat is a billion dollar commercial Linux company that puts a lot of effort in developing Linux. They have hundreds of Linux specialists and are known for their excellent support. They give their products (Red Hat Enterprise Linux and Fedora) away for free. While Red Hat Enterprise Linux (RHEL) is well tested before release and supported for up to seven years after release, Fedora is a distro with faster updates but without support.
2.Ubuntu
Canonical started sending out free compact discs with Ubuntu Linux in 2004 and quickly became popular for home users (many switching from Microsoft Windows). Canonical wants Ubuntu to be an easy to use graphical Linux desktop without need to ever see a command line. Of course they also want to make a profit by selling support for Ubuntu.
3.Debian
There is no company behind Debian. Instead there are thousands of well organised developers that elect a Debian Project Leader every two years. Debian is seen as one of the most stable Linux distributions. It is also the basis of every release of Ubuntu. Debian comes in three versions: stable, testing and unstable. Every Debian release is named after a character in the movie Toy Story.
4. SUSE 
it is a paid version although the openSUSE version can be downloaded for free.
5. Linux Mint 
It claims to be the fourth most popular OS and it is easy to use with 30,000 packages.
6. Slackware 
It was released in 1993 making it one of the oldest Linux distributions. It is majorly dependent on command-line tools.
7. Gentoo 
First released in 2002, it offers "extreme configurability, performance and a top-notch user and developer community." It works on the Portage package management system which has over 10,000 different applications.
8. <"http://www.archlinux.org/">Arch Linux 
Arch’s simplistic design makes it a favorite among long-time Linux users. It installs a minimal base system and offers many options for customization.
9. Fedora 
This is free community version. It also has the standard desktop download which is available in many specialized versions as stated on datamation.com.
10. openSUSE
This free community version can be used on a desktop, laptop or server and can be installed or run live from a CD or USB drive. 
Distributions Based on Ubuntu-
11. Kubuntu
Kubuntu is a Ubuntu fork using the KDE desktop in place of the Unity desktop. 
12. Lubuntu
Lubuntu is lighter, faster, and consumes less energy making it a good choice for mobile devices like netbooks.
13. Xubuntu
This version of Ubuntu uses Xfce desktop environment for both desktop and server versions.
14. Edubuntu 
This is suited to meet the needs of schools.
15. Easy Peasy
Designed for use on netbooks, it has millions of users in more than 166 countries.
16. Zentyal
This is available for free, paid and supported versions. It is a Ubuntu-based small business server acting as a gateway, infrastructure manager, unified threat manager, office server and/or unified communication server. 
17. NewSense 
This has support by the Free Software Foundation and is based on Ubuntu with minor changes which include removal of non-free firmware. 
18. Pinguy OS 
This is for new Linux users. Pinguy OS makes it easy to search and use the programs average users. It also has a DVD version for $5.99.
19. Bodhi Linux 
This is focused on user choice and minimalism. It makes use of the enlightenment desktop environment and a "software store" making it easy to locate and install the open source applications.
20. MoonOS 
This is developed in Cambodia (English is supported) and based on Ubuntu. It has a different file hierarchy system and appshell framework. 
Distributions Based on Debian
21. MEPIS 
This is also called simplyMEPIS and is especially popular with new Linux users. You can download it for free or buy a CD that will make testing and installation of software easy. 
22. CrunchBang 
It is a lightweight distribution working on Debian.
23. Knoppix 
It is good for newbies and is an easy-to-use distribution based on Debian. It is available in CDs for less than two bucks.
24. DreamLinux 
This can be installed on your desktop as well as run from a USB drive. It installs the Xfce desktop environment by default and supports Gnome.
Distributions Based on Red Hat/Fedora
25. Mandriva 
It is a publicly traded French company and has over 3 million users worldwide. It has several editions which include desktop and server, paid and unpaid, and a unique Instant On version that boots up with minimal functionality in less than 10 seconds.
26. CentOS
This is the short form for Short for "Community ENTerprise Operating System". It is based on Red Hat code. It's used in 30 percent of Linux-based Web servers.
27. Scientific Linux 
This is aimed at preventing scientists at each of these different institutions from recreating a Linux distribution to meets their needs.
28. Fusion 
It offers multimedia support and has an interesting look and feel. This is ideal for more advanced Linux users.
Distributions Based on Mandriva
29. Unity 
It is built to offer developers or advanced Linux users certain modular pieces that can be used for creating customized distribution.
30. Mageia 
This is a community-driven fork with some ownership changes at the company that owns the Mandriva project. It's currently in beta stages and due for release in a few weeks time.
Distributions Based on Slackware
31. ZenWalk
This has become better over time into a modern, fast, lightweight distribution that's simple to use. This is present in five versions - standard, core, live, Gnome and Openbox.
32. Vector Linux 
It is availablefor free download as well as in a supported "deluxe" edition.
33. Frugalware 
This is ideal for users who don’t fear command line, it has certain graphical tools which are with simplicity in mind.
34. Salix OS 
This is available in four different versions for the Xfce, LXDE, Fluxbox and KDE desktop environments.
Distributions Based on Arch Linux
35. Chakra 
This is based on ArchLinux and uses KDE desktop. 
36. ArchBang
This variant utilizes the Openbox Window Manager and is fast as well as lightweight.
37. Sabayon 
This is based on Gentoo and supports KDE, Gnome, LXDE and Xfce desktop environments.
Distributions Based on Cloud Computing 
38. Joli OS 
This can be installed within 10 minutes and is optimized for cloud computing applications. 
39. Peppermint 
It is created for both cloud and Web apps. It is based on Lubuntu.
Lightweight Distributions
40. aLinux 
Earlier it was known as Peanut Linux. It is designed to be quick as well as multimedia-friendly. 
41. DSL 
It is a small OS at just 50MB. It is very fast and runs on older PCs. It can fit onto small USB drives and business card CDs.
42. Tiny Core Linux 
Among the smallest ones it weighs just 10MB in its GUI version. Its command line version, the Micro Core, is even smaller.
43. Puppy Linux 
It is small and quick and can be installed on a USB thumb drive that you can carry with you. It occupies 100 MB and gets booted in less than a minute. It runs from RAM for maximum speed.
Windows-Like Distributions
44. Zorin OS 
It was meant to look and feel as much like Windows as possible. It is faster and doesn not have many bugs. This is available in both free and paid versions.
45. Ylmf OS 
Its interface is similar in appearance to Windows. It's available in either Chinese or English and based on Ubuntu.
Other Distributions
46. GoboLinux 
This does not make use of the Unix Filesystem Hierarchy Standard but keeps each program in its own sub-directory in the Program directory. 
47. PCLinuxOS 
It is easy to use and can run a Live CD or installed on a desktop or laptop. It can support seven different desktops, including KDE, Gnome, Enlightenment, XFCE, LXDE, and others.
48. MeeGo 
It is based on Intel's Moblin and Nokia's Maemo. It can be used on netbooks and other mobile devices as well. 
49. Chrome OS/Chromium OS 
The "Chromium OS" is the open source version for developers and "Chrome OS" is the operating system that Google plans to include on netbooks for end users. 
50. Musix GNU+Linux 
Musix is made for multi-media enthusiasts especially those involved in audio editing. 
Which to choose ?
When you are new to Linux in 2012, go for the latest Ubuntu or Fedora. If you only want to practice the Linux command line then install one Ubuntu server and/or one CentOS server (without graphical interface).
         redhat.com
         ubuntu.com
         debian.org
         centos.org
         distrowatch.com


Linux history

All modern operating systems have their roots in 1969 when Dennis Ritchie and Ken Thompson developed the C language and the Unix operating system at AT&T Bell Labs. They shared their source code (yes, there was open source back in the Seventies) with the rest of the world, including the hippies in Berkeley California. By 1975, when AT&T started selling Unix commercially, about half of the source code was written by others. The hippies were not happy that a commercial company sold software that they had written; the resulting (legal) battle ended in there being two versions of Unix in the Seventies : the official AT&T Unix, and the free BSD Unix.

In the Eighties many companies started developing their own Unix: IBM created AIX, Sun SunOS (later Solaris), HP HP-UX and about a dozen other companies did the same. The result was a mess of Unix dialects and a dozen different ways to do the same thing. And here is the first real root of Linux, when Richard Stallman aimed to end this era of Unix separation and everybody re-inventing the wheel by starting the GNU project (GNU is Not Unix). His goal was to make an operating system that was freely available to everyone, and where everyone could work together (like in the Seventies). Many of the command line tools that you use today on Linux or Solaris are GNU tools.

The Nineties started with Linus Torvalds, a Swedish speaking Finnish student, buying a 386 computer and writing a brand new POSIX compliant kernel. He put the source code online, thinking it would never support anything but 386 hardware. Many people embraced the combination of this kernel with the GNU tools, and the rest, as they say, is history.

Today more than 90 percent of supercomputers (including the complete top 10), more than half of all smartphones, many millions of desktop computers, around 70 percent of all web servers, a large chunk of tablet computers, and several appliances (dvd- players, washing machines, dsl modems, routers, ...) run Linux. It is by far the most commonly used operating system in the world.

Linux kernel version 3.2 was released in January 2012. Its source code grew by almost two hundred thousand lines (compared to version 3.1) thanks to contributions of over 4000 developers paid by about 200 commercial companies including Red Hat, Intel, Broadcom, Texas Instruments, IBM, Novell, Qualcomm, Samsung, Nokia, Oracle, Google and even Microsoft. 

Thursday, October 24, 2013

Downloading Kali Linux

Downloading Kali Linux

Download Official Kali Images

Official Kali Linux Images

ISO Files

Kali Linux is available as a bootable ISO in both 32 and 64-bit formats.

VMware Images

Kali is available as a pre-made VMware virtual machine with VMware Tools installed. The VMware image is available in a 32-bit PAE format.

ARM Images

Due to the nature of the ARM architecture, it is not possible to have a single image that will work across all ARM devices. We have Kali Linux ARM images available for the following devices:
  • rk3306 mk/ss808 
  • Raspberry Pi 
  • ODROID-U2/X2 
  • MK802/MK802 II 
  • Samsung Chromebook
Download Link: http://www.kali.org/downloads/

Verifying SHA1 Checksums of Downloaded Images

When you download an image, be sure to download the SHA1SUMS and SHA1SUMS.gpg files that are next to the downloaded image (i.e. in the same directory on the server).

 Ensure the Origin of the SHA1SUMS File
 
Before verifying the checksums of the image, you must ensure that the SHA1SUMS file is the one generated by Kali. That’s why the file is signed by Kali’s official key with a detached signature in SHA1SUMS.gpg. Kali’s official key can be downloaded in one of two ways:

$ wget -q -O - http://archive.kali.org/archive-key.asc | gpg --import 

# or 

$ gpg --keyserver subkeys.pgp.net --recv-key 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6

Once you have downloaded both SHA1SUMS and SHA1SUMS.gpg, you can verify the signature as follows:

$ gpg --verify SHA1SUMS.gpg SHA1SUMS 
gpg: Signature made Thu Mar  7 21:26:40 2013 CET using RSA key ID 7D8D0BF6 
gpg: Good signature from "Kali Linux Repository <devel@kali.org>"

If you don’t get that “Good signature” message or if the key ID doesn’t match, then you should stop the process and review whether you downloaded the images from a legitimate Kali mirror. If the SHA1SUMS file is the one provided by Kali, then you can verify that the image downloaded has the required checksum. You can either generate the checksum and do a manual comparison with what’s listed in SHA1SUMS or use a tool that knows how to verify those checksums. 

 TODO: explain how to use GPG on OS X and Windows. See https://www.torproject.org/docs/verifying-signatures.html.en for inspiration.

Verifying SHA1 Checksums on Linux

 With a manual comparison:

$ sha1sum kali-linux-1.0-i386.iso 

796e32f51d1bf51e838499c326c71a1c952cc052  kali-linux-1.0-i386.iso 

$ grep kali-linux-1.0-i386.iso SHA1SUMS 

796e32f51d1bf51e838499c326c71a1c952cc052  kali-linux-1.0-i386.iso

By using sha1sum -c:

grep kali-linux-1.0-i386.iso SHA1SUMS | sha1sum -c 

kali-linux-1.0-i386.iso: OK

Verifying SHA1 Checksums on OSX

With a manual comparison:

$ shasum kali-linux-1.0-i386.iso 

796e32f51d1bf51e838499c326c71a1c952cc052  kali-linux-1.0-i386.iso 

$ grep kali-linux-1.0-i386.iso SHA1SUMS 

796e32f51d1bf51e838499c326c71a1c952cc052  kali-linux-1.0-i386.iso

Verifying SHA1 Checksums on Windows

Windows does not have the native ability to calculate SHA1 checksums so you will need a utility such asFree MD5 SHA1 verifier to verify your download.




Process Management Linux Commands

Process Management Linux Commands

• ps – report a snapshot of the current processes                                      

Usage: ps [OPTION]                                                                          

eg. ps,  ps ­-el   

• bg – make a foreground process to run in background                        

Usage: type 'ctrl+z'  and then 'bg <job id>' 

 • fg – to make background process as foreground process                      

Usage: fg [jobid]

 • jobs – displays the names and ids of background jobs                         

Usage: jobs

• kill – to kill a process(using signal mechanism)                                     

Usage: kill [OPTION] pid                                                                  

eg. kill -­9 2275 

Archival

• tar – to archive a file                                                                              

Usage: tar [OPTION] DEST SOURCE                                           

eg. tar -­cvf /home/archive.tar /home/original                                         

     tar ­-xvf /home/archive.tar 

• zip – package and compress (archive) files                                           

Usage: zip [OPTION] DEST SOURSE                                           

eg. zip original.zip original

• unzip – list, test and extract compressed files in a ZIP archive           

Usage: unzip filename         

eg. unzip original.zip

Network

• ssh – SSH client (remote login program)                                         

“ssh is a program for logging into a remote machine and for executing commands on a remote machine”        

Usage: ssh [options] [user]@hostname    

eg. ssh -­X guest@10.105.11.20 

• scp – secure copy (remote file copy program)                                       

“scp copies files between hosts on a network”          

Usage: scp [options] [[user]@host1:file1] [[user]@host2:file2]  

eg. scp file1.txt guest@10.105.11.20:~/Desktop/

File Systems

• fdisk – partition manipulator                                                        

eg. sudo fdisk ­-l 

• mount – mount a file system                                                       

Usage: mount -­t type device dir                                               

eg. mount /dev/sda5 /media/target                                       

• umount – unmount file systems                                                  

Usage: umount [OPTIONS] dir | device...                               

eg.  umount /media/target 

• du – estimate file space usage                                                                 

Usage:  du [OPTION]... [FILE]...                                                      

eg. du      

• df – report filesystem disk space usage                                                 

Usage: df [OPTION]... [FILE]...                                                        

eg. df     

• quota – display disk usage and limits                                                   

Usage: quota [OPTION]                                                                    

eg. quota ­-v    

Advanced Commands

• reboot – reboot the system                                                             

Usage: reboot [OPTION]                                                       

eg. reboot                                                                                            

• poweroff – power off the system                                                   

Usage: poweroff [OPTION]      

eg. poweroff

• sed–  stream editor for filtering and transforming text               

Usage: sed [OPTION] [input­file]...                                        

eg. sed 's/love/hate/g' loveletter.txt 

• awk– pattern scanning and processing language                        

eg.  awk ­-F: '{ print $1 }' sample_awk.txt 

• find – search for files in a directory hierarchy                                       

Usage: find [OPTION] [path] [pattern]                                             

eg. find ­name file1.txt 

• locate – find or locate a file      

Usage: locate [OPTION]... FILE...      

eg. locate file1.txt

Editor commands

• kate – KDE Advanced Text Editor                                                         

Usage:  kate [options][file(s)]                                                            

eg. kate file1.txt file2.txt                                                                

• vim – Vi Improved, a programmers text editor                                       

Usage: vim [OPTION] [file]...                                                           

eg. vi hello.c 

• gedit ­ A text Editor. Used to create and edit files.                                          

Usage: gedit [OPTION] [FILE]...                                                      

eg. gedit        




System Administration Linux Commands

System Administration Linux Commands

• chmod – change file access permissions                                         

Usage: chmod [OPTION] [MODE] [FILE]                                      

eg. chmod 744 calculate.sh    

• chown – change file owner and group                                                     

Usage: chown [OPTION]... OWNER[:[GROUP]] FILE...               

eg. chown remo myfile.txt  

•  su –  change user ID or become super-­user                              

Usage: su [OPTION] [LOGIN]                                                 

eg. su remo, su 

• passwd – update  a user’s authentication tokens(s)                   

Usage: passwd [OPTION]                                                       

eg. passwd 

• who – show who is logged on                                                     

Usage: who [OPTION]                                                            

eg. who , who ­-b , who -q


Linux File Permissions

Linux File Permissions 

• 3 types of file permissions – read, write, execute 

• 10 bit format from 'ls -­l' command 

     1           2 3 4      5 6 7     8 9 10             

   file type    owner     group    others 

eg.  drwxrw­-r--­­  means owner has all three permissions,group has read and write, others have only read              permission.

• read permission = 4, write = 2, execute =1 

eg. rwxrw-­r­­--   = 764 
       673    =   rw-­rwx­-wx

Text Processing Linux Commands

Pattern

A Pattern is an expression that describes a set of   strings which is used to give a concise description  of a set, without having to list all elements.

eg.  ab*cd matches anything that starts with ab and ends with cd etc.

 ls *.txt – prints all text files


Text Processing


• cat – 
concatenate files and print on the standard output


Usage:

cat [OPTION] [FILE]... 


eg. cat file1.txt file2.txt 

      cat -­n file1.txt 


• echo – display a line of text   

 

Usage: echo [OPTION] [string] ... 


eg. echo I love India