2nd-lsb-oracle for NTNU 2022 info sec class HW
let message be seperated into its lsb() and other parts().
for convenience, we will use as a representation for bits concatenation. in other words,
the situation of oracle with as input can be separate in two case. you can observe some interesting characteristic along with bit string of N while analyzing oracle return result.
you have to decrypt the ciphertext generated by the server and obtain the flag for the score. all your steps and scripts shall be recorded and documented in the report, otherwise you will get zero points as result.
NTNU{some ascii characters
}
- please install python3 and pwntools in your local computer
- for linux & OSX user, please refer the official installation guide
- for windows user, please directly use
pip3 install pwntools
(pip3
may bepip
according to your installation)
- please modify the server ip specify in
client.py
import pwn proc = pwn.remote('127.0.0.1', 7000) # modify me while True: print(proc.recv().decode()) inp = input().encode() proc.send(inp) if inp.strip() == b"2": proc.send(input().encode())
- run
python3 client.py
and see if there is a prompt like the following$ python3 client.py [+] Opening connection to 127.0.0.1 on port 7000: Done welcome to NTNU orcale service please input your action 1) get service source code 2) get leastest 2nd bit from input ciphertext 3) get ciphertext & public key 4) donate asef18766
if you have any problem in using client, please open issue in github page. otherwise, i will ignore all your requests.
in the case of server shutdown or passing local verification but not retrieving flag on remote server, please contact me at [email protected]