Official Rhome Discussion

Official discussion thread for Rhome. Please do not post any spoilers or big hints.

Should we solve this mathematically?

Is port 22 used to move forward at one point? I dont know, if this question is a spoiler :smiley: but please correct me if it is

Could someone please give me a hint? I now have a more comprehensive understanding of the Diffie-Hellman algorithm than I ever wanted to, including knowledge of what a safe prime is and how it relates to the security of the encrypted text. However, I am still unable to progress any further.

2 Likes

you don’t need ssh just nc $IP $PORT

you can DM

1 Like

i did am waiting for your response

I thought i found how to solve it but my code isnt working. I keep generating a key that decrypts into garbage values. Is anyone willing to give me some pointers?

hi everyone, As private keys a and b are totally independent from any other parameter - at least I don’t see any relations. I have p,q,r and even h but I don’t see how to relate these to a or b. Any hint welcome…Thanks!

Hi there,

is there someone I can DM?
I’ve got a couple of approaches, all leading into nothing (but I don’t want to post here any spoilers)… And now I really don’t have any idea how to proceed.

Hello there,

When I try to set up the server locally, i keep getting an error when trying to get the encrypted flag (option “3” of the server), can someone help me with it ? ( I don’t know if it’s really part of the challenge …)

┌──(kali㉿kali)-[~/HTB/crypto_rhome]
└─$ python3 server.py

Choose as you please

1. Get parameters
2. Reset parameters!! This can take some time
3. Get Flag

> 3
Traceback (most recent call last):
  File "/home/kali/HTB/crypto_rhome/server.py", line 73, in <module>
    main()
  File "/home/kali/HTB/crypto_rhome/server.py", line 66, in main
    print(dh.encrypt(FLAG))
          ^^^^^^^^^^^^^^^^
  File "/home/kali/HTB/crypto_rhome/server.py", line 39, in encrypt
    ct = cipher.encrypt(pad(flag_part, 16)).hex()
                        ^^^^^^^^^^^^^^^^^^
  File "/home/kali/.local/lib/python3.11/site-packages/Crypto/Util/Padding.py", line 64, in pad
    return data_to_pad + padding
           ~~~~~~~~~~~~^~~~~~~~~
TypeError: can only concatenate str (not "bytes") to str

(tried several versions of pycryptodome but none of them seem to work …)

Thanks for your response !

Hi thimpui,

both data_to_pad and padding need to be of type string. I guess your input is of type byte and not string.

Kind regards
wiizarrrd

Hi,
thanks for your response!

My probleme is that i did not modify/added the downloaded script of the challenge. When i choose option “3”, it gives me an error (the str/bytes error). Maybe the script is meant to run with an old version of libs, and with more recent ones, the use of padding functions have changed and so gives an error …

And so at this point, i’m a bit stuck because i can’t run the full script locally (the option “3” is bugged on my machine)

the script (server.py) import file secret.py and gets flag from there which does not exists
You need to create secret.py note that variable FLAG must be bytes

your file should be like

secret.py

FLAG=b"HTB{TESTING}"