OverTheWire的Natas题
来源:互联网 发布:女生提气质知乎 编辑:程序博客网 时间:2024/05/29 18:35
题目:
http://overthewire.org/wargames/natas/
Write-up:
http://perso.heavyberry.com/articles/2014-01/natas
https://infamoussyn.com/2014/02/05/overthewire-natas-level-0-16-writeup-updated/
https://just4funand2learn.wordpress.com/2013/04/22/overthewire-natas-16/
禁用上下文按钮(右键)
<body oncontextmenu="javascript:alert('right clicking has been blocked!');return false;"><h1>natas1</h1><div id="content">You can find the password for thenext level on this page, but rightclicking has been blocked!<!--The password for natas2 is ZluruAthQk7Q2MqmDeTiUij2ZvWy2mBi --></div></body>
前几关都是跟 view-source, cookie, Referrer, robots,txt, 网站目录有关的,而第六关只有一个这个,
而且尝试在输入框里输入 <script>alert(0)</script>
并没有什么反应。于是看一下write-up。
结果write-up说要用那个 View sourcecode
的按钮,即访问当前域名的index-source.html
页面。开始几关看了一下感觉跟浏览器里地址栏里直接view-source:
一样的,结果发现这次不一样。
多了一个这个,是部分php代码。
<?include "includes/secret.inc"; if(array_key_exists("submit", $_POST)) { if($secret == $_POST['secret']) { print "Access granted. The password for natas7 is <censored>"; } else { print "Wrong secret"; } }?>
于是去includes/secret.inc
目录下查看,发现该文件内容为
<?$secret = "FOEIUWGHFEEUHOFUOIU";?>
即只定义了一个secret
变量。到时候从$_post['secret']
即我们提交的表单里面的’secret’字段的值,如果与$secret变量的值一样,则会Access granted. The password for natas7 is <censored>
第7题,发现它的url有点特点,用?
来传递参数。
其中有两个?page=home
和?page=about
。再根据之前的提示,说,密码在/etc/natas_webpass/natas8
目录下。
于是试着 ?page=/etc/natas_webpass/natas8
完整url为http://natas7.natas.labs.overthewire.org/index.php?page=/etc/natas_webpass/natas8
得到响应中包含了密码
至于为什么home
, about
这种参数可以和系统的目录这样的参数作为同等地位的参数
- OverTheWire的Natas题
- OverTheWire的Bandit题
- Natas.4744幽灵王病毒的分析
- 【overthewire】Vortex
- overthewire朝花夕拾
- WeChall - overthewire
- OverTheWire之Vortex
- OverTheWire之Leviathan
- WarGames-Natas(16)
- 170817 WarGames-Natas(15)
- 170821 WarGames-Natas(26)
- web向wargame:natas通关手记
- 170816 WarGames-Natas(0-14)
- 170819 WarGames-Natas(17-20)
- 170820 WarGames-Natas(21-25)
- 170822 WarGames-Natas(27-28)
- 做不来的题&&看不懂的题
- Getmemory的几个经典的关于内存的笔试题
- 高通LCD之背光
- 前端.进度条样式的原理与解释
- Codeforce 486D(树形dp)
- 队列的使用
- 聊聊STM32芯片的DFU编程及相关话题
- OverTheWire的Natas题
- 分割数组
- js实现发送短信验证码后60秒倒计时
- spring学习总结(四):IOC & DI 配置 Bean 之注入属性细节
- 正则表达式、Math、SimpleDateFromat、Calendar类+JAVA学习笔记-DAY14
- S5PV210时钟配置
- linux C函数
- 99乘法表函数
- 插值中产生的龙格现象