DAY14: command execution

First, what is the command execution
1. command execution

 

 

2. Command Execution Vulnerability

 

 

 

3. Command Execution Vulnerability generated conditions

 

 

4. The common function command

 

 

 

 
Second, the command execution exploit
1. The rights issue
Command injection vulnerabilities that with web middleware (apache, nginx, etc.) permission to run about, because the web application running on the web middleware, so web applications "inherit" the permission to run web middleware, if there is a command injection vulnerability web application running on the web middleware running as an administrator, then execute commands via a web administrator privileges equivalent to execute the command.
 
2. The common system commands and functions
command can be echo a command to the specified file webshell
Under Windows simultaneously execute multiple command syntax
In fact, a pipe symbol two commands to be executed
under Linux simultaneously execute multiple command syntax

 

 

 
Third, the deserialization command execution
(Exp able to use successfully exploit the vulnerability, to understand what is deserialized vulnerability, principle)
1. PHP serialization
What is serialized?
php save an object allows easy reuse later, this process is referred to as a serialized
② serialization code examples are as follows:

 

 

2. PHP deserialization
① deserialization code sample as follows:
Constructor (automatically called when executing the corresponding operation)
③ constructor following sample code:

 

 

3. * What is deserialized vulnerability?

 

 

4. PHP exemplary deserialization vulnerability

 

 

* How it works: When passed to unserialize () the parameters controllable variables, we can pass a string through a sequence of carefully constructed to control the internal objects even function
 
 
 
 

Guess you like

Origin www.cnblogs.com/niangaoSDS/p/11641104.html