Advertisement
Guest User

Untitled

a guest
Oct 7th, 2019
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.57 KB | None | 0 0
  1. Simple crypto
  2. 1. ARKLN{EekwcxiXxgprwbwlMsariMmzorcklKaxzej}
  3. 2. Go to https://www.dcode.fr/vigenere-cipher
  4. 3. type the encrypted message and known key (thisisasecretkey)
  5. 4. HKCTF{MessageEncryptedUsingVigenereCipher}
  6.  
  7.  
  8. Simple Crypto 2
  9. 1. wzr%uL>6DD28606?4CJAE650FD:?80C@EcfN
  10. 2. noticed that wzr%uL maps to HKCTF (shifted 47bit)
  11. 3. Go to https://www.dcode.fr/rot-47-cipher and decrypt
  12. 4. HKCTF{message_encrypted_using_rot47}
  13.  
  14. Encrypted message
  15. 1. Go https://www.guballa.de/vigenere-solver
  16. 2. result is I can't beliele this is such an uasy problem in HACTF. It's almost ai if I solved a prorlem already! Okao. Here's the flag: HACTF{substitutien_ciphers_are_toe_easy_cipher_to_selve}
  17. 3. manually change the error bit
  18. 4. HKCTF{substitution_ciphers_are_too_easy_cipher_to_solve}
  19.  
  20. RSA 1
  21. c: 1267512865767235284579628962679981517661651162006242932307504395229069157817213250932198187
  22. n: 1441341319160614646189772775947458689224268167522603816085381857689639120119532883988453931
  23. e: 65537
  24.  
  25. 1a. go to http://factordb.com and check found that it is not factorized (now is available because i reported the factor)
  26. 1b. go to https://www.alpertron.com.ar/ECM.HTM and wait for the factorization
  27. 2. Get 1441341319160614646189772775947458689224268167522603816085381857689639120119532883988453931 <91> = 1334556412516773775580925026039868529270309<43> · 1080015281214272920245486385411085443503979257359<49>
  28.  
  29. 3a. find d, the private key:
  30. 3b. Go to https://www.cryptool.org/en/cto-highlights/rsa-step-by-step
  31. 3c. Enter p,q and e. Get d=
  32. 1114748423704076698222698821954755917736704851677922639992477593197483107298411669566550537
  33. 4. decrypt the cipher
  34. m= c^d mod n
  35. m= 498954823561354940679082867578948974184995796436288108951260273636356989
  36.  
  37. change m to hex, then hex to ascii
  38.  
  39. using https://www.rapidtables.com/convert/number/decimal-to-hex.html?x=16 & https://www.rapidtables.com/convert/number/hex-to-ascii.html
  40.  
  41. hex(m)= 484B4354467B7273405F6372797074305F7573335F31303830313139337D
  42. ascii(hex(m))= HKCTF{rs@_crypt0_us3_10801193}
  43.  
  44. RSA 2:
  45. n:123011419727242929605859484379712787224119427868122185028414426038747211967728126687082223191959583800124030930442533997557997625495312608148837196827665382944411142837816321635710707548473070155845149369804586838545770200114861944189730393681376431146673015470955622822572616394605670811484761576817673309001
  46.  
  47. c:52127047932811110668013864133349571790867805534855543297048613670965313472772560575182413718393507843165300390227330555558736664829280206143700900677133430280286900207970264306716622456672164011284966405111997950821662174402552515880677459669874493401227056820044471828999856535032257525489909965248714298022
  48.  
  49. e:20370827750732677953101194500404700852089173301382884082478321647291201786559551992537091540692087873762090234342322985115231826746732803397154738501467143140654322623572067396058860233911575260540468106570172920030157403146163826401598627492164762337650828047117823273414399019740348998847585859920303350373
  50.  
  51. 1. Get Rsactftool
  52. 2. ./RsaCtfTool.py --createpub -n 123011419727242929605859484379712787224119427868122185028414426038747211967728126687082223191959583800124030930442533997557997625495312608148837196827665382944411142837816321635710707548473070155845149369804586838545770200114861944189730393681376431146673015470955622822572616394605670811484761576817673309001 -e 20370827750732677953101194500404700852089173301382884082478321647291201786559551992537091540692087873762090234342322985115231826746732803397154738501467143140654322623572067396058860233911575260540468106570172920030157403146163826401598627492164762337650828047117823273414399019740348998847585859920303350373 > key.pub
  53. 3. ./RsaCtfTool.py --publickey key.pub --private > key.priv
  54. 4. c=52127047932811110668013864133349571790867805534855543297048613670965313472772560575182413718393507843165300390227330555558736664829280206143700900677133430280286900207970264306716622456672164011284966405111997950821662174402552515880677459669874493401227056820044471828999856535032257525489909965248714298022
  55. echo "obase=16; $c" | BC_LINE_LENGTH=0 bc | awk '{ print (length($0) % 2 == 0) ? $0 : 0$0; }' | xxd -p -r > c.bin
  56. xxd c.bin
  57. 5.
  58. ./RsaCtfTool.py --publickey key.pub --private --uncipherfile c.bin
  59.  
  60. 6. See https://imgur.com/a/HEllo6T
  61. The flag is HKCTF{w@tch_y0ur_rs@_c@r3fully_87027243203}
  62.  
  63. Buffer overflow
  64. 1. ./vuln aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  65. 2. HKCTF{S1mpl13_Buff3r_0v3rfl0w_016dc68c}
  66.  
  67. Admin Access
  68. 1. use ac:user & pw: 1234 to login
  69. 2. get auth cookie and put into base64 decode
  70. 3. See https://imgur.com/64cEvKp
  71. 4. Change admin = FALSE7 to admin = True
  72. 5. encode base64 and edit the cookie
  73. 6. (due to the site http://47.56.165.70:32954/login.php is not accessible after ctf ended, flag not retrieved)
  74.  
  75. Good Image
  76. 1. Download the file and open it with notepad++
  77. 2. Search for HKCTF
  78. 3. HKCTF{Open2019_b07209aJ}
  79.  
  80. Simple Forensics
  81. 1. Download the file and open it with notepad++
  82. 2. Search for HKCTF
  83. 3. HKCTF{grep_and_you_will_find_me}
  84.  
  85. Simple Forensics 2
  86. 1. Download the file and open it with notepad++
  87. 2. Search for HKCTF
  88. 3. HKCTF{sTrIngS_sAVeS_Time_4c987dcwxq}
  89. 4. sorry i know the proper way should be[ strings file | grep HKCTF ]
  90.  
  91. Welcome
  92. 1. open the image
  93. 2. HKCTF{Welcome}
  94.  
  95. Welcome again
  96. 1. 484b4354467b57656c636f6d65215f3235363037617d
  97. 2. hex to ascii (https://www.rapidtables.com/convert/number/hex-to-ascii.html)
  98. 3. HKCTF{Welcome!_25607a}
  99.  
  100. Connect
  101. 1. nc 47.56.165.70 22222
  102. 2. (due to the site 47.56.165.70:22222 is not accessible after ctf ended, flag not retrieved)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement