首页 > 其他分享 >“技能兴鲁”职业技能大赛-网络安全赛项-学生组初赛 WP

“技能兴鲁”职业技能大赛-网络安全赛项-学生组初赛 WP

时间:2023-11-14 22:22:21浏览次数:48  
标签:.. admin 赛项 初赛 flag ----- https WP import

Crypto

BabyRSA

共模攻击

题目附件:

from gmpy2 import *
from Crypto.Util.number import *
 
 
 
flag  = 'flag{I\'m not gonna tell you the FLAG}' # 这个肯定不是FLAG了,不要交这个咯


p = getPrime(2048)
q = getPrime(2048)
m1 = bytes_to_long(bytes(flag.encode()))

 
e1 = 3247473589
e2 = 3698409173


n = p*q


flag1 = pow(m1,e1,n)
flag2 = pow(m1,e2,n)
print('flag1= '+str(flag1))
print('flag2= '+str(flag2))
print('n= '+str(n))


# flag1= 295658788074157816670393593671184451782123605135184996662528766686642109492132533952160456440919197939935742027629210419312032730004032666912404179229952394343569590488768472800784830058534578639706805456277578757250365834591813481786084959844340418320620440636997732915872346619679993987903742079972676425404864295283955565746004124045155664762158516005326368384488346997494926539295740248007606864906884407198601326915643000764477435205579583836917598642053869541648731754384026407310786288997756775232852732033054591953078116290088267188296560877481534143707414153749140670404213262630122369941889862912426176115220410931992046973925991075473656781794097329513119548617920256625579072719981729556158392454956362838720993254919638177786730004086883044525967823454986241038123671907279715773848673713008902432841449556980494600938989397567019338970200872333713986608537678650318511128703055185979834233315117153115613952940778789222515375743186066883492596068186378372611075958909412662251913621375996518671118244409393829141365207153662416265238312206577474940661548038715230313608405518108581922154335405303862701783678336161505643508831482409054761542959278392940037561736468155509922530420964726953308604138731805543997557197893
# flag2= 219454357017359138238563345020257296433275019950745269658921329153689267055871241202626317639487122341365759606018366576305678949982408366815977617307888894995289951707241009621444691307275542686770303994110416384086739599181934011812163156338859395115724413628620575935425221522079154607411877822646179457455118804970038865452163833416447505142114976758532806787419762250921421272492466133659234602794242531776209324085944417173098820895755851386042954303555790085402616519592065446023510096773546730662074307900123349548340507067971393642039476326402523930789953483843698593104578179169624886357604650615249286150367204109726460230037005175927865466199600272190112483494387929732049738312695796015009178606906549093365261114132002222704510637261038978031857378729856467918978246977163353146981239215886053379980533235786905270211605457443266127512667882149285155542735532327780898540341696557860555884277608448996773250847560675650046440569736010800155992053362696097992699863059686881689842065077997427372972290872427656847223849769329713841670853267584161386494525686204330028142217737052411422895042170169703550774908415280261731967511925122636118468176645781785352430657090024109246103061415446942211482659025722233229083093876
# n= 549785700554963543393222974982211136067042846536450239199968863551137077564447156832697813202963334596948298760762991663065504535035143397250208506445202607659676332816610122258862787906629525548439909792727593939957178783466989816894454522630301104349317697612174888605090061231211194974337772507249418567229560145454791075929946332668360553910328900103264562348881791004831033587660163923517440406942993348972589262051083908075790422096042338651001937740085414301019827335549437397656318095919875053213333008551761167437683250592542156348138055482054331330609375930693247365749085041596578748797801601289693449629548744535914348450016287545136436964138806081283470239420969311905998245715160353982174880912315601876305613349276824998688275587308133069178764001924866079232824850209407236694426779262951463035278887804883917516580169051530590466082511045503107508117656821592538792566264160105940730326929474477787053681516844548383814388361089499629312831727731267796167205124844987064389097138747938870221504684958713047985374714612321540288239995935347905120710583169131356970267386562665138437631517802641426575996558648777831102462652517305151412695166331935115971277205305816897886952646432233312318756155702046584205507027737

exp:

import libnum

import gmpy2



n=549785700554963543393222974982211136067042846536450239199968863551137077564447156832697813202963334596948298760762991663065504535035143397250208506445202607659676332816610122258862787906629525548439909792727593939957178783466989816894454522630301104349317697612174888605090061231211194974337772507249418567229560145454791075929946332668360553910328900103264562348881791004831033587660163923517440406942993348972589262051083908075790422096042338651001937740085414301019827335549437397656318095919875053213333008551761167437683250592542156348138055482054331330609375930693247365749085041596578748797801601289693449629548744535914348450016287545136436964138806081283470239420969311905998245715160353982174880912315601876305613349276824998688275587308133069178764001924866079232824850209407236694426779262951463035278887804883917516580169051530590466082511045503107508117656821592538792566264160105940730326929474477787053681516844548383814388361089499629312831727731267796167205124844987064389097138747938870221504684958713047985374714612321540288239995935347905120710583169131356970267386562665138437631517802641426575996558648777831102462652517305151412695166331935115971277205305816897886952646432233312318756155702046584205507027737
e1=3247473589
e2=3698409173
c1=295658788074157816670393593671184451782123605135184996662528766686642109492132533952160456440919197939935742027629210419312032730004032666912404179229952394343569590488768472800784830058534578639706805456277578757250365834591813481786084959844340418320620440636997732915872346619679993987903742079972676425404864295283955565746004124045155664762158516005326368384488346997494926539295740248007606864906884407198601326915643000764477435205579583836917598642053869541648731754384026407310786288997756775232852732033054591953078116290088267188296560877481534143707414153749140670404213262630122369941889862912426176115220410931992046973925991075473656781794097329513119548617920256625579072719981729556158392454956362838720993254919638177786730004086883044525967823454986241038123671907279715773848673713008902432841449556980494600938989397567019338970200872333713986608537678650318511128703055185979834233315117153115613952940778789222515375743186066883492596068186378372611075958909412662251913621375996518671118244409393829141365207153662416265238312206577474940661548038715230313608405518108581922154335405303862701783678336161505643508831482409054761542959278392940037561736468155509922530420964726953308604138731805543997557197893
c2=219454357017359138238563345020257296433275019950745269658921329153689267055871241202626317639487122341365759606018366576305678949982408366815977617307888894995289951707241009621444691307275542686770303994110416384086739599181934011812163156338859395115724413628620575935425221522079154607411877822646179457455118804970038865452163833416447505142114976758532806787419762250921421272492466133659234602794242531776209324085944417173098820895755851386042954303555790085402616519592065446023510096773546730662074307900123349548340507067971393642039476326402523930789953483843698593104578179169624886357604650615249286150367204109726460230037005175927865466199600272190112483494387929732049738312695796015009178606906549093365261114132002222704510637261038978031857378729856467918978246977163353146981239215886053379980533235786905270211605457443266127512667882149285155542735532327780898540341696557860555884277608448996773250847560675650046440569736010800155992053362696097992699863059686881689842065077997427372972290872427656847223849769329713841670853267584161386494525686204330028142217737052411422895042170169703550774908415280261731967511925122636118468176645781785352430657090024109246103061415446942211482659025722233229083093876


def exp_def(e1,e2,c1,c2,n):

    s,s1,s2 = gmpy2.gcdext(e1, e2)

    m = (pow(c1,s1,n) * pow(c2 ,s2 ,n)) % n

    return int(m)



m=exp_def(e1,e2,c1,c2,n)

print(libnum.n2s(m))

# b'flag{baby_r3a_sierting_2023}'

image.png

EasyRSA

参考链接:
https://zhuanlan.zhihu.com/p/461349946
image.png

扫码关注微信公众号“中学生CTF”
私信对话回复“开始游戏”
根据提示进行解决问题
获得FLAG


公钥:-----BEGIN RSA PUBLIC KEY-----MIGJAoGBAKOSX8AR8/CsqasPfC7VL5aJzic8W9KFI1920SHhEhmcWd7yp5Dl9UfXgzLHIIZJExd7D1CwIxAMHANHV6qF/7FEedwEMHusBxbAWsjXQUGFeEMmzo+SUVbbRnDSw/jZwCNoofQfukVO7+5CBzV5S/N5WDTk+8bvwfrDDA9AHdW5AgMBAAE=-----END RSA PUBLIC KEY-----

MIGJAoGBAKOSX8AR8/CsqasPfC7VL5aJzic8W9KFI1920SHhEhmcWd7yp5Dl9UfXgzLHIIZJExd7D1CwIxAMHANHV6qF/7FEedwEMHusBxbAWsjXQUGFeEMmzo+SUVbbRnDSw/jZwCNoofQfukVO7+5CBzV5S/N5WDTk+8bvwfrDDA9AHdW5AgMBAAE=

30818902818100a3925fc011f3f0aca9ab0f7c2ed52f9689ce273c5bd285235f76d121e112199c59def2a790e5f547d78332c720864913177b0f50b023100c1c034757aa85ffb14479dc04307bac0716c05ac8d7414185784326ce8f925156db4670d2c3f8d9c02368a1f41fba454eefee420735794bf3795834e4fbc6efc1fac30c0f401dd5b90203010001








私钥:-----BEGIN RSA PRIVATE KEY-----MIICWwIBAAKBgQCjkl/AEfPwrKmrD3wu1S+Wic4nPFvShSNfdtEh4RIZnFne8qeQ5fVH14MyxyCGSRMXew9QsCMQDBwDR1eqhf+xRHncBDB7rAcWwFrI10FBhXhDJs6PklFW20Zw0sP42cAjaKH0H7pFTu/uQgc1eUvzeVg05PvG78H6wwwPQB3VuQIDAQABAoGADZ61jFeyWTr3UcATVg74TG+jE89J0gi1/k/1b/2+tRU4woCwBTewqc+/I+5Cvgu9pDnh95UDBmYLuxYorZFEzgrSa3rZ5y7OFQZl9nXapt2LttBXoQaWf3jtyslsGmfNi/VuNgKaiiVwINhVG8NeIFzzAB3AqNDitHlKDalkKZECQQDN1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JEuQq9FUMQJAe6Vt+yJhCEwxRxFw7bxSosWSNL8o7rwslDke1+HdxdmwXRAuZ1mTS7QFc7vLwC3gQ9u5NGqMIvfm4nrl2f0NJQJAJrOQDrZX/KpYAnFmW8IGXxkcJrtdB2Xi9VN1WdC9r4QGz28X5ScH0o9mcYVxaDxzNU7A9DPiRL28fAltiGdJLg==

3082025b02010002818100a3925fc011f3f0aca9ab0f7c2ed52f9689ce273c5bd285235f76d121e112199c59def2a790e5f547d78332c720864913177b0f50b023100c1c034757aa85ffb14479dc04307bac0716c05ac8d7414185784326ce8f925156db4670d2c3f8d9c02368a1f41fba454eefee420735794bf3795834e4fbc6efc1fac30c0f401dd5b902030100010281800d9eb58c57b2593af751c013560ef84c6fa313cf49d208b5fe4ff56ffdbeb51538c280b00537b0a9cfbf23ee42be0bbda439e1f7950306660bbb1628ad9144ce0ad26b7ad9e72ece150665f675daa6dd8bb6d057a106967f78edcac96c1a67cd8bf56e36029a8a257020d8551bc35e205cf3001dc0a8d0e2b4794a0da9642991024100cdd6564a57c6f18a664d0d52fd09a8e6744e9fdc3a1b62018dbce5ec392e10933c7eff72ef01ba928a289e979574f290481b5f03448a71051379ef3f1f6c9c650241 00cb6f3379e31e6f76452fbfe2ca8b10f115abcf7fc1c6552d44487d192a6545aec426d8e6f39d8840293df258361d1fbeb6eba099db55012d25c5dfd45435ccc5 024015a570b5a8bd773142c8df99d69a6974b2ce81e93b031e2f63a475d97db9e66c55745590d4a9ade1333e4a4f4e9c59d5ea7f56629596a9840b244b90abd1543102407ba56dfb2261084c31471170edbc52a2c59234bf28eebc2c94391ed7e1ddc5d9b05d102e6759934bb40573bbcbc02de043dbb9346a8c22f7e6e27ae5d9fd0d25024026b3900eb657fcaa580271665bc2065f191c26bb5d0765e2f5537559d0bdaf8406cf6f17e52707d28f66718571683c73354ec0f433e244bdbc7c096d8867492e


n = 00a3925fc011f3f0aca9ab0f7c2ed52f9689ce273c5bd285235f76d121e112199c59def2a790e5f547d78332c720864913177b0f50b023100c1c034757aa85ffb14479dc04307bac0716c05ac8d7414185784326ce8f925156db4670d2c3f8d9c02368a1f41fba454eefee420735794bf3795834e4fbc6efc1fac30c0f401dd5b9

e = 010001

d = 0d9eb58c57b2593af751c013560ef84c6fa313cf49d208b5fe4ff56ffdbeb51538c280b00537b0a9cfbf23ee42be0bbda439e1f7950306660bbb1628ad9144ce0ad26b7ad9e72ece150665f675daa6dd8bb6d057a106967f78edcac96c1a67cd8bf56e36029a8a257020d8551bc35e205cf3001dc0a8d0e2b4794a0da9642991

p = 00cdd6564a57c6f18a664d0d52fd09a8e6744e9fdc3a1b62018dbce5ec392e10933c7eff72ef01ba928a289e979574f290481b5f03448a71051379ef3f1f6c9c65

q = 00cb6f3379e31e6f76452fbfe2ca8b10f115abcf7fc1c6552d44487d192a6545aec426d8e6f39d8840293df258361d1fbeb6eba099db55012d25c5dfd45435ccc5

d mod(p-1) 



密文:QhS9n7TkavmU8E4CFa872ZzqIq/NG/agtCkxQBzB0/E1PDZRv6otOYxBLsxwd/7h0fPkYYMCpPt4nXqYBGQ/n8/F3q3spV94+IFs7+CjyybUvAQg8MXLgSTzVt+ua0Ub0/et5/7Q1xAcgzT3/jWHwjklEAykdpSYMAqv5PQrhT4=

4214bd9fb4e46af994f04e0215af3bd99cea22afcd1bf6a0b42931401cc1d3f1353c3651bfaa2d398c412ecc7077fee1d1f3e4618302a4fb789d7a9804643f9fcfc5deadeca55f78f8816cefe0a3cb26d4bc0420f0c5cb8124f356dfae6b451bd3f7ade7fed0d7101c8334f7fe3587c23925100ca4769498300aafe4f42b853e


提示:回答个问题吧,回答正确了就给你提示。
求小于100的所有正整数中,与10互质的数有多少个?
40个

image.png
把它们变成十进制然后工具跑一下就出了
image.png

flag{c2915ff0a0ca8ffd50af20cd27682ff2}

简单的Python

题目附件:

import time
from tqdm import tqdm
from qsnctf import *



flag = "flag{}"
flag = caesar_encrypt(flag, 8)
for i in tqdm(range(21)):
    flag = string_reverse(flag)
flag = atbash_cipher(flag)
for i in tqdm(range(20)):
    flag = base64_encode(flag)
flag = base100_encode(flag)
print(flag)

# flag = "

标签:..,admin,赛项,初赛,flag,-----,https,WP,import
From: https://www.cnblogs.com/Fab1an/p/17832744.html

相关文章

  • Buuctf-Crypto-之深夜刷题部分wp
    萌萌哒的八戒首先下载好附件,解压,是一幅猪图,图的下方是一串看不懂的字,百度输入关键词猪、密码,可知这是猪圈密码,手撸得WHENTHEPIGWANTTOEAT大写不对,换成小写。whenthepigwanttoeat传统知识+古典密码首先下载好附件,解压:小明某一天收到一封密信,信中写了几个不同的年份辛卯,癸巳......
  • 界面控件DevExpress WPF Splash Screen,让应用启动画面更酷炫!
    DevExpressWPF的SplashScreen组件可以为应用程序创建十分酷炫的启动屏幕,提高用户在漫长的启动操作期间的体验!P.S:DevExpressWPF拥有120+个控件和库,将帮助您交付满足甚至超出企业需求的高性能业务应用程序。通过DevExpressWPF能创建有着强大互动功能的XAML基础应用程序,这些应用......
  • 中龙技术 | HSCSEC CRY + MISC WP
    CRYPTO[HSC-1th]EasySignIn5445705857464579517A4A48546A4A455231645457464243566B5579556C7053546C4A4E524564565646644D515670455130354C5755644F5231685256314A5452315A5552304E57576C5A49525430395054303950513D3DCyber一把梭RSAimportgmpy2importsympyfromCry......
  • .net6.0及以上WPF中使用GDI+的demo
    usingSystem;usingSystem.Drawing;usingSystem.Runtime.InteropServices;usingSystem.Windows;usingSystem.Windows.Interop;usingSystem.Windows.Media.Imaging;namespaceTryDemo{///<summary>///InteractionlogicforMainWindow.xaml......
  • 安装arch时用wpa_supplicant连接隐藏WPA2 wifi
    1.终端输入vim/etc/wpa_supplicant/wpa_supplicant.conf创建/etc/wpa_supplicant/wpa_supplicant.conf目录并编辑wpa_supplicant.conf文件2.在wpa_supplicant.conf文件写入network={scan_ssid=1proto=WPA2key_mgmt=WPA-PSKssid="你的wifi名字"psk=......
  • 安装arch时用wpa_supplicant连接隐藏WPA2 wifi
    1.vim/etc/wpa_supplicant/wpa_supplicant.conf#创建/etc/wpa_supplicant/wpa_supplicant.conf目录并编辑wpa_supplicant.conf文件2.在wpa_supplicant.conf文件写入network={scan_ssid=1proto=WPA2key_mgmt=WPA-PSKssid="你的wifi名字"psk="你的wifi密码"}以``下是注释......
  • 第二届福州大学至诚学院网络安全大赛G0DCTF Misc WP
    MISCbaby_misc1、题目信息key文件夹:还有一张图片2、解题方法观察key文件夹里的每个文件信息,发现并无什么有用的,甚至有的为空。。。看到文件名称的数字而且还给了图片,可以想到steghide隐写,而密码就是数字排列,我们按从大到小排列正好是985211steghideextract-sfflag.jp......
  • 1. WPF DataBinding--概述
    数据绑定为应用程序提供了一种简单而一致的方式来表示数据并与之交互,UI元素可以绑定到不同的数据源(.net对象和XML),什么是数据绑定数据绑定是一个UI和它显示数据建立联系的过程。如果建立了正确的绑定,当数据发生变化并发出适当的通知时,UI元素也会自动跟着变化,当UI元素的数据表现发生......
  • WP光电信息学院2023年网络安全季度挑战赛
    签个到就跑WPMiscMISC-没爱了,下一个下载附件压缩包解压之后,获得一个流量包文件使用wireShark打开流量包,Ctrl+F搜索flag{即可获得flagflag{Good_b0y_W3ll_Done}MISC-送你一朵小花花下载附件压缩包解压之后,获得一个JPG图片文件用010打开查看,在文件尾部发现Unicode编......
  • WPF win10窗体背景模糊
    internalenumAccentState{ACCENT_DISABLED=0,ACCENT_ENABLE_GRADIENT=1,ACCENT_ENABLE_TRANSPARENTGRADIENT=2,ACCENT_ENABLE_BLURBEHIND=3,ACCENT_INVALID_STATE=4}[StructLayout(LayoutKind.......