24

【Root-Me】 Javascript - Obfuscation 2

 2 years ago
source link: https://exp-blog.com/safe/ctf/rootme/web-client/javascript-obfuscation-2/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

【Root-Me】 Javascript



水题,熟悉编码的样子就很容易做。

打开页面什么都没有,打开浏览器开发者工具,切到 Network 找到名为 ch12.html 中的一段 js 代码。

发现密码被定义为:

var pass = unescape("unescape%28%22String.fromCharCode%2528104%252C68%252C117%252C102%252C106%252C100%252C107%252C105%252C49%252C53%252C54%2529%22%29");

其中两次 unescape 表示要做两次 URL 解码fromCharCode表示要做一次 ASCII 解码

01.png

打开 Burp Suite -> Decoder ,做两次 URL 解码得到 :

unescape("String.fromCharCode(104,68,117,102,106,100,107,105,49,53,54)")

由于 Burp Suite 不支持直接对十进制 ASCII 进行解码,所以先将其编码成十六进制,得到:

68,44,75,66,6a,64,6b,69,31,35,36

最后对这串十六进制 ASCII 解码,得到真正的11个字符: h,D,u,f,j,d,k,i,1,5,6

去掉逗号串起来就是真正的密码,完成挑战。

02.png

flag 下载后的 flagzip 的文件需要手动更改后缀为 *.zip,然后解压即可(为了避免直接刷答案)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK