L in u X ba sics for h acke rs g e t t I n g s t a r t e d w I t h




Download 7,3 Mb.
Pdf ko'rish
bet107/125
Sana14.05.2024
Hajmi7,3 Mb.
#232858
1   ...   103   104   105   106   107   108   109   110   ...   125
Bog'liq
linuxbasicsforhackers

bunzip2 HackersArise.*
kali >
When you do, the file returns to its original size, and its file extension 
returns to .tar.
Compressing with compress
Finally, you can use the command 
compress
to compress the file. This is 
probably the least commonly used compression utility, but it’s easy to 
remember. To use it, simply enter the command 
compress
followed by the 
filename, like so:
kali >
compress HackersArise.*
kali >
ls -l
--
snip
--
-rw-r--r-- 1 root root 5476 Nov 27 2018 13:32 HackersArise.tar.Z
Note that the 
compress
utility reduced the size of the file to 5,476 bytes, 
more than twice the size of 
bzip2
. Also note that the file extension now is 
.tar.Z (with an uppercase Z).
To decompress the same file, use 
uncompress
:
kali >
uncompress HackersArise.*
You can also use the 
gunzip
command with files that have been com-
pressed with 
compress
.


98
Chapter 9
Creating Bit-by-Bit or Physical Copies of Storage Devices
Within the world of information security and hacking, one Linux archiving 
command stands above the rest in its usefulness. The 
dd
command makes 
a bit-by-bit copy of a file, a filesystem, or even an entire hard drive. This 
means that even deleted files are copied (yes, it’s important to know that 
your deleted files may be recoverable), making for easy discovery and 
recovery. Deleted files will not be copied with most logical copying utili-
ties, such as 
cp
.
Once a hacker has owned a target system, the 
dd
command will allow 
them to copy the entire hard drive or a storage device to their system. In 
addition, those people whose job it is to catch hackers—namely, forensic 
investigators—will likely use this command to make a physical copy of the 
hard drive with deleted files and other artifacts that might be useful for 
finding evidence against the hacker.
It’s critical to note that the 
dd
command should not be used for typical 
day-to-day copying of files and storage devices because it is very slow; other 
commands do the job faster and more efficiently. It is, though, excellent 
when you need a copy of a storage device without the filesystem or other 
logical structures, such as in a forensic investigation.
The basic syntax for the 
dd
command is as follows:
dd if=
inputfile
of=
outputfile
So, if you wanted to make a physical copy of your flash drive, assuming 
the flash drive is sdb (we’ll discuss this designation more in Chapter 10), 
you would enter the following:
kali >

Download 7,3 Mb.
1   ...   103   104   105   106   107   108   109   110   ...   125




Download 7,3 Mb.
Pdf ko'rish

Bosh sahifa
Aloqalar

    Bosh sahifa



L in u X ba sics for h acke rs g e t t I n g s t a r t e d w I t h

Download 7,3 Mb.
Pdf ko'rish