Hack Like a Pro: Linux Basics for the Aspiring Hacker, Part 5 (Installing New Software) « Null Byte :: WonderHowTo

Welcome back, my hacker wannabees!Since nearly all hacker tools and platforms are developed in the Linux/Unix operating systems,this seriesof tutorials are for those of you who want to be hackers, but are unfamiliar with Linux.We've looked at numerous basic commands in the first few tutorials, but here I want to focus on installing new software in Linux, and especially inBackTrack.Image viawonderhowto.comBackTrack v5r3was built on Ubuntu, which is a type of Debian Linux. That's important because different Linux systems use different methods for package management (package management means downloading and installing new software packages).Before we dive in, make sure to check outmy previous guides on Linux basicsto get current on our lessons.Step 1: Using the GUI Package ManagerThe simplest way to install software on BackTrack is to use the GUI package manager. In my KDE-based BackTrack 5, the GUI package manager is calledKPackageKit(some of you may haveSynaptic).These package managers enable us find packages, download them, and install them on our system. We can open KPackageKit by navigating toSystemand thenKPackageKitas shown in the screenshot below.When open, you simply put the name into search field. It will then retrieve all the options fulfilling the criteria of your search, then just click on the icon next to the package you want to download.In this example, we will be looking for the wireless hacking software,aircrack-ng.Note that if the package is already installed, there will be anXnext to it. If not, there will be a downward-pointing arrow. Click on the arrow and then click on theAPPLYbutton below.Step 2: Updating Your RepositoriesPackage managers search in specified repositories (websites housing packages) for the package you are seeking. If you get a message that the package was not found, it doesn't necessarily mean that it doesn't exist, but simply that it's not in the repositories your OS is searching.BackTrack defaults to searching inbacktrack-linux.orgwhere many hacking tools are available. Unfortunately, if you are looking for something that is not a hacking tool or a new hacking tool that BackTrack hasn't yet placed in its repository, you may have to revise where your operating system searching for packages.This can be done by editing the/etc/apt/sources.listfile. Let's open it withKWriteand take a look.As you can see, BackTrack has three default sources on itssources.list, all pointing to BackTrack repositories. We can add any repository with Linux software to this list, but since BackTrack is a Ubuntu distribution, we might want to add an Ubuntu repository to this list to download and install Ubuntu software. We can do this by adding a single line to this file:debhttp://archive.ubuntu.org/ubuntulucid main restrictedNow when I use my package manager, it will search the three BackTrack repositories first, and if it fails to find the package in any of those places, it will then search for it in the Ubuntu repository.Step 3: Command Line Package ManagementUbuntu also has a command line package manager calledapt. The basic syntax for using apt to download packages is:apt-get install aircrack-ngSo, let's open a terminal and type the above command to installaircrack-ng(of course, we just need to replace the name of the package to install other software).If the package is in one of our repositories, it will download it and any of the necessary dependencies (files that the package need to run properly), and install it on your system automatically.Step 4: Installing from SourceFinally, sometimes you will need to download software that is neither in a repository, nor in a package. Most often these are archived astarortarballs. These are files that are "tarred" together into a single file and often compressed (similar to zipping files with WinZip and then putting them together into a .zip file).Let's say thataircrack-ngwas not in our repository (some software never finds its way into a repository) and we had to download it fromaircrack-ng.orgwebsite. We could download the fileaircrack-ng-1.2-beta1.tar.Once we've downlaoded it, then we need to untar it using thetarcommand:tar xvf aircrack-ng-1.2-beta1.tarThis will untar and uncompress it, if it's compressed. Next we need to compile it with the GNU compiler. Compiling from source code will give us binaries (the program files) that are optimized for our hardware and operating system, meaning they will often run faster and more efficiently. We can compile this source code by typing:gcc aircrack-ngFinally, we can now run this file from within the directory where we unzipped it:./aircrack-ngNote that to run the file, we preceded it with the./, which tells Linux to execute this file from the directory we are presently in, so make certain you run this command in the same directory that you compiled the source code in.That should cover all the major ways of installing software and I hope it wasn't too confusing. In most cases, we can simply use the GUI based package manager to install software, but like all things in life, there are exceptions.In my next tutorial, we'll be looking at networking Linux using BackTrack. If you haven't already, make sure to check out thefirst four partsof this series, and if you have any questions, ask away in the comments below or hit up theNull Byte forumfor more help.Blue penguin photoby Joe ShlabotnikWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews:How to Study for the White Hat Hacker Associate Certification (CWA)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How to Hack Like a Pro:Getting Started with MetasploitHow To:The Essential Skills to Becoming a Master HackerHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 1 (Getting Started)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 6 (Networking Basics)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 12 (Loadable Kernel Modules)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 21 (GRUB Bootloader)News:What to Expect from Null Byte in 2015Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 2 (Creating Directories & Files)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 22 (Samba)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 4 (Finding Files)Hack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 13 (Mounting Drives & Devices)Hack Like a Pro:Metasploit for the Aspiring Hacker, Part 4 (Armitage)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 24 (The Linux Philosophy)Hack Like a Pro:Python Scripting for the Aspiring Hacker, Part 1How To:Simplify Payload Creation with MSFPC (MSFvenom Payload Creator)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 25 (Inetd, the Super Daemon)Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 9 (Managing Environmental Variables)Hack Like a Pro:How to Install BackTrack 5 (With Metasploit) as a Dual Boot Hacking SystemGoodnight Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHow To:How Hackers Take Your Encrypted Passwords & Crack ThemCommunity Byte:HackThisSite Walkthrough, Part 6 - Legal Hacker TrainingHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:How Hackers Use Your IP Address to Hack Your Computer & How to Stop ItCommunity Byte:HackThisSite Walkthrough, Part 1 - Legal Hacker TrainingHow To:Use Cygwin to Run Linux Apps on WindowsCommunity Byte:HackThisSite Walkthrough, Part 2 - Legal Hacker TrainingTHE FILM LAB:Non-Linear Editing Basics, Final Cut Pro - Part 01Goodnight Byte:HackThisSite Walkthrough, Part 8 - Legal Hacker TrainingNews:Let Me Introduce MyselfHow To:Hack Wireless Router Passwords & Networks Using HydraGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingGoodnight Byte:HackThisSite Walkthrough, Part 9 - Legal Hacker TrainingCommunity Byte:HackThisSite Walkthrough, Part 5 - Legal Hacker Training