bugku-web-login1




<!DOCTYPE html>

<html>

<head lang="en">

<meta charset="UTF-8">

<title>WEB管理系统</title>

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">

<meta name="format-detection" content="telephone=no">

<meta name="renderer" content="webkit">

<meta http-equiv="Cache-Control" content="no-siteapp" />

<link rel="stylesheet" href="css/style.css"/>

<style>

.header {

text-align: center;

}

.header h1 {

font-size: 200%;

color: #333;

margin-top: 30px;

}

.header p {

font-size: 14px;

}

</style>

</head>

<body>

<div class="header">

<div class="am-g">

<h1>WEB管理系统</h1>

</div>

<hr />

</div>

<div class="am-g">

<div class="am-u-lg-6 am-u-md-8 am-u-sm-centered">

<h2>登录</h2>

<p style='text-align:center;color:#1C86EE;font-size:20px;'>

</p>

<form method="post" class="am-form">

<label for="uname">用户名:</label>

<input type="text" name="username" id="email" value="">

<br>

<label for="password">密码:</label>

<input type="password" name="password" id="password" value="">

<br>

<label for="remember-me">

<input id="remember-me" type="checkbox">

记住密码

</label>

<br />

<div class="am-cf">

<input type="submit" name="sub" value="登 录" class="am-btn am-btn-primary am-btn-sm am-fl">

<li class="am-btn am-btn-default am-btn-sm am-fr"><a href="register.php">没有账号 ^_^?</a></li>



</div>

</form>

<hr>

<p>© WEB管理系统.</p>

</div>

</div>

</body>

</html>

根据提示,得知这时sql注入攻击注入点

当发送一个含有账号和密码的报文时,将其抓下

POST / HTTP/1.1
Host: 114.67.175.224:10434
Content-Length: 45
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://114.67.175.224:10434
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Referer: http://114.67.175.224:10434/
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
Cookie: Hm_lvt_c1b044f909411ac4213045f0478e96fc=1711286763; _ga=GA1.1.52075818.1711286767; _ga_F3VRZT58SJ=GS1.1.1711288951.2.1.1711290145.0.0.0
Connection: close

username=1&password=1&sub=%E7%99%BB+%E5%BD%95

这里看到是一个post请求
username为账号字段
password为密码字段
这里还有一个sub字段不知道是什么

这里是账号出错页面

这里经过多次尝试发现sub字段不会因为账号密码的改变而改变,所以可以忽略

注册一个账号

成功登录之后的页面

开始sql测试
先对username字段进行sql注入测试
测试之后发现不论是账号字段还是密码字段都没有注入点

开始思考提示,即sql约束攻击

但是这里其实是有一个问题的,就是我们要测试出这里的约束长度是多少,而且要猜到管理员的账号是什么

这里猜测账号为admin
密码随意,开始注册

这里的admin后面跟随了非常多的空格

这里直接输入admin账号
和刚才注册的密码

成功登录

相关推荐

  1. <span style='color:red;'>bugku</span> <span style='color:red;'>1</span>

    bugku 1

    2024-04-11 17:40:07      24 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-11 17:40:07       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-11 17:40:07       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-11 17:40:07       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-11 17:40:07       20 阅读

热门阅读

  1. LeetCode -- 第 392 场周赛

    2024-04-11 17:40:07       18 阅读
  2. rollup 插件架构-驱动设计 PluginDriver

    2024-04-11 17:40:07       15 阅读
  3. 中国知网:学术资源的宝库与知识共享的平台

    2024-04-11 17:40:07       17 阅读
  4. 蓝桥杯 2022 省 B 洛谷 P8787 砍竹子

    2024-04-11 17:40:07       18 阅读
  5. 【蓝桥杯】快读&快写

    2024-04-11 17:40:07       17 阅读
  6. 漫步人生路

    2024-04-11 17:40:07       15 阅读
  7. Quarkus初探

    2024-04-11 17:40:07       13 阅读