How To Exploit A Linux Kernel
How to exploit a Linux kernel
In modern world a personal computer is indispensable part of human being. From small to old people know about it and of course use it. PCs, laptops, netbooks, tablets, smartphones are produced thousands every day. It is the best entertainment for people of all ages. We use it for work and continue to use it at home. Windows XP, than Windows 7, now Windows 10. They were and are very popular.But who knows at least something about Linux except its operational system? Do you guys know that it was developed in 1991 by a Finnish engineer of software Linus Torwalds? This man was not only a creator of the Linux kernel OS but also quite a while its single developer. Torwalds was frustrated because of limited functions of the existing operational system (e.g. education explicit only) and started to work on his own OS, which became as famous as GNU at that times and Android and Chrome OS later.
And now if you are curious about Linux kernel we should say that introduction with the new operation system is as much interesting as any other entertainment with your PC at home. Besides, this introduction may be useful concerning broadening your outlook and personal enrichment.
Free and worthwhile. Those two words completely describe this operational system, which was developed for various people in different countries of the whole world. It became stable and effective. You can use Linus kernel to browse and host the web, to write documents and emails, to watch various movies and YouTube, to play games. But remember this isn't a toy! It is a fully effective operating system used by many users in everywhere.
Mostly people use Linux as the simplest instrument to build applications or to run existed applications built by other people. They do not look how the system works itself and it’s a pity because developers make all the sources fully free and it can be distributed in frames of Free Software Foundation's GNU Public License.
So let us talk a bit about ways to exploit Linux kernel
The aforementioned will be useful for enthusiasts who want to know how the Linux kernel works in general.It definitely should be mentioned, that in Linux the graphics mode to display the information is not the main way. The user will encounter without putting information in the text mode and typing the commands in prompt.
Turning on the computer and off. Daily work with Linux kernel significantly differs from the work with Windows, in particular the usage of the Reset switch and combination of buttons Ctrl+Alt+Del, which most Windows users know and use. In Linux, device reboot is really external situation, which leads to problem issues with the system. Therefore, you should learn from the start how to switch on the PC and off in a right way.
After booting the Linux operational system software, you should ensure that permission to enter the system is available. Therefore, the first dialogue will be your name and the password prompt:
Password: User password
Note: Root user is administrator of OS. He/she always has some privileges.
The user can finish his session only with the command:
In emergencies there is a "hot" keystrokes Ctrl+Alt+Backspase, which causes the switch over of the current session.
Working in a virtual console
Learning Linux kernel commands, of course, is possible by switching to the alpha mode, but it is more comfortable to run in KDE or GNOME graphical shell of one of the programs that emulate a virtual console. After that in the window of this program you are running in text mode (command line), but you will be able to support GUI (copy and scrolling a text that is not possible in a standard text mode).
The command will be entered when the key Enter is pressed. Up to this time, the user can optionally change the text line by adding or removing characters and commands.
How virtual console looks like
Users and passwords. There is no right in the Linux operating system to refuse root to do any operations. It is a very dangerous threat. If you are not a master of working in the OS you will seriously mess up the file structure or essential service files. Indeed, you have to restart Linux (and possibly more than once). Therefore, it is imperative and crucial to learn having the user rights, which can not cause irreparable harm to the system.
Commands to manage files. Even if you use a graphic mode, you should still be able to work with the text console, as the work in the command prompt mode is the main here. Working with Linux kernel it is always helpful to know the most popular commands that let you to reboot the system operability.
Commands to know the file sizes -
df. This information is significantly important for those who ran into problems during the installation (for example, too small volume of a section has been specified or too many packages were selected):
df [-t type] [path] .
<strong>List of files </strong>– <code>ls</strong></strong>. In order to put on monitor a list of working files and subdirectories in the existing directory (at the very beginning you look at your home directory), you can press this command.
Also “*” symbol can be used for output files using a mask
<code>ls n*- all files starting with "n"
<code>ls *n - all files ending with "n"</strong><strong><code>
<code>ls n*n - all files beginning and ending with "n"</strong><strong><code>
</strong><strong></strong></strong><p><strong><strong><code>Renaming files. To rename the selected file use the code: <code>mv old_name new_name.
Deleting files -
rm deleted_file. <br />Creating files. To create a short note or a text file, you can enter the <code>echo command that prints text or changing to the standard displaying (by default - the monitor):
echo "Text output on the screen" or <code>echo "Text output to the file" > test to file test
<code><strong>In the text block, the following control characters are used:</strong>
<code> <code>\b backspace
<code> <code>\c do not to output a newline character
<code> <code>\f page broaching
<code> <code>\n end-of-line
<code> <code>\r carriage restore
<code> <code>\t horizontal tabulation character
<code> <code>\v vertical tabulation character
<code> <code>\\ backslat
<code> <code>\nnn octal character code
<code><strong>File output and copying.</strong> To display information from incurrent file, you can use the cut command: <code>cut test</strong>. This command is really one of the most efficient in Linux kernel. It can help not only to look at the body of files, but also to perform various operations with them. For example, you can make a short text file by printing its contents with the keyboard:
cat > test1. To finish entering text, you have to press the hotkey <kbd>Ctrl+D</kbd>.
<code><strong>Viewing file contents.</strong> There is the command more files settings for paging file at the screen. Nevertheless, most people apply a command that allows you to see the body of the file not only from the beginning to the end, but in the opposite direction: <code>less [options].
<code><strong>File systems and drives. </strong>Users who are familiar only with the products of Microsoft, reaching this section are in some way appalled by the fact that the organization of hard drives and various external drives requires additional actions from the user. But I want to note that in recent years in modern Linux distributions appeared automount service/unmount external device, which are quite convenient. To connect a floppy disk file system use the mount command: <code>mount [-arvw] [-o option] [-t type] [device] [list]. For example, the following parameters used for reading a floppy disk:
mount /dev/fd0 Unlike MS DOS, where the user never needs to think about the kind of a file system on a floppy disk, Linux kernel can work with disks created on different operating systems.
<code><code>File system table. To store a table of file systems that user uses by default (regularly used file systems) there is a text file <samp>/etc/fstab</samp>, which can looks like this:
<code><code>/dev/hda6 ext4 defaults 0 0
<code><code> /dev/hda7 swap swap defaults 0 0
<code><code> /dev/fd0 /mnt/floppy ext3 noauto 0 0
<code><code> /dev/cdrom /mnt/cdrom iso9600 noauto ro 0 0 none
<code><code>In the first row there is the title of the device, while in the second - the path where it is installed. The third row of the file system can specify a special device that is why you can change the kind of a file system for floppy disks, using the embed editor <code>mcF4, for example.
<strong>User rights. </strong>The most important issue of multi-user systems user right is. Very often, trying to make a simple operation, the system receives a response that the user does not have enough privileges. It is crucial to receive the information about the rights to use the file or directory. If it happens that the object pertains to someone else, you have to change the title of owner or group. If you want to change the permissions for the file or directory, the most often used <code>chmod</strong> command is. Sometimes, useful command
chown let you to change the ownership for the file or directory. The option to change both owner and group exists. Before changing file ownership, you will clarify a group to which you belong as a user. To do this, there is the groups command, for example: <code>groups root. For quick reference information, use it with the following parameters: --help show help &exit; --version show information about the version and exit.
<strong><strong><code><code><code>Anatomy of Linux kernel
<strong><strong><code><code><code><strong>There is nothing without the disadvantages</strong>
<strong><strong><code><code><code>First and the biggest drawback of this OS is the language. It was developed by programmers who know and use program language C/C++. It is the language of this system. To operate and manage with different tasks the user also has to remember a lot of program commands. Of course, there is possibility to work without programming, but it costs money and the Linux becomes not free to use. Windows users used to deal with any problems, which they face in managing the PC by quick rebooting the OS. You should once and forever remember that rebooting Linux kernel is the extremal option.