前言
今天早上看到别人推荐了一个CTF练习平台,我做了一下,有难度,今天就分享下我写的writeup,后续做出来再更。平台链接https://www.hackthebox.eu,关于注册请看这里https://www.jianshu.com/p/1201a0d2cdfe。
WEB_1
题目 HDC
内容:
We believe a certain individual uses this website for shady business. Can you find out who that is and send him an email to check, using the web site's functionality?
Note: The flag is not an e-mail address.
进入题目后,发现是一个登录表单,关于登录表单一般我们用注入。
我做Web题第一步查看源码
发现有隐藏表单,发现提交的时候会经过doProcess()函数,我们查找下这个函数,发现源代码中并没有doProcess() 这个函数,我们查找页面引用的js 文件
myscript.js
function doProcess()
{
document.forms["formaki"].submit();
}
jquery-3.2.1.js
function doProcess()
{
var form=document.createElement("form");
form.setAttribute("method","post");
form.setAttribute("action","main/index.php");
form.setAttribute("target","view");
var hiddenField=document.createElement("input");
hiddenField.setAttribute("type","hidden");
hiddenField.setAttribute("name","name1");
hiddenField.setAttribute("value","TXlMaXR0bGU");
var hiddenField2=document.createElement("input");
hiddenField2.setAttribute("type","hidden");
hiddenField2.setAttribute("name","name2");
hiddenField2.setAttribute("value","cDB3bmll");
form.appendChild(hiddenField2);
form.appendChild(hiddenField);
form.appendChild(hiddenField2);
document.body.appendChild(form);
window.open('','view'); form.submit();
}
我们在这里找到了doProcess()函数。得到账号密码TXlMaXR0bGUcDB3bmll
然后我们登陆后台
找了一圈都没发现flag,于是我又回头看了看这个页面,发现右上角的这个图片有问题,我查看了这个图片
这里有路径,我们切换到secret_area 目录下
得到了一堆邮箱,然后根据后台主页面的提示,进入send mail页面,我们把邮箱做成字典,放入burp中跑一下,就得到了flag。
这道题主要考察信息搜集的能力。
WEB_2
题目Lernaean
内容
Your target is not very good with computers. Try and guess their password to see if they may be hiding anything!
我们打开目标站点,给了提示请不要猜测我的密码,那么我当当然要猜咯。
试了半天没啥效果,然后gg了下题目,发现用的是社工。
首先搜索Lernaean
看到hydra 这就是提示我们用hydra爆破
hydra -l admin -P /usr/share/wordlists/rockyou.txt http-post-form 88.198.233.174 http-post-form "/:password=^PASS^:Invalid password!" -s 39203
得到密码 leonardo
我们登录后显示我们太慢了
打开burp,然后抓取数据包,返回包里就可以看到flag。
这道题主要考察社工能力。
总结
CTF平台很多,我这里给大家汇总下,我今天收集的平台。
https://ctf.hackmethod.com/
https://angstromctf.com/problems
后续我会继续更新wp,请继续关注。
领取专属 10元无门槛券
私享最新 技术干货