少女祈祷中...

Misc

简单编码

题目描述:

二八二八,咔咔就是发!

1
0122 110001 0153 0172 1010010 1000101 061 1011010 1010111 1101100 1100100 1001000 0122 0124 1001110 0105 0124 110000 064 1111010 0121 060 0144 1011010 1001101 1101100 1010010 0110 0124 1010110 1110000 1010101 1010010 060 1000110 0141 0126 0105 1101100 0117 1010101 1101100 1100100 1001000 0127 0126 0154 1010101 0124 0125 065 0123 0126 1000101 1100011 060 1001101 110000 0122 0110 0124 1010110 1110000 1010111 1010010 110000 110000 0171 1010110 0105 0144 1001110 1010101 1101100 1100100 1001000 0127 0126 1110000 0125 1010101 1010101 061 0141 1010101 110000 1100100 1001110 1010111 1101011 1010010 1001000 0124 0153 0112 0125 1010010 110000 1101011 0172 0122 0105 110001 0117 1010101 0154 0132 1001000 1010111 0124 1001010 0105 0124 1010101 065 1001011 1010110 1000101 0143 110000 1010111 1101100 1010010 0124 0124 0154 0112 0127 1010010 110000 060 0171 1010010 0105 1100100 0117 0125 1101100 0144 1001000 1010100 0124 0116 1000101 1010010 110000 110101 1010011 1010101 060 0144 1001110 1001110 1000110 0122 1001000 1010100 1101100 1110000 1011001 0124 0126 0105 111001 1010000 1010100 060 071 1010000 1010100 060 111101 

二进制,八进制

写一个二进制,八进制转为字符串

exp:

1
2
3
4
5
6
7
8
9
10
11
import re

flag=''
a = ['1010010','110001','1101011','0172','1010010','1000101','061','0132','0127','1101100','0144','1001000','1010010','1010100','0116','0105','0124','110000','110100','0172','1010001','110000','0144','1001110','1001101','110001','1010010','0110','1010100','0154','1110000','1011000','0122','060','110001','0141','1010110','0105','0144','1001110','0127','1101100','1010110','1001000','1010111','0124','0112','0125','1010010','110000','110101','0113','1010110','1000101','0144','0116','0127','0154','0122','1000010','1010100','0154','1001010','1010111','0122','110000','061','0141','1010110','1000101','110001','0117','0125','1101100','0122','0110','0123','0124','0116','0105','0124','0125','065','1010011','0126','060','0144','0132','1010111','1101011','1010010','1001000','1010100','0154','0112','0125','1010011','1000101','0126','0141','1010110','1000110','1000110','1001110','0127','1101100','1001110','0110','0127','0124','1001110','1000101','0122','110000','110101','1001011','1010110','0105','0144','0102','1010111','1101100','1010010','0124','1010100','0126','0160','0125','0122','110000','110000','060','0126','1000101','061','1001110','0125','0154','1010010','0110','0124','0126','1110000','0125','0123','060','110001','1100001','1010111','1101011','0144','1001110','1010111','0154','0122','0116','1010100','1010110','0112','0131','1010100','0126','0105','071','1010000','0124','110000','111001','0120','1010100','110000','075']
for i in range(len(a)):
print(len(a[i]))
if len(a[i])==4 or len(a[i])==3:
flag+=chr(int(a[i], 8))
else:
flag += chr(int(a[i],2))
print(flag)

运行得到base编码

图片

赛博厨子一把梭

图片

最后flag为flag{77c34e530e3f2ffb6982f50939b3593b}

神秘的base

题目描述:

神奇密码在哪里

1
2
3
4
EvAzEwo6E9RO4qSAHq42E9KvEv5zHDt34GtdHGJaHD7NHG42bwd=

神奇密码:
xbQTZqjN8ERuwlzVfUIrPkeHd******LK697o2pSsGD+ncgm3CBh/Xy1MF4JAWta

base换表爆破

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import base64
import string
import itertools


string1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' #标准base64编码表

strings = "ivOY50"
all_colors = (itertools.permutations(strings, 6))
for i in all_colors:
tmp = ''.join(i)
string2 = f'xbQTZqjN8ERuwlzVfUIrPkeHd{tmp}LK697o2pSsGD+ncgm3CBh/Xy1MF4JAWta' # 换表后base64编码表
encode = 'EvAzEwo6E9RO4qSAHq42E9KvEv5zHDt34GtdHGJaHD7NHG42bwd='
decode = base64.b64decode(encode.translate(str.maketrans(string1, string2)))
if 'flag{' in str(decode) and '}' in str(decode):
print(decode)

运行得到flag

图片

最后flag为flag{8ee3021432edffaa57527461952e632c}

Stego

我应该去爱你

题目描述:

全世界还有谁,比我们能绝配~

下载附件,用AU打开文件,查看频谱

图片

最后flag为flag{dfcba866efb361d89b7240c49653a782}

数独

题目描述:

闲来无事,做个数独吧(tips:将数独的结果横向排列,即可得到一组16位的神奇密码)

下载附件

图片

画图做数独

图片

密码为4132234132141423

带密码的png隐写优先考虑cloacked-pixel

b神工具一把梭

图片

获得flag

图片

最后flag为flag{7d692a3c795478b16631eb9b43677075}

莫生气

题目描述:

他人生气我不气,气出病来无人替

下载附件

图片

010查看文件

图片

发现藏有png,缺少文件头,补全

图片

保存得到png文件

图片

发现两张图都一样,猜测双图盲水印,b神工具一把梭

图片

最后flag为flag{c6d8bc4276f2a26eo7d8178253456b92}

Forenisc

金刚大战哥斯拉

题目描述:

哥斯拉大战金刚,到底谁会获胜呢?

下载附件

图片

过滤http

图片

追踪流发现是哥斯拉流量(其实题目就告诉了)

图片

url解码得到哥斯拉流量密文

图片

导出http对象

图片

查看shell(1).php,发现哥斯拉流量的key

图片

方法一:

哥斯拉流量解密exp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

function encode($D,$K){
for($i=0;$i<strlen($D);$i++){
$c = $K[$i+1&15];
$D[$i] = $D[$i]^$c;
}
return $D;
}

$pass='DASCTF';
$payloadName='payload';
$key='9c2ffaf6a14493bf';
$data = 'fLluZmFmNmExNJEhWBG1b1XhCY%2BtGO2uCp6t3zK69FxYTKJQssNT1y5Cf45Hu3u%2Fivq08xw%2FbzMVDb2iVURKKXEgFjxjZzQ6kQjmUHpg8t9m09mKOdTLyE5V%2B%2Bzw83kQjtK%2Bl9yBKvzGCdNluDokRoC4jvtek8KVLXnlU3K366szlCn4XS%2BxolAu%2FzspbXO1wRZkj15en%2BXvDcX%2BrfySQnxMFJKl2bgedSVozzyNwPBUFxcUX3V2E%2FGyFHezDWxnihBUXutJRvu%2FuHjZwHGhu%2BpybShnSwTgYLjybXZRZC3M%2BmD04BA6ancVF5lirsWZ3gsqB3h9rvKzDvtwG3FoCM6ObODAYOcpOLtSO8xuGMciws40NV81hhXQV7ViZG9At06ypufihH4bSJ0xy1aL1T6WCPL6fcRbCaVn%2F7BYmCuoy3LzMlI3CH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K32xH506xzsqjhFJnDHAbMPC47x6hXmMsm%2BTMBQNfgYyzmDyxERG3o9IuLB%2B3vzTJfaLv9bZ4aNTef%2BMwQDLojDSIiEK%2FDvw%2BuOHt5%2Fwk7cNiXWBhKCjULlR8Daukh7MFlCklEs3srvkifaW4VbF85SckpUhIjOTVTYZ4EgK1VYQ%2BK52O7kKt%2BT2kOkLDDE5JiDXApezQtbnw5yPM8WDh5c1DTaRqLsWxUTPWtVlcbzyge5D4VYWXJ0ICPpVfbeEQXutk0tMKBfY0q20%2Bo8CD6oHnm3wy5ELMeLsmXrspAmhwk2wr8d64CHizraARwvNAAX71VCPIUukAvgtEBblKi9EsFr4Or6s%2Fz1RtnxlaufSdlTCCwWTAe%2FeBK%2FKdehF4gIQ91hCWyrI6jJchH%2F5VA0sXxqVe1sBsZulTMJJJo3VZsFutboAetPCdcmEzqqIYUEuSuJf%2F5tXJm5hujq6EJ6rZbBXqnCeLDVWyhhZvy4kL9jKcF2Hp9ItvRBHP6hI%2FAEzBH%2B89XwS07WJsmlYkiQmHDYavnLbbm8sEAbGwbxCbTUJU7qKgTZff%2BWEBuQ%2BTg4mRab4%2B8SpRklCHU3QCeS1nIHPuJrdyOwMMGQ%2B%2BWEG0hDsiReJbkcG9f9mORbZpLegR5HDbiT0oYJG6GcvKxTNS6voIrE94nva0%2FeQvEgokgbBQQQoejcj1h7oStaWk5OdeWhBJaAgnFmtfGW6lyA0OQ%3D%3D';
echo base64_encode(gzdecode(encode(base64_decode(urldecode($data)),$key)));

运行得到

图片
1
ZmlsZU5hbWUCHgAAAEM6L3BocHN0dWR5L1dXVy8xMTEvaW5kZXguaHRtbGZpbGVWYWx1ZQJUFAAAPCFET0NUWVBFIGh0bWw+DQo8aHRtbCBsYW5nPSJlbiI+DQo8aGVhZD4NCiAgICA8bWV0YSBjaGFyc2V0PSJVVEYtOCI+DQogICAgPG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0xLjAiPg0KICAgIDxtZXRhIGh0dHAtZXF1aXY9IlgtVUEtQ29tcGF0aWJsZSIgY29udGVudD0iaWU9ZWRnZSI+DQogICAgPHRpdGxlPkRvY3VtZW50PC90aXRsZT4NCiAgICA8c3R5bGU+DQogICAgICAgICp7Ym94LXNpemluZzogYm9yZGVyLWJveDt9DQogICAgICAgIGJvZHl7DQogICAgICAgICAgICBiYWNrZ3JvdW5kOiAjMDAwOw0KICAgICAgICAgICAgbWFyZ2luOiAwOw0KICAgICAgICAgICAgcGFkZGluZzogMDsNCiAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47DQogICAgICAgICAgICB0ZXh0LXNoYWRvdzogMHB4IDBweCA4MHB4Ow0KICAgICAgICB9DQogICAgICAgIGgxew0KICAgICAgICAgICAgbWFyZ2luOiAwOw0KICAgICAgICAgICAgcGFkZGluZzogMDsNCiAgICAgICAgICAgIGNvbG9yOiAjMGZmOw0KICAgICAgICB9DQogICAgICAgIGF7Y29sb3I6ICNmZmY7fQ0KICAgICAgICAvKiDnm5LlrZDihpMgKi8NCiAgICAgICAgcHsNCiAgICAgICAgICAgIG1hcmdpbjogMDsNCiAgICAgICAgfQ0KICAgICAgICAuYm94ew0KICAgICAgICAgICAgLyog55uS5a2Q5a695bqm4oaTIC0tLeacgOWlveWIq+aUuSovDQogICAgICAgICAgICB3aWR0aDogNzAwcHg7DQogICAgICAgICAgICAvKiDorqnop4bpopHlsYXkuK3lr7npvZDihpMtLS3mnIDlpb3liKvliqggKi8NCiAgICAgICAgICAgIHRleHQtYWxpZ246IGNlbnRlcjsNCiAgICAgICAgICAgIC8qIGJvcmRlcjogMXB4IHNvbGlkICNmMDA7ICovDQogICAgICAgICAgICBjb2xvcjogI2ZmZjsNCiAgICAgICAgICAgIA0KICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOw0KICAgICAgICAgICAgbWFyZ2luOiAyMHB4IGF1dG8gMDsNCiAgICAgICAgICAgIHRvcDogMjBweDsNCiAgICAgICAgICAgIGxlZnQ6IDA7DQogICAgICAgICAgICByaWdodDogMDsNCiAgICAgICAgfQ0KICAgICAgICAvKiDlm77niYfmoLflvI/ihpMgKi8NCg0KICAgICAgICBpbWd7DQogICAgICAgICAgICAvKiDop4bpopHlrr3luqbihpMgLS0t5pyA5aW95LiN6KaB5aSn5LqO5LiK6Z2i55uS5a2Q55qE5a695bqmKi8NCiAgICAgICAgICAgIHdpZHRoOiA3MDBweDsNCiAgICAgICAgICAgIGhlaWdodDogMzkwcHg7DQogICAgICAgICAgICAvKiDngbDoibLnmoTmj4/ovrnihpMgLS0tcHjmmK/nspfnu4Ygc29saWTmmK/lrp7nur8gIzU1NeaYr+minOiJsuS7o+eggSDlj6/ku6Xnmb7luqZodG1s6aKc6Imy5Luj56CB5L+u5pS5Ki8NCiAgICAgICAgICAgIGJvcmRlcjogMnB4IHNvbGlkICMyMjI7DQogICAgICAgICAgICAvKiDlm77niYfnmoTlnIbop5IgKi8NCiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDVweDsNCiAgICAgICAgICAgIC8qIOWKqOeUu+aXtumXtCAqLw0KICAgICAgICAgICAgdHJhbnNpdGlvbjogMC44czsNCiAgICAgICAgfQ0KICAgICAgICAuaW1nMjpob3Zlcntib3JkZXI6IDJweCBzb2xpZCAjOTgwYjE4fQ0KDQogICAgICAgIC5ib3g+ZGl2ew0KICAgICAgICAgICAgcGFkZGluZzogMjBweDsNCiAgICAgICAgICAgIC8qIGJvcmRlcjogMXB4IHNvbGlkICNmMDA7ICovDQogICAgICAgIH0NCiAgICAgICAgLnN6ansNCiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsNCiAgICAgICAgICAgIHRvcDogMDsNCiAgICAgICAgICAgIGxlZnQ6IDA7DQogICAgICAgICAgICBjb2xvcjogI2ZmZjsNCiAgICAgICAgICAgIHBhZGRpbmc6IDVweDsNCiAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvb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mF3LCAzMyk7DQo8L3NjcmlwdD4NCjwvYm9keT4NCjwvaHRtbD5tZXRob2ROYW1lAgoAAAB1cGxvYWRGaWxl

base解码得到flag

图片

方法二:

流量一把梭

图片

最后flag为flag{227ad242fc8013c8fe8ff8f4679337e4}

啊吧啊吧的数据包

题目描述:

一打开数据包我就,啊吧啊吧啊吧。

下载附件

图片

过滤http

图片

http.request.method == POST

图片

导出特定分组,筛选c38流量文件

图片

查看文本手撕得到flag

最后flag为flag{3563bd1a59309e1a4e93b65152bfbba}

小刘的硬盘

题目描述:

小刘有一块硬盘误删了一些文件,你能帮帮他么?

下载附件,使用diskgenius挂载磁盘

图片

使用diskgenius恢复文件

图片

得到一个假flag,一个jpg图片,一个压缩包

jpg文件不存在隐写,考虑压缩包,导出压缩包,发现有密码

图片

旁边有提示:小刘喜欢用自己的名字+生日当密码

掩码爆破

图片

解压压缩包得到flag

图片

最后flag为flag{8ddeed0126f2523ae14a8a492528c9a0}

考古2.0

下载附件

内存取证(vol)

vol.py -f 考古 –profile=WinXPSP2x86 cmdline

图片

发现virus,搜索文件

vol.py -f 考古 –profile=WinXPSP2x86 filescan | grep virus

图片

提取文件

vol.py -f 考古 –profile=WinXPSP2x86 dumpfiles -Q 0x00000000064e7490 -D ./

图片

强制异或

图片

导出,搜索关键字flag

图片

最后flag为flag{w0rd_v1ru4_i5_v3ry_e45y}

Crypto

easyRSA

题目描述:

简单的RSA,你能做出来吗?

题目源码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from Crypto.Util.number import getPrime,bytes_to_long
from random import randint
from gmpy2 import *

m = bytes_to_long(b'flag{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}')

p=getPrime(1024)
q=getPrime(1024)
n = p*q
e = 65537
c = pow(m,e,n)
p_2=((p>>128)<<128)
Result = []
Divisor = []
for i in range(12):
Divisor.append(getPrime(128))
for i in range(12):
Result.append(p_2%Divisor[i])



print(c,n,Divisor,Result)
'''
output:
16054555662735670936425135698617301522625617352711974775378018085049483927967003651984471094732778961987450487617897728621852600854484345808663403696158512839904349191158022682563472901550087364635161575687912122526167493016086640630984613666435283288866353681947903590213628040144325577647998437848946344633931992937352271399463078785332327186730871953277243410407484552901470691555490488556712819559438892801124838585002715833795502134862884856111394708824371654105577036165303992624642434847390330091288622115829512503199938437184013818346991753782044986977442761410847328002370819763626424000475687615269970113178
23074300182218382842779838577755109134388231150042184365611196591882774842971145020868462509225850035185591216330538437377664511529214453059884932721754946462163672971091954096063580346591058058915705177143170741930264725419790244574761160599364476900422586525460981150535489695841064696962982002670256800489965431894477338710190086446895596651842542202922745215496409772520899845435760416159521297579623368414347408762466625792978844177386450506030983725234361868749543549687052221290158286459657697717436496769811720945731143244062649181615815707417418929020541958587698982776940334577355474770096580775243142909913
[205329935991133380974880368934928321273, 274334866497850560640212079966358515253, 264739757264805981824344553014559883169, 314495359937742744429284762852853819407, 197513216256198287285250395397676269263, 194633662721082002304170457215979299327, 320085578355926571635267449373645191637, 310701821184698431287158634968374845899, 198238777199475748910296932106553167589, 292201037703513010563101692415826269513, 332238634715339876614712914152080415649, 334257376383174624240445796871873866383]
[108968951841202413783269876008807200083, 29053101048844108651205043858001307413, 243503157837867321277650314313173163504, 160933173053376016589301282259056101279, 53063624128824890885455759542416407733, 34980025050049118752362228613379556692, 132553045879744579114934351230906284133, 160998336275894702559853722723725889989, 87211131829406574118795685545402094661, 36445723649693757315689763759472880579, 11133325919940126818459098315213891415, 1404668567372986395904813351317555162]
'''

中国剩余定理+coppersmith

先通过CRT求出p_2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from Crypto.Util.number import *
from gmpy2 import *
from functools import reduce

c=16054555662735670936425135698617301522625617352711974775378018085049483927967003651984471094732778961987450487617897728621852600854484345808663403696158512839904349191158022682563472901550087364635161575687912122526167493016086640630984613666435283288866353681947903590213628040144325577647998437848946344633931992937352271399463078785332327186730871953277243410407484552901470691555490488556712819559438892801124838585002715833795502134862884856111394708824371654105577036165303992624642434847390330091288622115829512503199938437184013818346991753782044986977442761410847328002370819763626424000475687615269970113178
n=23074300182218382842779838577755109134388231150042184365611196591882774842971145020868462509225850035185591216330538437377664511529214453059884932721754946462163672971091954096063580346591058058915705177143170741930264725419790244574761160599364476900422586525460981150535489695841064696962982002670256800489965431894477338710190086446895596651842542202922745215496409772520899845435760416159521297579623368414347408762466625792978844177386450506030983725234361868749543549687052221290158286459657697717436496769811720945731143244062649181615815707417418929020541958587698982776940334577355474770096580775243142909913
Divisor=[205329935991133380974880368934928321273, 274334866497850560640212079966358515253, 264739757264805981824344553014559883169, 314495359937742744429284762852853819407, 197513216256198287285250395397676269263, 194633662721082002304170457215979299327, 320085578355926571635267449373645191637, 310701821184698431287158634968374845899, 198238777199475748910296932106553167589, 292201037703513010563101692415826269513, 332238634715339876614712914152080415649, 334257376383174624240445796871873866383]
Result=[108968951841202413783269876008807200083, 29053101048844108651205043858001307413, 243503157837867321277650314313173163504, 160933173053376016589301282259056101279, 53063624128824890885455759542416407733, 34980025050049118752362228613379556692, 132553045879744579114934351230906284133, 160998336275894702559853722723725889989, 87211131829406574118795685545402094661, 36445723649693757315689763759472880579, 11133325919940126818459098315213891415, 1404668567372986395904813351317555162]

def basic_CRT(ai,mi):
assert reduce(gmpy2.gcd,mi) == 1
assert len(ai) == len(mi)
N = reduce(lambda x,y:x * y,mi)
ans = 0
for a,m in zip(ai,mi):
t = N // m
ans += a * t * gmpy2.invert(t,m)
return ans % N,N
result = basic_CRT(Result,Divisor)
print(result)

得到p_2

1
(mpz(157397749849472741302651922559110947585741898399548366071672772026799823577871183957882637829089669634665699886533302712057712796808672023827078956556745522749244570015492585747076324258912525658578733402979835176037760966294532155059241756382643278063578661030876735794467422919824463419065126688059515994112), 115343256339804438488541860602807499768350592243111732022419431132087583829952557330993478731619075521301706171847716910739807488266701790937805652553244788024534230754162298101105496772540567818850570512144853594488579606954797182360716688344137783051055690460297099575344944650143959946929880492674974780957995559861235099499367407389543136733028684627735422306472504011232051138891022767098404805311381687759832357323075065923241564165806258181141497530683119)

然后再梭个coppersmith

1
2
3
4
5
6
7
8
9
10
p_high=157397749849472741302651922559110947585741898399548366071672772026799823577871183957882637829089669634665699886533302712057712796808672023827078956556745522749244570015492585747076324258912525658578733402979835176037760966294532155059241756382643278063578661030876735794467422919824463419065126688059515994112

PR.<x> = PolynomialRing(Zmod(n))
f = x + p_high
roots = f.small_roots(X=2^128, beta=0.4)
if roots:
p = p_high+int(roots[0])
print("n="+str(n))
print("p="+str(p))
print("q="+str(n//p))
1
2
3
#n = 23074300182218382842779838577755109134388231150042184365611196591882774842971145020868462509225850035185591216330538437377664511529214453059884932721754946462163672971091954096063580346591058058915705177143170741930264725419790244574761160599364476900422586525460981150535489695841064696962982002670256800489965431894477338710190086446895596651842542202922745215496409772520899845435760416159521297579623368414347408762466625792978844177386450506030983725234361868749543549687052221290158286459657697717436496769811720945731143244062649181615815707417418929020541958587698982776940334577355474770096580775243142909913
#p = 157397749849472741302651922559110947585741898399548366071672772026799823577871183957882637829089669634665699886533302712057712796808672023827078956556745522749244570015492585747076324258912525658578733402979835176037760966294532155059241756382643278063578661030876735794708282102407491782299777228899079176117
#q = 146598666145389487374076474702380241089893944436923994466470555513748278755568038863819188404588602962888679358728628069490879689376996830110571995521814075973422513105805715524894550773219606972944401957227665252279176873209924236114228003156706532596699592716796867748104565680326123749660658940264843181589

最后正常解RSA

1
2
3
4
5
6
7
8
9
10
11
12
13
import gmpy2
from Crypto.Util.number import long_to_bytes
c=16054555662735670936425135698617301522625617352711974775378018085049483927967003651984471094732778961987450487617897728621852600854484345808663403696158512839904349191158022682563472901550087364635161575687912122526167493016086640630984613666435283288866353681947903590213628040144325577647998437848946344633931992937352271399463078785332327186730871953277243410407484552901470691555490488556712819559438892801124838585002715833795502134862884856111394708824371654105577036165303992624642434847390330091288622115829512503199938437184013818346991753782044986977442761410847328002370819763626424000475687615269970113178
n=23074300182218382842779838577755109134388231150042184365611196591882774842971145020868462509225850035185591216330538437377664511529214453059884932721754946462163672971091954096063580346591058058915705177143170741930264725419790244574761160599364476900422586525460981150535489695841064696962982002670256800489965431894477338710190086446895596651842542202922745215496409772520899845435760416159521297579623368414347408762466625792978844177386450506030983725234361868749543549687052221290158286459657697717436496769811720945731143244062649181615815707417418929020541958587698982776940334577355474770096580775243142909913
p=157397749849472741302651922559110947585741898399548366071672772026799823577871183957882637829089669634665699886533302712057712796808672023827078956556745522749244570015492585747076324258912525658578733402979835176037760966294532155059241756382643278063578661030876735794708282102407491782299777228899079176117
q=146598666145389487374076474702380241089893944436923994466470555513748278755568038863819188404588602962888679358728628069490879689376996830110571995521814075973422513105805715524894550773219606972944401957227665252279176873209924236114228003156706532596699592716796867748104565680326123749660658940264843181589
e=65537

phi = (p-1) * (q-1)
n = p * q
d = gmpy2.invert(e, phi)
m = pow(c, d, n)
print(long_to_bytes(m))

运行得到flag

图片

最后flag为flag{2233747d3bf06f070048e80300dac75f}

小试牛刀

题目描述:

一个很简单的密码学题目

题目

1
ipfm\x82Kj]p~l?\x82ogw\x85mt[K\x8br\x97

变异凯撒

exp:

1
2
3
4
5
6
7
8
from Crypto.Util.number import *
c=b'ipfm\x82Kj]p~l?\x82ogw\x85mt[K\x8br\x97'
a=3
flag=''
for i in c:
flag+=chr(i-a)
a+=1
print(flag)

运行得到flag

图片

最后flag为flag{CaSer_1s_VerY_E4sY}

Reverse

人生模拟

查壳

图片

ida64载入

图片

查看关键代码

图片

完整代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
unsigned __int64 __fastcall sub_40350F(int a1, int a2, int a3, int a4, int a5)
{
__int64 v5; // rbx
int *v6; // rdx
int v11; // [rsp+20h] [rbp-F0h]
int i; // [rsp+24h] [rbp-ECh]
__int64 v13; // [rsp+28h] [rbp-E8h]
int v14[8]; // [rsp+30h] [rbp-E0h]
int v15[42]; // [rsp+50h] [rbp-C0h] BYREF
unsigned __int64 v16; // [rsp+F8h] [rbp-18h]

v16 = __readfsqword(0x28u);
v13 = a1;
v11 = 0;
v14[0] = a2;
v14[1] = a3;
v14[2] = a4;
v14[3] = a5;
while ( v11 <= 3 )
{
v5 = v13 * v14[v11];
v13 = v5 / (int)sub_4034E1((unsigned int)v13, (unsigned int)v14[v11++]);
}
if ( a2 > 0 && a3 > 0 && a4 > 0 && a5 > 0 && a1 == 60 && v13 == 286395540 )
{
v6 = v15;
memset(v15, 0, 0xA0uLL);
v15[0] = 432;
v15[1] = 408;
v15[2] = 429;
v15[3] = 438;
v15[4] = 452;
v15[5] = 246;
v15[6] = 243;
v15[7] = 417;
v15[8] = 423;
v15[9] = 444;
v15[10] = 236;
v15[11] = 231;
v15[12] = 203;
v15[13] = 447;
v15[14] = 207;
v15[15] = 435;
v15[16] = 253;
v15[17] = 224;
v15[18] = 204;
v15[19] = 443;
v15[20] = 419;
v15[21] = 248;
v15[22] = 442;
v15[23] = 241;
v15[24] = 203;
v15[25] = 251;
v15[26] = 445;
v15[27] = 239;
v15[28] = 441;
v15[29] = 254;
v15[30] = 444;
v15[31] = 246;
v15[32] = 203;
v15[33] = 245;
v15[34] = 255;
v15[35] = 445;
v15[36] = 248;
v15[37] = 478;
for ( i = 0; v15[i]; ++i )
std::operator<<<std::char_traits<char>>(&std::cout, (unsigned int)(char)((v15[i] >> 2) ^ 0xA), v6);
}
return __readfsqword(0x28u) ^ v16;
}

跟着这个加密代码写出解密脚本:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
v15=[0]*38
v15[0] = 432;
v15[1] = 408;
v15[2] = 429;
v15[3] = 438;
v15[4] = 452;
v15[5] = 246;
v15[6] = 243;
v15[7] = 417;
v15[8] = 423;
v15[9] = 444;
v15[10] = 240;
v15[11] = 231;
v15[12] = 203;
v15[13] = 447;
v15[14] = 207;
v15[15] = 435;
v15[16] = 253;
v15[17] = 224;
v15[18] = 204;
v15[19] = 443;
v15[20] = 419;
v15[21] = 248;
v15[22] = 442;
v15[23] = 241;
v15[24] = 203;
v15[25] = 251;
v15[26] = 445;
v15[27] = 239;
v15[28] = 441;
v15[29] = 254;
v15[30] = 417;
v15[31] = 246;
v15[32] = 203;
v15[33] = 245;
v15[34] = 255;
v15[35] = 445;
v15[36] = 248;
v15[37] = 478;
for i in range(len(v15)):
print(chr((v15[i]>>2)^0xa),end='')

运行得到flag

图片