2020.3.30 xctf(NaNNaNNaNNaN-Batman)①

本文探讨了在PHPStudy环境下利用Eval函数执行字符串内容的现象,及通过改用Alert函数使原本因执行而乱码的HTML源代码得以完整显示的方法。文中详细解释了如何构造特定字符串,并使用正则表达式进行匹配验证。

在这里插入图片描述我们将其放在phpstudy的www先,在浏览器中看看是个啥样子!
在这里插入图片描述eval函数,这是执行函数;这里执行了_变量中的内容也就是’'中的内容,但是,要注意的是,它并没有执行()函数,仅仅执行了字符串而已(从而导致乱码),因而页面html页面没有任何显示,只显示了input标签的内容,但是我们想让源代码正常显示出来,不进行执行,那么,我们就用到了alert弹窗(将eval函数改为alert),将乱码的()函数,仅仅执行了字符串而已(从而导致乱码),因而页面html页面没有任何显示,只显示了input标签的内容,但是我们想让源代码正常显示出来,不进行执行,那么,我们就用到了alert弹窗(将eval函数改为alert),将乱码的()htmlinputalertevalalert()函数源码完整显示出来

在这里插入图片描述在这里插入图片描述`e.length==16

e.match(/^be0f23/)!=null
e.match(/233ac/)!=null
e.match(/e98aa/)!=nulle.match(/c7be9/)!=null‘这里又用到了正则表达式表示开头一定要匹配到be0f23,/)!=null e.match(/c7be9/)!=null ` 这里又用到了正则表达式 ^表示开头一定要匹配到be0f23,/)!=nulle.match(/c7be9/)!=nullbe0f23表示结尾一定要匹配到e98aa,其它的只要匹配到就好,没有位置要求
于是我们构造e的值

e=be0f233ac7be98aa

在这里插入图片描述

### XCTF Challenge Web-6b6b154857 Details and Solution XCTF (eXtreme CTF) is a well-known platform for hosting Capture The Flag competitions, where participants solve challenges related to cybersecurity. For the specific challenge `web-6b6b154857`, detailed information may not be publicly available unless it was part of an official event with documented solutions or walkthroughs. #### Understanding the Problem Context Web-based challenges typically involve identifying vulnerabilities such as SQL injection, cross-site scripting (XSS), command injection, broken authentication mechanisms, etc., within a provided application environment[^2]. In this case, solving the challenge would require analyzing its structure and exploiting any weaknesses present in the system. #### General Approach to Solving Web Challenges To tackle web-related problems like `web-6b6b154857` from XCTF: 1. **Reconnaissance**: Begin by gathering all possible metadata about the target website using tools like `curl`, `wget`, or even manual inspection through browsers. ```bash curl http://challenge-url/ ``` 2. **Source Code Analysis**: If source code snippets are accessible via browser developer tools or other means, review them thoroughly for clues regarding hidden endpoints, comments indicating potential issues, or misconfigurations that could lead to exploitation opportunities[^3]. 3. **Vulnerability Exploitation**: Based on identified flaws during reconnaissance phase, attempt various attack vectors depending upon what seems plausible given context-specific constraints imposed by organizers when designing these puzzles[^4]: - Try injecting payloads into input fields looking out especially sensitive areas prone errors leading unauthorized access credentials leakage database manipulation actions beyond intended scope functionality offered users interacting normally without malicious intent whatsoever; Example payload testing against suspected XSS vulnerability might look something along lines below: ```html <script>alert(&#39;test&#39;);</script> ``` 4. **Flag Retrieval**: Once successful penetration achieved either directly retrieving flag stored somewhere inside filesystem memory process space network traffic captured packets sent received between client server communications over HTTP(S). #### Important Considerations While Participating Competitions Such As XCTF Always adhere strictly ethical guidelines set forth competition rules ensuring fair play among competitors while respecting legal boundaries protecting systems outside controlled environments specifically prepared contest purposes only never targeting real-world assets under any circumstances whatsoever[^5].
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值