当前位置:网站首页>Beescms website penetration test and repair comments "suggestions collection"
Beescms website penetration test and repair comments "suggestions collection"
2022-06-25 01:58:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
beescms Website penetration test Repair comments
Catalog
1. Environment building 2. Pre penetration information collection 3. It's beginning to penetrate 4. summary 5. Repair suggestions
Beescms Construction of experimental environment
1、 The official download Beescms v4.0, Download address : http://beescms.com/cxxz.html 2、 Unzip the compressed file , Then put the document in phpstudy The root directory of the website 3、 Browser access http://127.0.0.1/beescms/install, Start installation
4、 All the way to the next step , The following interface appears , Enter database account password
5、 Successful installation
6、 modify mysql.ini file , stay mysqld Add items below : secure_file_priv =, Save and restart phpstudy, Otherwise use mysql Writing to a file will result in an error .
7、 installation is complete
Pre penetration information collection
1、 use kali Of dirb Scan the site directory
It also uses sqlmap Scan the website for injection sqlmap -u "http:// Drone aircraft IP/newsletter&id=1" -p id
2、 After scanning ,sqlmap No injection point was found , But the directory scan found the administrative login point , Attempt to test the administrative login for vulnerabilities
3、 Log in to the user name here sql Injection attempts
Found to have sql Statement error
Here is a penetration point write down !
4. Check whether the administrator login can be exploded
ad locum , You can see , There is a captcha submit To refresh the page , In other words, control can be achieved submit To disable the verification code refresh to realize the blasting , This is also the penetration point , Write down the !
Exploit
One 、 Password explosion vulnerability
(1) Try entering your username and password to log in
(2) adopt burp Analyze the parameters required for login
You can see that there are user,password,code,submit It can be found through the code ,submit Refresh the page and verification code after the user submits , So we need to be able to submit=true Where to change to submit=false You can make him stop refreshing , So you can input the verification code once . (3) adopt burp Blast
modify submit=true by false Set the password as a variable pair admin Users conduct blasting . (4) Successful results
Two 、 File upload vulnerability
1. Log in to the background to obtain system permissions (1) There are file upload areas in the background management
(2) Upload a one sentence Trojan horse , The discovery file will be renamed
(3) After observing the source code, I found , After the file is renamed, the source file is still in the same directory , Just add a separate screenshot of the file _thumb.png The suffix of is changed to the suffix of the file we uploaded , Remove the suffix and you can see that the file we uploaded contains the following sentence: Trojan horse
(4) Connect test with ant sword
Test success , Access to the system sql Inject holes (1) Login page try
Through analysis, we can see that there are sql Inject holes
unionselect Wait for keywords to be filtered (3) Through the above analysis of the source , Find out bypass Methods , Guessing SQL The number of fields in the query statement , According to the figure below , Determine the SQL The number of fields in the query statement is 5
(4) Blast the name of the library
(5) Blast the table name
(6) Listing blasting
(7) Storm fields
(8) Code of violence
(9) Password decryption The password is md5 Compiling , use md5 Decrypt it
The password is admin
summary
After audit analysis ,beescms V4.0 Version has a background administrator password explosion vulnerability 、 File upload vulnerability 、 backstage SQL Inject holes . The administrator background password explosion vulnerability will cause the administrator password to be leaked ; File upload vulnerability vulnerability will cause the system to be affected by hackers ; backstage SQL The injection vulnerability will cause the administrator password to be leaked .
Repair suggestions
The password vulnerability of the background administrator can be repaired by modifying the verification code , The repair measures are as follows :
- Captcha can only be used once , Expired immediately after use ! You can't use
- The captcha should not be too weak . Distortion 、 deformation 、 Disturbing lines 、 Interferes with the background color 、 Change the font 、 increase token, And it works all at once .
- Fuzzy reminders
- Limit request frequency , Certain number of errors , Lock your account for a while
- Modify authentication method settings , Change to slider verification or graphical verification to prevent packet capture
You can fix the file upload vulnerability by modifying the image , The repair measures are as follows :
- After the second image processing , Delete or transfer the source file to another directory , Prevent being found , Avoid a word Trojan horse insert You can modify the picture to sql Inject vulnerabilities for repair , The repaired code or measures are as follows :
- The permissions of ordinary users and system administrator users should be strictly distinguished , If an ordinary user embeds another in the query statement Drop Table sentence , So is it allowed to execute ? because Drop Statement is related to the basic object of the database , Therefore, to operate this statement, the user must have relevant permissions
- Force the use of parameterized statements , If you are writing SQL At the time of statement , The variables entered by the user are not directly embedded in SQL sentence , Instead, this variable is passed through parameters , Then it can be effectively prevented SQL Injection attack
- Enhance the verification of user input , Strengthen the inspection and verification of user input content , Forcing parameterized statements to pass user input . stay SQLServer In the database , There are many user input content verification tools , Can help administrators deal with SQL Injection attack . Test the contents of string variables , Accept only the required values . Reject containing binary data 、 The input of escape sequences and comment characters
- Use more SQL Server The security parameters of the database , stay SQLServer The database is specially designed to be relatively safe SQL Parameters . In the process of database design , Try to use these parameters to prevent malicious SQL Injection attack
- Regularly use professional vulnerability scanning tools to find possible points of attack , Before someone attacks your website , Find out the loopholes of your website first
- Set up two accounts , One is an ordinary administrator account , One is an anti injection account . Set the anti injection account like an administrator , Such as admin, To create illusion to attract software detection , And the password is more than 1000 Chinese characters , Force the software to enter the full load state when analyzing the account or even crash due to resource exhaustion
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/151799.html Link to the original text :https://javaforall.cn
边栏推荐
- TSDB在民机行业中的应用
- Award winning interface control development kit devaxpress v22.1 officially announced
- SQL aggregate function handling null [easy to understand]
- Unity C # e-learning (VI) -- FTP (II)
- 修身励学篇
- Unity C# 网络学习(六)——FTP(一)
- 获取图片外链的方法–网易相册[通俗易懂]
- Reverse ordinal number by merge sort
- Ps5 connected to oppo K9 TV does not support 2160p/4k
- 安超云:“一云多芯”支持国家信创政务云落地
猜你喜欢

Application session coverage solutions with different ports on the same server

Fan benefits, JVM manual (including PDF)

Multi modal data can also be Mae? Berkeley & Google proposed m3ae to conduct Mae on image and text data! The optimal masking rate can reach 75%, significantly higher than 15% of Bert

How to prepare for the last day of tomorrow's exam? Complete compilation of the introduction to the second building test site

Abnova丨5-甲基胞嘧啶多克隆抗体中英文说明

js数组对象转对象
Cusdis - 轻量级、隐私优先的开源评论系统 | 倾城之链

Abnova丨A4GNT多克隆抗体中英文说明

leetcode:2104. 子数组范围和

pbcms添加循环数字标签
随机推荐
sql 聚合函数有哪些
内网学习笔记(7)
明日考试 最后一天如何备考?二造考点攻略全整理
国内炒股开户正规安全的具体名单
tmux 如何自定义背景颜色 | How does the tmux color palette work?
Abnova CSV magnetic beads description in Chinese and English
Preg in PHP_ How to replace variable data
Redis persistence
Full arrangement ii[duplicate removal of the same elements + standard backtracking]
Q1季度逆势增长的华为笔电,正引领PC进入“智慧办公”时代
leetcode:2104. 子数组范围和
困牛排序(寒假每日一题 40)
創新藥二級市場審餅疲勞:三期臨床成功、產品獲批也不管用了
Texture enhancement
Matlab rounding
Some Modest Advice for Graduate Students - by Stephen C. Stearns, Ph.D.
write a number of lines to a new file in vim
RedisTemplate操作Redis,这一篇文章就够了(一)[通俗易懂]
Baidu voice synthesizes voice files and displays them on the website
Fan benefits, JVM manual (including PDF)