![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
攻防世界-crypto
无名函数
整装洒扫,迎接新的一天
展开
-
2022-02-09
[第七章 CTF之CRYPTO章]N1DES# -*- coding: utf-8 -*-import hashlib,base64def f(a,b): digest = hashlib.sha256(a + b).digest() return digest[:8]def str_xor(a,b): return ''.join( chr(ord(a[i]) ^ ord(b[i])) for i in range(len(a)))def round_add(a, b原创 2022-02-09 23:02:06 · 7534 阅读 · 3 评论 -
2022-01-07
Java逆向解密程序员小张不小心弄丢了加密文件用的秘钥,已知还好小张曾经编写了一个秘钥验证算法,聪明的你能帮小张找到秘钥吗? 注意:得到的 flag 请包上 flag{} 提交解压就得到一个.class文件,用Eclipse还打不开搜了一下java反编译工具,jd-gui要下载,直接用的在线反编译网站:https://jdec.app/得到/* Decompiler 33ms, total 22066ms, lines 39 */import java.util.ArrayList;impo原创 2022-01-17 10:39:47 · 340 阅读 · 0 评论 -
2022-01-12
消失的岛屿题目来源: 2019_看雪CTF_晋级赛Q2题目描述:flag{xxxxxxxxxxxx} 本题考查了修改过编码table的base64算法,重点在于单个字符的变换强度。真实的编码table从头到尾不会在内存中显示。所以攻击者需要先将断点设置在charEncrypt处,找出编码的变换规则,然后找到修改过后的编码table,根据变换规则推导出真正的编码table。附件是一个,额,exe看来是和re结合的题用IDA32位打开,F5进入主程序base64_encodeint __cde原创 2022-01-12 22:28:14 · 261 阅读 · 0 评论 -
2021-12-30
xor_gameciMbOQxffx0GHQtSBB0QSQIORihXVQAUOUkHNgQLVAQcAVMAAAMCASFEGQYcVS8BNh8BGAoHFlMAABwCTSVQC2UdMQx5FkkGEQQAAVMAAQtHRCNLF0NSORscMkkaHABSExIYBQseUmBCFgtSKwEWfwELFRcGbzwEDABHVS8DDAcXfwUcMQwCDUUBCgYYSQEBATNKGwQeOkkbPhsYERYGDB0TYzwCUSVCDE8dKh0BNg4GAAkLSVMWHBp原创 2021-12-30 21:30:55 · 187 阅读 · 0 评论 -
2021-12-29
[watevrCTF 2019]Baby RLWEfrom sage.stats.distributions.discrete_gaussian_polynomial import DiscreteGaussianDistributionPolynomialSampler as d_gaussflag = bytearray(raw_input())flag = list(flag)n = len(flag)q = 40961## Finite Field of size q. F =原创 2021-12-29 22:43:59 · 235 阅读 · 0 评论 -
rsa-buffet
rsa-buffetboston-key-party-2017encrypt.pyimport randomfrom Crypto.Cipher import AES,PKCS1_OAEPfrom Crypto.PublicKey import RSAdef get_rand_bytes(length): return "".join([chr(random.randrange(256)) for i in range(length)])def encrypt(public_key,原创 2021-11-01 22:01:26 · 317 阅读 · 0 评论 -
2021-11-01
RSA#!/usr/bin/env python3import gmpy2from Crypto.Util.number import getPrimefrom Crypto.PublicKey import RSAfrom Crypto.Cipher import PKCS1_v1_5from base64 import b64encodeflag = open('flag', 'r').read().strip() * 23def encrypt(p, q, e, msg):原创 2021-11-01 19:50:06 · 3094 阅读 · 0 评论 -
2021-09-27
shanghai题目描述:维吉利亚密码bju lcogx fisep vjf pyztj sdgh 13 gifc qsxw. pkiowxcglv jqtio ekpy-hfgcouibkh qijgzkfoqur bj r twnovtvlnfvxqe sdxnie arw nqhhcregiu fg nujv hegxzwbc qgjkvgm rvwwdy 1467 ith hwvh i ouoir gvtyiz fynk zs fazxkj rzbcirr tmxjum irtuesibu.原创 2021-09-27 17:06:32 · 1195 阅读 · 0 评论 -
2021-09-26
工业协议分析1工业网络中存在异常,尝试通过分析PCAP流量包,分析出流量数据中的异常点,并拿到FLAG。flag形式为 flag{}找到最长的一条发现data = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdAAAABiCAYAAADgKILKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAABzXSURBVHhe7Z2Js11Fncfn75maqZma原创 2021-09-26 22:49:24 · 2131 阅读 · 0 评论 -
2021-09-24
fanfieMZYVMIWLGBL7CIJOGJQVOA3IN5BLYC3NHI就给了一串字符,不是十六进制,base没解出来参考https://www.cnblogs.com/coming1890/p/13509875.html很多时候比赛的名称是解密的谜面,对字符串BITSCTF进行base32编码得字符串IJEVIU2DKRDA====,与文本中的字符串MZYVMIWLGBL7CIJOGJQVOA3IN5BLYC3NHI进行对比,发现字符I两次对应M,猜测是移位密码或仿射密码,加密运算的有限原创 2021-09-24 22:20:15 · 277 阅读 · 0 评论 -
2021-09-22
ecb,_it’s_easy_as_123Somebody leaked a still from the upcoming Happy Feet Three movie,which will be released in 4K, but Warner Bros. was smart enoughto encrypt it. But those idiots used a black and white bmp format,and that wasn’t their biggest mistak原创 2021-09-22 21:58:10 · 811 阅读 · 0 评论 -
2021-09-21
safer-than-rot13XMVZGC RGC AMG RVMG HGFGMQYCD VT VWM BYNO, NSVWDS NSGO RAO XG UWFN AF HACDGMVWF. AIRVFN AII AMG JVRRVC-XVMC, FYRBIG TVIZ ESV SAH CGQGM XGGC RVMG NSAC A RYIG TMVR NSG SVWFG ESGMG NSGO EGMG XVMC WCNYI NSG HAO FVRG IVMH JARG MVWCH NV NAZG原创 2021-09-21 23:13:25 · 1062 阅读 · 0 评论 -
2021-09-20
streamgame2from flag import flagassert flag.startswith("flag{")assert flag.endswith("}")assert len(flag)==27def lfsr(R,mask): output = (R << 1) & 0xffffff i=(R&mask)&0xffffff lastbit=0 while i!=0: lastbit^=(i原创 2021-09-20 18:07:59 · 200 阅读 · 0 评论 -
2021-09-19
best_rsacipher1e臅/a`?%?爱A9q掱Z懟XNZ狺<??蚣倳鬶酻SK蠊檍悔?ZU?ヽ徊\笊x瞏衷RX挝xWX纣呍獅哞R岳鎴記砶镎撱?咘i?儔[刯d?g倔/鳩g辷笖k[KLVK腞Q 績憾x??Lh轡櫱!+顱乩OV7?`冻2z袨τWd?胴g幧攃藏埭.罆鄕姸%苜??R;鏆*?ss?@F惹v]rt?X餫巍鴽﹖:cipher26^k隠紶!熄r洴躒 鲋ワ?#藄?"<m癥通?V?0?JM*>8`O?`原创 2021-09-19 20:18:49 · 136 阅读 · 0 评论 -
2021-09-18
OldDriver有个年轻人得到了一份密文,身为老司机的你能帮他看看么?[{"c": 7366067574741171461722065133242916080495505913663250330082747465383676893970411476550748394841437418105312353971095003424322679616940371123028982189502042, "e": 10, "n": 25162507052339714421839688873734596177751原创 2021-09-18 23:10:15 · 57 阅读 · 0 评论 -
2021-09-15
banana-princess题目给了一个pdf文档,却不能打开,换后缀名txt打开如果是pdf文件,开头应该是pdf,但是这个开头是CQS,所以推测发生了移位从C到P,从Q到D,从S到F,都是移动了13位,也就是ROT13写个代码解密import stringdef rot(c, n): if c.isupper(): start = ord('A') elif c.islower(): start = ord('a') else:原创 2021-09-15 18:54:42 · 159 阅读 · 0 评论 -
2021-09-14
你猜猜题目我们刚刚拦截了,敌军的文件传输获取一份机密文件,请君速速破解。504B03040A0001080000626D0A49F4B5091F1E0000001200000008000000666C61672E7478746C9F170D35D0A45826A03E161FB96870EDDFC7C89A11862F9199B4CD78E7504B01023F000A0001080000626D0A49F4B5091F1E000000120000000800240000000000000020000原创 2021-09-14 14:48:11 · 477 阅读 · 0 评论 -
2021-09-13
flag in your hand题目打开看到function hm(s) { return rh(rstr(str2rstr_utf8(s)));}function bm(s){ //return rb(rstr(str2rstr_utf8(s))); return rb(rstr(s)) }function rstr(s) { return binl2rstr(binl(rstr2binl(s), s.length * 8));}function checkT原创 2021-09-13 23:10:23 · 337 阅读 · 0 评论