Research and Analysis on PHP Website Security and Applications to Photograph Uploading System
- Author
- WangWei
- Advisor
- WuGuoShi
- School
- Beijing University of Posts and Telecommunications
- Major
- Software Engineering
- Classification
- TP393.08 Computer Network Security
- Degree
- Master's thesis
- Year
- 2011
- Downloads
- 94
- Citations
- 1
Abstract
PHP language is the most popular web development language , has been the emergence of more and more PHP website on the Internet . However, due to the programmer itself means endless lack of safety awareness , as well as a variety of PHP website attacks , the PHP website security issues exposed more and more . Therefore, the study concluded a deal with the prevention of various attacks to guide programmers to write safe and reliable PHP applications becomes increasingly important to the analysis and research on the PHP website attacks as well as the prevention of This paper focuses on the SQL injection attacks , cross-site scripting attacks , cross-site request forgery attacks, as well as file upload vulnerability attack attack principle , the course of the attack , and the harm caused by the attack , also against these attacks , study the appropriate method of prevention . In this paper, the use of security configuration , database design techniques , and other methods to protect against SQL injection ; filtration and validate input and output as well as the cookie settings httponly other methods to prevent cross-site scripting attacks ; prevention methods such as consistency of the authentication cookie and http refer to cross-site request forgery attacks ; upload directory setting file permissions and check the file type size , and other methods to prevent file upload vulnerability attacks . PHP image upload system with a specific description of how to write secure , robust , reliable PHP applications First, we conducted a needs analysis of the image upload system , and then writing a image upload system did not consider any security design , and then analysis of the system may be subjected to a variety of attacks , the attack prevention perfect developed prior to the final use of this system , to design a safe and reliable PHP image upload system .
Table of contents
Summary 4-5
ABSTRACT 5-8
Chapter Introduction 8-11
1.1 subject background 8-9 < br /> 1.2 topics task 9-10 1.2.1 subject content
9-10
1.2.2 I assume tasks 10
1.3 papers 10-11
PHP website attack analysis 11-26
2.1 SQL injection attacks analysis 11-14
2.1. 1 SQL injection 11-13
2.1.2 SQL injection techniques 13
2.1.3 to obtain valuable information 13-14 <br / > 2.1.4 SQL injection hazards 14
2.2 XSS cross-site scripting attacks analysis 14-17
2.2.1 XSS attack principle 14-15
2.2.2 XSS attack to harm 15-16
2.2.3 XSS attack 16-17
2.3 CSRF analysis of cross-site request forgery attacks 17-21
2.3.1 CSRF attack works the way 17-18
2.3.2 CSRF attack
2.3.3 CSRF 18-20 attack instance 20-21
2.3.4 CSRF attacks harm 21
2.4 file upload vulnerability attacks analysis 21-23
2.4.1 Attacks the 21-22 attacks
2.4.2 Analysis 22
2.4.3 attacks hazard analysis 22-23
2.5 file contains vulnerability analysis 23-25 ??
2.6 Chapter Summary 25-26
Chapter PHP website security methods 26-40
3.1 SOL injected to prevent 26-29
3.1.1 Security Configuration 26
3.1.2 secure coding 26-28
3.1.3 database design skills 28
3.1.4 upgrade system software 28-29
3.2 XSS injection analysis prevention methods 29-32
3.2.1 convert or cleared the HTML the 3.2.2 database input 29
escape 29-30
3.2.3 verify input format and length are found; 30-31
the 3.2.4 cookie settings into httponly 31-32
3.3 CSRF attack prevention methods research the 32-36
3.3.1 check cookie consistency 32 -33
3.3.2 Check the HTTP request the antecedents (HTTP REFERER) the Verification Code 33
3.3.3 33
3.3.4 using session tokens are found; 33-36
3.4 file upload vulnerability attack prevention method 36-37
3.4.1 file upload directory permissions set 36
3.4.2 check the file size and type 36
3.4.3 rewrite the file name 36-37
3.4.4 file upload security function 37
3.5 file include vulnerability prevention methods 37-39
3.6 Chapter Summary 39-40
Chapter safe and reliable image upload system 40-63 < br /> 4.1 needs 40-43
4.1.1 system functionality requirements 40
4.1.2 system performance requirements 40
4.1.3 operational requirements 40-41
4.1.4 each module data flow 41-43
4.2 The simple picture to upload the realization of the system PIC1.0 43-46
4.3 PIC1.0 system security risk analysis 46-50
4.3.1 SQL injection risks 46-47
4.3.2 XSS injection hidden 47-48
4.3.3 upload files hidden 48-49
4.3.4 Cross Site Request Forgery CSRF hidden 49
4.3.5 hidden 49-50
4.4 to achieve a safe and reliable picture to upload system PIC2.0 50-61
4.4.1 PIC2.0 system security configuration 50 - 51
4.4.2 PIC2.0 system user login module the systems user registration module nbsp 51-53
4.4.3 PIC2.0,; 53-56
4.4 Upload the .4 PIC2.0 picture module 56-59
4.4.5 PIC2.0 system image. showcase module 59-61
4.5 Chapter Summary 61-63
Chapter V Conclusion nbsp 63-64
5.1 papers working summarized; 63
5.2 Problems and Prospects 63-64
References 64-65
Acknowledgements 65
Related dissertations
- The Study of Occurrence Rules and Hazard Loss of Vegetable Root-knot Nematodes in Sunlight Greenhouse of Gansu Province
- Research on PHP Web Application Security and Development of Vulnerability Detection Tool
- A Comparative Study on Financing Risks with Universities Governed by Gansu Province
- Research and System Realization on the Prevention System of Trojan Virus
- Europe , the Chinese team , the Japanese team offensively comparative study
- China and Japan , South Korea in the 2004 Asian Cup , the main means of attack Comparative Study
- Research of credit fraud
- Enterprise Human Resource Management Outsourcing Risk and Prevention Research in China
- Study on Analysis of the Causes of Electric Power Industry Accident and Its Prevention Measures
- Analysis and Countermeasures in Scoring and Offensive Means of Chinese Men’s Basketball and the Opponent in the 29th Olympic Games
- Research and Implementation of SQL injection detection method