当前位置:   article > 正文

一些无用功_0x596

0x596

(有后续了)

small weiner

来源:dvCTF

Someone I hate sent me an insulting message using RSA. Can you retrieve his private key?

m = 0x596f7520686176652073756368206120736d616c6c207765696e65722e2049204841544520594f5521212121
N = 0x26553fbb7e4bd5bd48868a25f24d9cc5975aa8597f82110058e687dfa10dd0114c0d2011fa288dbd9d01c0a70dfa8212d5a218d513bdd8ebed9f75bc299e1461be8a23ed8ade96bc449d409fbbf5a328ee2ad3257e6c55a97641258730f74f4d3938f0df794546791ba2b1518b8d855e83f65f885d67aa000a01687ac605404e7bca681e51e6e195f77eb4785fcda0372e3d0fd90240f736243584677f89da4c6ab54d687897d5afb0801cc151c516b072aaa2d9aa8d39d34c230536cba077beaa88ff8e8940a5ba990cafd0b1326f209873a43a785d0c5477241fb6469b8c27c7d54908467a7525de18b2425901c0de3ed63472831c29818ce6efb0354c61f36b2e61146472e99209d198bc885ced0edb66eab62a968c9b98b49b756c689d69820ca1d97e1232c338084097078265ce79b25c1e37bc777247af3fee2ce7a87a697a120c0428327177cf6e934aa2d18e696474227d361a5c36992788c3b1aa8654b88852e897027d58b21576b25a5ffdcb9fbdc5167eb74f1c9082ae79ca0b89
e = 0xfc2e4d12eb69a42c074d9a0ddc6b84294f1e23d6eaa0ba53e9cb60ec0db203d31bdfb90eaca38189890ad26335ad6107cd234a415bfc73fc1bbd6c5d9da65249eebb57d889f91719cfdbd535ab19d2d317ffdf075870a62c6e05aac16c9b122e1c52d7dbeb2fb683514d0f463b58a4217f2e379e5a62be06e764e043a0eac5ac6af56816af926bcc4cd826ee1cfd4157496dc024042676503cec93de45c3c5e4dd9dcf85406a3cf93a9f784b9eef6e320cd9856aefff48df52127b98da8a0d207f588ce1c58e47419554590b1fa7fa3c38034f93a3a5112b6dd5e78c181abc2d972fbcb058575789c68c03f043bd4bf48d94fa7390c77f9fc033f3f01a5162d31056eb42a07397f3485b25396f93558466fc49ef80adea1e9d6c3d9edf529be5faf014669ae5f8e02433a2474d9c92fcc468d81aa0fd641a5647d55153713783a9e5d66fe70c9c2794325b28f20b751fb49359c4a8487bbfa7efc6270b7fa0ffe277276bba14027596d129fcbdef0a82aba24855bfd2155071b52c11da2d943
  • 1
  • 2
  • 3

Flag format: dvCTF{d} with d in decimal (base 10)

之前做过一道已知c、m、n,求e的题

e=discrete_log(Mod(c,n),Mod(m,n))
  • 1

所以这道应该

c = pow(m,e,N)
#c=803966748369093233867528670117833695673019045146866931674002529382581720466964038191118280233118778917693162909504749272637492591195155393830971306115662080454967101948208729181122662448033376455217412810428221150860739111744891956071056258413939565797976786982177166776259145668693871636782829074007793365982929885590007721015679407919307454597278784981674195161328092740619373294281239315918017584677709790325315202460959006049647790786848526319418345336115633228348623643747179118075155352279546884736186472718395207758873686387097911945774041633369812537580494436666655940958749843252996591801802720436045000085843967300119690956070340746966169967868549762159240374136639389419083565794256399400183300129021073200138882121476590630811020518868942385684725157562159316602749982901807520325564058116507232844541416904622352664641645136812679754528456915712750341861801262302690574858787275654591520414601305664500910787777
d = discrete_log(Mod(m,N),Mod(c,N))
  • 1
  • 2
  • 3

但是好像没有运行出来哎~

Secure Or Not Secure

I made secure application but i lost my cookie and now I can't connect. Can you help me?

nc challs.dvc.tf 2600
  • 1
  • 2
  • 3

nc进入

------ Welcome to my secure login system ------
1. Login
2. Register
3. Exit
-----------------------------------------------
>>> 2
Username: re
Password: re
Here is your cookie: wr2TBvKa+oU0HY7emHvxwwgozYdLN6f1q76CQ5o+ahBzZv0Qf9p2645P90f+TqW566M5wYbOeg==
------ Welcome to my secure login system ------
1. Login
2. Register
3. Exit
-----------------------------------------------
>>> 1
Cookie: wr2TBvKa+oU0HY7emHvxwwgozYdLN6f1q76CQ5o+ahBzZv0Qf9p2645P90f+TqW566M5wYbOeg==
You're not the admin! The cookie b'username=re\x00\x00\x00\x00\x00\x00;admin=False;password=re\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' is invalid!
------ Welcome to my secure login system ------
1. Login
2. Register
3. Exit
-----------------------------------------------
>>> 2
Username: a
Password: a
Here is your cookie: wr2TBvKa+oU0DuvemHvxwwgozYdLN6f1q76CQ5o+ahBzZv0Qf9p2+OtP90f+TqW566M5wYbOeg==
------ Welcome to my secure login system ------
1. Login
2. Register
3. Exit
-----------------------------------------------
>>> 1
Cookie: \xc2\xbd\x93\x06\xf2\x9a\xfa\x854\x0e\xeb\xde\x98{\xf1\xc3\x08(\xcd\x87K7\xa7\xf5\xab\xbe\x82C\x9a>j\x10sf\xfd\x10\x7f\xdav\xf8\xebO\xf7G\xfeN\xa5\xb9\xeb\xa39\xc1\x86\xcez
Are you trying to cheat?!
------ Welcome to my secure login system ------
1. Login
2. Register
3. Exit
-----------------------------------------------
>>> 3
  • 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

wr2TBvKa+oU0DuvemHvxwwgozYdLN6f1q76CQ5o+ahBzZv0Qf9p2+OtP90f+TqW566M5wYbOeg==显示解码失败
在这里插入图片描述

用python解还显示不对
在这里插入图片描述
那还能怎样

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/238091
推荐阅读
相关标签