质量:沙特和阿曼国家网络安全CTF2019。WriteUp

哈Ha

2019年2月7日至9日,竞赛的资格阶段在网络人才网站上进行,目标是为阿曼和沙特阿拉伯寻找网络人才。 根据比赛规则,来自其他国家/地区的人们可以参加比赛以外的活动。 在猫之下-某些任务的分析。



比赛包括9项任务,其中4项处于“简单”难度级别,其中4项是“中级”,一项是“艰苦”。 对于每个任务,分别给出50、100和200点。 任务也被分类。 以下是一些问题的解决方案。

回到基础


简单的网络分析
没有太多选择。 无需从浏览器打开链接,总会有不同的方式
给定类似example.com/somepage的链接。 当您单击它时,我们将被重定向(永久移至301)到同一页面,并在末尾加一个斜杠,而她又被重定向到google.com:



让我们尝试对第二页的POST请求:



var _0x7f88=["","join","reverse","split","log","ceab068d9522dc567177de8009f323b2"];function reverse(_0xa6e5x2){flag= _0xa6e5x2[_0x7f88[3]](_0x7f88[0])[_0x7f88[2]]()[_0x7f88[1]](_0x7f88[0])}console[_0x7f88[4]]= reverse;console[_0x7f88[4]](_0x7f88[5]) 

通过JS美化代码轻轻传递代码:

 function reverse(_0xa6e5x2) { flag = _0xa6e5x2['split']('')['reverse']()['join']('') } console['log'] = reverse; console['log']('ceab068d9522dc567177de8009f323b2') 

标记: 2b323f9008ed771765cd2259d860baec

我喜欢图片


简单的数字取证
黑客给我们留下了一些东西,使我们可以在此图像中跟踪他,您能找到它吗?
图片附在任务上:


图片链接

解决方案
在十六进制编辑器中打开。 请注意, png格式具有“ IEND”预告片 (49 45 4E 44)。 我们看一下结尾:

可以看出,其他信息已添加到文件末尾。 第一个假设是base32,因为 所有字母在一种情况下。 解密:
FLAG{Not_Only_Base64}

我爱这个人


中型恶意软件逆向工程
您可以找到密码来获取标志吗?
文件

解决方案
通过“轻松检测”跳过文件:



打开DNSpy x86

该文件实际上很小,并且包含一个用户事件-Button_Click:

 string value = new string(new char[] { this.Letters[5], this.Letters[14], this.Letters[13], this.Letters[25], this.Letters[24] }); if (this.TextBox1.Text.Equals(value)) { MessageBox.Show(new string(new char[] { this.Letters[5], this.Letters[11], this.Letters[0], this.Letters[6], this.Letters[26], this.Letters[8], this.Letters[28], this.Letters[11], this.Letters[14], this.Letters[21], this.Letters[4], this.Letters[28], this.Letters[5], this.Letters[14], this.Letters[13], this.Letters[25], this.Letters[24], this.Letters[27] })); } 

同样,该字符串在当前类中声明:
 public char[] Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ{}_".ToCharArray(); 

有两种解决方案-静态和动态。 首先,我们通过静态方法解决:

 # text -   >>> for i in range(len(letters)): text = text.replace(f"this.Letters[{i}]", letters[i]) >>> print(text) string value = new string(new char[] { F, O, N, Z, Y }); if (this.TextBox1.Text.Equals(value)) { MessageBox.Show(new string(new char[] { F, L, A, G, {, I, _, L, O, V, E, _, F, O, N, Z, Y, } })); } 

当我们确定程序无害时,我们可以动态地对其进行调试。 我们在方法的开头放置一个断点(breakpoint,breakpoint),查找局部变量,获取变量值,此后我们将获得带有标志的消息。

标记: FLAG{I_LOVE_FONZY}

只是另一个会议


简单的一般信息
OWASP在不同地点举办的著名网络安全会议
应用安全

Source: https://habr.com/ru/post/zh-CN439590/


All Articles