blog

htb xmas ctf 2021

My first CTF! This was after my friend introduced to me the amazing world of CTFs and invited me to join several HTB CTFs. Honestly, I was (and am) quite noob, so I didn’t solve much but I was glad to have solved my first RSA challenge!!!


Common Mistake (Crypto)

This is my first successful legit attack :) It is one of the common RSA attacks called common modulus.

  • condition needed: with one n, two distinct e and two ct ⇒ common modulus attack
  • Reading

Steps

  • convert n, e, ct to decimal since operations may not work in hexadecimal
  • using the code above, find M
  • it gave recursion depth error, hence increasing the limit of recursion (import sys)
  • converted to hex
  • convert back (cyberchef) to get the flag

RSA Common modulus attack condition:
1) gcd(e1, e2) = 1
2) gcd(C₂, n)=1


APT (Forensics)

Steps

Wireshark

  1. opened on Wireshark and read that HTTP is the most common way

  2. scroll through and second last row is where the attacker made the last request to the server

  3. suspicious file name

  4. using cyber chef to convert from base 64