Ethical Hacking and Penetration Testing Guide



Yüklə 22,44 Mb.
Pdf görüntüsü
səhifə28/235
tarix07.08.2023
ölçüsü22,44 Mb.
#138846
1   ...   24   25   26   27   28   29   30   31   ...   235
Ethical Hacking and Penetration Testing Guide ( PDFDrive )

19
Chapter 2
Linux Basics
In order to become a good ethical hacker or penetration tester, you need to be conversant with 
Linux, which is by far one of the most powerful operating systems. Linux is really good for ethical 
hacking and penetration testing because it is compatible with a wide variety of related tools and 
software, whereas other operating systems such as Mac and Windows support fewer of these soft-
ware and tools. In this chapter, I will teach you some of the very basics of operating a Linux OS. If 
you are already familiar with Linux basics, you can skip this chapter.
One of the most common questions asked in many forums is “Which Linux distro should I 
use?” As there are tons of Linux distros such as Ubuntu, Fedora, Knoppix, and BackTrack you 
can use any Linux distro you want as all work in a similar manner. However, I suggest you use 
BackTrack if you really wish to dig deeper into this subject because it is all encompassing from a 
penetration tester’s perspective.
Major Linux Operating Systems
Before talking about BackTrack, let’s take a look at some of the Linux-based distros that you will 
encounter very often:
Redhat Linux
—Used mostly for administration purpose.
Debian Linux
—Designed for using only in open source software.
Ubuntu Linux
—Designed mostly for personal use.
Mac OS X
—Used in all Apple computers.
Solaris
—Used in many commercial environments.
BackTrack Linux
—Used mostly for penetration testing.


20
◾ 
Ethical Hacking and Penetration Testing Guide
File Structure inside of Linux
On a Linux system, most everything is a file, and if it is not a file, then it is a process.
Here is a general diagram for file structure in Linux.
There are certain exceptions in a Linux file system
Directories—
Files that are lists of other files.
Special file
—The mechanism used for inout and output. /dev are special files.
Links
—A system to make file or directory visible in multiple parts of the systems.
Sockets
—A special file type, similar to TCP/IP sockets providing inter-process networking.
Pipes
—More or less like sockets; they form a way for process to communicate with each other 
with out using network socket.
File types in a long list:
Symbol
Meaning
-
Regular file
d
Directory
l
Link
c
Special file


Linux Basics
◾ 
21
s
Socket
p
Named pipe
b
Block device
Subdirectories of the root directory:
Directory
Content
/bin
Common programs, shared by the system, the system administrator, and 
the users.
/boot
The startup files and the kernel, vmlinuz. In some recent distributions also 
grub data. Grub is the GRand Unified Boot loader and is an attempt to get 
rid of the many different boot-loaders we know today.
/dev
Contains references to all the CPU peripheral hardware, which are 
represented as files with special properties.
/etc
Most important system configuration files are in/etc., this directory 
contains data similar to those in the Control Panel in Windows
/home
Home directories of the common users.
/initrd
(on some distributions) Information for booting. Do not remove!
/lib
Library files, includes files for all kinds of programs needed by the system 
and the users.
/lost+found
Every partition has a lost+found in its upper directory. Files that were saved 
during failures are here.
/misc
For miscellaneous purposes.
/mnt
Standard mount point for external file systems, for example, a CD-ROM or 
a digital camera.
/net
Standard mount point for entire remote file systems.
/opt
Typically contains extra and third-party software.
/proc
A virtual file system containing information about system resources. More 
information about the meaning of the files in proc is obtained by entering 
the command man proc in a terminal window. The file proc.txt discusses 
the virtual file system in detail.
/root
The administrative user’s home directory. Mind the difference between /, 
the root directory and /root, the home directory of the root user.
/sbin
Programs for use by the system and the system administrator.
/tmp
Temporary space for use by the system, cleaned upon reboot, so don’t use 
this for saving any work!
/usr
Programs, libraries, documentation, etc., for all user-related programs.
/var
Storage for all variable files and temporary files created by users, such as 
log files, the mail queue, the print spooler area, space for temporary 
storage of files downloaded from the Internet, or to keep an image of a CD 
before burning it.



Yüklə 22,44 Mb.

Dostları ilə paylaş:
1   ...   24   25   26   27   28   29   30   31   ...   235




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin