Hacking: A 101 Hacking Guide (2015)
Chapter 8: Unix
Now that you have a good grasp of the concepts and methods behind white hat hacking, you can start building your hacking skills. If you aren’t already familiar with Unix, it’s time to learn it. Unlike Windows, Unix is an open source operating system, which means that you can actually look at and modify all the code that was written to create it.
Imagine you are a mechanic, or at least a budding mechanic, and you purchase a car. You start hearing some strange noises from the engine, so you decide to pop the hood to take a look. However, when you try to pop the hood you find it welded shut! You can’t even change the oil without going through the car manufacturer to have it done. Fortunately, cars aren’t like that–but some operating systems are!
Unix is more like a car: you can pop the hood, look around at the source code, find out how it works, make changes to see what happens, and more.
Unix comes in so many different flavors: Unix, Linux, Kali, Fedora, FreeBSD, Ubuntu…the list keeps growing. Just like ice cream, hackers have their own favorite flavor of Unix. However, Kali seems to be quite popular because of its support for penetration testing.
Unix operating systems are usually free, too, and have exhaustive documentation available on the web. Since Unix is open source, many of the tools developed for it are also open source and free.
There is still another reason why you should learn Unix: some of the best hacking tools are open source and originally written for Unix. Once you learn how to use them, and become familiar with Unix, you can modify them or start developing your own tools.
When you download Unix, you will probably be downloading it as an .ISO file, which you can burn to a CD or copy to a flash drive. This is the full image you need for installation.
If you don’t have a computer to laptop that you can dedicate to just running Unix, there are other options. One is VirtualBox, that lets you run Unix through a virtual machine on your computer, or just from the CD drive or flash drive (you can’t make any permanent changes to settings, Unix source code, etc. this way, but you can experiment).
Another cool option just for learning how to use Unix is one of the online Unix simulators. Coding Ground offers a Unix shell simulator, as well as just about any other kind of online simulator you need to learn a programming language.
As a hacker, you will spend a good deal of your time working with the Unix CLI, or Command Line Interface. With a command line interface you type in your commands and instructions, as opposed to working with a GUI, or Graphical User Interface.
Using the CLI, you can do everything you do with a GUI, like copying files from one directory to another, or searching through files and placing copies of only the files that have the word“chapter”in them into a new directory.
Once you get the hang of Unix, its time to learn how to write shell scripts. As is typical in Unix, there are a variety of shells out there, with bash (Bourne Again Shell) being popular among hackers. A shell script is similar to a program that includes operating system commands, and hackers use them not just to develop hacking tools, but also to automate boring, repetitive tasks that require interfacing with the operating system.
There are a tremendous number of sites with tutorials and examples for writing shell scripts, and if you already know how to program, then you will find it quite easy to work with.
Be sure to check out the online resources for links to some of the popular flavors of Unix, as well as excellent tools to help you learn how to use Unix effectively.
Coding Ground: http://www.tutorialspoint.com/codingground.htm
How to Write Bash Programs: