首页 > 其他分享 >FSCTF2023-WP

FSCTF2023-WP

时间:2024-05-26 23:48:19浏览次数:20  
标签:FSCTF2023 题目 gp 兔子 密码 flag WP FSCTF

FSCTF2023-WP

前言

去年10月份办的联合竞赛,题目相对简单,量大管饱,本人出了一道WEB和若干Misc

Cypto

RSA1

1、题目信息

提交格式:FSCTF{你所解出的内容}
p=1458769258361
q=4556983871563
e=17
求d

2、解题方法

Exp如下:

点击查看代码
from gmpy2 import *
p=1458769258361
q=4556983871563
e=17
d = int(invert(e, (p-1)*(q-1)))
print(d)
\#FSCTF{5865518808244394324786753}
RSA 2

1、题目信息
提交格式:FSCTF{你所解出的内容}

c=90362297576572826064831133206230135349790392078780406000643496612200873754835039374184323808342127071833274981191134125413478105835272238356352724573228797863805124195170088819735610736936895478614898105848968069280022022112207095140266709372221090586917729998024205978412679448008696923580889787529663283314
p=8637633767257008567099653486541091171320491509433615447539162437911244175885667806398411790524083553445158113502227745206205327690939504032994699902053229
q=11874843837980297032092405848653656852760910154543380907650040190704283358909208578251063047732443992230647903887510065547947313543299303261986053486569407
e=65537

2、解题方法:

点击查看代码
import gmpy2
from Crypto.Util.number import long_to_bytes
c=90362297576572826064831133206230135349790392078780406000643496612200873754835039374184323808342127071833274981191134125413478105835272238356352724573228797863805124195170088819735610736936895478614898105848968069280022022112207095140266709372221090586917729998024205978412679448008696923580889787529663283314
p=8637633767257008567099653486541091171320491509433615447539162437911244175885667806398411790524083553445158113502227745206205327690939504032994699902053229
q=11874843837980297032092405848653656852760910154543380907650040190704283358909208578251063047732443992230647903887510065547947313543299303261986053486569407
e=65537
phi = (p-1) * (q-1)
n = p * q
d = gmpy2.invert(e, phi)
m = pow(c, d, n)
print(m)
\#FSCTF{20230824}
RSA 3

RSA 3
1、题目信息

提交格式:FSCTF{你所解出的内容}

from Crypto.Util.number import bytes_to_long
m=bytes_to_long(flag)
n= 12308543373374311860115195114269947739026255098864232126071500623399852788903738569949462616714391748269539072128882946132686996592089735285396762634029371785959865779256901123369306119124563405765293657606975290441243965513640680841871955014230301486214824204887945375140818283280272607903500556306646445508386218951500563603482945071727344737690804338144982687000734071274618240408238519378280819162796749148066754028700125846348589164721591354555019608871411236973606149388257533629388508942271702742078883636357856776193846813894734271905070538713351614750057245897158615891962167410053552739441195871000310777649
e= 65537
dp= 28196759050232165736649945458463681080421101473761579424309687746007021074159564720195299959516638110870101025657932732247788828322476803386736345945717104030991724584628153257976163663460034720811420324255626233108130037584679035250792445830510130682783638394418531763109219293027733347554816808577799709553
from Crypto.Util.number import bytes_to_long
m=bytes_to_long(flag)
n= 12308543373374311860115195114269947739026255098864232126071500623399852788903738569949462616714391748269539072128882946132686996592089735285396762634029371785959865779256901123369306119124563405765293657606975290441243965513640680841871955014230301486214824204887945375140818283280272607903500556306646445508386218951500563603482945071727344737690804338144982687000734071274618240408238519378280819162796749148066754028700125846348589164721591354555019608871411236973606149388257533629388508942271702742078883636357856776193846813894734271905070538713351614750057245897158615891962167410053552739441195871000310777649
e= 65537
dp= 28196759050232165736649945458463681080421101473761579424309687746007021074159564720195299959516638110870101025657932732247788828322476803386736345945717104030991724584628153257976163663460034720811420324255626233108130037584679035250792445830510130682783638394418531763109219293027733347554816808577799709553
c= 1855798257044238280327042455832785889763141234883180404158555071443088630113034033050409259513632343742665544043437830959750873431928980910236398026670945184328950692568113819821699696418438157336263799808404698795433243968536256780396910914692949484556950491722527661706255009863481905590371725089587377065000354109396062360440021447607401687082247775453369117424848927386857425051097931983703966253652921113920387008048024308793686643944404541941182997963873579988680965558581885273185721576668001462817150245955628293258512024323515581063235248627223179117549540541642185815489978089367061102920114395871329023208c= 1855798257044238280327042455832785889763141234883180404158555071443088630113034033050409259513632343742665544043437830959750873431928980910236398026670945184328950692568113819821699696418438157336263799808404698795433243968536256780396910914692949484556950491722527661706255009863481905590371725089587377065000354109396062360440021447607401687082247775453369117424848927386857425051097931983703966253652921113920387008048024308793686643944404541941182997963873579988680965558581885273185721576668001462817150245955628293258512024323515581063235248627223179117549540541642185815489978089367061102920114395871329023208

2、解题方法

dp泄露

Exp如下:

点击查看代码
import gmpy2 as gp
e = 65537
n = gp.mpz(12308543373374311860115195114269947739026255098864232126071500623399852788903738569949462616714391748269539072128882946132686996592089735285396762634029371785959865779256901123369306119124563405765293657606975290441243965513640680841871955014230301486214824204887945375140818283280272607903500556306646445508386218951500563603482945071727344737690804338144982687000734071274618240408238519378280819162796749148066754028700125846348589164721591354555019608871411236973606149388257533629388508942271702742078883636357856776193846813894734271905070538713351614750057245897158615891962167410053552739441195871000310777649)
dp = gp.mpz(28196759050232165736649945458463681080421101473761579424309687746007021074159564720195299959516638110870101025657932732247788828322476803386736345945717104030991724584628153257976163663460034720811420324255626233108130037584679035250792445830510130682783638394418531763109219293027733347554816808577799709553)
c = gp.mpz(1855798257044238280327042455832785889763141234883180404158555071443088630113034033050409259513632343742665544043437830959750873431928980910236398026670945184328950692568113819821699696418438157336263799808404698795433243968536256780396910914692949484556950491722527661706255009863481905590371725089587377065000354109396062360440021447607401687082247775453369117424848927386857425051097931983703966253652921113920387008048024308793686643944404541941182997963873579988680965558581885273185721576668001462817150245955628293258512024323515581063235248627223179117549540541642185815489978089367061102920114395871329023208
)
for x in range(1, e):
if(e*dp%x==1):
p=(e*dp-1)//x+1
if(n%p!=0):
continue
q=n//p
phin=(p-1)*(q-1)
d=gp.invert(e, phin)
m=gp.powmod(c, d, n)
if(len(hex(m)[2:])%2==1):
continue
print('--------------')
print(m)
print(hex(m)[2:])
print(bytes.fromhex(hex(m)[2:]))
\#FSCTF{Cheese_snow_1eop@rd}
埃塞克的秘密

1、题目信息

埃塞克先生将自己的秘密藏在盒子里并交给了ROT保管
埃塞克先生将自己的秘密藏在盒子里并交给了ROT保管,埃塞克先生在盒子上留下了这样一串数字:
117 36 114 37 117 76 37 57 111 63 60 48 74 64 70 78

2、解题方法

厨子一把梭:

img

关键的Vigenere

1、题目信息

观其表,解其里
key.txt

FNY CQ HLQSEPNVJ
提示:Keyword
(观其表,解其里)
题目.txt

QGUMI{py@nessfz_tzhozr!}

2、解题方法

我们的思路是这样的,看到题目说是维吉尼亚,所以肯定要key才能解,如何去找key?

看到另一个文件提示:Keyword,知道是关键字密码,我们肯定是要用这个关键字密码来解出维吉尼亚解密所需的key

但关键字密码需要知道关键字,显然没有发现。。竟然给了总会有关键字的不然没法解。

仔细读提示:观其表,解其里。。什么意思?就是观察题目外表,解附件里面密文。

所以我们发现关键字就是“Vigenere”,而且题目说关键的Vigenere,很显然。

如果实在发现不了那就把题目所涉及的所有字符都试一遍肯定有结果的。

所以我们关键字解码

img

得到密匙为:

LOSTDREAM
这和我们按照flag前缀手算出来的前五个字母一样,所以它就是key了,然后维吉尼亚解码
img

兔帽的奇妙冒险

1、题目信息

有一只名叫贝斯64先生的兔子。它戴着一顶古老的兔帽子,帽子上绣着奇异的符文,传说这是一种能与神秘力量连接的魔法帽子。
OFR3c05RTEFKM2Q3QkxqRGlTbWthWExxSXhrZFo3SU5DVWRkOTVFQ2JUSE1VcXpRQk9hc3hqMzRrbHRJMD0=
2、解题方法
看到题目肯定想到要用兔子流密码解码,问题是如何获得兔子流密码?
首先,我们来分析“有一只名叫贝斯64先生的兔子。”因此可以想到是兔子流密码用base64加密了,所以我们需要base64先解一下

img

得到
8TwsNQLAJ3d7BLjDiSmkaXLqIxkdZ7INCUdd95ECbTHMUqzQBOasxj34kltI0=
然后就是考察我们对兔子流密码的认识了,分析最后一句话“帽子上绣着奇异的符文,传说这是一种能与神秘力量连接的魔法帽子。”与神秘力量连接的魔法帽子,重点是在这个连接上。有连接说明什么?肯定是断了,哪里断了呢?我们仔细看解密后的信息发现兔子流密码一部分前缀没了,完整的兔子流密码前缀长这样
U2FsdGVkX1
所以我们加上去
U2FsdGVkX18TwsNQLAJ3d7BLjDiSmkaXLqIxkdZ7INCUdd95ECbTHMUqzQBOasxj34kltI0=
然后解码就OK啦
img
这里还有个小知识,兔子流base64后的前缀会发现是Salted开头的哈哈哈。
img

认识密码出题人,可代打出题人(doge)

Misc

小试牛刀

放入010 尾部有flag 但是是假的 尝试Base64 解码得到密码:123
JPG 想到JPHS工具进行尝试 输入密码 得到flag (多做题,多尝试)
img
img
img
FSCTF{huang_duduanwangu}

舔狗红中

跟摩斯密码有关,应该是绿色信息为点,回复信息为横

..-. ... -.-. - ..-. ----.-- .. -- .. ... ... -.-- --- ..- ... --- -- ..- -.-. .... -----.-

(emo了出点烂题怎么了)

夜深人静的时候也会偷偷emo

接爆破,得到密码:12345

.\Decode.exe -X -P 12345 flag.mp3
img

行不行啊细狗

预期解:
第一步把隐藏文字选项打开
第二步把所有文字改成其他颜色
第三步改文件名后缀为zip,上压缩包里找去

非预期解:
解压文件后,sublime打开document.xml文件
flag分三段,均在此文件内找到,拼起来即可

为什么不换换思路捏

img

密文:3956305A7652305877676D656E3532626F395664776B3358723557596F52335835423055375A4556444E6C52

base16解码
img
img
FSCTF{S@y_thank_y0u_hongzh0_DogE}

Web
寻找蛛丝马迹

我出这道题的时候以为这是一道签到题

第一段
ctrl u
img
第二段
顺着找css
img
这个其实是我出题的锅,没想到会出现编码问题,从第二段开始都是有编码问题,不过正好就当考察了(doge
火狐自带的编码修复或者直接抓包看响应
右上角三道杠->更多工具->定制工具栏
img
img
再或者直接在检查里看
img
第三段
js里
img
第四段
根据提示访问robots.txt,考察robots.txt的定义

img
第五段

根据提示访问.DS_store

img

查看

img

第六段

备份文件挺多的,这个直接dirsearch爆破也能出来其实,www.zip
img
查看

img

PS:如果在这个压缩包上再加一个伪加密将是绝杀

标签:FSCTF2023,题目,gp,兔子,密码,flag,WP,FSCTF
From: https://www.cnblogs.com/hongzh0/p/18214544

相关文章

  • ISCC2024个人挑战赛WP-MISC
    (非官方解,以下内容均互联网收集的信息和个人思路,仅供学习参考) whereisflag下载附件,解压出pyc,然后到下面网址反编译python反编译-在线工具记住c,是密文,Key是k5fgb2eur5styn0lve3t6r1sAESecb解密解密网址:https://www.lddgo.net/encrypt/aes成语学习压缩包密码:5......
  • ISCC2024个人挑战赛WP-WEB
    (非官方解,以下内容均互联网收集的信息和个人思路,仅供学习参考) 还没想好名字的塔防游戏GET/world.jsHTTP/1.1Host:101.200.138.180:17345Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed......
  • WPF implement ICommand and similar with DelegateCommand of Prism
    publicclassDelCmd:ICommand{publiceventEventHandlerCanExecuteChanged{add{CommandManager.RequerySuggested+=value;}remove{CommandManager.RequerySuggested-=......
  • ISCC 2024 部分wp
    文章目录一、Misc1、Number_is_the_key2、FunZip3、擂台——重“隐”;4、RSA_KU5、时间刺客6、成语学习7、精装四合一8、钢铁侠在解密9、有人让我给你带个话10、Magic_Keyboard11、工业互联网模拟仿真数据分析二、Web1、还没想好名字的塔防游戏2、代码审计3、原神启动......
  • WPF一个简单的属性编辑控件
    代码:publicclassPropertiesControl:Grid{[TypeConverter(typeof(LengthConverter))]publicdoubleRowHeight{get{return(double)GetValue(RowHeightProperty);}set{SetValue(RowHeightProperty,......
  • WPF 加载本地HTML
    index.html代码高亮:<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>jQuery语法高亮示例</title><linkrel="stylesheet"href="https://cdnjs.cloudflare.com/a......
  • 深入浅出Viewport设计原理2
    逻辑像素、逻辑分辨率对于同一个元素,DPR越大,渲染时需要的物理像素就越多。这是我们上面得出的结论。那么,在软件开发中,元素的大小到底应该写成多少px?为了解决这个问题,我们引入“逻辑像素”的概念。平时我们在css中写的px指的就是逻辑像素,而不是物理像素,一个逻辑像素可以......
  • wp
    Reverse这次本同校的队伍打爆了,争取明年能进决赛吧asm_re打开是一段ida里复制出来的汇编,但是把源文件的十六进制也复制出来了。将十六进制写进新的文件,选择arm小端序,ida反编译能看出对每一个字符ch做了((80*ch+20)^0x4D)+30的操作,解密即可#include<bits/stdc++.......
  • 【WPF】WPF中调用winform的控件,winform始终置顶处理
    在WPF中调用windowFormsHost的控件时,由于渲染机制的问题总会出现各种问题,比如Winform的控件始终会出现在最顶层。在WPF项目中添加Microsoft.DwayneNeed.dll可以避免置顶问题<xmlns:interop=clr-namespace:Microsoft.DwayneNeed.Interop;assembly=Microsoft.DwayneNeed></xmln......
  • WPF Image ZoomIn ZoomOut
    //xaml<Windowx:Class="WpfApp109.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mi......