You can control the time!

Time in your hands Challenge

mucomplex
1 min readJun 28, 2021

You found login source code of the bank on the dark web.You test the administrator password on bank site, but it already changes.How can you exploit this system?

Questions.

  1. What is the problem of this code?
  2. What kind of attack is used?
  3. how you retrieve real password and know its length?

1.Show your PoC.

2.Deploy the script using socat/ncat and assume it from target server.As an outsider, you need to exploit this.”make sure you put random password with length 11 to emulate the exploit without putting directly the password”

Leak source code below.

import sys
import time

password='timeisyours' #password already changes
if(len(sys.argv) < 2):
print('python3 vulnerable.py password')
exit()

pass_input = sys.argv[1]

if((len(pass_input) <= 10) or (len(pass_input)>len(password))):
print('Wrong password')
exit()

if(len(pass_input) > 10):
counter = 0
for i in range(11):
if(password[i] == pass_input[i]):
counter +=1
time.sleep(0.001)
else:
break

if(counter == len(password)):
print('Successfully login!')
else:
print('Wrong password')
time.sleep(0.001)

--

--