Skip to content

w33d-ctf/2nd-lsb-oracle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2nd-lsb-oracle

2nd-lsb-oracle for NTNU 2022 info sec class HW

hint

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.

objective

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.

flag format

NTNU{some ascii characters}

how to use

  1. 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 be pip according to your installation)
  1. 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())
  2. 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
    

issue & problem in use

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 40747039s@gapps.ntnu.edu.tw

About

2nd-lsb-oracle for NTNU 2022 info sec class HW

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published