当前位置:网站首页>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
边栏推荐
- 你知道你的ABC吗(春季每日一题 1)
- Transformers 库的基本使用
- mpls 笔记 part 1
- excel 汉字转拼音「建议收藏」
- Sumati GameFi生态纵览,神奇世界中的元素设计
- 2022-06-24:golang选择题,以下golang代码输出什么?A:1;B:3;C:4;D:编译失败。 package main import ( “f
- Stocking but not completely stocking (daily question 2 in spring)
- DataEase模板市场正式发布
- 創新藥二級市場審餅疲勞:三期臨床成功、產品獲批也不管用了
- Intégration de la plate - forme de test continu open source de metersphere avec Alibaba Cloud Effect devops
猜你喜欢

Abnova CSV magnetic beads description in Chinese and English

多模态数据也能进行MAE?伯克利&谷歌提出M3AE,在图像和文本数据上进行MAE!最优掩蔽率可达75%,显著高于BERT的15%

明日考试 最后一天如何备考?二造考点攻略全整理

带马尔科夫切换的正向随机微分方程数值格式模拟

js数组对象转对象

Fake wireless speakers in stores? Sony responded: the product has reserved a wired connection interface, which can be used in complex scenarios

DDD概念复杂难懂,实际落地如何设计代码实现模型?
![Longest continuous sequence [diffusion method + space for time]](/img/db/7b0d1b0db7015e887340723505153a.png)
Longest continuous sequence [diffusion method + space for time]

同一服务器两个端口不同的应用session覆盖解决方案

JS array object to object
随机推荐
Chinese and English instructions of Papain
非凸联合创始人李佐凡:将量化作为自己的终身事业
Build and train your own dataset for pig face recognition
02-Epicor二次开发常用代码
‘distutils‘ has no attribute ‘version
leetcode:2104. 子数组范围和
同一服务器两个端口不同的应用session覆盖解决方案
通达信哪个开户更安全,更好点
Redis 那些事
海河实验室创新联合体成立 GBASE成为首批创新联合体(信创)成员单位
Elastase instructions in Chinese and English
Application session coverage solutions with different ports on the same server
String common methods
Dataease template market officially released
[leetcode] 11. Container with the most water
1. package your own scaffold 2 Create code module
Taishan Office Technology Lecture: a simple study of Chinese punctuation in vertical arrangement
【LeetCode】11、盛最多水的容器
AssertionError: CUDA unavailable, invalid device 0 requested
sql 聚合函数对 null 的处理[通俗易懂]