Information Security system design basics first week study summary
I. Introduction to the History of experiments
1. Knowledge points
1) Operating system: Connect hardware and applications as a bridge between the computer tables, including system calls and cores.
2) Linux: Developed by the first, the original purpose is
Compared to Windows, the main advantages (and some people's serious disadvantage) are-mostly open-source free software, users can modify the customization and redistribution, both graphical interface operation (need to use a distribution with the desktop environment) and full command-line operation, you can only use the keyboard to complete all operations.
Second, the basic operation
1. Knowledge points
1) A kit x.org for the graphical interface of the Linux system, client xclient (X window System). Comparison: There is no mediation between the Windows graphics environment and the kernel.
2) The user communicates with the Linux system through the shell (Command parser). Under the graphical interface, Linux uses the Terminal emulator Program (Terminal) to accept user input and display output.
3) Note that there is a difference between the terminal (Terminal) and the console (consoles).
4) Linux default provides 6 pure command line interface terminal to let the user log on, on the physical machine system you can use the [ctrl]+
[ALT]+[F1]~[F6] to switch.
5) A wildcard is a special statement that has an asterisk (*, representing 0 or more characters) and a question mark (?, matching any character), which is used to make a fuzzy match to a string (such as a file name, parameter name).
6) The user can get a detailed description of a command and how to use it by executing the man command to invoke the manual page. such as: Man Man (Get a description of the man's own function).
7) Some basic operations
tab: For hints, can complete the command, directory, command parameters;
CTRL + C key to forcibly terminate the current program (it does not cause the terminal to exit), used to stop an unknown program or restore the program to receive the information normally function;
Use the arrow keys on your keyboard to restore the commands you have entered previously.
2. Operation
1) Banner command:
Figure 1 Installing Banner
Figure 2 Installation Complete
The '-W ' parameter specifies the print width, because our environment is relatively small on the screen and must be added with a width limit.
Figure 3 Banner function trial
3. Job
1) Toilet trial
Figure 4 Toilet installation
Figure 5 Toilet trial
Third, user file Rights Management
1. Operation
1) You can use the Who am I command to query the current login user:
Figure 6 Querying the user
2) Create User: To create a user requires root permission, use the sudo command. However, the use of this command has two large premises, one is that you want to know the current login user's password, and the second is the current user must be in the sudo user group.
Figure 7 Creating a user
Figure 8 Entering the created user
3) give the created user root privileges and do the following (need to heal a user password with root privileges)
Figure 9 Adding root privileges
4) The content of/etc/group includes user group, user group password, GID, and user group, each user group has a record. The format is as follows:
Group_name:password:GID:user_list
5) Delete User
Figure 10 Deleting a user
6) query All files: ls command, if followed by-A, is to show hidden files
Figure 11 Showing hidden files
7) Create user--Login--Create file--view owner
Figure 12
8) Change the file owner
sudo chown < new owners > < files >
9) Lock dead files so that other users cannot modify
Note: Three sets of permissions per file (owner, user group, other user, remember this order is certain) corresponds to this "rwx", that is, a ' 7 '.
Figure 13 Changing other user permissions
Figure 14 Changing other user permissions
2. Job
Figure 15 Creating an opt file and qualifying its permissions
IV. directory structure and basic operation of documents
1. Knowledge points
1) Linux is a tree-shaped directory structure to build the entire system, can be understood as a user-operable system skeleton. Although essentially both the directory structure and the operating system kernel are stored on disk, the Linux disk is logically "hung" on the directory (mounted), each directory can not only use the local disk partition of the file system, but also can use the file system on the network.
2) FHS (file system hierarchy standard) defines the use of each region in the system, the minimum required composition of files and directories and also gives the exception handling and contradictory processing.
FHS defines the two-tier specification, the first layer is what file data should be placed in each directory below, and the second tier is defined for subdirectories of the/USR and/var directories.
3) Use the CD command to switch directories and use them in Linux. Represents the current directory,.. Indicates the previous level of the directory (* * Note, remember our previous section, as described in. The beginning of the file is hidden files, so the two directories must also be hidden, you can use the LS-A command to view the hidden file),-Indicates the last directory, ~ usually represents the current user's "home" directory. Use the PWD command to get the current path (absolute path).
3) Relative path, that is, relative to your current directory path, relative to the path is the current directory. As the starting point, take the directory you want to the end, the expression form such as: Usr/local/bin (this assumes your current directory is the root directory). You may notice that we indicate that the relative path actually does not add the one that represents the current directory. , instead of directly starting with the directory name, because this USR directory is a subdirectory of the/directory, this can be omitted. (You'll talk about a situation like you can't omit it later); if it's the top-level directory of the current directory, you'll need to use: , such as your current directory as the "home" directory, the root directory should be represented as: /.. /, indicates the top level directory ("/" directory) of the previous level directory ("Home" directory)
2. Operation
1) Viewing the file tree using the tree command
Figure 16 File Tree
2) using the CD command
Figure 17 using the CD command
3) Create a new blank file: Touch < file name > (Touch can modify an existing file timestamp, create a blank new file when no parameters are added)
4) Create a blank folder (including parent directory)
Figure 18 Creating a folder
5) Copying Files and folders
Figure 19
6) Delete files or directories (RM command)
Figure 20
7) Move the file (cut) using the MV (move or rename files) command.
MV < files > < new folders >
8) Renaming files
MV < file name > < new file name >
Rename commands can be renamed in batches
9) The Cat and TAC two commands are used to print the file contents to the standard output (terminal), where cat is a positive sequence display and TAC is displayed in reverse order.
Standard input and output: when we execute a shell command line normally will automatically open three standard files, namely standard input file (stdin), default corresponding to the terminal's keyboard, standard output file (STDOUT) and standard error output file (stderr), All two files correspond to the screen being redirected to the terminal so that we can see the output directly. The process will get input data from the standard input file, output normal output data to the standard output file, and send the error message to the standard error file.
Where, plus –n can be displayed by line
10) Use the more tool to open the passwd file, open the default display only one screen of content, the bottom of the terminal shows the current reading progress (percentage). You can use the ENTER key to scroll down a line, use the space key to scroll down one screen, press H to display Help, and Q to exit.
11) We typically use the file command to view the types of files
12) Learn Vim
Figure 21
3. Job
Figure 22 Bring up "eyes"
Figure 23 Background run
V. Environment variables and file search
1. Operation
1) Find
Whereis can only search binaries (-B), man Help Files (-m), and source code files (-s). You can use the Locate command if you want to get a more comprehensive search result.
Figure Whereis Find
The locate command can be found in the current folder and its subfolders, and can look for files that resemble all JPG types such as/*.jpg.
Typically, which is used to determine whether a specified software is installed because it searches for commands only from the path specified by the PATH environment variable.
The path to the Find command is the first parameter, and the basic command format is find [path] [option] [action].
3. Job
Figure Cmatrix's Digital rain
Six, file packaging and decompression
1. Knowledge points
1) ZIP file Packaging: the-r parameter indicates that the recursive package contains the entire contents of the subdirectory, the-Q parameter is expressed in quiet mode, that is, not to the screen output information,-o, represents the output file, the compression level-[1-9],1 represents the fastest compression but the volume is large, 9 represents the smallest but the longest time. The output file name needs to be packaged immediately thereafter. Later, use the du command to view the size of the file after packaging.
Zip parameter file. zip file absolute Path
2) Use the-e parameter to create an encrypted compressed package.
3) Unzip the zip file using the unzip command
4) If you do not want to unzip just want to view the contents of the compressed package you can use the unzip plus the-l parameter.
5) RAR is also a commonly used in Windows compressed file format, on Linux can use RAR and Unrar tools to create and decompress RAR compression package.
6) RAR command parameters do not-if added will be an error. D: Deletes a file from the specified compressed package file. L: View the unresolved file.
7) Tar package and unzip:
• Create a tar package: TAR-CF Shiyanlou.tar ~
• Unpack a file (-x parameter) to the existing directory of the specified path (-c parameter):
$ mkdir Tardir
$ TAR-XF shiyanlou.tar-c Tardir
2. Job
Figure 26
Vii. file system operations and Disk Management
1. Knowledge points
1) The DD command is used to convert and copy files, but its replication differs from CP. As mentioned earlier about Linux, everything is file, on Linux, hardware device drivers (such as hard disk) and special device files (such as/dev/zero and/dev/random) are like ordinary files, as long as the corresponding function in the respective driver, DD You can also read from and/or write to these files. In this way, DD can also be used in tasks such as backing up the boot sector of the hardware, obtaining a certain amount of random data, or empty data. DD programs can also process data at copy time, such as converting a byte order, or swapping between ASCII and EBCDIC encoding.
The command line statement for DD differs from other Linux programs because its command line option format is option = value instead of the more standard-option value or-option = value. DD is read from the standard input by default and is written to standard output, but can be changed with the option if (input file, input files) and the of (output file, export files).
2) format the disk with the MKFS command.
3) The Mount instruction of the Linux/unix command line tells the operating system that the corresponding file system is ready to be used, and that the file system corresponds to a specific point (called a mount point). Mounted files, directories, devices, and special files can be used by users.
In UNIX-like systems,/dev/loop (or VND (Vnode disk), Lofi (circular file interface)) is a pseudo-device that allows files to be accessed as if they were block devices.
Before use, the loop device must be associated with a file on an existing file system. This association will be provided to the user with an application interface that will allow the file to be treated as a block special file (see Device file System) for use. Therefore, if the file contains a complete file system, the file can be mounted as if it were a disk device.
This device file is often used for disc or disk mirroring. A file that contains a file system is mounted by a cyclic mount to allow access to the files in the file system. These files will appear in the mount point directory. If the mount directory itself has files, these files will be banned after being mounted.
Command execution sequence control and piping
1. Knowledge points
1) The pipeline is divided into anonymous pipes and named pipes (this will not discuss the use of system calls in the source program to create and use the pipeline, which is the same mechanism as the command line pipeline in the kernel). When we use some filter programs, we often use anonymous pipes, which are represented in the command line by the | delimiter, which we have used many times in the previous content. A named pipe is simply a named pipe, usually a named pipe in the source program.
2) Cut command to print a field for each line.
3) grep command:-r parameter indicates recursive search for files in subdirectories,-n means print match line number,-I means ignore binary file. This operation doesn't really make much sense, but you can feel the power and practicality of GREP commands.
4) The Sort command function is very simple is to sort the input in a certain way, and then output, it supports sorting by dictionary, number sorting, sort by month, random sort, reverse sort, specify specific fields to sort and so on.
Nine, simple text processing
1. Knowledge points
1) Join command: The command is used to merge the rows that contain the same content in two files.
2) Paste command
Paste this command is similar to the join command, where it is simple to merge multiple files together and tab-separated without comparing the data.
2. Job
Figure 27
X. Data Flow Redirection
1. Direct the standard output to a file or append to a file. This is actually redirection, redirecting data that was originally output to standard output to a file, because the standard output (/dev/stdout) itself is also a file.
2. redirect standard output to a file, this is a very practical operation, another very useful operation is to redirect the standard error, standard output and standard errors are pointed to the pseudo-terminal screen display, so we often see the output of a command is usually included both standard output and standard error results.
Xi. the basis of regular expressions
1. Regular expressions, also known as formal representations, formal representations, regular expressions, regular expressions, general representations (English: Regular expression, often abbreviated in code as regex, RegExp, or RE), is a concept of computer science. A regular expression uses a single string to describe and match a series of strings that conform to a certain syntactic rule. In many text editors, regular expressions are often used to retrieve and replace text that conforms to a pattern.
Many programming languages support the use of regular expressions for string manipulation. For example, in Perl, a powerful regular expression engine is built in. The concept of regular expressions was initially popularized by tools software (such as SED and grep) in UNIX. Regular expressions are usually abbreviated as "regex", singular with regexp, regex, plural regexps, regexes, Regexen.
12, Linux download installation
is complete.
Figure 28 Virtual machine platform and Linux system
Information Security system design basics first week study summary