PlaidCTF 2015: Curious

This challenge was a bit different from Strength in the sense that the moduli of the intercepted ciphertexts were different. There is an attack called Wiener’s attack which is based on the following theorem:

Wiener’s theorem
Let $N = pq$ with $q and $d < \frac{1}{3} N^{\frac{1}{4}}$. Given  $N$ and $e$ with $ed = 1 (\bmod \phi (N))$, the attacker can efficiently recover $d$.

So by running the attack on all the instances, we hope that at least one satisfies the constraints in Wiener's theorem. After running implementation here on a few of the instances, we find the exponent

$e = \texttt{23974584842546960047080386914966001070087596246662608796022581200084145416583}$

and can recover

$\texttt{0x666c61675f53305930554b4e30575731334e33522434545434434b21},$

which translates to ‘ flag_S0Y0UKN0WW13N3R\$4TT4CK!’
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 9, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9270500540733337, "perplexity": 2450.688003822069}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-04/segments/1610703527224.75/warc/CC-MAIN-20210121163356-20210121193356-00347.warc.gz"}