假期难得有时间空闲下来,就和协会的小伙伴组织了一次比较简单的ctf比赛针对学校的学弟学妹们,这里就贴上每一次的writeup,以供整理复习用。
WEB WEB从0开始之PHP代码审计0 POINT: 100 DONE 题目ID: 55 题目描述: http://ctf.lazysheep.cc:8081/web1.php Hint: 前置技能:PHP
题目的原题是出在hctf2015的fuck===,出题思路来自http://www.secbox.cn/hacker/1889.html . payload: ?a[]=adsa&b[]=dsadsa 这里之所以===能过,是因为在php中,md5不能加密数组,会返回null,null==null返回flag
MISC MISC 驾驶技术科目一 POINT: 100 DONE 题目ID: 36 题目描述: 如果玩转 MISC 快来开始你的科目一吧! 链接: http://pan.baidu.com/s/1c1c7fiC 密码: cyyd Hint: 噫 都上些啥站呀
科目一比较简单,和之前的流量分析类似,大概就是一个http明文请求,仔细找找很快就能找到。flag中顺便找到科目二的入口。
MISC 驾驶技术科目二 POINT: 100 DONE 题目ID: 37 题目描述: 考完科目一的小伙伴快过来科目二啦,早上上路,争当中国好司机。 Hint: 无
科目二找到后发现是一张图片,这里使用到一个linux下的工具,binwalk,可以发现图片是由多个文件合并的,使用foremost就可以把所有的东西拆开来,得到flag的二维码,扫码getflag。
MISC从0开始之编码1 POINT: 75 DONE 题目ID: 49 题目描述: 老司机的题目做不出来?丢一题简单的给你们做。。http://ctf.lazysheep.cc:8081/misc1.html Hint: base全家桶,老司机们别抢新生的前三血啊~
这里就是base全家桶了,目前好像没见过用python以外的方式做的,不过如果自己写代码实现应该也是可以的。
1 2 3 4 5 import base64 bb64 =base64.b64encode('xxxxx')bb32 =base64.b32encode(bb64)b =base64.b16endcode(bb32)print b
大概就是这样…
MISC从0开始之流量分析1 POINT: 75 DONE 题目ID: 53 题目描述: http://ctf.lazysheep.cc:8081/misc1.pcap Hint: 暂无HINT
比较接近一般题目的流量分析了,可以看到在最后一个http请求中请求了一个flag的zip文件。那么就需要wireshark加一个16进制编辑器把这个文件扣出来了,一般网上还是能搜到教程的,懒得赘述了。
CTF coding step1 POINT: 50 DONE 题目ID: 47 题目描述: 打CTF就是拿工具? 不不不,也要写很多代码的。这个系列就是让你熟悉CTF风格的编程题目,具体的要求见题目吧のの 就是让你们多看点英文: nc 115.29.77.78 9979 Hint: repr
nc连上发现是计算数学式子,那么开始写代码吧。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect(('115.29.77.78' ,9979)) import time sock11 =sock.recv(1024)print sock11sock11 =sock.recv(1024)print sock11pos2 =sock11.find('=',950)sendr = eval(sock11[945:pos2]) print sendrsock.send(repr(sendr)+'\n' ) while 1: sock11 =sock.recv(1024) print sock11 pos =sock11.find('=') i =sock11.find(']') if(i!=-1): sendr=eval(sock11[i+2:pos].replace(' \xc3\x97',' *')) print sendr sock.send(repr(sendr)+' \n') else: sendr=eval(sock11[:pos]) print sendr sock.send(repr(sendr)+' \n') sock.close()
因为是第一次写socket,所以还是踩了不少坑,首先这个文件不能叫做socket.py否则不能通过编译,其次就是每一个send必须在后面加上’\n’否则不会有下一步,自己试试吧。。。
crypto 密码学从0开始之1 POINT: 20 DONE 题目ID: 50 题目描述: http://ctf.lazysheep.cc:8081/cry1.html flag不是标准格式,提交你解出的明文就行,flag全是大写 Hint: 这个简单,应该不需要hint
打开看到一堆点啊横啊就知道是摩斯密码,随便一搜都能搜到各种解码
密码学从0开始之1.1 POINT: 150 DONE 题目ID: 54 题目描述: http://ctf.lazysheep.cc:8081/cry2.html 你知道01的奥秘么? Hint: 这可不是啥古典密码了
打开看到0101,第一反应是看看有多少位,能除开8的话,八成是要转ascii码,那就写个代码吧
1 2 3 4 5 6 7 8 9 10 11 import binascii f = file('./test','w+') str11 = '10001001010100 00010011100100 01110000110100 00101000011010 00001010000000 00000000000000 00000000110101 00100101001000 01000100010100 10000000000000 00000000000010 11001000000000 00000000000000 00001100100000 10000000011000 00000000000000 00000000111110 00001110101000 00011011000000 00000000000000 00000101001111 01010010010100 01000100000101 01010001111000 10011100111011 01100111001100 11110100101110 01101101001001 00011000110001 11101111111101 10011110111000 01111110100000 11010000010010 11001001001000 10110001111000 00110010000010 11010100010010 11000101110001 01001101110100 00010100001111 01011101000101 10101101100000 10101000110110 01000100010110 01101111000000 01101110111101 10001000001010 11000010100110 10000111111000 10000010100101 10101000101000 00110101110100 10010111000111 10101101001000 01111000001000 01101110010110 01000000011011 10101001010100 10110110110110 00010001110101 00001111101001 01001111010000 10000101010101 01000101011000 00101111010010 10110000011001 10100100001101 10010011000101 01011100000010 10111100010001 11111001000011 10110011001100 11111011001000 11001001100110 11111101111010 01100000110111 11110011110011 10111110110011 01100001100110 01111000001111 00000100110110 10001101111110 11110011110011 10111101100100 11100110001110 11110011111111 00111001110101 11100101001011 00000011100001 01100100110100 11000001000100 00010011010001 11100010011111 00111101011010 01010011101101 00000000010000 00110010001000 00001000010001 00110100101001 00000001000010 00100110100101 00100000001000 01000100110000 10100000000001 00001001100110 01010100000000 00100001001000 11001010100001 00000100001001 00011001000100 00100000100101 00100011001000 10000100000100 10100100001001 00000000100100 10010100100000 00100001000100 11010010100100 00000100001000 10011010010100 10000000100001 00010011000010 10000000000100 00100110011001 01010000000000 10000100100011 00101010000100 00010000100100 01100100010000 10000010010100 10001100100010 00010000010010 01001000000100 01111100101111 01100110010000 00010011101101 10010011001110 01000110011010 00010110110001 10100101011011 11011011110000 00010010001000 10000011110110 00001101111101 01000110000111 10100111010011 01111101010011 01011001001001 11011111101101 00011110110110 11100110110011 10000011110011 01101110110100 00010001010010 11111110010111 00010111110001 00011010001101 11111000111101 10011010110000 11010001111101 01000110011011 10110110111100 11011110000111 01111011110100 00010010001100 00111110010001 10101000010110 01001100001100 11010110000101 11101011111110 10001101011101 01011111010010 01010010001001 10101000100110 11011111011100 01110010011111 10001110011001 01111101000101 00110100111000 01110001000111 11001111001100 10011111100111 10111011101110 00000000011000 11001011110001 11101100111011 10001011101010 00001111001101 11010001010100 00110011011100 01011100111001 11111101010011 11111010010001 10111000110100 10011100101001 01110000101000 10110011001010 11111110101000 00101111111011 11110001101000 01000001111010 11101001111111 10010111011100 10111101101000 00011010001000 01111100110000 00011001111010 11010111111011 10110001111110 01011000110001 11001010000000 00111101110111 10111110000011 01100101011101 11010111101110 00111011100111 01111111101111 01110000010001 00001001101110 00110010010010 10110000011010 11101101011010 11111100001101 01100111111111 00010101110001 00110111100110 01110101000001 11100000111111 10001100101010 11111111010111 10011110000111 11111011001011 10001010010100 11000011110010 11101110001001 00000000100010 10001011111001 01000101110011 10111001101000 01000010001011 00101111000111 10000000001010 10010111000111 10011101100010 10110110000110 01010011110110 11111110100001 00001110101111 00110001000101 01010101110001 01111001111110 10000000111000 00111111100001 10011001001110 00100011011101 10110001111011 01010100101011 01100110100100 01101100100000 11010111001001 11100111101100 00010101010111 01011111000100 11111101111100 00111100000001 00101011100111 01010111100000 11110100011001 11001101100001 01101110011000 00001111000111 10001101011101 11001100100110 00011110100000 10000100111000 10000000111101 11011001100001 11101011011100 11010000111111 00111000101100 01001101110111 10011011100011 11000111110100 10000011011000 10000101001000 01000011111100 00110100101100 01010110110010 01011001010000 10111101000100 11111011101001 10101011110101 10011001010110 01101100110111 01001000111111 10000100100111 01111001101110 11010000000011 01001000111000 10010010111011 00100111100110 01000110000010 10001001010101 00101101011110 11110010000000 10000010010011 01100111000111 01100001000111 01111100100110 10010111110101 11110100000001 11101010101101 01111010101100 10011010101011 01010111011111 01101000110111 10101011101101 11101101011111 01101101001101 10100110010110 10010111000101 01101001110110 01101011101111 11110000000111 10111100011000 10000010110111 10001010101001 11111110110000 11100010111111 10111011101000 11100110111011 10000011110000 00011101110101 10111010110001 01000000001011 10101101111000 00000110101000 10001111111110 00110111100100 00001111000101 10100011110111 00011010101101 01001001101101 10101110111111 10010001001001 11111001001011 01110111000111 00010011110000 01011000111100 11101100011100 01011101010101 10010101001100 11100001000011 01011011101100 11101011110110 11110010011000 01010100010111 10000100101001 10011101100000 00111000001100 10101111101010 11110111011111 01110000101110 11000010111110 01100111100101 00000111101010 11010000110110 01101110100100 11111001100111 01100100100001 01110001111001 00110001100101 10110100100100 10110001001100 10110001010000 10111110100101 10000101100100 11001001111000 10001101110110 10101000011110 11111001010110 10111011011001 11011111011010 10110100011100 11001101010000 11010110101111 10100001100100 11100110110101 10111111111101 11001100100100 01001110001110 01010010110111 11010011101011 00000000111111 10110101010010 11011010111011 00101000110110 01001001010001 11000110011000 11101110100111 11100011010110 01000101111011 10111111000101 01110011011001 01101110001111 00100011100100 01001110010000 00100110111001 11100111000000 01110100101010 00110111101010 10100100111111 11101011111011 11110000100100 00110101011011 10111001110000 10011000110000 11000100011100 10100100101111 10001001110010 10000101110000 00110011100110 11100000110100 10001101110110 01011111011000 00001000001111 01110011011001 01100011110110 10110101100110 01010100001000 00011011111001 01010110100001 01111001110010 00010010101101 10110011001010 11100000101000 11100000011110 11010001011110 00111101100010 11010011111011 01101001011101 00000000101101 11011101101001 11011110010111 11011001100000 10011111010111 11001111010011 00111010011010 01010111011000 10001101111001 11100110111100 11011100101110 11001111110010 10110000010100 11100101110001 10001110000010 11001111111011 00011110011101 00110010010101 11100101000010 11101110111011 00101011000011 11010100100100 11010101001010 10100010000010 00111110100110 01100000011111 11100001100111 11110101010011 11111001111101 10011110010010 11001010111110 01011001000010 01011111101000 11110011101100 11110110000110 01000101011100 01011100111001 01000010011000 01101010100111 10101100010111 01100000000101 01011000110110 10110011100011 00000111001101 10101100001011 00001101110111 01001011001000 01111000000110 10011100001100 00011111111111 00000110110010 00110111110110 00111011111111 00101110001011 11010010100010 11111001001101 11011110110001 01101100111011 10111011000111 01011000011110 01000001000110 11100100011010 11110111011010 00000001100001 11001100001111 00110101010000 11111100001101 00011000001110 10010111000100 00100011100000 10101000101010 01101000101100 01001110001110 01101110100101 00011101111001 10111011100100 10101000000011 01010000101101 10000110010011 01111001111100 11000100100011 01100111000011 00011111000111 11010010110011 10101111110111 10011010010101 01110110110111 11011000000101 10110100110011 00101000000101 01100110111111 11011111010001 01101010100111 00000001110111 11110000010001 10110010010101 10010101101000 00001000001111 01001100010011 00111001111100 01101011100000 11110011001101 01111110010110 11000101001001 11001011110100 10110110100101 11000000000010 10011011110111 00101000110111 00100100111111 00100100000100 11110101010011 00101101000010 01000000101011 00011011010001 11000101100100 00101010010110 11000110011101 10010001101011 11101011001110 00011001100100 11111001100111 00110001111011 01111110110000 00100010001010 00000000111011 00001110100001 01011010010101 10010010110011 11110001110110 01001001010001 01001001011101 01110010110011 01001000011011 00100001110101 11110111101000 01111011001111 00000100010111 00100010100110 10001111110110 10010010101000 11010101011110 01010000010101 01101110000100 11101011000110 01011100011010 11100111011000 11101101001111 01101000011110 10111100010110 01001001111111 10001001011110 11011111110101 10110110001100 00100010010100 01101101110000 01001110001111 11000110010111 00001001101100 11010101100110 01101100001101 11101000111001 10011111101011 10011001110110 11011000110110 11000001110000 01111101011111 10011100001101 10101100001110 01111100010001 01001011111011 10011000101110 10001111010010 00010111110001 11111011011101 00111101011110 10101101110111 10100111001111 00111011110111 00110101011100 11011100010010 01001001100100 01111101111110 11011000101000 00111110001100 11000001011100 11011001011110 10111110000000 00101100011111 00101011010101 01111100001111 11010010010011 10000101100011 10101011100010 11111100011101 01100000111111 10110011111011 10001100100000 11011001111111 10000101100101 00001111101111 10001001101010 00011101100010 11011001001001 11100100000001 10000100011101 11101100001010 00010101001011 11001110111001 11001110000010 11011001111101 00101001000011 10110010111000 01001001000110 11010100001000 00000010010100 01111100110000 10101101111111 10000100110111 11100000110001 11010111011100 01100011000111 01101110110101 10010111111101 10011110101001 01011110110110 11100010110101 00111010001110 10010111010100 00000111100001 11101000000000 01110001111000 11100011100010 10011001011111 10010101011010 11110111101011 11101011111101 00010011101100 11011111001110 10101100110011 00110100101100 01010001011111 01101011111100 01110100101100 01001111111111 10001011010110 00101100010100 00100111110100 00100010101111 11111000100110 10000111010111 01111110100010 11100100000000 11111010111100 11010011011111 01001101111001 11001100001011 11111111101000 10101100000110 00111101011110 00111100111110 10010101101101 00011010010110 11001011001101 11111010000110 01010101111011 11000110010101 01100110001000 11000110101100 11111011101000 10001010011000 10001011001001 11011010011111 01110010010100 10101110111111 01000111010011 11100111011001 01010111011001 01100101110001 11111100100011 10111011011001 01101110110010 11111111101111 10110000110001 01011111000111 11001101100010 10001111111000 00101101100110 01100100010011 10011111101000 00101011010111 11111111111100 01100010111000 10001000010100 10000011111100 10000011101111 11000001010000 11000011001110 11101100100111 01100010110100 01100111001101 00101011001001 00001000100110 10001000011100 10010110101110 11100001110010 01100100100000 11101100001000 00001000010001 00110100101001 00000001000010 00100110100101 00100000001000 01000100110000 10100000000001 00001001100110 01010100000000 00100001001000 11001010100001 00000100001001 00011001000100 00100000100101 00100011001000 10000100000100 10100100001001 00000000100100 10010100100000 00100001000100 11010010100100 00000100001000 10011010010100 10000000100001 00010011000010 10000000000100 00100110011001 01010000000000 10000100100011 00101010000100 00010000100100 01100100010000 10000010010100 10001100100010 00010000010010 10010000100100 00000010010010 01011111100000 01111100101011 11000111110000 11001111011110 10101111101011 11011100011110 00000000000000 00000000000000 00000100100101 00010101001110 01000100101011 10010000100110 000010000010 ' for k in xrange (0 ,11184 ,8 ): stt=str11[k:k+8 ] f.write(chr(int(stt,2 ))) f.close()
突然发现好长啊。。。出来时一张图片,get!
pentest lightless&aklis的渗透教室-2 POINT: 75 DONE 题目ID: 45 题目描述: http://120.27.53.238/pentest/02/http-header.php Hint: Mozilla/5.0 (iPhone; CPU iPhone OS 9_0 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13A344 Safari/601.1 xff: 127.0.0.1
坑已经被踩完了还所做不出那就没办法了,记得要改ios99啊,hint中的是ios9的…
记得看文档啊!!!