您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 质量控制/管理 > BCTFWriteupSigma20140312
1版权所有Sigma小组BCTF解题报告BCTF解题报告..........................................................................................................................1MISC.......................................................................................................................................2初来乍到(ByLanlan)....................................................................................................2内网探险(ByLanlan)....................................................................................................2诱捕陷阱(By杜荀鹤&d).........................................................................................2PPC&CRYPTO.......................................................................................................................5混沌密码锁(ByLanlan&Sky)......................................................................................5他乡遇故知(ByGuest&杜荀鹤)...............................................................................6地铁难挤(ByLanlan)....................................................................................................7PWN.....................................................................................................................................10后门程序(Byd)..........................................................................................................10身无分文(Byd)..........................................................................................................12情报窃取(ByRandom)...............................................................................................14REVERSE...............................................................................................................................29最难的题目(ByL0g1n)..............................................................................................29小菜一碟(ByL0g1n)..................................................................................................30码海密踪(Byd)..........................................................................................................34WEB.....................................................................................................................................37分分钟而已(ByLanlan)..............................................................................................37真假难辨(By杜荀鹤)...............................................................................................39见缝插针(ByLanlan&Random)...............................................................................40冰山一角(ByLanlan)..................................................................................................412版权所有Sigma小组MISC初来乍到(ByLanlan)这个题貌似就是传说中的签到题,不过我当时找了半天,关注BCTF的官方账号之后,在他的公司那一栏会看到一个flag,果断提交就成了。内网探险(ByLanlan)下载了pcap包,可以看到两个DNS的解析请求,请求的IP是218.2.197.236,telnet到218.2.197.236:12345,要输入四个ip进行验证,直接指向218.2.197.236是解析不到,通过这个博客(需要翻墙访问)的提示。使用TCP查询,得到四个ip地址,nc连接,提交ip,得到flag四个ip地址:110.1.2.33210.200.55.1263172.18.42.304192.168.234.3诱捕陷阱(By杜荀鹤&d)根据提示,找到dionaea蜜罐系统的官方网站dionaea.carnivore.it。按照deployment一节,将蜜罐搭建在IP地址为10.10.10.13的虚拟机上。使用命令opt/dionaea/bin/dionaea/opt/dionaea/-w/opt/dionaea-p/opt/dionaea/var/dionaea.pid运行系统。然后在本机(10.10.10.1)重放log文件pythonretry.py-sr-port=445-H10.10.10.13--file=dionaea.bistream重放后,在虚拟机中执行./readlogsqltree.py-t$(date'+%s')-24*3600/opt/dionaea/var/dionaea/logsql.sqlite查看记录,如下图,感觉没什么发现,疑惑是我使用系统的姿势不正确?看起来好像是MS03039的溢出?没思路。3版权所有Sigma小组下载kippo蜜罐,在utils目录下有重放log的工具playlog.py。使用命令pythonplaylog.pykippo.ttylog.692ce16db7d940cb9ec52a8419800423重放第二段log,会发现入侵者尝试下载一个文件。其中2792326331实际上是IP地址166.111.132.187十进制表示,这两个命令都是在尝试下载这个文件。下载回来,发现是windows可执行文件,交给逆向大神队友逆向之。---------------------------------------------------------------------------------------------------------------------------------查看队友发来的fool.exe,发现在sub_4011C0函数,有字符赋值的操作,随后调用的sub_401190进行异或解密。用OD载入直接从4011C0开始运行,在内存中得到未解密的字符,然后写脚本异或解密。在运行结果中,找到FLAG:BCTF{Y0u_6oT_It_7WxMQ_jjR4P_mE9bV}4版权所有Sigma小组5版权所有Sigma小组PPC&CRYPTO混沌密码锁(ByLanlan&Sky)1、给了一个python的脚本,下到本地,瞅了瞅,发现需要写数字决定4个函数的顺序。通过穷举跑出字符顺序:##############################################################################number=[1,2,3,4,5,6,7,8,9]foroneinnumber:f1='fun'+str(one)fortwoinnumber:f2='fun'+str(two)forthreeinnumber:f3='fun'+str(three)forfourinnumber:f4='fun'+str(four)try:answer_hash=f['fun6'](f['fun2'](f[f1](f[f2](f[f3](f[f4](answer))))))except:passelse:iflen(answer_hash)==0:passelse:printone,two,three,four#最后的数字输入顺序为3、5、1、4###############################################################################(2)加密的过程如下所示gb2312(base64decode(zlib.decompress(binascii.unhexlify(reverse(dec2hex(answer))))))(3)发现check_equal函数的特殊返回值,必须是要Falsedefcheck_equal(a,b):6版权所有Sigma小组ifa==b:returnTruetry:ifint(a)==int(b):returnTrueexcept:returnFalsereturnFalse得到的信息是,key需要不同,但是编码后的结果需要相同。(4)编写代码测试得到是zlib.decompress的后面添加字符串,然后再去编码,实现编码后的结果一样answer_hash=f['fun6'](f['fun2'](f[f1](f[f2](f[f3](f[f4](answer))))))answer_hash
本文标题:BCTFWriteupSigma20140312
链接地址:https://www.777doc.com/doc-418228 .html