We got an RSA public key (pub.key) encoded in PEM format and the encrypted flag (flag.enc).
These are the converted parameters:
The public exponent is too large thus we can suspect that the private exponent is possible too small.
I tried to attack it with Wiener’s attack: https://en.wikipedia.org/wiki/Wiener%27s_attack with the following implementation, but it did not worked: https://github.com/pablocelayes/rsa-wiener-attack
So I remembered other RSA attacks from previous CTFs and how much time this page helped me: https://github.com/mimoo/RSA-and-LLL-attacks
The last attack is the Boneh Durfee attack, which is you know BO-neh DU-rfee => BODU just like the challenge’s name, so I instantly know this will solve the challenge (also a lot of other teams are already solved it, so it should be not too hard challenge either).
Running budo.sage will give us the private exponent (d):
The executing pow(c,d,N) in python give us the following plaintext: